diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-11-12 14:41:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-12 14:41:42 +0100 |
commit | 99f4d6e744285a1a634e6ba46cd500560573985c (patch) | |
tree | e2a0ae999e420615d94dbf5673710489bc6f2938 /railties | |
parent | a34a0cccfa1aa436d8f4b7df402fc8035fc22397 (diff) | |
parent | d1eb0ef88bfded6d797203e09c71d74bd651e09b (diff) | |
download | rails-99f4d6e744285a1a634e6ba46cd500560573985c.tar.gz rails-99f4d6e744285a1a634e6ba46cd500560573985c.tar.bz2 rails-99f4d6e744285a1a634e6ba46cd500560573985c.zip |
Merge pull request #30770 from y-yagi/do_not_create_credential_in_dummy_application
Do not create credentials in dummy application
Diffstat (limited to 'railties')
3 files changed, 5 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 1c32fad3ea..b7357025ef 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -159,7 +159,7 @@ module Rails end def master_key - return if options[:pretend] + return if options[:pretend] || options[:dummy_app] require "rails/generators/rails/master_key/master_key_generator" @@ -169,7 +169,7 @@ module Rails end def credentials - return if options[:pretend] + return if options[:pretend] || options[:dummy_app] require "rails/generators/rails/credentials/credentials_generator" diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index bc2dcf008e..4762dfddd4 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -98,6 +98,7 @@ task default: :test opts[:skip_listen] = true opts[:skip_git] = true opts[:skip_turbolinks] = true + opts[:dummy_app] = true invoke Rails::Generators::AppGenerator, [ File.expand_path(dummy_path, destination_root) ], opts diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 49256883d6..2723f5b256 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -474,6 +474,8 @@ class PluginGeneratorTest < Rails::Generators::TestCase assert_no_file "test/dummy/Gemfile" assert_no_file "test/dummy/public/robots.txt" assert_no_file "test/dummy/README.md" + assert_no_file "test/dummy/config/master.key" + assert_no_file "test/dummy/config/credentials.yml.enc" assert_no_directory "test/dummy/lib/tasks" assert_no_directory "test/dummy/test" assert_no_directory "test/dummy/vendor" |