mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Change YAML.load trick to use File.read instead
And move required Ruby version to 1.8.7 or greater. (sorry folks on 1.8.6, time to upgrade anyway)
This commit is contained in:
parent
21327cad9b
commit
0fee5c8064
3 changed files with 5 additions and 3 deletions
2
Rakefile
2
Rakefile
|
@ -13,6 +13,8 @@ HOE = Hoe.spec "puma" do
|
|||
spec_extras[:extensions] = ["ext/puma_http11/extconf.rb"]
|
||||
spec_extras[:executables] = ['puma', 'pumactl']
|
||||
|
||||
require_ruby_version ">= 1.8.7"
|
||||
|
||||
dependency "rack", "~> 1.2"
|
||||
|
||||
extra_dev_deps << ["rake-compiler", "~> 0.8.0"]
|
||||
|
|
|
@ -46,7 +46,7 @@ module Puma
|
|||
|
||||
@parser.parse! @argv
|
||||
|
||||
@state = YAML.load File.open(@path, "r") { |f| f.read }
|
||||
@state = YAML.load File.read(@path)
|
||||
@config = @state['config']
|
||||
|
||||
cmd = @argv.shift
|
||||
|
|
|
@ -86,7 +86,7 @@ class TestCLI < Test::Unit::TestCase
|
|||
cli.parse_options
|
||||
cli.write_state
|
||||
|
||||
data = YAML.load File.open(@tmp_path, "r") { |f| f.read }
|
||||
data = YAML.load File.read(@tmp_path)
|
||||
|
||||
assert_equal Process.pid, data["pid"]
|
||||
|
||||
|
@ -104,7 +104,7 @@ class TestCLI < Test::Unit::TestCase
|
|||
cli.parse_options
|
||||
cli.write_state
|
||||
|
||||
data = YAML.load File.open(@tmp_path, "r") { |f| f.read }
|
||||
data = YAML.load File.read(@tmp_path)
|
||||
|
||||
assert_equal Process.pid, data["pid"]
|
||||
assert_equal url, data["config"].options[:control_url]
|
||||
|
|
Loading…
Reference in a new issue