From db947c2917a95c0a4f7202fc5668aaec9808d7ac Mon Sep 17 00:00:00 2001 From: Petrik de Heus Date: Wed, 28 Jul 2021 23:59:22 +0200 Subject: [PATCH] Add plugin to common command USAGE (#41457) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because the PluginCommand is defined with `hide_command!`, running `bin/rails -h` hides the plugin command. As an alternative to removing the `hide_command!` this adds the plugin command to the USAGE. Unless it's an engine, because adding an engine to an engine doesn't make sense. Both the railtie and engine terms are used so a user can search for both. [Petrik de Heus + Rafael Mendonça França + Jonathan Hefner] --- railties/CHANGELOG.md | 4 ++++ railties/lib/rails/commands/help/USAGE | 1 + 2 files changed, 5 insertions(+) diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 9badd38a1f..3af0eb966c 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -4,6 +4,10 @@ the task description instead of the general Rake help. *Petrik de Heus* + +* Add missing `plugin new` command to help. + + *Petrik de Heus * Fix `config_for` error when there's only a shared root array. diff --git a/railties/lib/rails/commands/help/USAGE b/railties/lib/rails/commands/help/USAGE index fd3cb47529..94f7fe3f73 100644 --- a/railties/lib/rails/commands/help/USAGE +++ b/railties/lib/rails/commands/help/USAGE @@ -9,6 +9,7 @@ The most common rails commands are: <% unless engine? -%> new Create a new Rails application. "rails new my_app" creates a new application called MyApp in "./my_app" + plugin new Create a new Rails railtie or engine <% end -%> All commands can be run with -h (or --help) for more information.