Top Level Namespace
Defined Under Namespace
Modules: Decidim
Classes: AnotherDummyAuthorizationHandler, BudgetsWorkflowRandom, DummyAuthorizationHandler
Instance Method Summary
collapse
Instance Method Details
#cmd_capture(path, cmd, env: {}) ⇒ Object
974
975
976
977
978
|
# File 'lib/decidim/generators/test/generator_examples.rb', line 974
def cmd_capture(path, cmd, env: {})
Bundler.with_unbundled_env do
Decidim::GemManager.new(path).capture(cmd, env:, with_stderr: false)[0]
end
end
|
#initializer_config_for(path, env, mod = "Decidim") ⇒ Object
962
963
964
|
# File 'lib/decidim/generators/test/generator_examples.rb', line 962
def initializer_config_for(path, env, mod = "Decidim")
JSON.parse cmd_capture(path, "bin/rails runner 'puts #{mod}.config.to_json'", env:)
end
|
#json_secrets_for(path, env) ⇒ Object
958
959
960
|
# File 'lib/decidim/generators/test/generator_examples.rb', line 958
def json_secrets_for(path, env)
JSON.parse cmd_capture(path, "bin/rails runner 'puts Rails.application.secrets.to_json'", env:)
end
|
#rails_value(value, path, env) ⇒ Object
966
967
968
|
# File 'lib/decidim/generators/test/generator_examples.rb', line 966
def rails_value(value, path, env)
JSON.parse cmd_capture(path, "bin/rails runner 'puts #{value}.to_json'", env:)
end
|
#repo_root ⇒ Object
970
971
972
|
# File 'lib/decidim/generators/test/generator_examples.rb', line 970
def repo_root
File.expand_path(File.join("..", "..", "..", "..", ".."), __dir__)
end
|