webmock 1.21.0 → 1.22.1

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.
Files changed (44) hide show
  1. data/.travis.yml +8 -0
  2. data/CHANGELOG.md +51 -1
  3. data/Gemfile +0 -1
  4. data/README.md +17 -6
  5. data/lib/webmock.rb +4 -1
  6. data/lib/webmock/config.rb +2 -0
  7. data/lib/webmock/errors.rb +3 -21
  8. data/lib/webmock/http_lib_adapters/em_http_request/em_http_request_1_x.rb +5 -0
  9. data/lib/webmock/http_lib_adapters/manticore_adapter.rb +123 -0
  10. data/lib/webmock/http_lib_adapters/net_http.rb +16 -2
  11. data/lib/webmock/request_body_diff.rb +63 -0
  12. data/lib/webmock/request_execution_verifier.rb +24 -21
  13. data/lib/webmock/request_pattern.rb +2 -0
  14. data/lib/webmock/request_signature.rb +5 -1
  15. data/lib/webmock/request_signature_snippet.rb +61 -0
  16. data/lib/webmock/rspec/matchers.rb +0 -1
  17. data/lib/webmock/rspec/matchers/request_pattern_matcher.rb +4 -0
  18. data/lib/webmock/rspec/matchers/webmock_matcher.rb +4 -0
  19. data/lib/webmock/stub_request_snippet.rb +4 -0
  20. data/lib/webmock/util/json.rb +25 -6
  21. data/lib/webmock/util/query_mapper.rb +6 -4
  22. data/lib/webmock/version.rb +1 -1
  23. data/lib/webmock/webmock.rb +12 -0
  24. data/spec/acceptance/em_http_request/em_http_request_spec.rb +60 -0
  25. data/spec/acceptance/http_rb/http_rb_spec.rb +2 -2
  26. data/spec/acceptance/http_rb/http_rb_spec_helper.rb +1 -1
  27. data/spec/acceptance/httpclient/httpclient_spec.rb +8 -7
  28. data/spec/acceptance/manticore/manticore_spec.rb +56 -0
  29. data/spec/acceptance/manticore/manticore_spec_helper.rb +31 -0
  30. data/spec/acceptance/net_http/net_http_spec.rb +24 -1
  31. data/spec/acceptance/shared/request_expectations.rb +10 -10
  32. data/spec/spec_helper.rb +4 -0
  33. data/spec/unit/errors_spec.rb +45 -4
  34. data/spec/unit/request_body_diff_spec.rb +90 -0
  35. data/spec/unit/request_execution_verifier_spec.rb +48 -11
  36. data/spec/unit/request_signature_snippet_spec.rb +89 -0
  37. data/spec/unit/request_signature_spec.rb +61 -23
  38. data/spec/unit/stub_registry_spec.rb +1 -1
  39. data/spec/unit/util/json_spec.rb +29 -3
  40. data/spec/unit/util/query_mapper_spec.rb +15 -4
  41. data/spec/unit/webmock_spec.rb +4 -0
  42. data/test/shared_test.rb +2 -2
  43. data/webmock.gemspec +4 -1
  44. metadata +63 -24
