Skip to content

Commit

Permalink
puma 6, rack 3 (#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcai authored Oct 15, 2022
1 parent 164e7c3 commit 07ea227
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions savon.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Gem::Specification.new do |s|
s.add_dependency "nokogiri", ">= 1.8.1"
s.add_dependency "mail", "~> 2.5"

s.add_development_dependency "rack", " < 3"
s.add_development_dependency "puma", ">= 4.3.8", "< 6"
s.add_development_dependency "rack", " < 4"
s.add_development_dependency "puma", ">= 4.3.8", "< 7"

s.add_development_dependency "byebug"
s.add_development_dependency "rake", ">= 12.3.3"
Expand Down
6 changes: 1 addition & 5 deletions spec/integration/support/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def initialize(options = {})
@port = options.fetch(:port, 17172)
@ssl = options.fetch(:ssl, false)

@server = Puma::Server.new(app, events)
@server = Puma::Server.new(app, Puma::Events.new)

if ssl?
add_ssl_listener
Expand Down Expand Up @@ -58,10 +58,6 @@ def stop

private

def events
Puma::Events.new($stdout, $stderr)
end

def add_tcp_listener
server.add_tcp_listener(host, port)
rescue Errno::EADDRINUSE
Expand Down
2 changes: 1 addition & 1 deletion spec/savon/mock_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
expect(response).to be_a_soap_fault

expect(response.http.code).to eq(500)
expect(response.http.headers).to eq("X-Result" => "invalid")
expect(response.http.headers).to eq("x-result" => "invalid")
expect(response.http.body).to eq(soap_fault)
end

Expand Down
4 changes: 2 additions & 2 deletions spec/savon/observers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def notify(operation_name, builder, globals, locals)

def notify(*)
# return a response to mock the request
HTTPI::Response.new(201, { "X-Result" => "valid" }, "valid!")
HTTPI::Response.new(201, { "x-result" => "valid" }, "valid!")
end

}.new
Expand All @@ -61,7 +61,7 @@ def notify(*)
response = new_client.call(:authenticate)

expect(response.http.code).to eq(201)
expect(response.http.headers).to eq("X-Result" => "valid")
expect(response.http.headers).to eq("x-result" => "valid")
expect(response.http.body).to eq("valid!")
end

Expand Down
2 changes: 1 addition & 1 deletion spec/savon/options_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def to_s
client = new_client(:endpoint => @server.url, :log => true)
client.call(:authenticate)
}
soap_header = stdout.string.include? "Content-Type"
soap_header = stdout.string.include? "content-type"
expect(soap_header).to be true
end

Expand Down

0 comments on commit 07ea227

Please sign in to comment.