webmock 3.18.1 → 3.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/README.md +34 -15
- data/lib/webmock/api.rb +2 -0
- data/lib/webmock/assertion_failure.rb +2 -0
- data/lib/webmock/callback_registry.rb +2 -0
- data/lib/webmock/config.rb +2 -0
- data/lib/webmock/cucumber.rb +2 -0
- data/lib/webmock/deprecation.rb +2 -0
- data/lib/webmock/errors.rb +2 -0
- data/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +2 -0
- data/lib/webmock/http_lib_adapters/curb_adapter.rb +2 -0
- data/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +14 -6
- data/lib/webmock/http_lib_adapters/excon_adapter.rb +2 -0
- data/lib/webmock/http_lib_adapters/http_lib_adapter.rb +2 -0
- data/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +2 -0
- data/lib/webmock/http_lib_adapters/http_rb/client.rb +2 -0
- data/lib/webmock/http_lib_adapters/http_rb/request.rb +3 -1
- data/lib/webmock/http_lib_adapters/http_rb/response.rb +2 -0
- data/lib/webmock/http_lib_adapters/http_rb/streamer.rb +2 -0
- data/lib/webmock/http_lib_adapters/http_rb/webmock.rb +2 -0
- data/lib/webmock/http_lib_adapters/http_rb_adapter.rb +2 -0
- data/lib/webmock/http_lib_adapters/httpclient_adapter.rb +2 -0
- data/lib/webmock/http_lib_adapters/manticore_adapter.rb +2 -0
- data/lib/webmock/http_lib_adapters/net_http.rb +2 -0
- data/lib/webmock/http_lib_adapters/net_http_response.rb +2 -0
- data/lib/webmock/http_lib_adapters/patron_adapter.rb +2 -0
- data/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +2 -0
- data/lib/webmock/matchers/any_arg_matcher.rb +2 -0
- data/lib/webmock/matchers/hash_argument_matcher.rb +2 -0
- data/lib/webmock/matchers/hash_excluding_matcher.rb +2 -0
- data/lib/webmock/matchers/hash_including_matcher.rb +2 -0
- data/lib/webmock/minitest.rb +2 -0
- data/lib/webmock/rack_response.rb +2 -0
- data/lib/webmock/request_body_diff.rb +2 -0
- data/lib/webmock/request_execution_verifier.rb +2 -0
- data/lib/webmock/request_pattern.rb +3 -1
- data/lib/webmock/request_registry.rb +2 -0
- data/lib/webmock/request_signature.rb +2 -0
- data/lib/webmock/request_signature_snippet.rb +2 -0
- data/lib/webmock/request_stub.rb +7 -1
- data/lib/webmock/response.rb +2 -0
- data/lib/webmock/responses_sequence.rb +2 -0
- data/lib/webmock/rspec/matchers/request_pattern_matcher.rb +2 -0
- data/lib/webmock/rspec/matchers/webmock_matcher.rb +2 -0
- data/lib/webmock/rspec/matchers.rb +2 -0
- data/lib/webmock/rspec.rb +2 -0
- data/lib/webmock/stub_registry.rb +2 -0
- data/lib/webmock/stub_request_snippet.rb +2 -0
- data/lib/webmock/test_unit.rb +2 -0
- data/lib/webmock/util/hash_counter.rb +12 -6
- data/lib/webmock/util/hash_keys_stringifier.rb +2 -0
- data/lib/webmock/util/hash_validator.rb +2 -0
- data/lib/webmock/util/headers.rb +22 -8
- data/lib/webmock/util/json.rb +2 -0
- data/lib/webmock/util/query_mapper.rb +2 -0
- data/lib/webmock/util/uri.rb +3 -1
- data/lib/webmock/util/values_stringifier.rb +2 -0
- data/lib/webmock/util/version_checker.rb +7 -5
- data/lib/webmock/version.rb +3 -1
- data/lib/webmock/webmock.rb +2 -0
- data/lib/webmock.rb +2 -0
- metadata +36 -168
- data/.gemtest +0 -0
- data/.github/workflows/CI.yml +0 -38
- data/.gitignore +0 -34
- data/.rspec-tm +0 -2
- data/Gemfile +0 -9
- data/Rakefile +0 -38
- data/minitest/test_helper.rb +0 -34
- data/minitest/test_webmock.rb +0 -9
- data/minitest/webmock_spec.rb +0 -60
- data/spec/acceptance/async_http_client/async_http_client_spec.rb +0 -375
- data/spec/acceptance/async_http_client/async_http_client_spec_helper.rb +0 -73
- data/spec/acceptance/curb/curb_spec.rb +0 -510
- data/spec/acceptance/curb/curb_spec_helper.rb +0 -147
- data/spec/acceptance/em_http_request/em_http_request_spec.rb +0 -462
- data/spec/acceptance/em_http_request/em_http_request_spec_helper.rb +0 -77
- data/spec/acceptance/excon/excon_spec.rb +0 -77
- data/spec/acceptance/excon/excon_spec_helper.rb +0 -52
- data/spec/acceptance/http_rb/http_rb_spec.rb +0 -93
- data/spec/acceptance/http_rb/http_rb_spec_helper.rb +0 -54
- data/spec/acceptance/httpclient/httpclient_spec.rb +0 -217
- data/spec/acceptance/httpclient/httpclient_spec_helper.rb +0 -57
- data/spec/acceptance/manticore/manticore_spec.rb +0 -107
- data/spec/acceptance/manticore/manticore_spec_helper.rb +0 -35
- data/spec/acceptance/net_http/net_http_shared.rb +0 -190
- data/spec/acceptance/net_http/net_http_spec.rb +0 -395
- data/spec/acceptance/net_http/net_http_spec_helper.rb +0 -64
- data/spec/acceptance/net_http/real_net_http_spec.rb +0 -20
- data/spec/acceptance/patron/patron_spec.rb +0 -123
- data/spec/acceptance/patron/patron_spec_helper.rb +0 -54
- data/spec/acceptance/shared/allowing_and_disabling_net_connect.rb +0 -313
- data/spec/acceptance/shared/callbacks.rb +0 -148
- data/spec/acceptance/shared/complex_cross_concern_behaviors.rb +0 -36
- data/spec/acceptance/shared/enabling_and_disabling_webmock.rb +0 -95
- data/spec/acceptance/shared/precedence_of_stubs.rb +0 -15
- data/spec/acceptance/shared/request_expectations.rb +0 -930
- data/spec/acceptance/shared/returning_declared_responses.rb +0 -409
- data/spec/acceptance/shared/stubbing_requests.rb +0 -678
- data/spec/acceptance/typhoeus/typhoeus_hydra_spec.rb +0 -135
- data/spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb +0 -60
- data/spec/acceptance/webmock_shared.rb +0 -41
- data/spec/fixtures/test.txt +0 -1
- data/spec/quality_spec.rb +0 -84
- data/spec/spec_helper.rb +0 -48
- data/spec/support/example_curl_output.txt +0 -22
- data/spec/support/failures.rb +0 -9
- data/spec/support/my_rack_app.rb +0 -53
- data/spec/support/network_connection.rb +0 -19
- data/spec/support/webmock_server.rb +0 -70
- data/spec/unit/api_spec.rb +0 -175
- data/spec/unit/errors_spec.rb +0 -129
- data/spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb +0 -17
- data/spec/unit/http_lib_adapters/http_lib_adapter_spec.rb +0 -12
- data/spec/unit/matchers/hash_excluding_matcher_spec.rb +0 -61
- data/spec/unit/matchers/hash_including_matcher_spec.rb +0 -87
- data/spec/unit/rack_response_spec.rb +0 -112
- data/spec/unit/request_body_diff_spec.rb +0 -90
- data/spec/unit/request_execution_verifier_spec.rb +0 -208
- data/spec/unit/request_pattern_spec.rb +0 -748
- data/spec/unit/request_registry_spec.rb +0 -95
- data/spec/unit/request_signature_snippet_spec.rb +0 -89
- data/spec/unit/request_signature_spec.rb +0 -175
- data/spec/unit/request_stub_spec.rb +0 -234
- data/spec/unit/response_spec.rb +0 -314
- data/spec/unit/stub_registry_spec.rb +0 -103
- data/spec/unit/stub_request_snippet_spec.rb +0 -115
- data/spec/unit/util/hash_counter_spec.rb +0 -39
- data/spec/unit/util/hash_keys_stringifier_spec.rb +0 -27
- data/spec/unit/util/headers_spec.rb +0 -28
- data/spec/unit/util/json_spec.rb +0 -33
- data/spec/unit/util/query_mapper_spec.rb +0 -157
- data/spec/unit/util/uri_spec.rb +0 -371
- data/spec/unit/util/version_checker_spec.rb +0 -65
- data/spec/unit/webmock_spec.rb +0 -114
- data/test/http_request.rb +0 -24
- data/test/shared_test.rb +0 -108
- data/test/test_helper.rb +0 -23
- data/test/test_webmock.rb +0 -12
- data/webmock.gemspec +0 -54
data/spec/unit/webmock_spec.rb
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
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
|
59
|
-
end
|
60
|
-
|
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
|
113
|
-
end
|
114
|
-
end
|
data/test/http_request.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'ostruct'
|
2
|
-
|
3
|
-
module HttpRequestTestHelper
|
4
|
-
def http_request(method, uri, options = {})
|
5
|
-
begin
|
6
|
-
uri = URI.parse(uri)
|
7
|
-
rescue
|
8
|
-
uri = Addressable::URI.heuristic_parse(uri)
|
9
|
-
end
|
10
|
-
response = nil
|
11
|
-
clazz = ::Net::HTTP.const_get("#{method.to_s.capitalize}")
|
12
|
-
req = clazz.new("#{uri.path}#{uri.query ? '?' : ''}#{uri.query}", options[:headers])
|
13
|
-
req.basic_auth uri.user, uri.password if uri.user
|
14
|
-
http = ::Net::HTTP.new(uri.host, uri.port)
|
15
|
-
http.use_ssl = true if uri.scheme == "https"
|
16
|
-
response = http.start {|http|
|
17
|
-
http.request(req, options[:body])
|
18
|
-
}
|
19
|
-
OpenStruct.new({
|
20
|
-
body: response.body,
|
21
|
-
headers: response,
|
22
|
-
status: response.code })
|
23
|
-
end
|
24
|
-
end
|
data/test/shared_test.rb
DELETED
@@ -1,108 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/http_request')
|
2
|
-
|
3
|
-
module SharedTest
|
4
|
-
include HttpRequestTestHelper
|
5
|
-
|
6
|
-
def setup
|
7
|
-
super
|
8
|
-
@stub_http = stub_http_request(:any, "http://www.example.com")
|
9
|
-
@stub_https = stub_http_request(:any, "https://www.example.com")
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_assert_requested_with_stub_and_block_raises_error
|
13
|
-
assert_raises ArgumentError do
|
14
|
-
assert_requested(@stub_http) {}
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_assert_not_requested_with_stub_and_block_raises_error
|
19
|
-
assert_raises ArgumentError do
|
20
|
-
assert_not_requested(@stub_http) {}
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_error_on_non_stubbed_request
|
25
|
-
assert_raise_with_message(WebMock::NetConnectNotAllowedError, %r{Real HTTP connections are disabled. Unregistered request: GET http://www.example.net/ with headers}) do
|
26
|
-
http_request(:get, "http://www.example.net/")
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_verification_that_expected_request_occured
|
31
|
-
http_request(:get, "http://www.example.com/")
|
32
|
-
assert_requested(:get, "http://www.example.com", times: 1)
|
33
|
-
assert_requested(:get, "http://www.example.com")
|
34
|
-
end
|
35
|
-
|
36
|
-
def test_verification_that_expected_stub_occured
|
37
|
-
http_request(:get, "http://www.example.com/")
|
38
|
-
assert_requested(@stub_http, times: 1)
|
39
|
-
assert_requested(@stub_http)
|
40
|
-
end
|
41
|
-
|
42
|
-
def test_verification_that_expected_request_didnt_occur
|
43
|
-
expected_message = "The request GET http://www.example.com/ was expected to execute 1 time but it executed 0 times"
|
44
|
-
expected_message += "\n\nThe following requests were made:\n\nNo requests were made.\n============================================================"
|
45
|
-
assert_fail(expected_message) do
|
46
|
-
assert_requested(:get, "http://www.example.com")
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def test_verification_that_expected_stub_didnt_occur
|
51
|
-
expected_message = "The request ANY http://www.example.com/ was expected to execute 1 time but it executed 0 times"
|
52
|
-
expected_message += "\n\nThe following requests were made:\n\nNo requests were made.\n============================================================"
|
53
|
-
assert_fail(expected_message) do
|
54
|
-
assert_requested(@stub_http)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
def test_verification_that_expected_request_occured_with_body_and_headers
|
59
|
-
http_request(:get, "http://www.example.com/",
|
60
|
-
body: "abc", headers: {'A' => 'a'})
|
61
|
-
assert_requested(:get, "http://www.example.com",
|
62
|
-
body: "abc", headers: {'A' => 'a'})
|
63
|
-
end
|
64
|
-
|
65
|
-
def test_verification_that_expected_request_occured_with_query_params
|
66
|
-
stub_request(:any, "http://www.example.com").with(query: hash_including({"a" => ["b", "c"]}))
|
67
|
-
http_request(:get, "http://www.example.com/?a[]=b&a[]=c&x=1")
|
68
|
-
assert_requested(:get, "http://www.example.com",
|
69
|
-
query: hash_including({"a" => ["b", "c"]}))
|
70
|
-
end
|
71
|
-
|
72
|
-
def test_verification_that_expected_request_not_occured_with_query_params
|
73
|
-
stub_request(:any, 'http://www.example.com').with(query: hash_including(a: ['b', 'c']))
|
74
|
-
stub_request(:any, 'http://www.example.com').with(query: hash_excluding(a: ['b', 'c']))
|
75
|
-
http_request(:get, 'http://www.example.com/?a[]=b&a[]=c&x=1')
|
76
|
-
assert_not_requested(:get, 'http://www.example.com', query: hash_excluding('a' => ['b', 'c']))
|
77
|
-
end
|
78
|
-
|
79
|
-
def test_verification_that_expected_request_occured_with_excluding_query_params
|
80
|
-
stub_request(:any, 'http://www.example.com').with(query: hash_excluding('a' => ['b', 'c']))
|
81
|
-
http_request(:get, 'http://www.example.com/?a[]=x&a[]=y&x=1')
|
82
|
-
assert_requested(:get, 'http://www.example.com', query: hash_excluding('a' => ['b', 'c']))
|
83
|
-
end
|
84
|
-
|
85
|
-
def test_verification_that_non_expected_request_didnt_occur
|
86
|
-
expected_message = %r(The request GET http://www.example.com/ was not expected to execute but it executed 1 time\n\nThe following requests were made:\n\nGET http://www.example.com/ with headers .+ was made 1 time\n\n============================================================)
|
87
|
-
assert_fail(expected_message) do
|
88
|
-
http_request(:get, "http://www.example.com/")
|
89
|
-
assert_not_requested(:get, "http://www.example.com")
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
def test_refute_requested_alias
|
94
|
-
expected_message = %r(The request GET http://www.example.com/ was not expected to execute but it executed 1 time\n\nThe following requests were made:\n\nGET http://www.example.com/ with headers .+ was made 1 time\n\n============================================================)
|
95
|
-
assert_fail(expected_message) do
|
96
|
-
http_request(:get, "http://www.example.com/")
|
97
|
-
refute_requested(:get, "http://www.example.com")
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
def test_verification_that_non_expected_stub_didnt_occur
|
102
|
-
expected_message = %r(The request ANY http://www.example.com/ was not expected to execute but it executed 1 time\n\nThe following requests were made:\n\nGET http://www.example.com/ with headers .+ was made 1 time\n\n============================================================)
|
103
|
-
assert_fail(expected_message) do
|
104
|
-
http_request(:get, "http://www.example.com/")
|
105
|
-
assert_not_requested(@stub_http)
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
data/test/test_helper.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
|
3
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
4
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
5
|
-
|
6
|
-
require 'webmock/test_unit'
|
7
|
-
require 'test/unit'
|
8
|
-
|
9
|
-
class Test::Unit::TestCase
|
10
|
-
AssertionFailedError = Test::Unit::AssertionFailedError rescue MiniTest::Assertion
|
11
|
-
def assert_raise_with_message(e, message, &block)
|
12
|
-
e = assert_raises(e, &block)
|
13
|
-
if message.is_a?(Regexp)
|
14
|
-
assert_match(message, e.message)
|
15
|
-
else
|
16
|
-
assert_equal(message, e.message)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def assert_fail(message, &block)
|
21
|
-
assert_raise_with_message(AssertionFailedError, message, &block)
|
22
|
-
end
|
23
|
-
end
|
data/test/test_webmock.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/test_helper')
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/shared_test')
|
3
|
-
|
4
|
-
class TestWebMock < Test::Unit::TestCase
|
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
|
12
|
-
end
|
data/webmock.gemspec
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path('../lib', __FILE__)
|
3
|
-
require 'webmock/version'
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = 'webmock'
|
7
|
-
s.version = WebMock::VERSION
|
8
|
-
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = ['Bartosz Blimke']
|
10
|
-
s.email = ['bartosz.blimke@gmail.com']
|
11
|
-
s.homepage = 'https://github.com/bblimke/webmock'
|
12
|
-
s.summary = %q{Library for stubbing HTTP requests in Ruby.}
|
13
|
-
s.description = %q{WebMock allows stubbing HTTP requests and setting expectations on HTTP requests.}
|
14
|
-
s.license = "MIT"
|
15
|
-
|
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
|
-
}
|
23
|
-
|
24
|
-
s.required_ruby_version = '>= 2.3'
|
25
|
-
|
26
|
-
s.add_dependency 'addressable', '>= 2.8.0'
|
27
|
-
s.add_dependency 'crack', '>= 0.3.2'
|
28
|
-
s.add_dependency 'hashdiff', ['>= 0.4.0', '< 2.0.0']
|
29
|
-
|
30
|
-
unless RUBY_PLATFORM =~ /java/
|
31
|
-
s.add_development_dependency 'patron', '>= 0.4.18'
|
32
|
-
s.add_development_dependency 'curb', '>= 0.7.16'
|
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'
|
36
|
-
end
|
37
|
-
|
38
|
-
s.add_development_dependency 'http', '>= 0.8.0'
|
39
|
-
s.add_development_dependency 'manticore', '>= 0.5.1' if RUBY_PLATFORM =~ /java/
|
40
|
-
s.add_development_dependency 'rack', ((RUBY_VERSION < '2.2.2') ? '1.6.0' : '> 1.6')
|
41
|
-
s.add_development_dependency 'rspec', '>= 3.1.0'
|
42
|
-
s.add_development_dependency 'httpclient', '>= 2.2.4'
|
43
|
-
s.add_development_dependency 'excon', '>= 0.27.5'
|
44
|
-
s.add_development_dependency 'async-http', '>= 0.48.0'
|
45
|
-
s.add_development_dependency 'minitest', '>= 5.0.0'
|
46
|
-
s.add_development_dependency 'test-unit', '>= 3.0.0'
|
47
|
-
s.add_development_dependency 'rdoc', '> 3.5.0'
|
48
|
-
s.add_development_dependency 'webrick'
|
49
|
-
|
50
|
-
s.files = `git ls-files`.split("\n")
|
51
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
52
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
53
|
-
s.require_paths = ['lib']
|
54
|
-
end
|