Top Level Namespace
Defined Under Namespace
Modules: Decidim
Classes: AnotherDummyAuthorizationHandler, BudgetsWorkflowRandom, DummyAuthorizationHandler, DummySignatureHandler, DummySmsMobilePhoneValidator, EphemeralDummyAuthorizationHandler
Instance Method Summary
collapse
Instance Method Details
#cmd_capture(path, cmd, env: {}) ⇒ Object
887
888
889
890
891
|
# File 'lib/decidim/generators/test/generator_examples.rb', line 887
def cmd_capture(path, cmd, env: {})
Bundler.with_unbundled_env do
Decidim::GemManager.new(path).capture(cmd, env:, with_stderr: false)[0]
end
end
|
#rails_value(value, path, env) ⇒ Object
879
880
881
|
# File 'lib/decidim/generators/test/generator_examples.rb', line 879
def rails_value(value, path, env)
JSON.parse cmd_capture(path, "bin/rails runner 'puts #{value}.to_json'", env:)
end
|
#repo_root ⇒ Object
883
884
885
|
# File 'lib/decidim/generators/test/generator_examples.rb', line 883
def repo_root
File.expand_path(File.join("..", "..", "..", "..", ".."), __dir__)
end
|