Do not show credentials in generators help

Since credentials generator is executed via the credentials command and
does not need to be executed directly, so it is not necessary to show it in
help.
This commit is contained in:
yuuji.yaginuma 2017-11-09 20:54:24 +09:00
parent be6e1b8f7d
commit d1e0bc7c17
2 changed files with 3 additions and 1 deletions

View File

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

View File

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