1
0
Fork 0
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:
Kasper Timm Hansen 2017-11-12 14:41:42 +01:00 committed by GitHub
commit 99f4d6e744
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -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"

View file

@ -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

View file

@ -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"