提交 4e106ee0 编写于 作者: K Kasper Timm Hansen

Per Dr. Eileen's orders :)

Prescribed some review fixes for myself!
上级 993c0696
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 @@
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 @@ def hidden_commands # :nodoc:
@hidden_commands ||= []
end
def environment
def environment # :nodoc:
ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
end
......
......@@ -20,7 +20,7 @@ def acceptable_environment(env = nil)
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
......
......@@ -100,7 +100,6 @@ def default_options
end
private
def setup_dev_caching
if options[:environment] == "development"
Rails::DevCaching.enable_by_argument(options[:caching])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册