@@ -0,0 +1,89 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe WebMock::RequestSignatureSnippet do
4
+ it("is real"){expect{subject}.not_to(raise_error)}
5
+
6
+ subject { WebMock::RequestSignatureSnippet.new(request_signature) }
7
+
8
+ let(:uri) { "http://example.com" }
9
+ let(:method) { "GET" }
10
+
11
+ let(:request_signature) { WebMock::RequestSignature.new(method, uri) }
12
+ let(:request_signature_body) { {"key" => "different value"}.to_json }
13
+
14
+ let(:request_pattern) {
15
+ WebMock::RequestPattern.new(
16
+ method, uri, {:body => request_signature_body}
17
+ )
18
+ }
19
+
20
+ before :each do
21
+ request_signature.headers = {"Content-Type" => "application/json"}
22
+ request_signature.body = request_signature_body
23
+ end
24
+
25
+ describe "#stubbing_instructions" do
26
+ context "with stubbing instructions turned off" do
27
+ before :each do
28
+ WebMock.hide_stubbing_instructions!
29
+ end
30
+
31
+ it "returns nil" do
32
+ expect(subject.stubbing_instructions).to be nil
33
+ end
34
+
35
+ after :each do
36
+ WebMock.show_stubbing_instructions!
37
+ end
38
+ end
39
+
40
+ context "with stubbing instructions turned on" do
41
+ it "returns a stub snippet" do
42
+ expect(subject.stubbing_instructions).to include(
43
+ "You can stub this request with the following snippet:"
44
+ )
45
+ end
46
+ end
47
+ end
48
+
49
+ describe "#request_stubs" do
50
+ before :each do
51
+ WebMock.stub_request(:get, "https://www.example.com").with(:body => {"a" => "b"})
52
+ end
53
+
54
+ context "when showing the body diff is turned off" do
55
+ before :each do
56
+ WebMock.hide_body_diff!
57
+ end
58
+
59
+ it "returns does not show the body diff" do
60
+ result = subject.request_stubs
61
+ result.sub!("registered request stubs:\n\n", "")
62
+ expect(result).to eq(
63
+ "stub_request(:get, \"https://www.example.com/\").\n with(:body => {\"a\"=>\"b\"})"
64
+ )
65
+ end
66
+
67
+ after :each do
68
+ WebMock.show_body_diff!
69
+ end
70
+ end
71
+
72
+ context "when showing the body diff is turned on" do
73
+ it "shows the body diff" do
74
+ result = subject.request_stubs
75
+ result.sub!("registered request stubs:\n\n", "")
76
+ expect(result).to eq(
77
+ "stub_request(:get, \"https://www.example.com/\").\n with(:body => {\"a\"=>\"b\"})\n\nBody diff:\n [[\"-\", \"key\", \"different value\"], [\"+\", \"a\", \"b\"]]\n"
78
+ )
79
+ end
80
+ end
81
+
82
+ context "with no request stubs" do
83
+ it "returns nil" do
84
+ WebMock.reset!
85
+ expect(subject.request_stubs).to be nil
86
+ end
87
+ end
88
+ end
89
+ end
@@ -4,42 +4,46 @@ describe WebMock::RequestSignature do
4
4
 
5
5
  describe "initialization" do
6
6
 
7
- it "should have assigned normalized uri" do
7
+ it "assign the uri to be the normalized uri" do
8
8
  expect(WebMock::Util::URI).to receive(:normalize_uri).and_return("www.example.kom")
9
9
  signature = WebMock::RequestSignature.new(:get, "www.example.com")
10
10
  expect(signature.uri).to eq("www.example.kom")
11
11
  end
12
12
 
13
- it "should have assigned uri without normalization if uri is URI" do
13
+ it "assigns the uri without normalization if uri is already a URI" do
14
14
  expect(WebMock::Util::URI).not_to receive(:normalize_uri)
15
15
  uri = Addressable::URI.parse("www.example.com")
16
16
  signature = WebMock::RequestSignature.new(:get, uri)
17
17
  expect(signature.uri).to eq(uri)
18
18
  end
19
19
 
20
- it "should have assigned normalized headers" do
20
+ it "assigns normalized headers" do
21
21
  expect(WebMock::Util::Headers).to receive(:normalize_headers).with('A' => 'a').and_return('B' => 'b')
22
- expect(WebMock::RequestSignature.new(:get, "www.example.com", :headers => {'A' => 'a'}).headers).to eq({'B' => 'b'})
22
+ expect(
23
+ WebMock::RequestSignature.new(:get, "www.example.com", :headers => {'A' => 'a'}).headers
24
+ ).to eq({'B' => 'b'})
23
25
  end
24
26
 
25
- it "should have assigned body" do
27
+ it "assign the body" do
26
28
  expect(WebMock::RequestSignature.new(:get, "www.example.com", :body => "abc").body).to eq("abc")
27
29
  end
28
30
 
