aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2017-11-09 07:49:08 -0500
committerGitHub <noreply@github.com>2017-11-09 07:49:08 -0500
commit518959d0127aac81020ccd50f3dc425f857e6715 (patch)
treea79338fb0592219cb9bc402b3739e5a5e09243c1
parentbe6e1b8f7dbce1940f47339657faab2c1fdeaa54 (diff)
parentd1e0bc7c17b1be2766e9fca228b4c61e01988b34 (diff)
downloadrails-518959d0127aac81020ccd50f3dc425f857e6715.tar.gz
rails-518959d0127aac81020ccd50f3dc425f857e6715.tar.bz2
rails-518959d0127aac81020ccd50f3dc425f857e6715.zip
Merge pull request #31102 from y-yagi/do_not_show_credentials_in_generators_help
Do not show credentials in generators help
-rw-r--r--railties/lib/rails/generators.rb1
-rw-r--r--railties/test/application/generators_test.rb3
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb
index 2d265818f7..5592e8d78e 100644
--- a/railties/lib/rails/generators.rb
+++ b/railties/lib/rails/generators.rb
@@ -218,6 +218,7 @@ module Rails
rails.delete("app")
rails.delete("plugin")
rails.delete("encrypted_secrets")
+ rails.delete("credentials")
hidden_namespaces.each { |n| groups.delete(n.to_s) }
diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb
index 47c815d221..e5e557d204 100644
--- a/railties/test/application/generators_test.rb
+++ b/railties/test/application/generators_test.rb
@@ -188,10 +188,11 @@ module ApplicationTests
Rails::Command.send(:remove_const, "APP_PATH")
end
- test "help does not show hidden namespaces" do
+ test "help does not show hidden namespaces and hidden commands" do
FileUtils.cd(rails_root) do
output = rails("generate", "--help")
assert_no_match "active_record:migration", output
+ assert_no_match "credentials", output
output = rails("destroy", "--help")
assert_no_match "active_record:migration", output