webmock 1.22.6 → 1.23.0
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.
- data/CHANGELOG.md +22 -0
- data/README.md +54 -7
- data/lib/webmock/http_lib_adapters/httpclient_adapter.rb +12 -4
- data/lib/webmock/version.rb +1 -1
- data/lib/webmock/webmock.rb +4 -0
- data/spec/acceptance/httpclient/httpclient_spec.rb +17 -2
- data/spec/acceptance/shared/allowing_and_disabling_net_connect.rb +144 -36
- metadata +190 -86
- checksums.yaml +0 -7
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.23.0
|
4
|
+
|
5
|
+
* `WebMock.disable_net_connect` accepts `:allow` option with an object that responds to `#call`, receiving a `URI` object and returning a boolean:
|
6
|
+
|
7
|
+
|
8
|
+
blacklist = ['google.com', 'facebook.com', 'apple.com']
|
9
|
+
allowed_sites = lambda{|uri|
|
10
|
+
blacklist.none?{|site| uri.host.include?(site) }
|
11
|
+
}
|
12
|
+
WebMock.disable_net_connect!(:allow => allowed_sites)
|
13
|
+
|
14
|
+
RestClient.get('www.example.org', '/') # ===> Allowed
|
15
|
+
RestClient.get('www.facebook.com', '/') # ===> Failure
|
16
|
+
RestClient.get('apple.com', '/') # ===> Failure
|
17
|
+
|
18
|
+
Thanks to [Pablo Brasero](https://github.com/pablobm)
|
19
|
+
|
20
|
+
* Support for HTTPClient stream responses with body chunks
|
21
|
+
|
22
|
+
Thanks to [Cedric Pimenta](https://github.com/cedricpim)
|
23
|
+
|
24
|
+
|
3
25
|
## 1.22.6
|
4
26
|
|
5
27
|
* Fixes [issue](https://github.com/bblimke/webmock/issues/568) around
|
data/README.md
CHANGED
@@ -462,22 +462,67 @@ Net::HTTP.get('www.something.com', '/') # ===> Failure
|
|
462
462
|
Net::HTTP.get('localhost:9887', '/') # ===> Allowed. Perhaps to Selenium?
|
463
463
|
```
|
464
464
|
|
465
|
-
### External requests can be disabled while allowing
|
465
|
+
### External requests can be disabled while allowing specific requests
|
466
|
+
|
467
|
+
Allowed requests can be specified in a number of ways.
|
468
|
+
|
469
|
+
With a `String` specifying a host name:
|
470
|
+
|
471
|
+
```ruby
|
472
|
+
WebMock.disable_net_connect!(:allow => 'www.example.org')
|
473
|
+
|
474
|
+
RestClient.get('www.something.com', '/') # ===> Failure
|
475
|
+
RestClient.get('www.example.org', '/') # ===> Allowed
|
476
|
+
RestClient.get('www.example.org:8080', '/') # ===> Allowed
|
477
|
+
```
|
478
|
+
|
479
|
+
With a `String` specifying a host name and a port:
|
466
480
|
|
467
481
|
```ruby
|
468
|
-
WebMock.disable_net_connect!(:allow =>
|
482
|
+
WebMock.disable_net_connect!(:allow => 'www.example.org:8080')
|
469
483
|
|
470
484
|
RestClient.get('www.something.com', '/') # ===> Failure
|
485
|
+
RestClient.get('www.example.org', '/') # ===> Failure
|
486
|
+
RestClient.get('www.example.org:8080', '/') # ===> Allowed
|
487
|
+
```
|
488
|
+
|
489
|
+
With a `Regexp` matching the URI:
|
490
|
+
|
491
|
+
```ruby
|
492
|
+
WebMock.disable_net_connect!(:allow => %r{ample.org/foo})
|
471
493
|
|
472
|
-
RestClient.get('www.example.org', '/')
|
494
|
+
RestClient.get('www.example.org', '/foo/bar') # ===> Allowed
|
495
|
+
RestClient.get('sample.org', '/foo') # ===> Allowed
|
496
|
+
RestClient.get('sample.org', '/bar') # ===> Failure
|
497
|
+
```
|
473
498
|
|
474
|
-
|
499
|
+
With an object that responds to `#call`, receiving a `URI` object and returning a boolean:
|
475
500
|
|
476
|
-
|
501
|
+
```ruby
|
502
|
+
blacklist = ['google.com', 'facebook.com', 'apple.com']
|
503
|
+
allowed_sites = lambda{|uri|
|
504
|
+
blacklist.none?{|site| uri.host.include?(site) }
|
505
|
+
}
|
506
|
+
WebMock.disable_net_connect!(:allow => allowed_sites)
|
507
|
+
|
508
|
+
RestClient.get('www.example.org', '/') # ===> Allowed
|
509
|
+
RestClient.get('www.facebook.com', '/') # ===> Failure
|
510
|
+
RestClient.get('apple.com', '/') # ===> Failure
|
511
|
+
```
|
477
512
|
|
478
|
-
|
513
|
+
With an `Array` of any of the above:
|
479
514
|
|
480
|
-
|
515
|
+
```ruby
|
516
|
+
WebMock.disable_net_connect!(:allow => [
|
517
|
+
lambda{|uri| uri.host.length % 2 == 0 },
|
518
|
+
/ample.org/,
|
519
|
+
'bbc.co.uk',
|
520
|
+
])
|
521
|
+
|
522
|
+
RestClient.get('www.example.org', '/') # ===> Allowed
|
523
|
+
RestClient.get('bbc.co.uk', '/') # ===> Allowed
|
524
|
+
RestClient.get('bbc.com', '/') # ===> Allowed
|
525
|
+
RestClient.get('www.bbc.com', '/') # ===> Failure
|
481
526
|
```
|
482
527
|
|
483
528
|
## Connecting on Net::HTTP.start
|
@@ -987,6 +1032,8 @@ People who submitted patches and new features or suggested improvements. Many th
|
|
987
1032
|
* Mike Knepper
|
988
1033
|
* Charles Pence
|
989
1034
|
* Alexey Zapparov
|
1035
|
+
* Pablo Brasero
|
1036
|
+
* Cedric Pimenta
|
990
1037
|
|
991
1038
|
For a full list of contributors you can visit the
|
992
1039
|
[contributors](https://github.com/bblimke/webmock/contributors) page.
|
@@ -72,13 +72,19 @@ if defined?(::HTTPClient)
|
|
72
72
|
|
73
73
|
res = if stream
|
74
74
|
do_get_stream_without_webmock(req, proxy, conn, &block)
|
75
|
+
elsif block
|
76
|
+
body = ''
|
77
|
+
do_get_block_without_webmock(req, proxy, conn) do |http_res, chunk|
|
78
|
+
body += chunk
|
79
|
+
block.call(http_res, chunk)
|
80
|
+
end
|
75
81
|
else
|
76
|
-
do_get_block_without_webmock(req, proxy, conn
|
82
|
+
do_get_block_without_webmock(req, proxy, conn)
|
77
83
|
end
|
78
84
|
res = conn.pop
|
79
85
|
conn.push(res)
|
80
86
|
if WebMock::CallbackRegistry.any_callbacks?
|
81
|
-
webmock_response = build_webmock_response(res)
|
87
|
+
webmock_response = build_webmock_response(res, body)
|
82
88
|
WebMock::CallbackRegistry.invoke_callbacks(
|
83
89
|
{:lib => :httpclient, :real_request => true}, request_signature,
|
84
90
|
webmock_response)
|
@@ -133,7 +139,7 @@ if defined?(::HTTPClient)
|
|
133
139
|
end
|
134
140
|
end
|
135
141
|
|
136
|
-
def build_webmock_response(httpclient_response)
|
142
|
+
def build_webmock_response(httpclient_response, body = nil)
|
137
143
|
webmock_response = WebMock::Response.new
|
138
144
|
webmock_response.status = [httpclient_response.status, httpclient_response.reason]
|
139
145
|
|
@@ -147,7 +153,9 @@ if defined?(::HTTPClient)
|
|
147
153
|
end
|
148
154
|
end
|
149
155
|
|
150
|
-
if
|
156
|
+
if body
|
157
|
+
webmock_response.body = body
|
158
|
+
elsif httpclient_response.content.respond_to?(:read)
|
151
159
|
webmock_response.body = httpclient_response.content.read
|
152
160
|
body = HTTP::Message::Body.new
|
153
161
|
body.init_response(StringIO.new(webmock_response.body))
|
data/lib/webmock/version.rb
CHANGED
data/lib/webmock/webmock.rb
CHANGED
@@ -139,7 +139,6 @@ describe "HTTPClient" do
|
|
139
139
|
end
|
140
140
|
|
141
141
|
context 'session headers' do
|
142
|
-
|
143
142
|
it "client sends a User-Agent header when given an agent_name explicitly to the client" do
|
144
143
|
user_agent = "Client/0.1"
|
145
144
|
stub_request(:get, "www.example.com").with(:headers => { 'User-agent' => "#{user_agent} #{HTTPClient::LIB_NAME}" })
|
@@ -161,7 +160,6 @@ describe "HTTPClient" do
|
|
161
160
|
stub_request(:get, "www.example.com").with(:headers => headers)
|
162
161
|
HTTPClient.new.get("www.example.com", nil, headers)
|
163
162
|
end
|
164
|
-
|
165
163
|
end
|
166
164
|
|
167
165
|
context 'httpclient response header' do
|
@@ -171,4 +169,21 @@ describe "HTTPClient" do
|
|
171
169
|
expect(message.header.request_uri.to_s).to eq('www.example.com')
|
172
170
|
end
|
173
171
|
end
|
172
|
+
|
173
|
+
context 'httpclient streams response' do
|
174
|
+
before do
|
175
|
+
WebMock.allow_net_connect!
|
176
|
+
WebMock.after_request(:except => [:other_lib]) do |_, response|
|
177
|
+
@response = response
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
it 'sets the full body on the webmock response' do
|
182
|
+
body = ''
|
183
|
+
result = HTTPClient.new.request(:get, 'http://www.example.com/') do |http_res, chunk|
|
184
|
+
body += chunk
|
185
|
+
end
|
186
|
+
expect(@response.body).to eq body
|
187
|
+
end
|
188
|
+
end
|
174
189
|
end
|
@@ -88,64 +88,172 @@ shared_context "allowing and disabling net connect" do |*adapter_info|
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
-
describe "is not allowed with
|
92
|
-
|
91
|
+
describe "is not allowed, with exceptions" do
|
92
|
+
describe "allowing by host string" do
|
93
|
+
before :each do
|
94
|
+
WebMock.disable_net_connect!(:allow => 'httpstat.us')
|
95
|
+
end
|
93
96
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
+
context "when the host is not allowed" do
|
98
|
+
it "should return stubbed response if request was stubbed" do
|
99
|
+
stub_request(:get, 'disallowed.example.com/foo').to_return(:body => "abc")
|
100
|
+
expect(http_request(:get, 'http://disallowed.example.com/foo').body).to eq("abc")
|
101
|
+
end
|
97
102
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
103
|
+
it "should raise exception if request was not stubbed" do
|
104
|
+
expect {
|
105
|
+
http_request(:get, 'http://disallowed.example.com/')
|
106
|
+
}.to raise_error(WebMock::NetConnectNotAllowedError, %r(Real HTTP connections are disabled. Unregistered request: GET http://disallowed.example.com))
|
107
|
+
end
|
102
108
|
end
|
103
109
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
110
|
+
context "when the host is allowed" do
|
111
|
+
it "should return stubbed response if request was stubbed" do
|
112
|
+
stub_request(:get, 'httpstat.us/200').to_return(:body => "abc")
|
113
|
+
expect(http_request(:get, "http://httpstat.us/200").body).to eq("abc")
|
114
|
+
end
|
115
|
+
|
116
|
+
# WARNING: this makes a real HTTP request!
|
117
|
+
it "should make a real request to allowed host", :net_connect => true do
|
118
|
+
expect(http_request(:get, "http://httpstat.us/200").status).to eq('200')
|
119
|
+
end
|
108
120
|
end
|
109
121
|
end
|
110
122
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
123
|
+
describe "allowing by host:port string" do
|
124
|
+
def replace_with_different_port(uri)
|
125
|
+
uri.sub(%r{:(\d+)}){|m0, m1| ':' + ($~[1].to_i + 1).to_s }
|
126
|
+
end
|
127
|
+
|
128
|
+
let(:allowed_host_with_port) { WebMockServer.instance.host_with_port }
|
129
|
+
let(:disallowed_host_with_port) { replace_with_different_port(allowed_host_with_port) }
|
130
|
+
|
131
|
+
before :each do
|
132
|
+
WebMock.disable_net_connect!(:allow => allowed_host_with_port)
|
133
|
+
end
|
134
|
+
|
135
|
+
context "when the host is not allowed" do
|
136
|
+
it "should return stubbed response if request was stubbed" do
|
137
|
+
request_url = "http://#{disallowed_host_with_port}/foo"
|
138
|
+
stub_request(:get, request_url).to_return(:body => "abc")
|
139
|
+
expect(http_request(:get, request_url).body).to eq("abc")
|
140
|
+
end
|
141
|
+
|
142
|
+
it "should raise exception if request was not stubbed" do
|
143
|
+
request_url = "http://#{disallowed_host_with_port}/foo"
|
144
|
+
expect {
|
145
|
+
http_request(:get, request_url)
|
146
|
+
}.to raise_error(WebMock::NetConnectNotAllowedError, %r(Real HTTP connections are disabled. Unregistered request: GET #{request_url}))
|
147
|
+
end
|
115
148
|
end
|
116
149
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
150
|
+
context "when the host is allowed" do
|
151
|
+
it "should return stubbed response if request was stubbed" do
|
152
|
+
request_url = "http://#{allowed_host_with_port}/foo"
|
153
|
+
stub_request(:get, request_url).to_return(:body => "abc")
|
154
|
+
expect(http_request(:get, request_url).body).to eq('abc')
|
155
|
+
end
|
156
|
+
|
157
|
+
it "should make a real request to allowed host", :net_connect => true do
|
158
|
+
request_url = "http://#{allowed_host_with_port}/foo"
|
159
|
+
expect(http_request(:get, request_url).status).to eq('200')
|
160
|
+
end
|
121
161
|
end
|
122
162
|
end
|
123
163
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
164
|
+
describe "allowing by regular expression" do
|
165
|
+
before :each do
|
166
|
+
WebMock.disable_net_connect!(:allow => %r{httpstat})
|
167
|
+
end
|
168
|
+
|
169
|
+
context "when the host is not allowed" do
|
170
|
+
it "should return stubbed response if request was stubbed" do
|
171
|
+
stub_request(:get, 'disallowed.example.com/foo').to_return(:body => "abc")
|
172
|
+
expect(http_request(:get, 'http://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, 'http://disallowed.example.com/')
|
178
|
+
}.to raise_error(WebMock::NetConnectNotAllowedError, %r(Real HTTP connections are disabled. Unregistered request: GET http://disallowed.example.com))
|
179
|
+
end
|
129
180
|
end
|
130
181
|
|
131
|
-
|
132
|
-
|
182
|
+
context "when the host is allowed" do
|
183
|
+
it "should return stubbed response if request was stubbed" do
|
184
|
+
stub_request(:get, 'httpstat.us/200').to_return(:body => "abc")
|
185
|
+
expect(http_request(:get, "http://httpstat.us/200").body).to eq("abc")
|
186
|
+
end
|
187
|
+
|
188
|
+
# WARNING: this makes a real HTTP request!
|
189
|
+
it "should make a real request to allowed host", :net_connect => true do
|
190
|
+
expect(http_request(:get, "http://httpstat.us/200").status).to eq('200')
|
191
|
+
end
|
133
192
|
end
|
134
193
|
end
|
135
194
|
|
136
|
-
|
137
|
-
|
138
|
-
|
195
|
+
describe "allowing by a callable" do
|
196
|
+
before :each do
|
197
|
+
WebMock.disable_net_connect!(:allow => lambda{|url| url.to_str.include?('httpstat') })
|
198
|
+
end
|
199
|
+
|
200
|
+
context "when the host is not allowed" do
|
201
|
+
it "should return stubbed response if request was stubbed" do
|
202
|
+
stub_request(:get, 'disallowed.example.com/foo').to_return(:body => "abc")
|
203
|
+
expect(http_request(:get, 'http://disallowed.example.com/foo').body).to eq("abc")
|
204
|
+
end
|
205
|
+
|
206
|
+
it "should raise exception if request was not stubbed" do
|
207
|
+
expect {
|
208
|
+
http_request(:get, 'http://disallowed.example.com/')
|
209
|
+
}.to raise_error(WebMock::NetConnectNotAllowedError, %r(Real HTTP connections are disabled. Unregistered request: GET http://disallowed.example.com))
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
context "when the host is allowed" do
|
214
|
+
it "should return stubbed response if request was stubbed" do
|
215
|
+
stub_request(:get, 'httpstat.us/200').to_return(:body => "abc")
|
216
|
+
expect(http_request(:get, "http://httpstat.us/200").body).to eq("abc")
|
217
|
+
end
|
218
|
+
|
219
|
+
# WARNING: this makes a real HTTP request!
|
220
|
+
it "should make a real request to allowed host", :net_connect => true do
|
221
|
+
expect(http_request(:get, "http://httpstat.us/200").status).to eq('200')
|
222
|
+
end
|
139
223
|
end
|
140
224
|
end
|
141
225
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
226
|
+
describe "allowing by a list of the above" do
|
227
|
+
before :each do
|
228
|
+
WebMock.disable_net_connect!(:allow => [lambda{|_| false }, %r{foobar}, 'httpstat.us'])
|
229
|
+
end
|
230
|
+
|
231
|
+
context "when the host is not allowed" do
|
232
|
+
it "should return stubbed response if request was stubbed" do
|
233
|
+
stub_request(:get, 'disallowed.example.com/foo').to_return(:body => "abc")
|
234
|
+
expect(http_request(:get, 'http://disallowed.example.com/foo').body).to eq("abc")
|
235
|
+
end
|
236
|
+
|
237
|
+
it "should raise exception if request was not stubbed" do
|
238
|
+
expect {
|
239
|
+
http_request(:get, 'http://disallowed.example.com/')
|
240
|
+
}.to raise_error(WebMock::NetConnectNotAllowedError, %r(Real HTTP connections are disabled. Unregistered request: GET http://disallowed.example.com))
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
context "when the host is allowed" do
|
245
|
+
it "should return stubbed response if request was stubbed" do
|
246
|
+
stub_request(:get, 'httpstat.us/200').to_return(:body => "abc")
|
247
|
+
expect(http_request(:get, "http://httpstat.us/200").body).to eq("abc")
|
248
|
+
end
|
249
|
+
|
250
|
+
# WARNING: this makes a real HTTP request!
|
251
|
+
it "should make a real request to allowed host", :net_connect => true do
|
252
|
+
expect(http_request(:get, "http://httpstat.us/200").status).to eq('200')
|
253
|
+
end
|
147
254
|
end
|
148
255
|
end
|
256
|
+
|
149
257
|
end
|
150
258
|
end
|
151
259
|
end
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webmock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 75
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 23
|
9
|
+
- 0
|
10
|
+
version: 1.23.0
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Bartosz Blimke
|
@@ -9,157 +15,244 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2016-
|
18
|
+
date: 2016-02-18 00:00:00 +01:00
|
19
|
+
default_executable:
|
13
20
|
dependencies:
|
14
21
|
- !ruby/object:Gem::Dependency
|
15
|
-
|
16
|
-
|
17
|
-
|
22
|
+
type: :runtime
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
18
25
|
requirements:
|
19
26
|
- - ">="
|
20
27
|
- !ruby/object:Gem::Version
|
28
|
+
hash: 15
|
29
|
+
segments:
|
30
|
+
- 2
|
31
|
+
- 3
|
32
|
+
- 6
|
21
33
|
version: 2.3.6
|
22
|
-
type: :runtime
|
23
|
-
version_requirements: *id001
|
24
|
-
- !ruby/object:Gem::Dependency
|
25
|
-
name: crack
|
26
34
|
prerelease: false
|
27
|
-
requirement:
|
35
|
+
requirement: *id001
|
36
|
+
name: addressable
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
type: :runtime
|
39
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
28
41
|
requirements:
|
29
42
|
- - ">="
|
30
43
|
- !ruby/object:Gem::Version
|
44
|
+
hash: 23
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
- 3
|
48
|
+
- 2
|
31
49
|
version: 0.3.2
|
32
|
-
type: :runtime
|
33
|
-
version_requirements: *id002
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: hashdiff
|
36
50
|
prerelease: false
|
37
|
-
requirement:
|
51
|
+
requirement: *id002
|
52
|
+
name: crack
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
type: :runtime
|
55
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
38
57
|
requirements:
|
39
|
-
-
|
40
|
-
- ">="
|
58
|
+
- - ">="
|
41
59
|
- !ruby/object:Gem::Version
|
60
|
+
hash: 3
|
61
|
+
segments:
|
62
|
+
- 0
|
42
63
|
version: "0"
|
43
|
-
type: :runtime
|
44
|
-
version_requirements: *id003
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
|
-
name: rspec
|
47
64
|
prerelease: false
|
48
|
-
requirement:
|
65
|
+
requirement: *id003
|
66
|
+
name: hashdiff
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
type: :development
|
69
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
49
71
|
requirements:
|
50
72
|
- - ">="
|
51
73
|
- !ruby/object:Gem::Version
|
74
|
+
hash: 3
|
75
|
+
segments:
|
76
|
+
- 3
|
77
|
+
- 1
|
78
|
+
- 0
|
52
79
|
version: 3.1.0
|
53
|
-
type: :development
|
54
|
-
version_requirements: *id004
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: httpclient
|
57
80
|
prerelease: false
|
58
|
-
requirement:
|
81
|
+
requirement: *id004
|
82
|
+
name: rspec
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
type: :development
|
85
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
59
87
|
requirements:
|
60
88
|
- - ">="
|
61
89
|
- !ruby/object:Gem::Version
|
90
|
+
hash: 15
|
91
|
+
segments:
|
92
|
+
- 2
|
93
|
+
- 2
|
94
|
+
- 4
|
62
95
|
version: 2.2.4
|
63
|
-
type: :development
|
64
|
-
version_requirements: *id005
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: patron
|
67
96
|
prerelease: false
|
68
|
-
requirement:
|
97
|
+
requirement: *id005
|
98
|
+
name: httpclient
|
99
|
+
- !ruby/object:Gem::Dependency
|
100
|
+
type: :development
|
101
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
102
|
+
none: false
|
69
103
|
requirements:
|
70
104
|
- - "="
|
71
105
|
- !ruby/object:Gem::Version
|
106
|
+
hash: 43
|
107
|
+
segments:
|
108
|
+
- 0
|
109
|
+
- 4
|
110
|
+
- 18
|
72
111
|
version: 0.4.18
|
73
|
-
type: :development
|
74
|
-
version_requirements: *id006
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: em-http-request
|
77
112
|
prerelease: false
|
78
|
-
requirement:
|
113
|
+
requirement: *id006
|
114
|
+
name: patron
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
type: :development
|
117
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
79
119
|
requirements:
|
80
120
|
- - ">="
|
81
121
|
- !ruby/object:Gem::Version
|
122
|
+
hash: 19
|
123
|
+
segments:
|
124
|
+
- 1
|
125
|
+
- 0
|
126
|
+
- 2
|
82
127
|
version: 1.0.2
|
83
|
-
type: :development
|
84
|
-
version_requirements: *id007
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
|
-
name: http
|
87
128
|
prerelease: false
|
88
|
-
requirement:
|
129
|
+
requirement: *id007
|
130
|
+
name: em-http-request
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
type: :development
|
133
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
134
|
+
none: false
|
89
135
|
requirements:
|
90
136
|
- - "="
|
91
137
|
- !ruby/object:Gem::Version
|
138
|
+
hash: 5
|
139
|
+
segments:
|
140
|
+
- 0
|
141
|
+
- 7
|
142
|
+
- 3
|
92
143
|
version: 0.7.3
|
93
|
-
type: :development
|
94
|
-
version_requirements: *id008
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: curb
|
97
144
|
prerelease: false
|
98
|
-
requirement:
|
145
|
+
requirement: *id008
|
146
|
+
name: http
|
147
|
+
- !ruby/object:Gem::Dependency
|
148
|
+
type: :development
|
149
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
150
|
+
none: false
|
99
151
|
requirements:
|
100
152
|
- - <=
|
101
153
|
- !ruby/object:Gem::Version
|
154
|
+
hash: 51
|
155
|
+
segments:
|
156
|
+
- 0
|
157
|
+
- 8
|
158
|
+
- 6
|
102
159
|
version: 0.8.6
|
103
|
-
type: :development
|
104
|
-
version_requirements: *id009
|
105
|
-
- !ruby/object:Gem::Dependency
|
106
|
-
name: typhoeus
|
107
160
|
prerelease: false
|
108
|
-
requirement:
|
161
|
+
requirement: *id009
|
162
|
+
name: curb
|
163
|
+
- !ruby/object:Gem::Dependency
|
164
|
+
type: :development
|
165
|
+
version_requirements: &id010 !ruby/object:Gem::Requirement
|
166
|
+
none: false
|
109
167
|
requirements:
|
110
168
|
- - ">="
|
111
169
|
- !ruby/object:Gem::Version
|
170
|
+
hash: 11
|
171
|
+
segments:
|
172
|
+
- 0
|
173
|
+
- 5
|
174
|
+
- 0
|
112
175
|
version: 0.5.0
|
113
|
-
type: :development
|
114
|
-
version_requirements: *id010
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name: excon
|
117
176
|
prerelease: false
|
118
|
-
requirement:
|
177
|
+
requirement: *id010
|
178
|
+
name: typhoeus
|
179
|
+
- !ruby/object:Gem::Dependency
|
180
|
+
type: :development
|
181
|
+
version_requirements: &id011 !ruby/object:Gem::Requirement
|
182
|
+
none: false
|
119
183
|
requirements:
|
120
184
|
- - ">="
|
121
185
|
- !ruby/object:Gem::Version
|
186
|
+
hash: 121
|
187
|
+
segments:
|
188
|
+
- 0
|
189
|
+
- 27
|
190
|
+
- 5
|
122
191
|
version: 0.27.5
|
123
|
-
type: :development
|
124
|
-
version_requirements: *id011
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: minitest
|
127
192
|
prerelease: false
|
128
|
-
requirement:
|
193
|
+
requirement: *id011
|
194
|
+
name: excon
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
type: :development
|
197
|
+
version_requirements: &id012 !ruby/object:Gem::Requirement
|
198
|
+
none: false
|
129
199
|
requirements:
|
130
200
|
- - ~>
|
131
201
|
- !ruby/object:Gem::Version
|
202
|
+
hash: 55
|
203
|
+
segments:
|
204
|
+
- 5
|
205
|
+
- 0
|
206
|
+
- 0
|
132
207
|
version: 5.0.0
|
133
|
-
type: :development
|
134
|
-
version_requirements: *id012
|
135
|
-
- !ruby/object:Gem::Dependency
|
136
|
-
name: rdoc
|
137
208
|
prerelease: false
|
138
|
-
requirement:
|
209
|
+
requirement: *id012
|
210
|
+
name: minitest
|
211
|
+
- !ruby/object:Gem::Dependency
|
212
|
+
type: :development
|
213
|
+
version_requirements: &id013 !ruby/object:Gem::Requirement
|
214
|
+
none: false
|
139
215
|
requirements:
|
140
216
|
- - ">"
|
141
217
|
- !ruby/object:Gem::Version
|
218
|
+
hash: 19
|
219
|
+
segments:
|
220
|
+
- 3
|
221
|
+
- 5
|
222
|
+
- 0
|
142
223
|
version: 3.5.0
|
143
|
-
type: :development
|
144
|
-
version_requirements: *id013
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: rack
|
147
224
|
prerelease: false
|
148
|
-
requirement:
|
149
|
-
|
150
|
-
- *id014
|
151
|
-
type: :development
|
152
|
-
version_requirements: *id015
|
225
|
+
requirement: *id013
|
226
|
+
name: rdoc
|
153
227
|
- !ruby/object:Gem::Dependency
|
154
|
-
|
228
|
+
type: :development
|
229
|
+
version_requirements: &id014 !ruby/object:Gem::Requirement
|
230
|
+
none: false
|
231
|
+
requirements:
|
232
|
+
- - ">="
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
hash: 3
|
235
|
+
segments:
|
236
|
+
- 0
|
237
|
+
version: "0"
|
155
238
|
prerelease: false
|
156
|
-
requirement:
|
239
|
+
requirement: *id014
|
240
|
+
name: rack
|
241
|
+
- !ruby/object:Gem::Dependency
|
242
|
+
type: :development
|
243
|
+
version_requirements: &id015 !ruby/object:Gem::Requirement
|
244
|
+
none: false
|
157
245
|
requirements:
|
158
246
|
- - ~>
|
159
247
|
- !ruby/object:Gem::Version
|
248
|
+
hash: 3
|
249
|
+
segments:
|
250
|
+
- 2
|
251
|
+
- 0
|
160
252
|
version: "2.0"
|
161
|
-
|
162
|
-
|
253
|
+
prerelease: false
|
254
|
+
requirement: *id015
|
255
|
+
name: appraisal
|
163
256
|
description: WebMock allows stubbing HTTP requests and setting expectations on HTTP requests.
|
164
257
|
email:
|
165
258
|
- bartosz.blimke@gmail.com
|
@@ -304,28 +397,39 @@ files:
|
|
304
397
|
- test/test_helper.rb
|
305
398
|
- test/test_webmock.rb
|
306
399
|
- webmock.gemspec
|
400
|
+
has_rdoc: true
|
307
401
|
homepage: http://github.com/bblimke/webmock
|
308
402
|
licenses:
|
309
403
|
- MIT
|
310
|
-
metadata: {}
|
311
|
-
|
312
404
|
post_install_message:
|
313
405
|
rdoc_options: []
|
314
406
|
|
315
407
|
require_paths:
|
316
408
|
- lib
|
317
409
|
required_ruby_version: !ruby/object:Gem::Requirement
|
410
|
+
none: false
|
318
411
|
requirements:
|
319
|
-
-
|
412
|
+
- - ">="
|
413
|
+
- !ruby/object:Gem::Version
|
414
|
+
hash: 3
|
415
|
+
segments:
|
416
|
+
- 0
|
417
|
+
version: "0"
|
320
418
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
419
|
+
none: false
|
321
420
|
requirements:
|
322
|
-
-
|
421
|
+
- - ">="
|
422
|
+
- !ruby/object:Gem::Version
|
423
|
+
hash: 3
|
424
|
+
segments:
|
425
|
+
- 0
|
426
|
+
version: "0"
|
323
427
|
requirements: []
|
324
428
|
|
325
429
|
rubyforge_project: webmock
|
326
|
-
rubygems_version:
|
430
|
+
rubygems_version: 1.6.2
|
327
431
|
signing_key:
|
328
|
-
specification_version:
|
432
|
+
specification_version: 3
|
329
433
|
summary: Library for stubbing HTTP requests in Ruby.
|
330
434
|
test_files:
|
331
435
|
- spec/acceptance/curb/curb_spec.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
data.tar.gz: cea737d780cbdf021a2649d7d942383e2bbbb69c
|
4
|
-
metadata.gz: e3f79ac55efa0abafd09ab92ec4058fa446839da
|
5
|
-
SHA512:
|
6
|
-
data.tar.gz: 235d4a2350afedb4a5b4781aaf84cca3111cd5300d85ec65736a44659f60090becc3041dfae074befd74534c34e2998364dac1b4435a36d1844e9408f8e3d1db
|
7
|
-
metadata.gz: 163992f908d194fa07e88027d26fed7c9dbf8dde05b6df292a0d3b1f6da2babbc85d96920cd21e17020c8eb00c0ee4f898a8d4d4265ca35d993a1b8acc12bb58
|