http_stub 0.13.0 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ N2JiODEwNjQzODFhNzU4ZjIyODg1Yjg0ZjU3Zjc4NDRlNzUxNmNhZQ==
5
+ data.tar.gz: !binary |-
6
+ YWUzNDU3YWMyNDVmNzI3ZGM2MTIzMjdhZTIwZThmNWI0NWQ2YTZhMQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NTA5OGZiZDdkMTY3MjkyMTM3MTg5MThmYWM2MTU4OTY2MDcxODc2YjZhNTg1
10
+ ZGM4Y2FmYTRkNTg0ZGJkZmE5ODBjOGZiNmVhZGU5ZDNmMjYzYTA4NmI1ZWM4
11
+ YjA0NWJjZGQwOGIyZjc3ZDUwMGY4ZTcyYzc4YzZhMWZlYTk5ODM=
12
+ data.tar.gz: !binary |-
13
+ YzMxNjAwNzU2NjAzZjVlYjI5MTEyOTcxODYwZmQ3MjVkZjQ5YmJkZDk0NjRi
14
+ MmE4MTE5MmFhZjNmZWNkZWFlYjBiMWM1MWRjNjAwY2Q2MzI0ODZiNWRjNDA2
15
+ ZDk1NGFlMmFhY2QyZDgwMTQwYzI0ZTllNTI2MDZjYmZiN2QwNjM=
data/lib/http_stub.rb CHANGED
@@ -7,6 +7,7 @@ require 'json'
7
7
  require 'http_server_manager'
8
8
 
9
9
  require_relative 'http_stub/hash_extensions'
10
+ require_relative 'http_stub/models/headers'
10
11
  require_relative 'http_stub/models/response'
11
12
  require_relative 'http_stub/models/omitted_value_matcher'
12
13
  require_relative 'http_stub/models/regexp_value_matcher'
@@ -0,0 +1,17 @@
1
+ module HttpStub
2
+ module Models
3
+
4
+ class Headers < Hash
5
+
6
+ def initialize(headers)
7
+ self.merge!(headers || {})
8
+ end
9
+
10
+ def to_s
11
+ self.map { |key_and_value| key_and_value.map(&:to_s).join(":") }.join(", ")
12
+ end
13
+
14
+ end
15
+
16
+ end
17
+ end
@@ -8,40 +8,31 @@ module HttpStub
8
8
  DEFAULT_OPTIONS = { "status" => 200, "delay_in_seconds" => 0 }.freeze
9
9
  DEFAULT_HEADERS = { "content-type" => "application/json" }.freeze
10
10
 
11
- def establish_defaults_in(options)
12
- headers = options["headers"] ||= {}
13
- DEFAULT_OPTIONS.each { |key, value| options[key] = value if !options[key] || options[key] == "" }
14
- DEFAULT_HEADERS.each { |key, value| headers[key] = value if !headers[key] || headers[key] == "" }
11
+ def merge_default_options(options)
12
+ options.clone.tap do |options|
13
+ headers = options["headers"] ||= {}
14
+ DEFAULT_OPTIONS.each { |key, value| options[key] = value if !options[key] || options[key] == "" }
15
+ DEFAULT_HEADERS.each { |key, value| headers[key] = value if !headers[key] || headers[key] == "" }
16
+ end
15
17
  end
16
18
 
17
19
  public
18
20
 
21
+ attr_reader :status, :body, :delay_in_seconds, :headers
22
+
19
23
  def initialize(options = {})
20
24
  @original_options = options
21
- @response_options = options.clone
22
- establish_defaults_in(@response_options)
25
+ resolved_options = merge_default_options(options)
26
+ @status = resolved_options["status"]
27
+ @body = resolved_options["body"]
28
+ @delay_in_seconds = resolved_options["delay_in_seconds"]
29
+ @headers = HttpStub::Models::Headers.new(resolved_options["headers"])
23
30
  end
24
31
 
