webmock 1.24.2 → 1.24.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.24.3
4
+
5
+ * Allow Net:HTTP headers keys to be provided as symbols if `RUBY_VERSION` >= 2.3.0
6
+
7
+ Thanks to [Alex Kestner](https://github.com/akestner)
8
+
9
+ * Fixed the issue with parsing query to a hash with nested array i.e. `a[][b][]=one&a[][c][]=two`
10
+
11
+ Thanks to [Tim Diggins](https://github.com/timdiggins) for reporting the issue.
12
+ Thanks to [Cedric Pimenta](https://github.com/cedricpim) for finding the solution.
13
+
14
+ * Added a clear message on an attept to match a multipart encoded request body.
15
+ WebMock does't support requests with multipart body... yet.
16
+
17
+ * `WebMock.disable_net_connect` `:allow` option, provided as regexp, matches https URIs correctly.
18
+
19
+ * `WebMock.disable_net_connect` `:allow` option can be set as a url string with scheme, host and port.
20
+
21
+ WebMock.disable_net_connect!(:allow => 'https://www.google.pl')
22
+
23
+ Thanks to [Gabriel Chaney](https://github.com/gabrieljoelc) for reporting the issue.
24
+
25
+
3
26
  ## 1.24.2
4
27
 
5
28
  * Improve parsing of params on request
data/Gemfile CHANGED
@@ -6,7 +6,8 @@ if ENV["EM_HTTP_REQUEST_0_X"]
6
6
  end
7
7
 
8
8
  group :development do
9
- gem 'rake'
9
+ gem 'rake', '~> 10.5.0' if RUBY_VERSION < '1.9.3'
10
+ gem 'rake' if RUBY_VERSION >= '1.9.3'
10
11
  end
11
12
 
12
13
  group :test do
@@ -16,3 +17,5 @@ end
16
17
  platforms :jruby do
17
18
  gem 'jruby-openssl'
18
19
  end
20
+
21
+ gem 'curb', '< 0.9.2' unless RUBY_PLATFORM =~ /java/ #https://github.com/taf2/curb/issues/296
data/README.md CHANGED
@@ -1035,6 +1035,10 @@ People who submitted patches and new features or suggested improvements. Many th
1035
1035
  * Pablo Brasero
1036
1036
  * Cedric Pimenta
1037
1037
  * Michiel Karnebeek
1038
+ * Alex Kestner
1039
+ * Manfred Stienstra
1040
+ * Tim Diggins
1041
+ * Gabriel Chaney
1038
1042
 
1039
1043
  For a full list of contributors you can visit the
1040
1044
  [contributors](https://github.com/bblimke/webmock/contributors) page.
@@ -5,7 +5,7 @@ source "http://rubygems.org/"
5
5
  gem "addressable", ">= 2.3.6", "< 2.4.0"
6
6
 
7
7
  group :development do
8
- gem "rake"
8
+ gem "rake", '~> 10.5.0'
9
9
  end
10
10
 
11
11
  group :test do
@@ -17,3 +17,5 @@ platforms :jruby do
17
17
  end
18
18
 
19
19
  gemspec :path => "../"
20
+
21
+ gem 'curb', '< 0.9.2' unless RUBY_PLATFORM =~ /java/ #https://github.com/taf2/curb/issues/296
@@ -209,13 +209,13 @@ if defined?(::HTTPClient)
209
209
  end
210
210
 
211
211
  def remove_authorization_header headers
212
- headers.reject! do |k, v|
213
- next unless k =~ /[Aa]uthorization/
214
- if v.is_a? Array
215
- v.reject! { |v| v =~ /^Basic / }
216
- v.length == 0
217
- elsif v.is_a? String
218
- v =~ /^Basic /
212
+ headers.reject! do |name, value|
213
+ next unless name =~ /[Aa]uthorization/
214
+ if value.is_a? Array
215
+ value.reject! { |v| v =~ /^Basic / }
216
+ value.length == 0
217
+ elsif value.is_a? String
218
+ value =~ /^Basic /
219
219
  end
220
220
  end
221
221
  end
@@ -304,7 +304,8 @@ module WebMock
304
304
  end
305
305
 
306
306
  def self.validate_headers(headers)
307
- # If you make a request with headers that are symbols Net::HTTP raises a NoMethodError
307
+ # For Ruby versions < 2.3.0, if you make a request with headers that are symbols
308
+ # Net::HTTP raises a NoMethodError
308
309
  #
309
310
  # WebMock normalizes headers when creating a RequestSignature,
310
311
  # and will update all headers from symbols to strings.
@@ -313,9 +314,11 @@ module WebMock
313
314
  #
314
315
  # So before this point, WebMock raises an ArgumentError if any of the headers are symbols
315
316
  # instead of the cryptic NoMethodError "undefined method `split' ...` from Net::HTTP
316
- header_as_symbol = headers.keys.find {|header| header.is_a? Symbol}
317
- if header_as_symbol
318
- raise ArgumentError.new("Net:HTTP does not accept headers as symbols")
317
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0')
318
+ header_as_symbol = headers.keys.find {|header| header.is_a? Symbol}
319
+ if header_as_symbol
320
+ raise ArgumentError.new("Net:HTTP does not accept headers as symbols")
321
+ end
319
322
  end
320
323
  end
321
324
 
@@ -213,6 +213,8 @@ module WebMock
213
213
  end
214
214
 
215
215
  def matches?(body, content_type = "")
216
+ assert_non_multipart_body(content_type)
217
+
216
218
  if (@pattern).is_a?(Hash)
217
219
  return true if @pattern.empty?
218
220
  matching_hashes?(body_as_hash(body, content_type), @pattern)
@@ -241,6 +243,12 @@ module WebMock
241
243
  end
242
244
  end
243
245
 
246
+ def assert_non_multipart_body(content_type)
247
+ if content_type =~ %r{^multipart/form-data}
248
+ raise ArgumentError.new("WebMock does not support matching body for multipart/form-data requests yet :(")
249
+ end
250
+ end
251
+
244
252
  # Compare two hashes for equality
245
253
  #
246
254
  # For two hashes to match they must have the same length and all
@@ -1,3 +1,3 @@
1
1
  module WebMock
2
- VERSION = '1.24.2' unless defined?(::WebMock::VERSION)
2
+ VERSION = '1.24.3' unless defined?(::WebMock::VERSION)
3
3
  end
@@ -68,10 +68,14 @@ module WebMock
68
68
  when Array
69
69
  allowed.any? { |allowed_item| net_connect_explicit_allowed?(allowed_item, uri) }
70
70
  when Regexp
71
- uri.to_s =~ allowed
71
+ uri.to_s =~ allowed ||
72
+ uri.omit(:port).to_s =~ allowed && uri.port == uri.default_port
72
73
  when String
74
+ allowed == uri.to_s ||
73
75
  allowed == uri.host ||
74
- allowed == "#{uri.host}:#{uri.port}"
76
+ allowed == "#{uri.host}:#{uri.port}" ||
77
+ allowed == "#{uri.scheme}://#{uri.host}:#{uri.port}" ||
78
+ allowed == "#{uri.scheme}://#{uri.host}" && uri.port == uri.default_port
75
79
  else
76
80
  if allowed.respond_to?(:call)
77
81
  allowed.call(uri)
@@ -19,7 +19,7 @@ describe "HTTP.rb" do
19
19
 
20
20
  it "fails if body was already streamed" do
21
21
  response.body.to_s
22
- expect { response.body.readpartial 1 }.to raise_error
22
+ expect { response.body.readpartial 1 }.to raise_error(HTTP::StateError)
23
23
  end
24
24
  end
25
25
 
@@ -14,6 +14,14 @@ describe "HTTPClient" do
14
14
 
15
15
  include_examples "with WebMock"
16
16
 
17
+ it "should raise a clearly readable error if request with multipart body is sent" do
18
+ stub_request(:post, 'www.example.com').with(:body => {:type => 'image'})
19
+
20
+ expect {
21
+ HTTPClient.new.post_content('www.example.com', :type => 'image', :file => File.new('spec/fixtures/test.txt'))
22
+ }.to raise_error(ArgumentError, "WebMock does not support matching body for multipart/form-data requests yet :(")
23
+ end
24
+
17
25
  it "should yield block on response if block provided" do
18
26
  stub_request(:get, "www.example.com").to_return(:body => "abc")
19
27
  response_body = ""
@@ -106,7 +106,16 @@ describe "Net:HTTP" do
106
106
  expect(Net::HTTP.start("www.example.com") { |query| query.get("/") }.body).to eq("abc"*100000)
107
107
  end
108
108
 
109
- it "raises an ArgumentError if passed headers as symbols" do
109
+ it "should handle requests with raw binary data" do
110
+ body = "\x14\x00\x00\x00\x70\x69\x6e\x67\x00\x00"
111
+ stub_http_request(:post, "www.example.com").with(:body => body).to_return(:body => "abc")
112
+ req = Net::HTTP::Post.new("/")
113
+ req.body = body
114
+ req.content_type = "application/octet-stream"
115
+ expect(Net::HTTP.start("www.example.com") { |http| http.request(req)}.body).to eq("abc")
116
+ end
117
+
118
+ it "raises an ArgumentError if passed headers as symbols if RUBY_VERSION < 2.3.0" do
110
119
  uri = URI.parse("http://google.com/")
111
120
  http = Net::HTTP.new(uri.host, uri.port)
112
121
  request = Net::HTTP::Get.new(uri.request_uri)
@@ -123,9 +132,15 @@ describe "Net:HTTP" do
123
132
  end
124
133
  end
125
134
 
126
- expect do
127
- http.request(request)
128
- end.to raise_error ArgumentError, "Net:HTTP does not accept headers as symbols"
135
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0')
136
+ expect do
137
+ http.request(request)
138
+ end.to raise_error ArgumentError, "Net:HTTP does not accept headers as symbols"
139
+ else
140
+ expect do
141
+ http.request(request)
142
+ end.to_not raise_error ArgumentError, "Net:HTTP does not accept headers as symbols"
143
+ end
129
144
  end
130
145
 
131
146
  it "should handle multiple values for the same response header" do
@@ -161,6 +161,54 @@ shared_context "allowing and disabling net connect" do |*adapter_info|
161
161
  end
162
162
  end
163
163
 
164
+ describe "allowing by scheme:host string" do
165
+ before :each do
166
+ WebMock.disable_net_connect!(:allow => 'https://www.google.pl')
167
+ end
168
+
169
+ context "when the host and scheme is not allowed" do
170
+ it "should return stubbed response if request was stubbed" do
171
+ stub_request(:get, 'https://disallowed.example.com/foo').to_return(:body => "abc")
172
+ expect(http_request(:get, 'https://disallowed.example.com/foo').body).to eq("abc")
173
+ end
174
+
175
+ it "should raise exception if request was not stubbed" do
176
+ expect {
177
+ http_request(:get, 'https://disallowed.example.com/')
178
+ }.to raise_error(WebMock::NetConnectNotAllowedError, %r(Real HTTP connections are disabled. Unregistered request: GET https://disallowed.example.com))
179
+ end
180
+
181
+ it "should raise exception if request was made to different port" do
182
+ expect {
183
+ http_request(:get, 'https://www.google.pl:80/')
184
+ }.to raise_error(WebMock::NetConnectNotAllowedError, %r(Real HTTP connections are disabled. Unregistered request: GET https://www.google.pl:80))
185
+ end
186
+
187
+ it "should raise exception if request was made to different scheme" do
188
+ expect {
189
+ http_request(:get, 'http://www.google.pl/')
190
+ }.to raise_error(WebMock::NetConnectNotAllowedError, %r(Real HTTP connections are disabled. Unregistered request: GET http://www.google.pl))
191
+ end
192
+ end
193
+
194
+ context "when the host is allowed" do
195
+ it "should return stubbed response if request was stubbed" do
196
+ stub_request(:get, 'https://www.google.pl').to_return(:body => "abc")
197
+ expect(http_request(:get, "https://www.google.pl/").body).to eq("abc")
198
+ end
199
+
200
+ it "should make a real request to allowed host with scheme", :net_connect => true do
201
+ method = http_library == :httpclient ? :head : :get #https://github.com/nahi/httpclient/issues/299
202
+ expect(http_request(method, "https://www.google.pl/").status).to eq('200')
203
+ end
204
+
205
+ it "should make a real request to allowed host with scheme and port", :net_connect => true do
206
+ method = http_library == :httpclient ? :head : :get
207
+ expect(http_request(method, "https://www.google.pl:443/").status).to eq('200')
208
+ end
209
+ end
210
+ end
211
+
164
212
  describe "allowing by regular expression" do
165
213
  before :each do
166
214
  WebMock.disable_net_connect!(:allow => %r{httpstat})
@@ -189,6 +237,12 @@ shared_context "allowing and disabling net connect" do |*adapter_info|
189
237
  it "should make a real request to allowed host", :net_connect => true do
190
238
  expect(http_request(:get, "http://httpstat.us/200").status).to eq('200')
191
239
  end
240
+
241
+ it "should make a real request if request is allowed by path regexp and url contains default port", :net_connect => true do
242
+ WebMock.disable_net_connect!(:allow => %r{github.com/bblimke/webmock})
243
+ method = http_library == :httpclient ? :head : :get
244
+ expect(http_request(method, 'https://github.com:443/bblimke/webmock').status).to eq('200')
245
+ end
192
246
  end
193
247
  end
194
248
 
@@ -257,7 +257,7 @@ shared_context "request expectations" do |*adapter_info|
257
257
  http_request(:get, "http://www.example.com/")
258
258
  http_request(:get, "http://www.example.com/")
259
259
  expect(a_request(:get, "http://www.example.com")).to have_been_made.at_most_once
260
- }.to raise_error
260
+ }.to fail
261
261
  end
262
262
  end
263
263
 
@@ -289,7 +289,7 @@ shared_context "request expectations" do |*adapter_info|
289
289
  http_request(:get, "http://www.example.com/")
290
290
  http_request(:get, "http://www.example.com/")
291
291
  expect(a_request(:get, "http://www.example.com")).to have_been_made.at_most_twice
292
- }.to raise_error
292
+ }.to fail
293
293
  end
294
294
  end
295
295
  end
@@ -299,7 +299,7 @@ shared_context "request expectations" do |*adapter_info|
299
299
  it "fails if no request was executed" do
300
300
  expect {
301
301
  expect(a_request(:get, "http://www.example.com")).to have_been_made.at_least_once
302
- }.to raise_error
302
+ }.to fail
303
303
  end
304
304
 
305
305
  it "satisfies expectation if request was executed with the same uri and method once" do
@@ -322,14 +322,14 @@ shared_context "request expectations" do |*adapter_info|
322
322
  it "fails if no request was executed" do
323
323
  expect {
324
324
  expect(a_request(:get, "http://www.example.com")).to have_been_made.at_least_twice
325
- }.to raise_error
325
+ }.to fail
326
326
  end
327
327
 
328
328
  it "fails if too few requests were executed" do
329
329
  expect {
330
330
  http_request(:get, "http://www.example.com/")
331
331
  expect(a_request(:get, "http://www.example.com")).to have_been_made.at_least_twice
332
- }.to raise_error
332
+ }.to fail
333
333
  end
334
334
 
335
335
  it "satisfies expectation if request was executed with the same uri and method twice" do
@@ -233,7 +233,7 @@ shared_examples_for "stubbing requests" do |*adapter_info|
233
233
  end
234
234
 
235
235
  it "should not match if hash doesn't match url encoded body" do
236
- expect { wrong_request }.to raise_error
236
+ expect { wrong_request }.to raise_error(WebMock::NetConnectNotAllowedError)
237
237
  end
238
238
  end
239
239
 
@@ -258,7 +258,7 @@ shared_examples_for "stubbing requests" do |*adapter_info|
258
258
  end
259
259
 
260
260
  it "should not match if hash doesn't match url encoded body" do
261
- expect { wrong_request }.to raise_error
261
+ expect { wrong_request }.to raise_error(WebMock::NetConnectNotAllowedError)
262
262
  end
263
263
  end
264
264
 
@@ -0,0 +1 @@
1
+ test
@@ -19,15 +19,14 @@ require 'webmock/rspec'
19
19
  require 'support/network_connection'
20
20
  require 'support/webmock_server'
21
21
  require 'support/my_rack_app'
22
+ require 'support/failures'
22
23
 
23
24
  CURL_EXAMPLE_OUTPUT_PATH = File.expand_path('../support/example_curl_output.txt', __FILE__)
24
25
 
25
26
  RSpec.configure do |config|
26
- unless NetworkConnection.is_network_available?
27
+ no_network_connection = ENV["NO_CONNECTION"] || ! NetworkConnection.is_network_available?
28
+ if no_network_connection
27
29
  warn("No network connectivity. Only examples which do not make real network connections will run.")
28
- no_network_connection = true
29
- end
30
- if ENV["NO_CONNECTION"] || no_network_connection
31
30
  config.filter_run_excluding :net_connect => true
32
31
  end
33
32
 
@@ -47,12 +46,7 @@ RSpec.configure do |config|
47
46
 
48
47
  config.filter_run :focus => true
49
48
  config.run_all_when_everything_filtered = true
50
- end
51
49
 
52
- def fail()
53
- raise_error(RSpec::Expectations::ExpectationNotMetError)
50
+ config.include Failures
54
51
  end
55
52
 
56
- def fail_with(message)
57
- raise_error(RSpec::Expectations::ExpectationNotMetError, message)
58
- end
@@ -0,0 +1,9 @@
1
+ module Failures
2
+ def fail()
3
+ raise_error(RSpec::Expectations::ExpectationNotMetError)
4
+ end
5
+
6
+ def fail_with(message)
7
+ raise_error(RSpec::Expectations::ExpectationNotMetError, message)
8
+ end
9
+ end
@@ -1,22 +1,16 @@
1
- module NetworkConnection
2
- def self.connect_to(host, port, timeout=nil)
3
- addr = Socket.getaddrinfo(host, nil)
4
- sock = Socket.new(Socket.const_get(addr[0][0]), Socket::SOCK_STREAM, 0)
1
+ require 'timeout'
2
+ require 'socket'
5
3
 
6
- if timeout
7
- secs = Integer(timeout)
8
- usecs = Integer((timeout - secs) * 1_000_000)
9
- optval = [secs, usecs].pack("l_2")
10
- sock.setsockopt Socket::SOL_SOCKET, Socket::SO_RCVTIMEO, optval
11
- sock.setsockopt Socket::SOL_SOCKET, Socket::SO_SNDTIMEO, optval
4
+ module NetworkConnection
5
+ def self.connect_to(host, port, timeout=10)
6
+ timeout(timeout) do
7
+ TCPSocket.new(host, port)
12
8
  end
13
- sock.connect(Socket.pack_sockaddr_in(port, addr[0][3]))
14
- sock
15
9
  end
16
10
 
17
11
  def self.is_network_available?
18
12
  begin
19
- self.connect_to("173.194.113.176", 80, 5)
13
+ self.connect_to("8.8.8.8", 53, 5)
20
14
  true
21
15
  rescue
22
16
  false
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmock
3
3
  version: !ruby/object:Gem::Version
4
- hash: 115
4
+ hash: 113
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 24
9
- - 2
10
- version: 1.24.2
9
+ - 3
10
+ version: 1.24.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Bartosz Blimke
@@ -15,12 +15,13 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2016-03-03 00:00:00 +01:00
18
+ date: 2016-04-13 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- type: :runtime
23
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ name: addressable
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
24
25
  none: false
25
26
  requirements:
26
27
  - - ">="
@@ -31,12 +32,12 @@ dependencies:
31
32
  - 3
32
33
  - 6
33
34
  version: 2.3.6
34
- prerelease: false
35
- requirement: *id001
36
- name: addressable
37
- - !ruby/object:Gem::Dependency
38
35
  type: :runtime
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: crack
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
40
41
  none: false
41
42
  requirements:
42
43
  - - ">="
@@ -47,12 +48,12 @@ dependencies:
47
48
  - 3
48
49
  - 2
49
50
  version: 0.3.2
50
- prerelease: false
51
- requirement: *id002
52
- name: crack
53
- - !ruby/object:Gem::Dependency
54
51
  type: :runtime
55
- version_requirements: &id003 !ruby/object:Gem::Requirement
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: hashdiff
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
56
57
  none: false
57
58
  requirements:
58
59
  - - ">="
@@ -61,12 +62,12 @@ dependencies:
61
62
  segments:
62
63
  - 0
63
64
  version: "0"
64
- prerelease: false
65
- requirement: *id003
66
- name: hashdiff
65
+ type: :runtime
66
+ version_requirements: *id003
67
67
  - !ruby/object:Gem::Dependency
68
- type: :development
69
- version_requirements: &id004 !ruby/object:Gem::Requirement
68
+ name: rspec
69
+ prerelease: false
70
+ requirement: &id004 !ruby/object:Gem::Requirement
70
71
  none: false
71
72
  requirements:
72
73
  - - ">="
@@ -77,12 +78,12 @@ dependencies:
77
78
  - 1
78
79
  - 0
79
80
  version: 3.1.0
80
- prerelease: false
81
- requirement: *id004
82
- name: rspec
83
- - !ruby/object:Gem::Dependency
84
81
  type: :development
85
- version_requirements: &id005 !ruby/object:Gem::Requirement
82
+ version_requirements: *id004
83
+ - !ruby/object:Gem::Dependency
84
+ name: httpclient
85
+ prerelease: false
86
+ requirement: &id005 !ruby/object:Gem::Requirement
86
87
  none: false
87
88
  requirements:
88
89
  - - ">="
@@ -93,12 +94,12 @@ dependencies:
93
94
  - 2
94
95
  - 4
95
96
  version: 2.2.4
96
- prerelease: false
97
- requirement: *id005
98
- name: httpclient
99
- - !ruby/object:Gem::Dependency
100
97
  type: :development
101
- version_requirements: &id006 !ruby/object:Gem::Requirement
98
+ version_requirements: *id005
99
+ - !ruby/object:Gem::Dependency
100
+ name: patron
101
+ prerelease: false
102
+ requirement: &id006 !ruby/object:Gem::Requirement
102
103
  none: false
103
104
  requirements:
104
105
  - - "="
@@ -109,12 +110,12 @@ dependencies:
109
110
  - 4
110
111
  - 18
111
112
  version: 0.4.18
112
- prerelease: false
113
- requirement: *id006
114
- name: patron
115
- - !ruby/object:Gem::Dependency
116
113
  type: :development
117
- version_requirements: &id007 !ruby/object:Gem::Requirement
114
+ version_requirements: *id006
115
+ - !ruby/object:Gem::Dependency
116
+ name: em-http-request
117
+ prerelease: false
118
+ requirement: &id007 !ruby/object:Gem::Requirement
118
119
  none: false
119
120
  requirements:
120
121
  - - ">="
@@ -125,12 +126,12 @@ dependencies:
125
126
  - 0
126
127
  - 2
127
128
  version: 1.0.2
128
- prerelease: false
129
- requirement: *id007
130
- name: em-http-request
131
- - !ruby/object:Gem::Dependency
132
129
  type: :development
133
- version_requirements: &id008 !ruby/object:Gem::Requirement
130
+ version_requirements: *id007
131
+ - !ruby/object:Gem::Dependency
132
+ name: http
133
+ prerelease: false
134
+ requirement: &id008 !ruby/object:Gem::Requirement
134
135
  none: false
135
136
  requirements:
136
137
  - - "="
@@ -141,12 +142,12 @@ dependencies:
141
142
  - 7
142
143
  - 3
143
144
  version: 0.7.3
144
- prerelease: false
145
- requirement: *id008
146
- name: http
147
- - !ruby/object:Gem::Dependency
148
145
  type: :development
149
- version_requirements: &id009 !ruby/object:Gem::Requirement
146
+ version_requirements: *id008
147
+ - !ruby/object:Gem::Dependency
148
+ name: curb
149
+ prerelease: false
150
+ requirement: &id009 !ruby/object:Gem::Requirement
150
151
  none: false
151
152
  requirements:
152
153
  - - ">="
@@ -157,12 +158,12 @@ dependencies:
157
158
  - 7
158
159
  - 16
159
160
  version: 0.7.16
160
- prerelease: false
161
- requirement: *id009
162
- name: curb
163
- - !ruby/object:Gem::Dependency
164
161
  type: :development
165
- version_requirements: &id010 !ruby/object:Gem::Requirement
162
+ version_requirements: *id009
163
+ - !ruby/object:Gem::Dependency
164
+ name: typhoeus
165
+ prerelease: false
166
+ requirement: &id010 !ruby/object:Gem::Requirement
166
167
  none: false
167
168
  requirements:
168
169
  - - ">="
@@ -173,12 +174,12 @@ dependencies:
173
174
  - 5
174
175
  - 0
175
176
  version: 0.5.0
176
- prerelease: false
177
- requirement: *id010
178
- name: typhoeus
179
- - !ruby/object:Gem::Dependency
180
177
  type: :development
181
- version_requirements: &id011 !ruby/object:Gem::Requirement
178
+ version_requirements: *id010
179
+ - !ruby/object:Gem::Dependency
180
+ name: excon
181
+ prerelease: false
182
+ requirement: &id011 !ruby/object:Gem::Requirement
182
183
  none: false
183
184
  requirements:
184
185
  - - ">="
@@ -189,12 +190,12 @@ dependencies:
189
190
  - 27
190
191
  - 5
191
192
  version: 0.27.5
192
- prerelease: false
193
- requirement: *id011
194
- name: excon
195
- - !ruby/object:Gem::Dependency
196
193
  type: :development
197
- version_requirements: &id012 !ruby/object:Gem::Requirement
194
+ version_requirements: *id011
195
+ - !ruby/object:Gem::Dependency
196
+ name: minitest
197
+ prerelease: false
198
+ requirement: &id012 !ruby/object:Gem::Requirement
198
199
  none: false
199
200
  requirements:
200
201
  - - ~>
@@ -205,12 +206,12 @@ dependencies:
205
206
  - 0
206
207
  - 0
207
208
  version: 5.0.0
208
- prerelease: false
209
- requirement: *id012
210
- name: minitest
211
- - !ruby/object:Gem::Dependency
212
209
  type: :development
213
- version_requirements: &id013 !ruby/object:Gem::Requirement
210
+ version_requirements: *id012
211
+ - !ruby/object:Gem::Dependency
212
+ name: rdoc
213
+ prerelease: false
214
+ requirement: &id013 !ruby/object:Gem::Requirement
214
215
  none: false
215
216
  requirements:
216
217
  - - ">"
@@ -221,12 +222,12 @@ dependencies:
221
222
  - 5
222
223
  - 0
223
224
  version: 3.5.0
224
- prerelease: false
225
- requirement: *id013
226
- name: rdoc
227
- - !ruby/object:Gem::Dependency
228
225
  type: :development
229
- version_requirements: &id014 !ruby/object:Gem::Requirement
226
+ version_requirements: *id013
227
+ - !ruby/object:Gem::Dependency
228
+ name: rack
229
+ prerelease: false
230
+ requirement: &id014 !ruby/object:Gem::Requirement
230
231
  none: false
231
232
  requirements:
232
233
  - - ">="
@@ -235,12 +236,12 @@ dependencies:
235
236
  segments:
236
237
  - 0
237
238
  version: "0"
238
- prerelease: false
239
- requirement: *id014
240
- name: rack
241
- - !ruby/object:Gem::Dependency
242
239
  type: :development
243
- version_requirements: &id015 !ruby/object:Gem::Requirement
240
+ version_requirements: *id014
241
+ - !ruby/object:Gem::Dependency
242
+ name: appraisal
243
+ prerelease: false
244
+ requirement: &id015 !ruby/object:Gem::Requirement
244
245
  none: false
245
246
  requirements:
246
247
  - - ~>
@@ -250,9 +251,8 @@ dependencies:
250
251
  - 2
251
252
  - 0
252
253
  version: "2.0"
253
- prerelease: false
254
- requirement: *id015
255
- name: appraisal
254
+ type: :development
255
+ version_requirements: *id015
256
256
  description: WebMock allows stubbing HTTP requests and setting expectations on HTTP requests.
257
257
  email:
258
258
  - bartosz.blimke@gmail.com
@@ -362,9 +362,11 @@ files:
362
362
  - spec/acceptance/typhoeus/typhoeus_hydra_spec.rb
363
363
  - spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb
364
364
  - spec/acceptance/webmock_shared.rb
365
+ - spec/fixtures/test.txt
365
366
  - spec/quality_spec.rb
366
367
  - spec/spec_helper.rb
367
368
  - spec/support/example_curl_output.txt
369
+ - spec/support/failures.rb
368
370
  - spec/support/my_rack_app.rb
369
371
  - spec/support/network_connection.rb
370
372
  - spec/support/webmock_server.rb
@@ -461,9 +463,11 @@ test_files:
461
463
  - spec/acceptance/typhoeus/typhoeus_hydra_spec.rb
462
464
  - spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb
463
465
  - spec/acceptance/webmock_shared.rb
466
+ - spec/fixtures/test.txt
464
467
  - spec/quality_spec.rb
465
468
  - spec/spec_helper.rb
466
469
  - spec/support/example_curl_output.txt
470
+ - spec/support/failures.rb
467
471
  - spec/support/my_rack_app.rb
468
472
  - spec/support/network_connection.rb
469
473
  - spec/support/webmock_server.rb