mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #30770 from y-yagi/do_not_create_credential_in_dummy_application
Do not create credentials in dummy application
This commit is contained in:
commit
99f4d6e744
3 changed files with 5 additions and 2 deletions
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue