提交 dce0afd4 编写于 作者: S Sam Oliver

Remove support for rails server RAILS_ENV=env-name

上级 cdd6d9b5
......@@ -32,11 +32,6 @@ def parse!(args)
opt_parser.parse! args
# Handle's environment like RAILS_ENV=production passed in directly
if index = args.index {|arg| arg.include?("RAILS_ENV")}
options[:environment] ||= args.delete_at(index).split('=').last
end
options[:server] = args.shift
options
end
......
......@@ -4,14 +4,14 @@
class Rails::ServerTest < ActiveSupport::TestCase
def test_environment_with_server_option
args = ["thin", "RAILS_ENV=production"]
args = ["thin", "-e", "production"]
options = Rails::Server::Options.new.parse!(args)
assert_equal 'production', options[:environment]
assert_equal 'thin', options[:server]
end
def test_environment_without_server_option
args = ["RAILS_ENV=production"]
args = ["-e", "production"]
options = Rails::Server::Options.new.parse!(args)
assert_equal 'production', options[:environment]
assert_nil options[:server]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册