Remove support for rails server RAILS_ENV=env-name
This commit is contained in:
parent
cdd6d9b53a
commit
dce0afd47f
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user