webmock 3.5.1 → 3.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/CI.yml +38 -0
- data/CHANGELOG.md +343 -2
- data/Gemfile +1 -1
- data/README.md +116 -32
- data/Rakefile +12 -4
- data/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +221 -0
- data/lib/webmock/http_lib_adapters/curb_adapter.rb +12 -3
- data/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +7 -4
- data/lib/webmock/http_lib_adapters/excon_adapter.rb +3 -0
- data/lib/webmock/http_lib_adapters/http_rb/client.rb +2 -1
- data/lib/webmock/http_lib_adapters/http_rb/response.rb +27 -3
- data/lib/webmock/http_lib_adapters/http_rb/streamer.rb +5 -3
- data/lib/webmock/http_lib_adapters/http_rb/webmock.rb +6 -2
- data/lib/webmock/http_lib_adapters/httpclient_adapter.rb +23 -6
- data/lib/webmock/http_lib_adapters/manticore_adapter.rb +33 -15
- data/lib/webmock/http_lib_adapters/net_http.rb +35 -103
- data/lib/webmock/http_lib_adapters/patron_adapter.rb +1 -1
- data/lib/webmock/request_body_diff.rb +1 -1
- data/lib/webmock/request_pattern.rb +106 -56
- data/lib/webmock/request_signature.rb +2 -2
- data/lib/webmock/request_stub.rb +15 -0
- data/lib/webmock/response.rb +19 -13
- data/lib/webmock/rspec.rb +2 -1
- data/lib/webmock/stub_registry.rb +26 -11
- data/lib/webmock/test_unit.rb +1 -3
- data/lib/webmock/util/query_mapper.rb +4 -2
- data/lib/webmock/util/uri.rb +8 -8
- data/lib/webmock/version.rb +1 -1
- data/lib/webmock/webmock.rb +20 -3
- data/lib/webmock.rb +1 -0
- data/minitest/webmock_spec.rb +1 -1
- data/spec/acceptance/async_http_client/async_http_client_spec.rb +375 -0
- data/spec/acceptance/async_http_client/async_http_client_spec_helper.rb +73 -0
- data/spec/acceptance/curb/curb_spec.rb +34 -5
- data/spec/acceptance/em_http_request/em_http_request_spec.rb +57 -1
- data/spec/acceptance/em_http_request/em_http_request_spec_helper.rb +2 -2
- data/spec/acceptance/excon/excon_spec.rb +2 -2
- data/spec/acceptance/excon/excon_spec_helper.rb +2 -0
- data/spec/acceptance/http_rb/http_rb_spec.rb +11 -0
- data/spec/acceptance/manticore/manticore_spec.rb +51 -0
- data/spec/acceptance/net_http/net_http_shared.rb +46 -9
- data/spec/acceptance/net_http/net_http_spec.rb +87 -23
- data/spec/acceptance/net_http/real_net_http_spec.rb +1 -1
- data/spec/acceptance/patron/patron_spec.rb +19 -21
- data/spec/acceptance/patron/patron_spec_helper.rb +2 -2
- data/spec/acceptance/shared/allowing_and_disabling_net_connect.rb +14 -14
- data/spec/acceptance/shared/callbacks.rb +3 -2
- data/spec/acceptance/shared/complex_cross_concern_behaviors.rb +1 -1
- data/spec/acceptance/shared/request_expectations.rb +7 -0
- data/spec/acceptance/shared/returning_declared_responses.rb +36 -15
- data/spec/acceptance/shared/stubbing_requests.rb +40 -0
- data/spec/support/webmock_server.rb +1 -0
- data/spec/unit/request_pattern_spec.rb +201 -49
- data/spec/unit/request_signature_spec.rb +21 -1
- data/spec/unit/request_stub_spec.rb +35 -0
- data/spec/unit/response_spec.rb +51 -19
- data/spec/unit/util/query_mapper_spec.rb +7 -0
- data/spec/unit/util/uri_spec.rb +74 -2
- data/spec/unit/webmock_spec.rb +108 -5
- data/test/test_webmock.rb +6 -0
- data/webmock.gemspec +15 -7
- metadata +78 -35
- data/.travis.yml +0 -21
data/spec/unit/response_spec.rb
CHANGED
@@ -31,7 +31,7 @@ describe WebMock::Response do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
it "should report normalized headers" do
|
34
|
-
|
34
|
+
allow(WebMock::Util::Headers).to receive(:normalize_headers).with({'A' => 'a'}.freeze).and_return('B' => 'b')
|
35
35
|
@response = WebMock::Response.new(headers: {'A' => 'a'})
|
36
36
|
expect(@response.headers).to eq({'B' => 'b'})
|
37
37
|
end
|
@@ -130,14 +130,46 @@ describe WebMock::Response do
|
|
130
130
|
# Users of webmock commonly make the mistake of stubbing the response
|
131
131
|
# body to return a hash, to prevent this:
|
132
132
|
#
|
133
|
-
it "should error if
|
133
|
+
it "should error if given a non-allowed type: a hash" do
|
134
134
|
expect { WebMock::Response.new(body: Hash.new) }.to \
|
135
135
|
raise_error(WebMock::Response::InvalidBody)
|
136
136
|
end
|
137
137
|
|
138
|
+
it "should error if given a non-allowed type: something that is not a hash" do
|
139
|
+
expect { WebMock::Response.new(body: 123) }.to \
|
140
|
+
raise_error(WebMock::Response::InvalidBody)
|
141
|
+
end
|
138
142
|
end
|
139
143
|
|
140
144
|
describe "from raw response" do
|
145
|
+
describe "when input is a StringIO" do
|
146
|
+
before(:each) do
|
147
|
+
@io = StringIO.new(File.read(CURL_EXAMPLE_OUTPUT_PATH))
|
148
|
+
@response = WebMock::Response.new(@io)
|
149
|
+
end
|
150
|
+
|
151
|
+
it "should read status" do
|
152
|
+
expect(@response.status).to eq([202, "OK"])
|
153
|
+
end
|
154
|
+
|
155
|
+
it "should read headers" do
|
156
|
+
expect(@response.headers).to eq(
|
157
|
+
"Date"=>"Sat, 23 Jan 2010 01:01:05 GMT",
|
158
|
+
"Content-Type"=>"text/html; charset=UTF-8",
|
159
|
+
"Content-Length"=>"419",
|
160
|
+
"Connection"=>"Keep-Alive",
|
161
|
+
"Accept"=>"image/jpeg, image/png"
|
162
|
+
)
|
163
|
+
end
|
164
|
+
|
165
|
+
it "should read body" do
|
166
|
+
expect(@response.body.size).to eq(419)
|
167
|
+
end
|
168
|
+
|
169
|
+
it "should close IO" do
|
170
|
+
expect(@io).to be_closed
|
171
|
+
end
|
172
|
+
end
|
141
173
|
|
142
174
|
describe "when input is IO" do
|
143
175
|
before(:each) do
|
@@ -152,12 +184,12 @@ describe WebMock::Response do
|
|
152
184
|
|
153
185
|
it "should read headers" do
|
154
186
|
expect(@response.headers).to eq({
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
187
|
+
"Date"=>"Sat, 23 Jan 2010 01:01:05 GMT",
|
188
|
+
"Content-Type"=>"text/html; charset=UTF-8",
|
189
|
+
"Content-Length"=>"419",
|
190
|
+
"Connection"=>"Keep-Alive",
|
191
|
+
"Accept"=>"image/jpeg, image/png"
|
192
|
+
})
|
161
193
|
end
|
162
194
|
|
163
195
|
it "should read body" do
|
@@ -182,12 +214,12 @@ describe WebMock::Response do
|
|
182
214
|
|
183
215
|
it "should read headers" do
|
184
216
|
expect(@response.headers).to eq({
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
217
|
+
"Date"=>"Sat, 23 Jan 2010 01:01:05 GMT",
|
218
|
+
"Content-Type"=>"text/html; charset=UTF-8",
|
219
|
+
"Content-Length"=>"419",
|
220
|
+
"Connection"=>"Keep-Alive",
|
221
|
+
"Accept"=>"image/jpeg, image/png"
|
222
|
+
})
|
191
223
|
end
|
192
224
|
|
193
225
|
it "should read body" do
|
@@ -234,11 +266,11 @@ describe WebMock::Response do
|
|
234
266
|
it "should evaluate new response with evaluated options" do
|
235
267
|
request_signature = WebMock::RequestSignature.new(:post, "www.example.com", body: "abc", headers: {'A' => 'a'})
|
236
268
|
response = WebMock::DynamicResponse.new(lambda {|request|
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
269
|
+
{
|
270
|
+
body: request.body,
|
271
|
+
headers: request.headers,
|
272
|
+
status: 302
|
273
|
+
}
|
242
274
|
})
|
243
275
|
evaluated_response = response.evaluate(request_signature)
|
244
276
|
expect(evaluated_response.body).to eq("abc")
|
@@ -147,4 +147,11 @@ describe WebMock::Util::QueryMapper do
|
|
147
147
|
expect(subject.values_to_query values).to eq query
|
148
148
|
expect(subject.query_to_values query).to eq values
|
149
149
|
end
|
150
|
+
|
151
|
+
it 'converts an empty array to ?' do
|
152
|
+
query = "one%5B%5D"
|
153
|
+
values = {"one" => []}
|
154
|
+
expect(subject.values_to_query values).to eq query
|
155
|
+
expect(subject.query_to_values query).to eq values
|
156
|
+
end
|
150
157
|
end
|
data/spec/unit/util/uri_spec.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
|
4
3
|
URIS_WITHOUT_PATH_OR_PARAMS =
|
5
4
|
[
|
6
5
|
"www.example.com",
|
@@ -65,7 +64,6 @@ URIS_WITH_DIFFERENT_PORT =
|
|
65
64
|
"http://www.example.com:88/"
|
66
65
|
].sort
|
67
66
|
|
68
|
-
|
69
67
|
URIS_FOR_HTTPS =
|
70
68
|
[
|
71
69
|
"https://www.example.com",
|
@@ -74,6 +72,49 @@ URIS_FOR_HTTPS =
|
|
74
72
|
"https://www.example.com:443/"
|
75
73
|
].sort
|
76
74
|
|
75
|
+
URIS_FOR_LOCALHOST =
|
76
|
+
[
|
77
|
+
"localhost",
|
78
|
+
"localhost/",
|
79
|
+
"localhost:80",
|
80
|
+
"localhost:80/",
|
81
|
+
"http://localhost",
|
82
|
+
"http://localhost/",
|
83
|
+
"http://localhost:80",
|
84
|
+
"http://localhost:80/"
|
85
|
+
].sort
|
86
|
+
|
87
|
+
URIS_WITH_SCHEME =
|
88
|
+
[
|
89
|
+
"http://www.example.com",
|
90
|
+
"http://www.example.com/",
|
91
|
+
"http://www.example.com:80",
|
92
|
+
"http://www.example.com:80/"
|
93
|
+
].sort
|
94
|
+
|
95
|
+
URIS_WITH_COLON_IN_PATH =
|
96
|
+
[
|
97
|
+
[
|
98
|
+
"https://example.com/a/b:80",
|
99
|
+
"https://example.com:443/a/b:80",
|
100
|
+
].sort,
|
101
|
+
[
|
102
|
+
"https://example.com:443/a/b:443",
|
103
|
+
"https://example.com/a/b:443",
|
104
|
+
].sort,
|
105
|
+
[
|
106
|
+
"http://example.com/a/b:443",
|
107
|
+
"example.com/a/b:443",
|
108
|
+
"http://example.com:80/a/b:443",
|
109
|
+
"example.com:80/a/b:443",
|
110
|
+
].sort,
|
111
|
+
[
|
112
|
+
"http://example.com/a/b:80",
|
113
|
+
"example.com/a/b:80",
|
114
|
+
"http://example.com:80/a/b:80",
|
115
|
+
"example.com:80/a/b:80",
|
116
|
+
].sort
|
117
|
+
]
|
77
118
|
|
78
119
|
describe WebMock::Util::URI do
|
79
120
|
|
@@ -115,6 +156,37 @@ describe WebMock::Util::URI do
|
|
115
156
|
end
|
116
157
|
end
|
117
158
|
|
159
|
+
it "should find all variations of the same uri for all variations of host names uris without a period" do
|
160
|
+
URIS_FOR_LOCALHOST.each do |uri|
|
161
|
+
expect(WebMock::Util::URI.variations_of_uri_as_strings(uri).sort).to eq(URIS_FOR_LOCALHOST)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
it "should find all variations of the same uri with scheme for all variations when only_with_scheme is true" do
|
166
|
+
URIS_WITHOUT_PATH_OR_PARAMS.each do |uri|
|
167
|
+
variations_of_uri_with_scheme = WebMock::Util::URI.variations_of_uri_as_strings(uri, only_with_scheme: true)
|
168
|
+
expect(variations_of_uri_with_scheme.sort).to eq(URIS_WITH_SCHEME)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
it "should not replace :80 or :443 in path" do
|
173
|
+
URIS_WITH_COLON_IN_PATH.each do |uris|
|
174
|
+
uris.each do |uri|
|
175
|
+
expect(WebMock::Util::URI.variations_of_uri_as_strings(uri).sort).to eq(uris)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
it "should find all variations of uris with https, basic auth, a non-standard port and a path" do
|
181
|
+
uri = "https://~%8A:pass@www.example.com:9000/foo"
|
182
|
+
variations = [
|
183
|
+
"https://~%8A:pass@www.example.com:9000/foo",
|
184
|
+
"https://~\x8A:pass@www.example.com:9000/foo".force_encoding(Encoding::ASCII_8BIT)
|
185
|
+
]
|
186
|
+
|
187
|
+
expect(WebMock::Util::URI.variations_of_uri_as_strings(uri)).to eq(variations)
|
188
|
+
end
|
189
|
+
|
118
190
|
end
|
119
191
|
|
120
192
|
describe "normalized uri equality" do
|
data/spec/unit/webmock_spec.rb
CHANGED
@@ -1,11 +1,114 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe "WebMock
|
4
|
-
|
5
|
-
|
3
|
+
describe "WebMock" do
|
4
|
+
|
5
|
+
describe ".version" do
|
6
|
+
it "should report version" do
|
7
|
+
expect(WebMock.version).to eq(WebMock::VERSION)
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should not require safe_yaml" do
|
11
|
+
expect(defined?SafeYAML).to eq(nil)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should alias enable_net_connect! to allow_net_connect!" do
|
15
|
+
expect(WebMock.method(:enable_net_connect!)).to eq(WebMock.method(:allow_net_connect!))
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should alias disallow_net_connect! to disable_net_connect!" do
|
19
|
+
expect(WebMock.method(:disallow_net_connect!)).to eq(WebMock.method(:disable_net_connect!))
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe ".net_connect_allowed?" do
|
24
|
+
context 'enabled globally' do
|
25
|
+
before do
|
26
|
+
WebMock.enable_net_connect!
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'without arguments' do
|
30
|
+
it 'returns WebMock::Config.instance.allow_net_connect' do
|
31
|
+
expect(WebMock.net_connect_allowed?).to eql(true)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context 'disabled with allowed remote string' do
|
37
|
+
before do
|
38
|
+
WebMock.disable_net_connect!(allow: "http://192.168.64.2:20031")
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'without arguments' do
|
42
|
+
it 'returns WebMock::Config.instance.allow_net_connect' do
|
43
|
+
expect(WebMock.net_connect_allowed?).to eql(false)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
context 'disabled globally' do
|
49
|
+
before do
|
50
|
+
WebMock.disable_net_connect!
|
51
|
+
end
|
52
|
+
|
53
|
+
context 'without arguments' do
|
54
|
+
it 'returns WebMock::Config.instance.allow_net_connect' do
|
55
|
+
expect(WebMock.net_connect_allowed?).to eql(false)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
6
59
|
end
|
7
60
|
|
8
|
-
|
9
|
-
|
61
|
+
describe ".net_http_connect_on_start?" do
|
62
|
+
let(:uri) { Addressable::URI.parse("http://example.org:5432") }
|
63
|
+
|
64
|
+
it "will not connect on start when false" do
|
65
|
+
WebMock.disable_net_connect!
|
66
|
+
expect(WebMock.net_http_connect_on_start?(uri)).to be(false)
|
67
|
+
end
|
68
|
+
|
69
|
+
it "will connect on start when true" do
|
70
|
+
WebMock.disable_net_connect!(net_http_connect_on_start: true)
|
71
|
+
expect(WebMock.net_http_connect_on_start?(uri)).to be(true)
|
72
|
+
end
|
73
|
+
|
74
|
+
it "will connect on start when regexp matches" do
|
75
|
+
WebMock.disable_net_connect!(net_http_connect_on_start: /example/)
|
76
|
+
expect(WebMock.net_http_connect_on_start?(uri)).to be(true)
|
77
|
+
end
|
78
|
+
|
79
|
+
it "will not connect on start when regexp does not match" do
|
80
|
+
WebMock.disable_net_connect!(net_http_connect_on_start: /nope/)
|
81
|
+
expect(WebMock.net_http_connect_on_start?(uri)).to be(false)
|
82
|
+
end
|
83
|
+
|
84
|
+
it "will connect on start when host matches" do
|
85
|
+
WebMock.disable_net_connect!(net_http_connect_on_start: "example.org")
|
86
|
+
expect(WebMock.net_http_connect_on_start?(uri)).to be(true)
|
87
|
+
end
|
88
|
+
|
89
|
+
it "will not connect on start when host does not match" do
|
90
|
+
WebMock.disable_net_connect!(net_http_connect_on_start: "localhost")
|
91
|
+
expect(WebMock.net_http_connect_on_start?(uri)).to be(false)
|
92
|
+
end
|
93
|
+
|
94
|
+
it "will connect on start when host + port matches" do
|
95
|
+
WebMock.disable_net_connect!(net_http_connect_on_start: "example.org:5432")
|
96
|
+
expect(WebMock.net_http_connect_on_start?(uri)).to be(true)
|
97
|
+
end
|
98
|
+
|
99
|
+
it "will not connect on start when host + port does not match" do
|
100
|
+
WebMock.disable_net_connect!(net_http_connect_on_start: "example.org:80")
|
101
|
+
expect(WebMock.net_http_connect_on_start?(uri)).to be(false)
|
102
|
+
end
|
103
|
+
|
104
|
+
it "will connect on start when scheme + host + port matches" do
|
105
|
+
WebMock.disable_net_connect!(net_http_connect_on_start: "http://example.org:5432")
|
106
|
+
expect(WebMock.net_http_connect_on_start?(uri)).to be(true)
|
107
|
+
end
|
108
|
+
|
109
|
+
it "will not connect on start when scheme + host + port does not match" do
|
110
|
+
WebMock.disable_net_connect!(net_http_connect_on_start: "https://example.org:5432")
|
111
|
+
expect(WebMock.net_http_connect_on_start?(uri)).to be(false)
|
112
|
+
end
|
10
113
|
end
|
11
114
|
end
|
data/test/test_webmock.rb
CHANGED
@@ -3,4 +3,10 @@ require File.expand_path(File.dirname(__FILE__) + '/shared_test')
|
|
3
3
|
|
4
4
|
class TestWebMock < Test::Unit::TestCase
|
5
5
|
include SharedTest
|
6
|
+
|
7
|
+
def teardown
|
8
|
+
# Ensure global Test::Unit teardown was called
|
9
|
+
assert_empty WebMock::RequestRegistry.instance.requested_signatures.hash
|
10
|
+
assert_empty WebMock::StubRegistry.instance.request_stubs
|
11
|
+
end
|
6
12
|
end
|
data/webmock.gemspec
CHANGED
@@ -8,23 +8,31 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ['Bartosz Blimke']
|
10
10
|
s.email = ['bartosz.blimke@gmail.com']
|
11
|
-
s.homepage = '
|
11
|
+
s.homepage = 'https://github.com/bblimke/webmock'
|
12
12
|
s.summary = %q{Library for stubbing HTTP requests in Ruby.}
|
13
13
|
s.description = %q{WebMock allows stubbing HTTP requests and setting expectations on HTTP requests.}
|
14
14
|
s.license = "MIT"
|
15
15
|
|
16
|
-
s.
|
16
|
+
s.metadata = {
|
17
|
+
'bug_tracker_uri' => 'https://github.com/bblimke/webmock/issues',
|
18
|
+
'changelog_uri' => "https://github.com/bblimke/webmock/blob/v#{s.version}/CHANGELOG.md",
|
19
|
+
'documentation_uri' => "https://www.rubydoc.info/gems/webmock/#{s.version}",
|
20
|
+
'source_code_uri' => "https://github.com/bblimke/webmock/tree/v#{s.version}",
|
21
|
+
'wiki_uri' => 'https://github.com/bblimke/webmock/wiki'
|
22
|
+
}
|
17
23
|
|
18
|
-
s.required_ruby_version = '>= 2.
|
24
|
+
s.required_ruby_version = '>= 2.3'
|
19
25
|
|
20
|
-
s.add_dependency 'addressable', '>= 2.
|
26
|
+
s.add_dependency 'addressable', '>= 2.8.0'
|
21
27
|
s.add_dependency 'crack', '>= 0.3.2'
|
22
|
-
s.add_dependency 'hashdiff'
|
28
|
+
s.add_dependency 'hashdiff', ['>= 0.4.0', '< 2.0.0']
|
23
29
|
|
24
30
|
unless RUBY_PLATFORM =~ /java/
|
25
31
|
s.add_development_dependency 'patron', '>= 0.4.18'
|
26
32
|
s.add_development_dependency 'curb', '>= 0.7.16'
|
27
33
|
s.add_development_dependency 'typhoeus', '>= 0.5.0'
|
34
|
+
s.add_development_dependency 'em-http-request', '>= 1.0.2'
|
35
|
+
s.add_development_dependency 'em-synchrony', '>= 1.0.0'
|
28
36
|
end
|
29
37
|
|
30
38
|
s.add_development_dependency 'http', '>= 0.8.0'
|
@@ -32,12 +40,12 @@ Gem::Specification.new do |s|
|
|
32
40
|
s.add_development_dependency 'rack', ((RUBY_VERSION < '2.2.2') ? '1.6.0' : '> 1.6')
|
33
41
|
s.add_development_dependency 'rspec', '>= 3.1.0'
|
34
42
|
s.add_development_dependency 'httpclient', '>= 2.2.4'
|
35
|
-
s.add_development_dependency 'em-http-request', '>= 1.0.2'
|
36
|
-
s.add_development_dependency 'em-synchrony', '>= 1.0.0'
|
37
43
|
s.add_development_dependency 'excon', '>= 0.27.5'
|
44
|
+
s.add_development_dependency 'async-http', '>= 0.48.0'
|
38
45
|
s.add_development_dependency 'minitest', '>= 5.0.0'
|
39
46
|
s.add_development_dependency 'test-unit', '>= 3.0.0'
|
40
47
|
s.add_development_dependency 'rdoc', '> 3.5.0'
|
48
|
+
s.add_development_dependency 'webrick'
|
41
49
|
|
42
50
|
s.files = `git ls-files`.split("\n")
|
43
51
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webmock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bartosz Blimke
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.8.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.8.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: crack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,20 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.4.0
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 2.0.0
|
48
51
|
type: :runtime
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
55
|
- - ">="
|
53
56
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
57
|
+
version: 0.4.0
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 2.0.0
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: patron
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +100,34 @@ dependencies:
|
|
94
100
|
- - ">="
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: 0.5.0
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: em-http-request
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.0.2
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: 1.0.2
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: em-synchrony
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 1.0.0
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 1.0.0
|
97
131
|
- !ruby/object:Gem::Dependency
|
98
132
|
name: http
|
99
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,47 +185,33 @@ dependencies:
|
|
151
185
|
- !ruby/object:Gem::Version
|
152
186
|
version: 2.2.4
|
153
187
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: 1.0.2
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: 1.0.2
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: em-synchrony
|
188
|
+
name: excon
|
169
189
|
requirement: !ruby/object:Gem::Requirement
|
170
190
|
requirements:
|
171
191
|
- - ">="
|
172
192
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
193
|
+
version: 0.27.5
|
174
194
|
type: :development
|
175
195
|
prerelease: false
|
176
196
|
version_requirements: !ruby/object:Gem::Requirement
|
177
197
|
requirements:
|
178
198
|
- - ">="
|
179
199
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
200
|
+
version: 0.27.5
|
181
201
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
202
|
+
name: async-http
|
183
203
|
requirement: !ruby/object:Gem::Requirement
|
184
204
|
requirements:
|
185
205
|
- - ">="
|
186
206
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.
|
207
|
+
version: 0.48.0
|
188
208
|
type: :development
|
189
209
|
prerelease: false
|
190
210
|
version_requirements: !ruby/object:Gem::Requirement
|
191
211
|
requirements:
|
192
212
|
- - ">="
|
193
213
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.
|
214
|
+
version: 0.48.0
|
195
215
|
- !ruby/object:Gem::Dependency
|
196
216
|
name: minitest
|
197
217
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,6 +254,20 @@ dependencies:
|
|
234
254
|
- - ">"
|
235
255
|
- !ruby/object:Gem::Version
|
236
256
|
version: 3.5.0
|
257
|
+
- !ruby/object:Gem::Dependency
|
258
|
+
name: webrick
|
259
|
+
requirement: !ruby/object:Gem::Requirement
|
260
|
+
requirements:
|
261
|
+
- - ">="
|
262
|
+
- !ruby/object:Gem::Version
|
263
|
+
version: '0'
|
264
|
+
type: :development
|
265
|
+
prerelease: false
|
266
|
+
version_requirements: !ruby/object:Gem::Requirement
|
267
|
+
requirements:
|
268
|
+
- - ">="
|
269
|
+
- !ruby/object:Gem::Version
|
270
|
+
version: '0'
|
237
271
|
description: WebMock allows stubbing HTTP requests and setting expectations on HTTP
|
238
272
|
requests.
|
239
273
|
email:
|
@@ -243,9 +277,9 @@ extensions: []
|
|
243
277
|
extra_rdoc_files: []
|
244
278
|
files:
|
245
279
|
- ".gemtest"
|
280
|
+
- ".github/workflows/CI.yml"
|
246
281
|
- ".gitignore"
|
247
282
|
- ".rspec-tm"
|
248
|
-
- ".travis.yml"
|
249
283
|
- CHANGELOG.md
|
250
284
|
- Gemfile
|
251
285
|
- LICENSE
|
@@ -259,6 +293,7 @@ files:
|
|
259
293
|
- lib/webmock/cucumber.rb
|
260
294
|
- lib/webmock/deprecation.rb
|
261
295
|
- lib/webmock/errors.rb
|
296
|
+
- lib/webmock/http_lib_adapters/async_http_client_adapter.rb
|
262
297
|
- lib/webmock/http_lib_adapters/curb_adapter.rb
|
263
298
|
- lib/webmock/http_lib_adapters/em_http_request_adapter.rb
|
264
299
|
- lib/webmock/http_lib_adapters/excon_adapter.rb
|
@@ -312,6 +347,8 @@ files:
|
|
312
347
|
- minitest/test_helper.rb
|
313
348
|
- minitest/test_webmock.rb
|
314
349
|
- minitest/webmock_spec.rb
|
350
|
+
- spec/acceptance/async_http_client/async_http_client_spec.rb
|
351
|
+
- spec/acceptance/async_http_client/async_http_client_spec_helper.rb
|
315
352
|
- spec/acceptance/curb/curb_spec.rb
|
316
353
|
- spec/acceptance/curb/curb_spec_helper.rb
|
317
354
|
- spec/acceptance/em_http_request/em_http_request_spec.rb
|
@@ -379,11 +416,16 @@ files:
|
|
379
416
|
- test/test_helper.rb
|
380
417
|
- test/test_webmock.rb
|
381
418
|
- webmock.gemspec
|
382
|
-
homepage:
|
419
|
+
homepage: https://github.com/bblimke/webmock
|
383
420
|
licenses:
|
384
421
|
- MIT
|
385
|
-
metadata:
|
386
|
-
|
422
|
+
metadata:
|
423
|
+
bug_tracker_uri: https://github.com/bblimke/webmock/issues
|
424
|
+
changelog_uri: https://github.com/bblimke/webmock/blob/v3.18.1/CHANGELOG.md
|
425
|
+
documentation_uri: https://www.rubydoc.info/gems/webmock/3.18.1
|
426
|
+
source_code_uri: https://github.com/bblimke/webmock/tree/v3.18.1
|
427
|
+
wiki_uri: https://github.com/bblimke/webmock/wiki
|
428
|
+
post_install_message:
|
387
429
|
rdoc_options: []
|
388
430
|
require_paths:
|
389
431
|
- lib
|
@@ -391,19 +433,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
391
433
|
requirements:
|
392
434
|
- - ">="
|
393
435
|
- !ruby/object:Gem::Version
|
394
|
-
version: '2.
|
436
|
+
version: '2.3'
|
395
437
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
396
438
|
requirements:
|
397
439
|
- - ">="
|
398
440
|
- !ruby/object:Gem::Version
|
399
441
|
version: '0'
|
400
442
|
requirements: []
|
401
|
-
|
402
|
-
|
403
|
-
signing_key:
|
443
|
+
rubygems_version: 3.1.2
|
444
|
+
signing_key:
|
404
445
|
specification_version: 4
|
405
446
|
summary: Library for stubbing HTTP requests in Ruby.
|
406
447
|
test_files:
|
448
|
+
- spec/acceptance/async_http_client/async_http_client_spec.rb
|
449
|
+
- spec/acceptance/async_http_client/async_http_client_spec_helper.rb
|
407
450
|
- spec/acceptance/curb/curb_spec.rb
|
408
451
|
- spec/acceptance/curb/curb_spec_helper.rb
|
409
452
|
- spec/acceptance/em_http_request/em_http_request_spec.rb
|
data/.travis.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
before_install:
|
2
|
-
- gem update --system
|
3
|
-
- gem update bundler
|
4
|
-
rvm:
|
5
|
-
- 2.3.8
|
6
|
-
- 2.4.5
|
7
|
-
- 2.5.3
|
8
|
-
- 2.6.0
|
9
|
-
- rbx-2
|
10
|
-
- ruby-head
|
11
|
-
- jruby-9.1.17.0
|
12
|
-
- jruby-9.2.5.0
|
13
|
-
- jruby-head
|
14
|
-
matrix:
|
15
|
-
allow_failures:
|
16
|
-
- rvm: jruby-head
|
17
|
-
- rvm: ruby-head
|
18
|
-
- rvm: rbx-2
|
19
|
-
# Send builds to container-based infrastructure
|
20
|
-
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/
|
21
|
-
sudo: false
|