25
32
  SUCCESS = HttpStub::Models::Response.new("status" => 200, "body" => "OK")
26
33
  ERROR = HttpStub::Models::Response.new("status" => 404, "body" => "ERROR")
27
34
  EMPTY = HttpStub::Models::Response.new()
28
35
 
29
- def status
30
- @response_options["status"]
31
- end
32
-
33
- def body
34
- @response_options["body"]
35
- end
36
-
37
- def delay_in_seconds
38
- @response_options["delay_in_seconds"]
39
- end
40
-
41
- def headers
42
- @response_options["headers"]
43
- end
44
-
45
36
  def empty?
46
37
  @original_options.empty?
47
38
  end
@@ -1,9 +1,10 @@
1
1
  module HttpStub
2
2
  module Models
3
3
 
4
- class StubHeaders
4
+ class StubHeaders < HttpStub::Models::Headers
5
5
 
6
6
  def initialize(headers)
7
+ super(headers)
7
8
  @headers = HttpStub::Models::HashWithValueMatchers.new((headers || {}).downcase_and_underscore_keys)
8
9
  end
9
10
 
@@ -11,10 +12,6 @@ module HttpStub
11
12
  @headers.match?(headers_in(request).downcase_and_underscore_keys)
12
13
  end
13
14
 
14
- def to_s
15
- @headers ? @headers.map { |key_and_value| key_and_value.map(&:to_s).join(":") }.join(", ") : ""
16
- end
17
-
18
15
  private
19
16
 
20
17
  def headers_in(request)
@@ -96,7 +96,7 @@ module HttpStub
96
96
  response = @stub_activator_controller.activate(request) if response.empty?
97
97
  response = HttpStub::Models::Response::ERROR if response.empty?
98
98
  HttpStub::Models::RequestPipeline.before_halt(response)
99
- halt(response.status, response.headers, response.body)
99
+ halt(response.status, response.headers.to_hash, response.body)
100
100
  end
101
101
 
102
102
  end
@@ -1,3 +1,3 @@
1
1
  module HttpStub
2
- VERSION = "0.13.0"
2
+ VERSION = "0.13.1"
3
3
  end
@@ -14,6 +14,12 @@
14
14
  %tr
15
15
  %td Response Status:
16
16
  %td=the_stub.response.status
17
+ %tr
18
+ %td Response Headers:
19
+ %td=h(the_stub.response.headers)
17
20
  %tr
18
21
  %td Response Body:
19
22
  %td=h(the_stub.response.body)
