webmock 1.6.4 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/.gitignore +3 -1
- data/.travis.yml +6 -0
- data/CHANGELOG.md +211 -118
- data/Gemfile +16 -1
- data/Guardfile +24 -0
- data/LICENSE +1 -1
- data/README.md +64 -15
- data/Rakefile +19 -6
- data/lib/webmock.rb +9 -4
- data/lib/webmock/api.rb +5 -4
- data/lib/webmock/assertion_failure.rb +1 -1
- data/lib/webmock/callback_registry.rb +1 -1
- data/lib/webmock/config.rb +2 -2
- data/lib/webmock/cucumber.rb +1 -1
- data/lib/webmock/errors.rb +17 -5
- data/lib/webmock/http_lib_adapters/{curb.rb → curb_adapter.rb} +79 -49
- data/lib/webmock/http_lib_adapters/{em_http_request.rb → em_http_request/em_http_request_0_x.rb} +20 -15
- data/lib/webmock/http_lib_adapters/em_http_request/em_http_request_1_x.rb +201 -0
- data/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +11 -0
- data/lib/webmock/http_lib_adapters/http_lib_adapter.rb +7 -0
- data/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +19 -0
- data/lib/webmock/http_lib_adapters/{httpclient.rb → httpclient_adapter.rb} +35 -8
- data/lib/webmock/http_lib_adapters/net_http.rb +84 -25
- data/lib/webmock/http_lib_adapters/net_http_response.rb +17 -17
- data/lib/webmock/http_lib_adapters/patron_adapter.rb +124 -0
- data/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +166 -0
- data/lib/webmock/minitest.rb +15 -0
- data/lib/webmock/rack_response.rb +52 -0
- data/lib/webmock/request_pattern.rb +4 -2
- data/lib/webmock/request_signature.rb +4 -0
- data/lib/webmock/request_stub.rb +35 -2
- data/lib/webmock/responses_sequence.rb +2 -2
- data/lib/webmock/rspec.rb +2 -2
- data/lib/webmock/rspec/matchers.rb +9 -4
- data/lib/webmock/rspec/matchers/webmock_matcher.rb +1 -1
- data/lib/webmock/stub_registry.rb +1 -1
- data/lib/webmock/stub_request_snippet.rb +14 -11
- data/lib/webmock/util/hash_keys_stringifier.rb +4 -4
- data/lib/webmock/util/headers.rb +3 -3
- data/lib/webmock/util/json.rb +54 -0
- data/lib/webmock/util/uri.rb +1 -1
- data/lib/webmock/version.rb +1 -1
- data/lib/webmock/webmock.rb +20 -3
- data/minitest/test_helper.rb +29 -0
- data/minitest/test_webmock.rb +6 -0
- data/minitest/webmock_spec.rb +30 -0
- data/spec/curb_spec.rb +26 -8
- data/spec/curb_spec_helper.rb +6 -6
- data/spec/em_http_request_spec.rb +95 -1
- data/spec/em_http_request_spec_helper.rb +16 -16
- data/spec/errors_spec.rb +19 -4
- data/spec/example_curl_output.txt +22 -22
- data/spec/http_lib_adapters/http_lib_adapter_registry_spec.rb +17 -0
- data/spec/http_lib_adapters/http_lib_adapter_spec.rb +12 -0
- data/spec/httpclient_spec.rb +1 -1
- data/spec/httpclient_spec_helper.rb +3 -38
- data/spec/my_rack_app.rb +18 -0
- data/spec/net_http_shared.rb +125 -0
- data/spec/net_http_spec.rb +27 -31
- data/spec/net_http_spec_helper.rb +4 -34
- data/spec/network_connection.rb +1 -1
- data/spec/patron_spec_helper.rb +4 -7
- data/spec/quality_spec.rb +60 -0
- data/spec/rack_response_spec.rb +33 -0
- data/spec/real_net_http_spec.rb +20 -0
- data/spec/request_execution_verifier_spec.rb +8 -8
- data/spec/request_pattern_spec.rb +3 -3
- data/spec/request_stub_spec.rb +19 -19
- data/spec/response_spec.rb +8 -8
- data/spec/spec_helper.rb +14 -11
- data/spec/stub_request_snippet_spec.rb +85 -37
- data/spec/support/webmock_server.rb +62 -0
- data/spec/typhoeus_hydra_spec.rb +53 -0
- data/spec/typhoeus_hydra_spec_helper.rb +50 -0
- data/spec/util/headers_spec.rb +5 -5
- data/spec/util/json_spec.rb +7 -0
- data/spec/util/uri_spec.rb +1 -1
- data/spec/vendor/addressable/lib/uri.rb +1 -0
- data/spec/vendor/crack/lib/crack.rb +1 -0
- data/spec/vendor/right_http_connection-1.2.4/History.txt +4 -4
- data/spec/vendor/right_http_connection-1.2.4/README.txt +4 -4
- data/spec/vendor/right_http_connection-1.2.4/Rakefile +3 -3
- data/spec/vendor/right_http_connection-1.2.4/lib/net_fix.rb +4 -4
- data/spec/vendor/right_http_connection-1.2.4/setup.rb +4 -4
- data/spec/webmock_shared.rb +375 -143
- data/spec/webmock_spec.rb +7 -0
- data/test/http_request.rb +24 -0
- data/test/shared_test.rb +47 -0
- data/test/test_helper.rb +6 -3
- data/test/test_webmock.rb +2 -67
- data/webmock.gemspec +8 -7
- metadata +153 -88
- data/lib/webmock/http_lib_adapters/patron.rb +0 -100
- data/spec/other_net_http_libs_spec.rb +0 -30
@@ -0,0 +1,24 @@
|
|
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
ADDED
@@ -0,0 +1,47 @@
|
|
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_request(:any, "http://www.example.com")
|
9
|
+
stub_http_request(:any, "https://www.example.com")
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_error_on_non_stubbed_request
|
13
|
+
default_ruby_headers = (RUBY_VERSION >= "1.9.1") ? "{'Accept'=>'*/*', 'User-Agent'=>'Ruby'}" : "{'Accept'=>'*/*'}"
|
14
|
+
assert_raise_with_message(WebMock::NetConnectNotAllowedError, %r{Real HTTP connections are disabled. Unregistered request: GET http://www.example.net/ with headers}) do
|
15
|
+
http_request(:get, "http://www.example.net/")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_verification_that_expected_request_occured
|
20
|
+
http_request(:get, "http://www.example.com/")
|
21
|
+
assert_requested(:get, "http://www.example.com", :times => 1)
|
22
|
+
assert_requested(:get, "http://www.example.com")
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_verification_that_expected_request_didnt_occur
|
26
|
+
expected_message = "The request GET http://www.example.com/ was expected to execute 1 time but it executed 0 times"
|
27
|
+
expected_message << "\n\nThe following requests were made:\n\nNo requests were made.\n============================================================"
|
28
|
+
assert_fail(expected_message) do
|
29
|
+
assert_requested(:get, "http://www.example.com")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_verification_that_expected_request_occured_with_body_and_headers
|
34
|
+
http_request(:get, "http://www.example.com/",
|
35
|
+
:body => "abc", :headers => {'A' => 'a'})
|
36
|
+
assert_requested(:get, "http://www.example.com",
|
37
|
+
:body => "abc", :headers => {'A' => 'a'})
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_verification_that_non_expected_request_didnt_occur
|
41
|
+
expected_message = %r(The request GET http://www.example.com/ was expected to execute 0 times 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============================================================)
|
42
|
+
assert_fail(expected_message) do
|
43
|
+
http_request(:get, "http://www.example.com/")
|
44
|
+
assert_not_requested(:get, "http://www.example.com")
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -7,14 +7,17 @@ require 'webmock/test_unit'
|
|
7
7
|
require 'test/unit'
|
8
8
|
|
9
9
|
class Test::Unit::TestCase
|
10
|
-
include WebMock::API
|
11
10
|
AssertionFailedError = Test::Unit::AssertionFailedError rescue MiniTest::Assertion
|
12
|
-
def
|
13
|
-
e = assert_raise(
|
11
|
+
def assert_raise_with_message(e, message, &block)
|
12
|
+
e = assert_raise(e, &block)
|
14
13
|
if message.is_a?(Regexp)
|
15
14
|
assert_match(message, e.message)
|
16
15
|
else
|
17
16
|
assert_equal(message, e.message)
|
18
17
|
end
|
19
18
|
end
|
19
|
+
|
20
|
+
def assert_fail(message, &block)
|
21
|
+
assert_raise_with_message(AssertionFailedError, message, &block)
|
22
|
+
end
|
20
23
|
end
|
data/test/test_webmock.rb
CHANGED
@@ -1,71 +1,6 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/test_helper')
|
2
|
-
|
3
|
-
require 'ostruct'
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + '/shared_test')
|
4
3
|
|
5
4
|
class TestWebMock < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def http_request(method, uri, options = {})
|
8
|
-
begin
|
9
|
-
uri = URI.parse(uri)
|
10
|
-
rescue
|
11
|
-
uri = Addressable::URI.heuristic_parse(uri)
|
12
|
-
end
|
13
|
-
response = nil
|
14
|
-
clazz = ::Net::HTTP.const_get("#{method.to_s.capitalize}")
|
15
|
-
req = clazz.new("#{uri.path}#{uri.query ? '?' : ''}#{uri.query}", options[:headers])
|
16
|
-
req.basic_auth uri.user, uri.password if uri.user
|
17
|
-
http = ::Net::HTTP.new(uri.host, uri.port)
|
18
|
-
http.use_ssl = true if uri.scheme == "https"
|
19
|
-
response = http.start {|http|
|
20
|
-
http.request(req, options[:body])
|
21
|
-
}
|
22
|
-
OpenStruct.new({
|
23
|
-
:body => response.body,
|
24
|
-
:headers => response,
|
25
|
-
:status => response.code })
|
26
|
-
end
|
27
|
-
|
28
|
-
|
29
|
-
def setup
|
30
|
-
super
|
31
|
-
stub_http_request(:any, "http://www.example.com")
|
32
|
-
stub_http_request(:any, "https://www.example.com")
|
33
|
-
end
|
34
|
-
|
35
|
-
def test_error_on_non_stubbed_request
|
36
|
-
default_ruby_headers = (RUBY_VERSION >= "1.9.1") ? "{'Accept'=>'*/*', 'User-Agent'=>'Ruby'}" : "{'Accept'=>'*/*'}"
|
37
|
-
assert_raise(WebMock::NetConnectNotAllowedError, "Real HTTP connections are disabled. Unregistered request: GET http://www.example.net/ with headers #{default_ruby_headers}") do
|
38
|
-
http_request(:get, "http://www.example.net/")
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def test_verification_that_expected_request_occured
|
43
|
-
http_request(:get, "http://www.example.com/")
|
44
|
-
assert_requested(:get, "http://www.example.com", :times => 1)
|
45
|
-
assert_requested(:get, "http://www.example.com")
|
46
|
-
end
|
47
|
-
|
48
|
-
def test_verification_that_expected_request_didnt_occur
|
49
|
-
expected_message = "The request GET http://www.example.com/ was expected to execute 1 time but it executed 0 times"
|
50
|
-
expected_message << "\n\nThe following requests were made:\n\nNo requests were made.\n============================================================"
|
51
|
-
assert_fail(expected_message) do
|
52
|
-
assert_requested(:get, "http://www.example.com")
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def test_verification_that_expected_request_occured_with_body_and_headers
|
57
|
-
http_request(:get, "http://www.example.com/",
|
58
|
-
:body => "abc", :headers => {'A' => 'a'})
|
59
|
-
assert_requested(:get, "http://www.example.com",
|
60
|
-
:body => "abc", :headers => {'A' => 'a'})
|
61
|
-
end
|
62
|
-
|
63
|
-
def test_verification_that_non_expected_request_didnt_occur
|
64
|
-
expected_message = %r(The request GET http://www.example.com/ was expected to execute 0 times 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============================================================)
|
65
|
-
assert_fail(expected_message) do
|
66
|
-
http_request(:get, "http://www.example.com/")
|
67
|
-
assert_not_requested(:get, "http://www.example.com")
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
5
|
+
include SharedTest
|
71
6
|
end
|
data/webmock.gemspec
CHANGED
@@ -16,14 +16,15 @@ Gem::Specification.new do |s|
|
|
16
16
|
|
17
17
|
s.add_dependency 'addressable', '~> 2.2', '> 2.2.5'
|
18
18
|
s.add_dependency 'crack', '>=0.1.7'
|
19
|
-
s.add_development_dependency 'rspec', '>= 2.0.0'
|
20
|
-
s.add_development_dependency 'httpclient', '>= 2.1.5.2'
|
21
19
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
s.add_development_dependency 'rspec', '>= 2.0.0'
|
21
|
+
s.add_development_dependency 'httpclient', '>= 2.1.5.2'
|
22
|
+
s.add_development_dependency 'patron', '>= 0.4.9'
|
23
|
+
s.add_development_dependency 'em-http-request', '>= 0.2.14'
|
24
|
+
s.add_development_dependency 'curb', '>= 0.7.8'
|
25
|
+
s.add_development_dependency 'typhoeus', '>= 0.2.4'
|
26
|
+
s.add_development_dependency 'minitest', '>= 2.2.2'
|
27
|
+
s.add_development_dependency 'rdoc', ((RUBY_VERSION == '1.8.6') ? '<= 3.5.0' : '>3.5.0')
|
27
28
|
|
28
29
|
s.files = `git ls-files`.split("\n")
|
29
30
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
@@ -1,112 +1,144 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: webmock
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.7.0
|
4
5
|
prerelease:
|
5
|
-
version: 1.6.4
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Bartosz Blimke
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-08-15 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: addressable
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &2153406180 !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
18
|
+
requirements:
|
22
19
|
- - ~>
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.2'
|
22
|
+
- - ! '>'
|
23
|
+
- !ruby/object:Gem::Version
|
27
24
|
version: 2.2.5
|
28
25
|
type: :runtime
|
29
|
-
version_requirements: *id001
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: crack
|
32
26
|
prerelease: false
|
33
|
-
|
27
|
+
version_requirements: *2153406180
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: crack
|
30
|
+
requirement: &2153404320 !ruby/object:Gem::Requirement
|
34
31
|
none: false
|
35
|
-
requirements:
|
36
|
-
- -
|
37
|
-
- !ruby/object:Gem::Version
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
38
35
|
version: 0.1.7
|
39
36
|
type: :runtime
|
40
|
-
version_requirements: *id002
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
37
|
prerelease: false
|
44
|
-
|
38
|
+
version_requirements: *2153404320
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
name: rspec
|
41
|
+
requirement: &2153403860 !ruby/object:Gem::Requirement
|
45
42
|
none: false
|
46
|
-
requirements:
|
47
|
-
- -
|
48
|
-
- !ruby/object:Gem::Version
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
49
46
|
version: 2.0.0
|
50
47
|
type: :development
|
51
|
-
version_requirements: *id003
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: httpclient
|
54
48
|
prerelease: false
|
55
|
-
|
49
|
+
version_requirements: *2153403860
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: httpclient
|
52
|
+
requirement: &2153403160 !ruby/object:Gem::Requirement
|
56
53
|
none: false
|
57
|
-
requirements:
|
58
|
-
- -
|
59
|
-
- !ruby/object:Gem::Version
|
54
|
+
requirements:
|
55
|
+
- - ! '>='
|
56
|
+
- !ruby/object:Gem::Version
|
60
57
|
version: 2.1.5.2
|
61
58
|
type: :development
|
62
|
-
version_requirements: *id004
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: patron
|
65
59
|
prerelease: false
|
66
|
-
|
60
|
+
version_requirements: *2153403160
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: patron
|
63
|
+
requirement: &2153402700 !ruby/object:Gem::Requirement
|
67
64
|
none: false
|
68
|
-
requirements:
|
69
|
-
- -
|
70
|
-
- !ruby/object:Gem::Version
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
71
68
|
version: 0.4.9
|
72
69
|
type: :development
|
73
|
-
version_requirements: *id005
|
74
|
-
- !ruby/object:Gem::Dependency
|
75
|
-
name: em-http-request
|
76
70
|
prerelease: false
|
77
|
-
|
71
|
+
version_requirements: *2153402700
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: em-http-request
|
74
|
+
requirement: &2153402220 !ruby/object:Gem::Requirement
|
78
75
|
none: false
|
79
|
-
requirements:
|
80
|
-
- -
|
81
|
-
- !ruby/object:Gem::Version
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
82
79
|
version: 0.2.14
|
83
80
|
type: :development
|
84
|
-
version_requirements: *id006
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
|
-
name: curb
|
87
81
|
prerelease: false
|
88
|
-
|
82
|
+
version_requirements: *2153402220
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: curb
|
85
|
+
requirement: &2153401700 !ruby/object:Gem::Requirement
|
89
86
|
none: false
|
90
|
-
requirements:
|
91
|
-
- -
|
92
|
-
- !ruby/object:Gem::Version
|
87
|
+
requirements:
|
88
|
+
- - ! '>='
|
89
|
+
- !ruby/object:Gem::Version
|
93
90
|
version: 0.7.8
|
94
91
|
type: :development
|
95
|
-
|
96
|
-
|
97
|
-
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: *2153401700
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: typhoeus
|
96
|
+
requirement: &2153401220 !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 0.2.4
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: *2153401220
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: minitest
|
107
|
+
requirement: &2153400760 !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
109
|
+
requirements:
|
110
|
+
- - ! '>='
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 2.2.2
|
113
|
+
type: :development
|
114
|
+
prerelease: false
|
115
|
+
version_requirements: *2153400760
|
116
|
+
- !ruby/object:Gem::Dependency
|
117
|
+
name: rdoc
|
118
|
+
requirement: &2153400200 !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
120
|
+
requirements:
|
121
|
+
- - ! '>'
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 3.5.0
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: *2153400200
|
127
|
+
description: WebMock allows stubbing HTTP requests and setting expectations on HTTP
|
128
|
+
requests.
|
129
|
+
email:
|
98
130
|
- bartosz.blimke@gmail.com
|
99
131
|
executables: []
|
100
|
-
|
101
132
|
extensions: []
|
102
|
-
|
103
133
|
extra_rdoc_files: []
|
104
|
-
|
105
|
-
|
134
|
+
files:
|
135
|
+
- .gemtest
|
106
136
|
- .gitignore
|
107
137
|
- .rvmrc
|
138
|
+
- .travis.yml
|
108
139
|
- CHANGELOG.md
|
109
140
|
- Gemfile
|
141
|
+
- Guardfile
|
110
142
|
- LICENSE
|
111
143
|
- README.md
|
112
144
|
- Rakefile
|
@@ -118,12 +150,19 @@ files:
|
|
118
150
|
- lib/webmock/cucumber.rb
|
119
151
|
- lib/webmock/deprecation.rb
|
120
152
|
- lib/webmock/errors.rb
|
121
|
-
- lib/webmock/http_lib_adapters/
|
122
|
-
- lib/webmock/http_lib_adapters/em_http_request.rb
|
123
|
-
- lib/webmock/http_lib_adapters/
|
153
|
+
- lib/webmock/http_lib_adapters/curb_adapter.rb
|
154
|
+
- lib/webmock/http_lib_adapters/em_http_request/em_http_request_0_x.rb
|
155
|
+
- lib/webmock/http_lib_adapters/em_http_request/em_http_request_1_x.rb
|
156
|
+
- lib/webmock/http_lib_adapters/em_http_request_adapter.rb
|
157
|
+
- lib/webmock/http_lib_adapters/http_lib_adapter.rb
|
158
|
+
- lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb
|
159
|
+
- lib/webmock/http_lib_adapters/httpclient_adapter.rb
|
124
160
|
- lib/webmock/http_lib_adapters/net_http.rb
|
125
161
|
- lib/webmock/http_lib_adapters/net_http_response.rb
|
126
|
-
- lib/webmock/http_lib_adapters/
|
162
|
+
- lib/webmock/http_lib_adapters/patron_adapter.rb
|
163
|
+
- lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb
|
164
|
+
- lib/webmock/minitest.rb
|
165
|
+
- lib/webmock/rack_response.rb
|
127
166
|
- lib/webmock/request_execution_verifier.rb
|
128
167
|
- lib/webmock/request_pattern.rb
|
129
168
|
- lib/webmock/request_registry.rb
|
@@ -141,23 +180,33 @@ files:
|
|
141
180
|
- lib/webmock/util/hash_counter.rb
|
142
181
|
- lib/webmock/util/hash_keys_stringifier.rb
|
143
182
|
- lib/webmock/util/headers.rb
|
183
|
+
- lib/webmock/util/json.rb
|
144
184
|
- lib/webmock/util/uri.rb
|
145
185
|
- lib/webmock/version.rb
|
146
186
|
- lib/webmock/webmock.rb
|
187
|
+
- minitest/test_helper.rb
|
188
|
+
- minitest/test_webmock.rb
|
189
|
+
- minitest/webmock_spec.rb
|
147
190
|
- spec/curb_spec.rb
|
148
191
|
- spec/curb_spec_helper.rb
|
149
192
|
- spec/em_http_request_spec.rb
|
150
193
|
- spec/em_http_request_spec_helper.rb
|
151
194
|
- spec/errors_spec.rb
|
152
195
|
- spec/example_curl_output.txt
|
196
|
+
- spec/http_lib_adapters/http_lib_adapter_registry_spec.rb
|
197
|
+
- spec/http_lib_adapters/http_lib_adapter_spec.rb
|
153
198
|
- spec/httpclient_spec.rb
|
154
199
|
- spec/httpclient_spec_helper.rb
|
200
|
+
- spec/my_rack_app.rb
|
201
|
+
- spec/net_http_shared.rb
|
155
202
|
- spec/net_http_spec.rb
|
156
203
|
- spec/net_http_spec_helper.rb
|
157
204
|
- spec/network_connection.rb
|
158
|
-
- spec/other_net_http_libs_spec.rb
|
159
205
|
- spec/patron_spec.rb
|
160
206
|
- spec/patron_spec_helper.rb
|
207
|
+
- spec/quality_spec.rb
|
208
|
+
- spec/rack_response_spec.rb
|
209
|
+
- spec/real_net_http_spec.rb
|
161
210
|
- spec/request_execution_verifier_spec.rb
|
162
211
|
- spec/request_pattern_spec.rb
|
163
212
|
- spec/request_registry_spec.rb
|
@@ -167,9 +216,13 @@ files:
|
|
167
216
|
- spec/spec_helper.rb
|
168
217
|
- spec/stub_registry_spec.rb
|
169
218
|
- spec/stub_request_snippet_spec.rb
|
219
|
+
- spec/support/webmock_server.rb
|
220
|
+
- spec/typhoeus_hydra_spec.rb
|
221
|
+
- spec/typhoeus_hydra_spec_helper.rb
|
170
222
|
- spec/util/hash_counter_spec.rb
|
171
223
|
- spec/util/hash_keys_stringifier_spec.rb
|
172
224
|
- spec/util/headers_spec.rb
|
225
|
+
- spec/util/json_spec.rb
|
173
226
|
- spec/util/uri_spec.rb
|
174
227
|
- spec/vendor/addressable/lib/addressable/uri.rb
|
175
228
|
- spec/vendor/addressable/lib/uri.rb
|
@@ -182,52 +235,57 @@ files:
|
|
182
235
|
- spec/vendor/right_http_connection-1.2.4/lib/right_http_connection.rb
|
183
236
|
- spec/vendor/right_http_connection-1.2.4/setup.rb
|
184
237
|
- spec/webmock_shared.rb
|
238
|
+
- spec/webmock_spec.rb
|
239
|
+
- test/http_request.rb
|
240
|
+
- test/shared_test.rb
|
185
241
|
- test/test_helper.rb
|
186
242
|
- test/test_webmock.rb
|
187
243
|
- webmock.gemspec
|
188
|
-
has_rdoc: true
|
189
244
|
homepage: http://github.com/bblimke/webmock
|
190
245
|
licenses: []
|
191
|
-
|
192
246
|
post_install_message:
|
193
247
|
rdoc_options: []
|
194
|
-
|
195
|
-
require_paths:
|
248
|
+
require_paths:
|
196
249
|
- lib
|
197
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
250
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
198
251
|
none: false
|
199
|
-
requirements:
|
200
|
-
- -
|
201
|
-
- !ruby/object:Gem::Version
|
202
|
-
version:
|
203
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
252
|
+
requirements:
|
253
|
+
- - ! '>='
|
254
|
+
- !ruby/object:Gem::Version
|
255
|
+
version: '0'
|
256
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
257
|
none: false
|
205
|
-
requirements:
|
206
|
-
- -
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version:
|
258
|
+
requirements:
|
259
|
+
- - ! '>='
|
260
|
+
- !ruby/object:Gem::Version
|
261
|
+
version: '0'
|
209
262
|
requirements: []
|
210
|
-
|
211
263
|
rubyforge_project: webmock
|
212
|
-
rubygems_version: 1.6
|
264
|
+
rubygems_version: 1.8.6
|
213
265
|
signing_key:
|
214
266
|
specification_version: 3
|
215
267
|
summary: Library for stubbing HTTP requests in Ruby.
|
216
|
-
test_files:
|
268
|
+
test_files:
|
217
269
|
- spec/curb_spec.rb
|
218
270
|
- spec/curb_spec_helper.rb
|
219
271
|
- spec/em_http_request_spec.rb
|
220
272
|
- spec/em_http_request_spec_helper.rb
|
221
273
|
- spec/errors_spec.rb
|
222
274
|
- spec/example_curl_output.txt
|
275
|
+
- spec/http_lib_adapters/http_lib_adapter_registry_spec.rb
|
276
|
+
- spec/http_lib_adapters/http_lib_adapter_spec.rb
|
223
277
|
- spec/httpclient_spec.rb
|
224
278
|
- spec/httpclient_spec_helper.rb
|
279
|
+
- spec/my_rack_app.rb
|
280
|
+
- spec/net_http_shared.rb
|
225
281
|
- spec/net_http_spec.rb
|
226
282
|
- spec/net_http_spec_helper.rb
|
227
283
|
- spec/network_connection.rb
|
228
|
-
- spec/other_net_http_libs_spec.rb
|
229
284
|
- spec/patron_spec.rb
|
230
285
|
- spec/patron_spec_helper.rb
|
286
|
+
- spec/quality_spec.rb
|
287
|
+
- spec/rack_response_spec.rb
|
288
|
+
- spec/real_net_http_spec.rb
|
231
289
|
- spec/request_execution_verifier_spec.rb
|
232
290
|
- spec/request_pattern_spec.rb
|
233
291
|
- spec/request_registry_spec.rb
|
@@ -237,9 +295,13 @@ test_files:
|
|
237
295
|
- spec/spec_helper.rb
|
238
296
|
- spec/stub_registry_spec.rb
|
239
297
|
- spec/stub_request_snippet_spec.rb
|
298
|
+
- spec/support/webmock_server.rb
|
299
|
+
- spec/typhoeus_hydra_spec.rb
|
300
|
+
- spec/typhoeus_hydra_spec_helper.rb
|
240
301
|
- spec/util/hash_counter_spec.rb
|
241
302
|
- spec/util/hash_keys_stringifier_spec.rb
|
242
303
|
- spec/util/headers_spec.rb
|
304
|
+
- spec/util/json_spec.rb
|
243
305
|
- spec/util/uri_spec.rb
|
244
306
|
- spec/vendor/addressable/lib/addressable/uri.rb
|
245
307
|
- spec/vendor/addressable/lib/uri.rb
|
@@ -252,5 +314,8 @@ test_files:
|
|
252
314
|
- spec/vendor/right_http_connection-1.2.4/lib/right_http_connection.rb
|
253
315
|
- spec/vendor/right_http_connection-1.2.4/setup.rb
|
254
316
|
- spec/webmock_shared.rb
|
317
|
+
- spec/webmock_spec.rb
|
318
|
+
- test/http_request.rb
|
319
|
+
- test/shared_test.rb
|
255
320
|
- test/test_helper.rb
|
256
321
|
- test/test_webmock.rb
|