29
- it "should symbolize the method" do
31
+ it "symbolizes the method" do
30
32
  expect(WebMock::RequestSignature.new('get', "www.example.com", :body => "abc").method).to eq(:get)
31
33
  end
32
34
  end
33
35
 
34
- it "should report string describing itself" do
35
- expect(WebMock::RequestSignature.new(:get, "www.example.com",
36
- :body => "abc", :headers => {'A' => 'a', 'B' => 'b'}).to_s).to eq(
37
- "GET http://www.example.com/ with body 'abc' with headers {'A'=>'a', 'B'=>'b'}"
38
- )
36
+ describe "#to_s" do
37
+ it "describes itself" do
38
+ expect(WebMock::RequestSignature.new(:get, "www.example.com",
39
+ :body => "abc", :headers => {'A' => 'a', 'B' => 'b'}).to_s).to eq(
40
+ "GET http://www.example.com/ with body 'abc' with headers {'A'=>'a', 'B'=>'b'}"
41
+ )
42
+ end
39
43
  end
40
44
 
41
- describe "hash" do
42
- it "should report same hash for two signatures with the same values" do
45
+ describe "#hash" do
46
+ it "reporst same hash for two signatures with the same values" do
43
47
  signature1 = WebMock::RequestSignature.new(:get, "www.example.com",
44
48
  :body => "abc", :headers => {'A' => 'a', 'B' => 'b'})