23
+ %tr
24
+ %td Response Delay:
25
+ %td=h(the_stub.response.delay_in_seconds)
@@ -0,0 +1,51 @@
1
+ describe HttpStub::Models::Headers do
2
+
3
+ let(:header_hash) { {} }
4
+
5
+ let(:headers) { HttpStub::Models::Headers.new(header_hash) }
6
+
7
+ it "should be a Hash" do
8
+ headers.should be_a(Hash)
9
+ end
10
+
11
+ describe "#to_s" do
12
+
13
+ describe "when multiple headers are provided" do
14
+
15
+ let(:header_hash) { { "key1" => "value1", "key2" => "value2", "key3" => "value3" } }
16
+
17
+ it "should return a string containing each header formatted as a conventional request header" do
18
+ result = headers.to_s
19
+
20
+ header_hash.each { |key, value| result.should match(/#{key}:#{value}/) }
21
+ end
22
+
23
+ it "should comma delimit the headers" do
24
+ headers.to_s.should match(/key\d.value\d\, key\d.value\d\, key\d.value\d/)
25
+ end
26
+
27
+ end
28
+
29
+ describe "when empty headers are provided" do
30
+
31
+ let(:header_hash) { {} }
32
+
33
+ it "should return an empty string" do
34
+ headers.to_s.should eql("")
35
+ end
36
+
37
+ end
38
+
39
+ describe "when nil headers are provided" do
40
+
41
+ let(:header_hash) { nil }
42
+
43
+ it "should return an empty string" do
44
+ headers.to_s.should eql("")
45
+ end
46
+
47
+ end
48
+
49
+ end
50
+
51
+ end
@@ -121,6 +121,12 @@ describe HttpStub::Models::Response do
121
121
 
122
122
  describe "#headers" do
123
123
 
124
+ let(:response_header_hash) { response.headers.to_hash }
125
+
126
+ it "should be Headers" do
127
+ response.headers.should be_a(HttpStub::Models::Headers)
128
+ end
129
+
124
130
  context "when headers are provided" do
125
131
 
126
132
  context "that include a content type" do
@@ -129,8 +135,8 @@ describe HttpStub::Models::Response do
129
135
  { "content-type" => "some/content/type", "some_header" => "some value", "another_header" => "another value" }
130
136
  end
131
137
 
132
- it "should return a hash including the provided headers" do
133
- response.headers.should eql(headers)
138
+ it "should return headers including the provided headers" do
139
+ response_header_hash.should eql(headers)
134
140
  end
135
141
 
136
142
  end
@@ -145,12 +151,12 @@ describe HttpStub::Models::Response do
145
151
  }
146
152
  end
147
153
 
148
- it "should return a hash including the provided headers" do
149
- response.headers.should include(headers)
154
+ it "should return headers including the provided headers" do
155
+ response_header_hash.should include(headers)
150
156
  end
151
157
 
152
- it "should return a hash including json as the default response content type" do
153
- response.headers.should include("content-type" => "application/json")
158
+ it "should return headers including json as the default response content type" do
159
+ response_header_hash.should include("content-type" => "application/json")
154
160
  end
155
161
 
156
162
  end
@@ -161,8 +167,8 @@ describe HttpStub::Models::Response do
161
167
 
162
168
  let(:headers) { nil }
163
169
 
164
- it "should return a hash containing json as the default response content type" do
165
- response.headers.should eql("content-type" => "application/json")
170
+ it "should return headers containing json as the default response content type" do
171
+ response_header_hash.should eql("content-type" => "application/json")
166
172
  end
167
173
 
168
174
  end
@@ -5,6 +5,10 @@ describe HttpStub::Models::StubHeaders do
5
5
 
6
6
  let(:stub_headers) { HttpStub::Models::StubHeaders.new(stubbed_headers) }
7
7
 
8
+ it "should be Headers" do
9
+ stub_headers.should be_a(HttpStub::Models::Headers)
10
+ end
11
+
8
12
  describe "when stubbed headers are provided" do
9
13
 
10
14
  it "should create a regexpable representation of the stubbed headers whose keys are downcased and underscored" do
@@ -61,44 +65,4 @@ describe HttpStub::Models::StubHeaders do
61
65
 
62
66
  end
63
67
 
64
- describe "#to_s" do
65
-
66
- describe "when multiple headers are provided" do
67
-
68
- let(:stubbed_headers) { { "key1" => "value1", "key2" => "value2", "key3" => "value3" } }
69
-
70
- it "should return a string containing each header formatted as a conventional request header" do
71
- result = stub_headers.to_s
72
-
73
- stubbed_headers.each { |key, value| result.should match(/#{key}:#{value}/) }
74
- end
75
-
76
- it "should comma delimit the headers" do
77
- stub_headers.to_s.should match(/key\d.value\d\, key\d.value\d\, key\d.value\d/)
78
- end
79
-
80
- end
81
-
82
- describe "when empty headers are provided" do
83
-
84
- let(:stubbed_headers) { {} }
85
-
86
- it "should return an empty string" do
87
- stub_headers.to_s.should eql("")
88
- end
89
-
90
- end
91
-
92
- describe "when nil headers are provided" do
93
-
94
- let(:stubbed_headers) { nil }
95
-
96
- it "should return an empty string" do
97
- stub_headers.to_s.should eql("")
98
- end
99
-
100
- end
101
-
102
- end
103
-
104
68
  end
@@ -49,32 +49,40 @@ describe HttpStub::Server, "when the server is running" do
49
49
 
50
50
  it "should return response whose body contains a link to each activator in alphabetical order" do
51
51
  response_document.css("a").each_with_index do |link, i|
52
- link['href'].should eql("/activator#{i + 1}")
52
+ link['href'].should eql("/activator_#{i + 1}")
53
53
  end
54
54
  end
55
55
 
56
56
  it "should return a response whose body contains the uri of each activators stub" do
57
- (1..3).each { |i| response.body.should match(/#{escape_html("/path#{i}")}/) }
57
+ (1..3).each { |i| response.body.should match(/#{escape_html("/path_#{i}")}/) }
58
58
  end
59
59
 
60
- it "should return a response whose body contains the headers of each activators stub" do
61
- (1..3).each { |i| response.body.should match(/header#{i}:header_value#{i}/) }
60
+ it "should return a response whose body contains the request headers of each activators stub" do
61
+ (1..3).each { |i| response.body.should match(/request_header_#{i}:request_header_value_#{i}/) }
62
62
  end
63
63
 
64
64
  it "should return a response whose body contains the parameters of each activators stub" do
65
- (1..3).each { |i| response.body.should match(/param#{i}=param_value#{i}/) }
65
+ (1..3).each { |i| response.body.should match(/parameter_#{i}=parameter_value_#{i}/) }
66
66
  end
67
67
 
68
68
  it "should return a response whose body contains the response status of each activators stub" do
69
69
  (1..3).each { |i| response.body.should match(/20#{i}/) }
70
70
  end
71
71
 
72
+ it "should return a response whose body contains the response headers of each activators stub" do
73
+ (1..3).each { |i| response.body.should match(/response_header_#{i}:response_header_value_#{i}/) }
74
+ end
75
+
72
76
  it "should return a response whose body contains the response body of each activators stub" do
73
77
  response.body.should match(/Plain text body/)
74
78
  response.body.should match(/#{escape_html({ "key" => "JSON body" }.to_json)}/)
75
79
  response.body.should match(/#{escape_html("<html><body>HTML body</body></html>")}/)
76
80
  end
77
81
 
82
+ it "should return a response whose body contains the response delay of each activators stub" do
83
+ (1..3).each { |i| response.body.should include("#{i * 8}") }
84
+ end
85
+
78
86
  end
79
87
 
80
88
  describe "GET #stubs" do
@@ -82,7 +90,7 @@ describe HttpStub::Server, "when the server is running" do
82
90
  describe "when multiple stubs are configured" do
83
91
 
84
92
  before(:all) do
85
- (1..3).each { |i| HTTParty.get("#{server_uri}/activator#{i}") }
93
+ (1..3).each { |i| HTTParty.get("#{server_uri}/activator_#{i}") }
86
94
  end
87
95
 
88
96
  let(:response) { HTTParty.get("#{server_uri}/stubs") }
@@ -93,27 +101,35 @@ describe HttpStub::Server, "when the server is running" do
93
101
  end
94
102
 
95
103
  it "should return a response whose body contains the uri of each stub" do
96
- (1..3).each { |i| response.body.should match(/#{escape_html("/path#{i}")}/) }
104
+ (1..3).each { |i| response.body.should match(/#{escape_html("/path_#{i}")}/) }
97
105
  end
98
106
 
99
107
  it "should return a response whose body contains the headers of each stub" do
100
- (1..3).each { |i| response.body.should match(/header#{i}:header_value#{i}/) }
108
+ (1..3).each { |i| response.body.should match(/request_header_#{i}:request_header_value_#{i}/) }
101
109
  end
102
110
 
103
111
  it "should return a response whose body contains the parameters of each stub" do
104
- (1..3).each { |i| response.body.should match(/param#{i}=param_value#{i}/) }
112
+ (1..3).each { |i| response.body.should match(/parameter_#{i}=parameter_value_#{i}/) }
105
113
  end
106
114
 
107
115
  it "should return a response whose body contains the response status of each stub" do
108
116
  (1..3).each { |i| response.body.should match(/20#{i}/) }
109
117
  end
110
118
 
119
+ it "should return a response whose body contains the response headers of each stub" do
120
+ (1..3).each { |i| response.body.should match(/response_header_#{i}:response_header_value_#{i}/) }
121
+ end
122
+
111
123
  it "should return a response whose body contains the response body of each stub" do
112
124
  response.body.should match(/Plain text body/)
113
125
  response.body.should match(/#{escape_html({ "key" => "JSON body" }.to_json)}/)
114
126
  response.body.should match(/#{escape_html("<html><body>HTML body</body></html>")}/)
115
127
  end
116
128
 
129
+ it "should return a response whose body contains the response delay of each stub" do
130
+ (1..3).each { |i| response.body.should include("#{i * 8}") }
131
+ end
132
+
117
133
  end
118
134
 
119
135
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_stub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
5
- prerelease:
4
+ version: 0.13.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Matthew Ueckerman
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-11-26 00:00:00.000000000 Z
12
+ date: 2013-11-27 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: sinatra
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ~>
21
19
  - !ruby/object:Gem::Version
@@ -23,7 +21,6 @@ dependencies:
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ~>
29
26
  - !ruby/object:Gem::Version
@@ -31,7 +28,6 @@ dependencies:
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: sinatra-partial
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
32
  - - ~>
37
33
  - !ruby/object:Gem::Version
@@ -39,7 +35,6 @@ dependencies:
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
39
  - - ~>
45
40
  - !ruby/object:Gem::Version
@@ -47,7 +42,6 @@ dependencies:
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: haml
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
46
  - - ~>
53
47
  - !ruby/object:Gem::Version
@@ -55,7 +49,6 @@ dependencies:
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
53
  - - ~>
61
54
  - !ruby/object:Gem::Version
@@ -63,7 +56,6 @@ dependencies:
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: sass
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
60
  - - ~>
69
61
  - !ruby/object:Gem::Version
@@ -71,7 +63,6 @@ dependencies:
71
63
  type: :runtime
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
67
  - - ~>
77
68
  - !ruby/object:Gem::Version
@@ -79,7 +70,6 @@ dependencies:
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: rake
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
74
  - - ~>
85
75
  - !ruby/object:Gem::Version
@@ -87,7 +77,6 @@ dependencies:
87
77
  type: :runtime
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
81
  - - ~>
93
82
  - !ruby/object:Gem::Version
@@ -95,7 +84,6 @@ dependencies:
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: http_server_manager
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
88
  - - ~>
101
89
  - !ruby/object:Gem::Version
@@ -103,7 +91,6 @@ dependencies:
103
91
  type: :runtime
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
95
  - - ~>
109
96
  - !ruby/object:Gem::Version
@@ -111,7 +98,6 @@ dependencies:
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: travis-lint
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
102
  - - ~>
117
103
  - !ruby/object:Gem::Version
@@ -119,7 +105,6 @@ dependencies:
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
108
  requirements:
124
109
  - - ~>
125
110
  - !ruby/object:Gem::Version
@@ -127,7 +112,6 @@ dependencies:
127
112
  - !ruby/object:Gem::Dependency
128
113
  name: metric_fu
129
114
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
115
  requirements:
132
116
  - - ~>
133
117
  - !ruby/object:Gem::Version
@@ -135,7 +119,6 @@ dependencies:
135
119
  type: :development
136
120
  prerelease: false
137
121
  version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
122
  requirements:
140
123
  - - ~>
141
124
  - !ruby/object:Gem::Version
@@ -143,7 +126,6 @@ dependencies:
143
126
  - !ruby/object:Gem::Dependency
144
127
  name: rspec
145
128
  requirement: !ruby/object:Gem::Requirement
146
- none: false
147
129
  requirements:
148
130
  - - ~>
149
131
  - !ruby/object:Gem::Version
@@ -151,7 +133,6 @@ dependencies:
151
133
  type: :development
152
134
  prerelease: false
153
135
  version_requirements: !ruby/object:Gem::Requirement
154
- none: false
155
136
  requirements:
156
137
  - - ~>
157
138
  - !ruby/object:Gem::Version
@@ -159,7 +140,6 @@ dependencies:
159
140
  - !ruby/object:Gem::Dependency
160
141
  name: simplecov
161
142
  requirement: !ruby/object:Gem::Requirement
162
- none: false
163
143
  requirements:
164
144
  - - ~>
165
145
  - !ruby/object:Gem::Version
@@ -167,7 +147,6 @@ dependencies:
167
147
  type: :development
168
148
  prerelease: false
169
149
  version_requirements: !ruby/object:Gem::Requirement
170
- none: false
171
150
  requirements:
172
151
  - - ~>
173
152
  - !ruby/object:Gem::Version
@@ -175,7 +154,6 @@ dependencies:
175
154
  - !ruby/object:Gem::Dependency
176
155
  name: rake
177
156
  requirement: !ruby/object:Gem::Requirement
178
- none: false
179
157
  requirements:
180
158
  - - ~>
181
159
  - !ruby/object:Gem::Version
@@ -183,7 +161,6 @@ dependencies:
183
161
  type: :development
184
162
  prerelease: false
185
163
  version_requirements: !ruby/object:Gem::Requirement
186
- none: false
187
164
  requirements:
188
165
  - - ~>
189
166
  - !ruby/object:Gem::Version
@@ -191,7 +168,6 @@ dependencies:
191
168
  - !ruby/object:Gem::Dependency
192
169
  name: rack-test
193
170
  requirement: !ruby/object:Gem::Requirement
194
- none: false
195
171
  requirements:
196
172
  - - ~>
197
173
  - !ruby/object:Gem::Version
@@ -199,7 +175,6 @@ dependencies:
199
175
  type: :development
200
176
  prerelease: false
201
177
  version_requirements: !ruby/object:Gem::Requirement
202
- none: false
203
178
  requirements:
204
179
  - - ~>
205
180
  - !ruby/object:Gem::Version
@@ -207,7 +182,6 @@ dependencies:
207
182
  - !ruby/object:Gem::Dependency
208
183
  name: nokogiri
209
184
  requirement: !ruby/object:Gem::Requirement
210
- none: false
211
185
  requirements:
212
186
  - - ~>
213
187
  - !ruby/object:Gem::Version
@@ -215,7 +189,6 @@ dependencies:
215
189
  type: :development
216
190
  prerelease: false
217
191
  version_requirements: !ruby/object:Gem::Requirement
218
- none: false
219
192
  requirements:
220
193
  - - ~>
221
194
  - !ruby/object:Gem::Version
@@ -223,7 +196,6 @@ dependencies:
223
196
  - !ruby/object:Gem::Dependency
224
197
  name: httparty
225
198
  requirement: !ruby/object:Gem::Requirement
226
- none: false
227
199
  requirements:
228
200
  - - ~>
229
201
  - !ruby/object:Gem::Version
@@ -231,7 +203,6 @@ dependencies:
231
203
  type: :development
232
204
  prerelease: false
233
205
  version_requirements: !ruby/object:Gem::Requirement
234
- none: false
235
206
  requirements:
236
207
  - - ~>
237
208
  - !ruby/object:Gem::Version
@@ -239,7 +210,6 @@ dependencies:
239
210
  - !ruby/object:Gem::Dependency
240
211
  name: wait_until
241
212
  requirement: !ruby/object:Gem::Requirement
242
- none: false
243
213
  requirements:
244
214
  - - ~>
245
215
  - !ruby/object:Gem::Version
@@ -247,7 +217,6 @@ dependencies:
247
217
  type: :development
248
218
  prerelease: false
249
219
  version_requirements: !ruby/object:Gem::Requirement
250
- none: false
251
220
  requirements:
252
221
  - - ~>
253
222
  - !ruby/object:Gem::Version
@@ -255,7 +224,6 @@ dependencies:
255
224
  - !ruby/object:Gem::Dependency
256
225
  name: json
257
226
  requirement: !ruby/object:Gem::Requirement
258
- none: false
259
227
  requirements:
260
228
  - - ~>
261
229
  - !ruby/object:Gem::Version
@@ -263,7 +231,6 @@ dependencies:
263
231
  type: :development
264
232
  prerelease: false
265
233
  version_requirements: !ruby/object:Gem::Requirement
266
- none: false
267
234
  requirements:
268
235
  - - ~>
269
236
  - !ruby/object:Gem::Version
@@ -289,6 +256,7 @@ files:
289
256
  - ./lib/http_stub/hash_extensions.rb
290
257
  - ./lib/http_stub/models/exact_value_matcher.rb
291
258
  - ./lib/http_stub/models/hash_with_value_matchers.rb
259
+ - ./lib/http_stub/models/headers.rb
292
260
  - ./lib/http_stub/models/omitted_value_matcher.rb
293
261
  - ./lib/http_stub/models/regexp_value_matcher.rb
294
262
  - ./lib/http_stub/models/registry.rb
@@ -330,6 +298,7 @@ files:
330
298
  - ./spec/lib/http_stub/hash_extensions_spec.rb
331
299
  - ./spec/lib/http_stub/models/exact_value_matcher_spec.rb
332
300
  - ./spec/lib/http_stub/models/hash_with_value_matchers_spec.rb
301
+ - ./spec/lib/http_stub/models/headers_spec.rb
333
302
  - ./spec/lib/http_stub/models/omitted_value_matcher_spec.rb
334
303
  - ./spec/lib/http_stub/models/regexp_value_matcher_spec.rb
335
304
  - ./spec/lib/http_stub/models/registry_spec.rb
@@ -354,30 +323,26 @@ files:
354
323
  homepage: http://github.com/MYOB-Technology/http_stub
355
324
  licenses:
356
325
  - MIT
326
+ metadata: {}
357
327
  post_install_message:
358
328
  rdoc_options: []
359
329
  require_paths:
360
330
  - lib
361
331
  required_ruby_version: !ruby/object:Gem::Requirement
362
- none: false
363
332
  requirements:
364
333
  - - ! '>='
365
334
  - !ruby/object:Gem::Version
366
335
  version: 1.9.3
367
336
  required_rubygems_version: !ruby/object:Gem::Requirement
368
- none: false
369
337
  requirements:
370
338
  - - ! '>='
371
339
  - !ruby/object:Gem::Version
372
340
  version: '0'
373
- segments:
374
- - 0
375
- hash: 4435099791600975775
376
341
  requirements: []
377
342
  rubyforge_project: http_stub
378
- rubygems_version: 1.8.25
343
+ rubygems_version: 2.1.11
379
344
  signing_key:
380
- specification_version: 3
345
+ specification_version: 4
381
346
  summary: A HTTP Server replaying configured stub responses.
382
347
  test_files:
383
348
  - ./spec/curl_samples.txt
@@ -397,6 +362,7 @@ test_files:
397
362
  - ./spec/lib/http_stub/hash_extensions_spec.rb
398
363
  - ./spec/lib/http_stub/models/exact_value_matcher_spec.rb
399
364
  - ./spec/lib/http_stub/models/hash_with_value_matchers_spec.rb
365
+ - ./spec/lib/http_stub/models/headers_spec.rb
400
366
  - ./spec/lib/http_stub/models/omitted_value_matcher_spec.rb
401
367
  - ./spec/lib/http_stub/models/regexp_value_matcher_spec.rb
402
368
  - ./spec/lib/http_stub/models/registry_spec.rb