diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-09-07 22:45:41 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-09-25 21:31:36 +0200 |
commit | 4e106ee08b36c2047a6af3829f3497459590c98a (patch) | |
tree | 7014ed5b43f3c98616ac2aa786c5e53dbfa8ff97 /railties/lib | |
parent | 993c0696e61f3449c97e31c54088ee7578953307 (diff) | |
download | rails-4e106ee08b36c2047a6af3829f3497459590c98a.tar.gz rails-4e106ee08b36c2047a6af3829f3497459590c98a.tar.bz2 rails-4e106ee08b36c2047a6af3829f3497459590c98a.zip |
Per Dr. Eileen's orders :)
Prescribed some review fixes for myself!
Diffstat (limited to 'railties/lib')
-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]) |