aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/command/environment_argument.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2019-01-16 20:47:39 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2019-01-17 16:08:34 -0500
commite20589c9be09c7272d73492d4b0f7b24e5595571 (patch)
treea7636109e381c7b09a6e29c156e8eed85b8d579e /railties/lib/rails/command/environment_argument.rb
parent9d39f81d512e0d16a27e2e864ea2dd0e8dc41b17 (diff)
downloadrails-e20589c9be09c7272d73492d4b0f7b24e5595571.tar.gz
rails-e20589c9be09c7272d73492d4b0f7b24e5595571.tar.bz2
rails-e20589c9be09c7272d73492d4b0f7b24e5595571.zip
Remove deprecated `environment` argument from the rails commands
Diffstat (limited to 'railties/lib/rails/command/environment_argument.rb')
-rw-r--r--railties/lib/rails/command/environment_argument.rb12
1 files changed, 1 insertions, 11 deletions
diff --git a/railties/lib/rails/command/environment_argument.rb b/railties/lib/rails/command/environment_argument.rb
index 5dc98b113d..fdc5ee92d9 100644
--- a/railties/lib/rails/command/environment_argument.rb
+++ b/railties/lib/rails/command/environment_argument.rb
@@ -8,23 +8,13 @@ module Rails
extend ActiveSupport::Concern
included do
- argument :environment, optional: true, banner: "environment"
-
class_option :environment, aliases: "-e", type: :string,
desc: "Specifies the environment to run this console under (test/development/production)."
end
private
def extract_environment_option_from_argument
- if environment
- self.options = options.merge(environment: acceptable_environment(environment))
-
- ActiveSupport::Deprecation.warn "Passing the environment's name as a " \
- "regular argument is deprecated and " \
- "will be removed in the next Rails " \
- "version. Please, use the -e option " \
- "instead."
- elsif options[:environment]
+ if options[:environment]
self.options = options.merge(environment: acceptable_environment(options[:environment]))
else
self.options = options.merge(environment: Rails::Command.environment)