45
49
  signature2 = WebMock::RequestSignature.new(:get, "www.example.com",
@@ -47,25 +51,25 @@ describe WebMock::RequestSignature do
47
51
  expect(signature1.hash).to eq(signature2.hash)
48
52
  end
49
53
 
50
- it "should report different hash for two signatures with different method" do
54
+ it "reports different hash for two signatures with different method" do
51
55
  signature1 = WebMock::RequestSignature.new(:get, "www.example.com")
52
56
  signature2 = WebMock::RequestSignature.new(:put, "www.example.com")
53
57
  expect(signature1.hash).not_to eq(signature2.hash)
54
58
  end
55
59
 
56
- it "should report different hash for two signatures with different uri" do
60
+ it "reports different hash for two signatures with different uri" do
57
61
  signature1 = WebMock::RequestSignature.new(:get, "www.example.com")
58
62
  signature2 = WebMock::RequestSignature.new(:get, "www.example.org")
59
63
  expect(signature1.hash).not_to eq(signature2.hash)
60
64
  end
61
65
 
62
- it "should report different hash for two signatures with different body" do
66
+ it "reports different hash for two signatures with different body" do
63
67
  signature1 = WebMock::RequestSignature.new(:get, "www.example.com", :body => "abc")
64
68
  signature2 = WebMock::RequestSignature.new(:get, "www.example.com", :body => "def")
65
69
  expect(signature1.hash).not_to eq(signature2.hash)
66
70
  end
67
71
 
68
- it "should report different hash for two signatures with different headers" do
72
+ it "reports different hash for two signatures with different headers" do
69
73
  signature1 = WebMock::RequestSignature.new(:get, "www.example.com",
70
74
  :headers => {'A' => 'a'})
71
75
  signature2 = WebMock::RequestSignature.new(:get, "www.example.com",
@@ -74,10 +78,9 @@ describe WebMock::RequestSignature do
74
78
  end
75
79
  end
76
80
 
77
-
78
81
  [:==, :eql?].each do |method|
79
82
  describe method do
80
- it "should be true for two signatures with the same values" do
83
+ it "is true for two signatures with the same values" do
81
84
  signature1 = WebMock::RequestSignature.new(:get, "www.example.com",
82
85
  :body => "abc", :headers => {'A' => 'a', 'B' => 'b'})
83
86
  signature2 = WebMock::RequestSignature.new(:get, "www.example.com",
@@ -86,25 +89,25 @@ describe WebMock::RequestSignature do
86
89
  expect(signature1.send(method, signature2)).to be_truthy
87
90
  end
88
91
 
89
- it "should be false for two signatures with different method" do
92
+ it "is false for two signatures with different method" do
90
93
  signature1 = WebMock::RequestSignature.new(:get, "www.example.com")
91
94
  signature2 = WebMock::RequestSignature.new(:put, "www.example.com")
92
95
  expect(signature1.send(method, signature2)).to be_falsey
93
96
  end
94
97
 
95
- it "should be false for two signatures with different uri" do
98
+ it "is false for two signatures with different uri" do
96
99
  signature1 = WebMock::RequestSignature.new(:get, "www.example.com")
97
100
  signature2 = WebMock::RequestSignature.new(:get, "www.example.org")
98
101
  expect(signature1.send(method, signature2)).to be_falsey
99
102
  end
100
103
 
101
- it "should be false for two signatures with different body" do
104
+ it "is false for two signatures with different body" do
102
105
  signature1 = WebMock::RequestSignature.new(:get, "www.example.com", :body => "abc")
103
106
  signature2 = WebMock::RequestSignature.new(:get, "www.example.com", :body => "def")
104
107
  expect(signature1.send(method, signature2)).to be_falsey
105
108
  end
106
109
 
107
- it "should be false for two signatures with different headers" do
110
+ it "is false for two signatures with different headers" do
108
111
  signature1 = WebMock::RequestSignature.new(:get, "www.example.com",
109
112
  :headers => {'A' => 'a'})
110
113
  signature2 = WebMock::RequestSignature.new(:get, "www.example.com",
@@ -114,4 +117,39 @@ describe WebMock::RequestSignature do
114
117
  end
115
118
  end
116
119
 
120
+ subject { WebMock::RequestSignature.new(:get, "www.example.com") }
121
+
122
+ describe "#url_encoded?" do
123
+ it "returns true if the headers are urlencoded" do
124
+ subject.headers = { "Content-Type" => "application/x-www-form-urlencoded" }
125
+ expect(subject.url_encoded?).to be true
126
+ end
127
+
128
+ it "returns false if the headers are NOT urlencoded" do
129
+ subject.headers = { "Content-Type" => "application/made-up-format" }
130
+ expect(subject.url_encoded?).to be false
131
+ end
132
+
133
+ it "returns false when no headers are set" do
134
+ subject.headers = nil
135
+ expect(subject.url_encoded?).to be false
136
+ end
137
+ end
138
+
139
+ describe "#json_headers?" do
140
+ it "returns true if the headers are json" do
141
+ subject.headers = { "Content-Type" => "application/json" }
142
+ expect(subject.json_headers?).to be true
143
+ end
144
+
145
+ it "returns false if the headers are NOT json" do
146
+ subject.headers = { "Content-Type" => "application/made-up-format" }
147
+ expect(subject.json_headers?).to be false
148
+ end
149
+
150
+ it "returns false when no headers are set" do
151
+ subject.headers = nil
152
+ expect(subject.json_headers?).to be false
153
+ end
154
+ end
117
155
  end
@@ -40,7 +40,7 @@ describe WebMock::StubRegistry do
40
40
  expect(WebMock::StubRegistry.instance.registered_request?(@request_signature)).to eq(nil)
41
41
  end
42
42
 
43
- it "should register and report registered stib" do
43
+ it "should register and report registered stub" do
44
44
  WebMock::StubRegistry.instance.register_request_stub(@request_stub)
45
45
  expect(WebMock::StubRegistry.instance.registered_request?(@request_signature)).to eq(@request_stub)
46
46
  end
@@ -1,7 +1,33 @@
1
+ # encoding: utf-8
1
2
  require 'spec_helper'
2
3
 
3
4
  describe WebMock::Util::JSON do
4
- it "should parse json without parsing dates" do
5
- expect(WebMock::Util::JSON.parse("\"a\":\"2011-01-01\"")).to eq({"a" => "2011-01-01"})
5
+ describe ".parse" do
6
+ it "should parse json without parsing dates" do
7
+ expect(WebMock::Util::JSON.parse("\"a\":\"2011-01-01\"")).to eq(
8
+ {"a" => "2011-01-01"}
9
+ )
10
+ end
11
+
12
+ it "can parse json with multibyte characters" do
13
+ expect(WebMock::Util::JSON.parse(
14
+ "{\"name\":\"山田太郎\"\,\"job\":\"会社員\"}"
15
+ )).to eq({"name" => "山田太郎", "job" => "会社員"})
16
+ end
17
+
18
+ it "rescues ArgumentError's from YAML.load" do
19
+ allow(YAML).to receive(:load).and_raise(ArgumentError)
20
+ expect {
21
+ WebMock::Util::JSON.parse("Bad JSON")
22
+ }.to raise_error WebMock::Util::JSON::ParseError
23
+ end
24
+ end
25
+
26
+ describe ".convert_json_to_yaml" do
27
+ it "parses multibyte characters" do
28
+ expect(WebMock::Util::JSON.convert_json_to_yaml(
29
+ "{\"name\":\"山田太郎\"\,\"job\":\"会社員\"}"
30
+ )).to eq "{\"name\": \"山田太郎\", \"job\": \"会社員\"}"
31
+ end
6
32
  end
7
- end
33
+ end
@@ -60,11 +60,15 @@ describe WebMock::Util::QueryMapper do
60
60
  it 'should transform hash value' do
61
61
  expect(subject.to_query('a', {'key' => 'value'})).to eq('a[key]=value')
62
62
  end
63
+ it 'should transform hash value with keys that are symbols' do
64
+ expect(subject.to_query('a', {:key => 'value'})).to eq('a[key]=value')
65
+ end
63
66
  it 'should transform array value' do
64
67
  expect(subject.to_query('a', ['b', 'c'])).to eq('a[0]=b&a[1]=c')
65
68
  end
66
- it 'should transform TrueClass value' do
67
- expect(subject.to_query('a', true)).to eq('a')
69
+ it 'should transform boolean values' do
70
+ expect(subject.to_query('a', true)).to eq('a=true')
71
+ expect(subject.to_query('a', false)).to eq('a=false')
68
72
  end
69
73
  end
70
74
 
@@ -89,16 +93,23 @@ describe WebMock::Util::QueryMapper do
89
93
  end
90
94
 
91
95
  it 'converts array values, vice versa' do
92
- query = "one%5B%5D=1&one%5B%5D=2"
96
+ query = "one%5B%5D=1&one%5B%5D=2" # one[]=1&one[]=2
93
97
  values = {"one" => ["1","2"]}
94
98
  expect(subject.values_to_query values).to eq query
95
99
  expect(subject.query_to_values query).to eq values
96
100
  end
97
101
 
98
102
  it 'converts hash values, vice versa' do
99
- query = "one%5Ba%5D=1&one%5Bb%5D=2"
103
+ query = "one%5Ba%5D=1&one%5Bb%5D=2" # one[a]=1&one[b]=2
100
104
  values = {"one" => {"a" => "1", "b" => "2"}}
101
105
  expect(subject.values_to_query values).to eq query
102
106
  expect(subject.query_to_values query).to eq values
103
107
  end
108
+
109
+ it 'converts complex nested values, vice versa' do
110
+ query = "one%5B%5D[foo]=bar&one%5B%5D[zoo]=car" # one[][foo]=bar&one[][zoo]=car
111
+ values = {"one" => [{"foo" => "bar"}, {"zoo" => "car"}]}
112
+ expect(subject.values_to_query values).to eq query
113
+ expect(subject.query_to_values query).to eq values
114
+ end
104
115
  end
@@ -4,4 +4,8 @@ describe "WebMock version" do
4
4
  it "should report version" do
5
5
  expect(WebMock.version).to eq(WebMock::VERSION)
6
6
  end
7
+
8
+ it "should not require safe_yaml" do
9
+ expect(defined?SafeYAML).to eq(nil)
10
+ end
7
11
  end
data/test/shared_test.rb CHANGED
@@ -71,7 +71,7 @@ module SharedTest
71
71
  end
72
72
 
73
73
  def test_verification_that_non_expected_request_didnt_occur
74
- 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============================================================)
74
+ 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============================================================)
75
75
  assert_fail(expected_message) do
76
76
  http_request(:get, "http://www.example.com/")
77
77
  assert_not_requested(:get, "http://www.example.com")
@@ -79,7 +79,7 @@ module SharedTest
79
79
  end
80
80
 
81
81
  def test_verification_that_non_expected_stub_didnt_occur
82
- expected_message = %r(The request ANY 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============================================================)
82
+ 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============================================================)
83
83
  assert_fail(expected_message) do
84
84
  http_request(:get, "http://www.example.com/")
85
85
  assert_not_requested(@stub_http)
data/webmock.gemspec CHANGED
@@ -17,20 +17,23 @@ Gem::Specification.new do |s|
17
17
 
18
18
  s.add_dependency 'addressable', '>= 2.3.6'
19
19
  s.add_dependency 'crack', '>=0.3.2'
20
+ s.add_dependency 'hashdiff'
20
21
 
21
22
  patron_version = (RUBY_VERSION <= '1.8.7') ? '0.4.18' : '>= 0.4.18'
22
23
 
23
24
  s.add_development_dependency 'rspec', '>= 3.1.0'
24
- s.add_development_dependency 'http', '>= 0.6.0'
25
25
  s.add_development_dependency 'httpclient', '>= 2.2.4'
26
26
  s.add_development_dependency('patron', patron_version) unless RUBY_PLATFORM =~ /java/
27
27
  s.add_development_dependency 'em-http-request', '>= 1.0.2'
28
+ s.add_development_dependency 'http', ((RUBY_VERSION <= '1.9.3') ? '0.7.3' : '>= 0.8.0')
28
29
  s.add_development_dependency 'em-synchrony', '>= 1.0.0' if RUBY_VERSION >= "1.9"
29
30
  s.add_development_dependency 'curb', '<= 0.8.6' unless RUBY_PLATFORM =~ /java/
30
31
  s.add_development_dependency 'typhoeus', '>= 0.5.0' unless RUBY_PLATFORM =~ /java/
32
+ s.add_development_dependency 'manticore', '>= 0.5.1' if RUBY_PLATFORM =~ /java/
31
33
  s.add_development_dependency 'excon', '>= 0.27.5'
32
34
  s.add_development_dependency 'minitest', '~> 5.0.0'
33
35
  s.add_development_dependency 'rdoc', ((RUBY_VERSION == '1.8.6') ? '<= 3.5.0' : '>3.5.0')
36
+ s.add_development_dependency 'rack'
34
37
 
35
38
  s.files = `git ls-files`.split("\n")
36
39
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmock
3
3
  version: !ruby/object:Gem::Version
4
- hash: 67
4
+ hash: 77
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 21
9
- - 0
10
- version: 1.21.0
8
+ - 22
9
+ - 1
10
+ version: 1.22.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Bartosz Blimke
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2015-03-28 23:00:00 +01:00
18
+ date: 2015-10-13 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -51,7 +51,7 @@ dependencies:
51
51
  requirement: *id002
52
52
  name: crack
53
53
  - !ruby/object:Gem::Dependency
54
- type: :development
54
+ type: :runtime
55
55
  version_requirements: &id003 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
@@ -59,13 +59,11 @@ dependencies:
59
59
  - !ruby/object:Gem::Version
60
60
  hash: 3
61
61
  segments:
62
- - 3
63
- - 1
64
62
  - 0
65
- version: 3.1.0
63
+ version: "0"
66
64
  prerelease: false
67
65
  requirement: *id003
68
- name: rspec
66
+ name: hashdiff
69
67
  - !ruby/object:Gem::Dependency
70
68
  type: :development
71
69
  version_requirements: &id004 !ruby/object:Gem::Requirement
@@ -73,15 +71,15 @@ dependencies:
73
71
  requirements:
74
72
  - - ">="
75
73
  - !ruby/object:Gem::Version
76
- hash: 7
74
+ hash: 3
77
75
  segments:
76
+ - 3
77
+ - 1
78
78
  - 0
79
- - 6
80
- - 0
81
- version: 0.6.0
79
+ version: 3.1.0
82
80
  prerelease: false
83
81
  requirement: *id004
84
- name: http
82
+ name: rspec
85
83
  - !ruby/object:Gem::Dependency
86
84
  type: :development
87
85
  version_requirements: &id005 !ruby/object:Gem::Requirement
@@ -133,6 +131,22 @@ dependencies:
133
131
  - !ruby/object:Gem::Dependency
134
132
  type: :development
135
133
  version_requirements: &id008 !ruby/object:Gem::Requirement
134
+ none: false
135
+ requirements:
136
+ - - "="
137
+ - !ruby/object:Gem::Version
138
+ hash: 5
139
+ segments:
140
+ - 0
141
+ - 7
142
+ - 3
143
+ version: 0.7.3
144
+ prerelease: false
145
+ requirement: *id008
146
+ name: http
147
+ - !ruby/object:Gem::Dependency
148
+ type: :development
149
+ version_requirements: &id009 !ruby/object:Gem::Requirement
136
150
  none: false
137
151
  requirements:
138
152
  - - <=
@@ -144,11 +158,11 @@ dependencies:
144
158
  - 6
145
159
  version: 0.8.6
146
160
  prerelease: false
147
- requirement: *id008
161
+ requirement: *id009
148
162
  name: curb
149
163
  - !ruby/object:Gem::Dependency
150
164
  type: :development
151
- version_requirements: &id009 !ruby/object:Gem::Requirement
165
+ version_requirements: &id010 !ruby/object:Gem::Requirement
152
166
  none: false
153
167
  requirements:
154
168
  - - ">="
@@ -160,11 +174,11 @@ dependencies:
160
174
  - 0
161
175
  version: 0.5.0
162
176
  prerelease: false
163
- requirement: *id009
177
+ requirement: *id010
164
178
  name: typhoeus
165
179
  - !ruby/object:Gem::Dependency
166
180
  type: :development
167
- version_requirements: &id010 !ruby/object:Gem::Requirement
181
+ version_requirements: &id011 !ruby/object:Gem::Requirement
168
182
  none: false
169
183
  requirements:
170
184
  - - ">="
@@ -176,11 +190,11 @@ dependencies:
176
190
  - 5
177
191
  version: 0.27.5
178
192
  prerelease: false
179
- requirement: *id010
193
+ requirement: *id011
180
194
  name: excon
181
195
  - !ruby/object:Gem::Dependency
182
196
  type: :development
183
- version_requirements: &id011 !ruby/object:Gem::Requirement
197
+ version_requirements: &id012 !ruby/object:Gem::Requirement
184
198
  none: false
185
199
  requirements:
186
200
  - - ~>
@@ -192,11 +206,11 @@ dependencies:
192
206
  - 0
193
207
  version: 5.0.0
194
208
  prerelease: false
195
- requirement: *id011
209
+ requirement: *id012
196
210
  name: minitest
197
211
  - !ruby/object:Gem::Dependency
198
212
  type: :development
199
- version_requirements: &id012 !ruby/object:Gem::Requirement
213
+ version_requirements: &id013 !ruby/object:Gem::Requirement
200
214
  none: false
201
215
  requirements:
202
216
  - - ">"
@@ -208,8 +222,22 @@ dependencies:
208
222
  - 0
209
223
  version: 3.5.0
210
224
  prerelease: false
211
- requirement: *id012
225
+ requirement: *id013
212
226
  name: rdoc
227
+ - !ruby/object:Gem::Dependency
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"
238
+ prerelease: false
239
+ requirement: *id014
240
+ name: rack
213
241
  description: WebMock allows stubbing HTTP requests and setting expectations on HTTP requests.
214
242
  email:
215
243
  - bartosz.blimke@gmail.com
@@ -251,6 +279,7 @@ files:
251
279
  - lib/webmock/http_lib_adapters/http_rb/webmock.rb
252
280
  - lib/webmock/http_lib_adapters/http_rb_adapter.rb
253
281
  - lib/webmock/http_lib_adapters/httpclient_adapter.rb
282
+ - lib/webmock/http_lib_adapters/manticore_adapter.rb
254
283
  - lib/webmock/http_lib_adapters/net_http.rb
255
284
  - lib/webmock/http_lib_adapters/net_http_response.rb
256
285
  - lib/webmock/http_lib_adapters/patron_adapter.rb
@@ -258,10 +287,12 @@ files:
258
287
  - lib/webmock/matchers/hash_including_matcher.rb
259
288
  - lib/webmock/minitest.rb
260
289
  - lib/webmock/rack_response.rb
290
+ - lib/webmock/request_body_diff.rb
261
291
  - lib/webmock/request_execution_verifier.rb
262
292
  - lib/webmock/request_pattern.rb
263
293
  - lib/webmock/request_registry.rb
264
294
  - lib/webmock/request_signature.rb
295
+ - lib/webmock/request_signature_snippet.rb
265
296
  - lib/webmock/request_stub.rb
266
297
  - lib/webmock/response.rb
267
298
  - lib/webmock/responses_sequence.rb
@@ -295,6 +326,8 @@ files:
295
326
  - spec/acceptance/http_rb/http_rb_spec_helper.rb
296
327
  - spec/acceptance/httpclient/httpclient_spec.rb
297
328
  - spec/acceptance/httpclient/httpclient_spec_helper.rb
329
+ - spec/acceptance/manticore/manticore_spec.rb
330
+ - spec/acceptance/manticore/manticore_spec_helper.rb
298
331
  - spec/acceptance/net_http/net_http_shared.rb
299
332
  - spec/acceptance/net_http/net_http_spec.rb
300
333
  - spec/acceptance/net_http/net_http_spec_helper.rb
@@ -324,9 +357,11 @@ files:
324
357
  - spec/unit/http_lib_adapters/http_lib_adapter_spec.rb
325
358
  - spec/unit/matchers/hash_including_matcher_spec.rb
326
359
  - spec/unit/rack_response_spec.rb
360
+ - spec/unit/request_body_diff_spec.rb
327
361
  - spec/unit/request_execution_verifier_spec.rb
328
362
  - spec/unit/request_pattern_spec.rb
329
363
  - spec/unit/request_registry_spec.rb
364
+ - spec/unit/request_signature_snippet_spec.rb
330
365
  - spec/unit/request_signature_spec.rb
331
366
  - spec/unit/request_stub_spec.rb
332
367
  - spec/unit/response_spec.rb
@@ -390,6 +425,8 @@ test_files:
390
425
  - spec/acceptance/http_rb/http_rb_spec_helper.rb
391
426
  - spec/acceptance/httpclient/httpclient_spec.rb
392
427
  - spec/acceptance/httpclient/httpclient_spec_helper.rb
428
+ - spec/acceptance/manticore/manticore_spec.rb
429
+ - spec/acceptance/manticore/manticore_spec_helper.rb
393
430
  - spec/acceptance/net_http/net_http_shared.rb
394
431
  - spec/acceptance/net_http/net_http_spec.rb
395
432
  - spec/acceptance/net_http/net_http_spec_helper.rb
@@ -419,9 +456,11 @@ test_files:
419
456
  - spec/unit/http_lib_adapters/http_lib_adapter_spec.rb
420
457
  - spec/unit/matchers/hash_including_matcher_spec.rb
421
458
  - spec/unit/rack_response_spec.rb
459
+ - spec/unit/request_body_diff_spec.rb
422
460
  - spec/unit/request_execution_verifier_spec.rb
423
461
  - spec/unit/request_pattern_spec.rb
424
462
  - spec/unit/request_registry_spec.rb
463
+ - spec/unit/request_signature_snippet_spec.rb
425
464
  - spec/unit/request_signature_spec.rb
426
465
  - spec/unit/request_stub_spec.rb
427
466
  - spec/unit/response_spec.rb