diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/command.rb | 9 | ||||
-rw-r--r-- | railties/lib/rails/command/environment_argument.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/commands/server/server_command.rb | 1 |
3 files changed, 7 insertions, 5 deletions
diff --git a/railties/lib/rails/command.rb b/railties/lib/rails/command.rb index 22eaf37bf7..6065e78fd1 100644 --- a/railties/lib/rails/command.rb +++ b/railties/lib/rails/command.rb @@ -1,4 +1,5 @@ require "active_support" +require "active_support/dependencies/autoload" require "active_support/core_ext/enumerable" require "active_support/core_ext/object/blank" require "active_support/core_ext/hash/transform_values" @@ -7,8 +8,10 @@ require "thor" module Rails module Command - autoload :Behavior, "rails/command/behavior" - autoload :Base, "rails/command/base" + extend ActiveSupport::Autoload + + autoload :Behavior + autoload :Base include Behavior @@ -17,7 +20,7 @@ module Rails @hidden_commands ||= [] end - def environment + def environment # :nodoc: ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development" end diff --git a/railties/lib/rails/command/environment_argument.rb b/railties/lib/rails/command/environment_argument.rb index d4221d142b..bff076adc9 100644 --- a/railties/lib/rails/command/environment_argument.rb +++ b/railties/lib/rails/command/environment_argument.rb @@ -20,7 +20,7 @@ module Rails if available_environments.include? env env else - %w(production development test).detect { |e| e =~ /^#{env}/ } || env + %w( production development test ).detect { |e| e =~ /^#{env}/ } || env end end diff --git a/railties/lib/rails/commands/server/server_command.rb b/railties/lib/rails/commands/server/server_command.rb index b45805bddd..98605b05b2 100644 --- a/railties/lib/rails/commands/server/server_command.rb +++ b/railties/lib/rails/commands/server/server_command.rb @@ -100,7 +100,6 @@ module Rails end private - def setup_dev_caching if options[:environment] == "development" Rails::DevCaching.enable_by_argument(options[:caching]) |