aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/command/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/command/base.rb')
-rw-r--r--railties/lib/rails/command/base.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/railties/lib/rails/command/base.rb b/railties/lib/rails/command/base.rb
index cd0720be4e..fa462ef7e9 100644
--- a/railties/lib/rails/command/base.rb
+++ b/railties/lib/rails/command/base.rb
@@ -1,10 +1,12 @@
+# frozen_string_literal: true
+
require "thor"
require "erb"
require "active_support/core_ext/string/filters"
require "active_support/core_ext/string/inflections"
-require_relative "actions"
+require "rails/command/actions"
module Rails
module Command
@@ -73,7 +75,7 @@ module Rails
# Use Rails' default banner.
def banner(*)
- "#{executable} #{arguments.map(&:usage).join(' ')} [options]".squish!
+ "#{executable} #{arguments.map(&:usage).join(' ')} [options]".squish
end
# Sets the base_name taking into account the current class namespace.
@@ -110,8 +112,8 @@ module Rails
# Default file root to place extra files a command might need, placed
# one folder above the command file.
#
- # For a `Rails::Command::TestCommand` placed in `rails/command/test_command.rb`
- # would return `rails/test`.
+ # For a Rails::Command::TestCommand placed in <tt>rails/command/test_command.rb</tt>
+ # would return <tt>rails/test</tt>.
def default_command_root
path = File.expand_path(File.join("../commands", command_root_namespace), __dir__)
path if File.exist?(path)