http_stub 0.25.0 → 0.25.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.
- checksums.yaml +4 -4
- data/lib/http_stub.rb +0 -1
- data/lib/http_stub/server/request/request.rb +2 -2
- data/lib/http_stub/server/stub/match/match.rb +2 -2
- data/lib/http_stub/server/stub/match/rules.rb +2 -2
- data/lib/http_stub/server/stub/response/base.rb +4 -0
- data/lib/http_stub/server/stub/stub.rb +2 -2
- data/lib/http_stub/server/stub/triggers.rb +5 -1
- data/lib/http_stub/version.rb +1 -1
- data/spec/acceptance/stub_match_last_spec.rb +13 -1
- data/spec/lib/http_stub/json_spec.rb +62 -0
- data/spec/lib/http_stub/server/request/request_spec.rb +16 -20
- data/spec/lib/http_stub/server/stub/match/match_spec.rb +10 -14
- data/spec/lib/http_stub/server/stub/match/rules_spec.rb +16 -20
- data/spec/lib/http_stub/server/stub/response/base_spec.rb +16 -10
- data/spec/lib/http_stub/server/stub/response/file_spec.rb +5 -9
- data/spec/lib/http_stub/server/stub/response/text_spec.rb +5 -9
- data/spec/lib/http_stub/server/stub/stub_spec.rb +16 -20
- data/spec/lib/http_stub/server/stub/triggers_spec.rb +10 -5
- data/spec/spec_helper.rb +1 -0
- data/spec/support/include_in_json.rb +19 -0
- data/spec/tmp/log/json_stub_console.log +25 -0
- data/spec/tmp/pids/json_stub.pid +1 -0
- metadata +11 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf1b8a410f17f0ab1797a5474d9c67567d4fec05
|
4
|
+
data.tar.gz: ed4cd4e41c8c080c2012ff00de1850a5f80c4ca9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f23b2f2d17db36ebefd1b6564b13b5631ed387c226715bfd71a0f07928cc6cea0aa753b88a1f8171704e20f908c907a3eb4902370b294c4d432815d160d3d31d
|
7
|
+
data.tar.gz: 472618feeed2b8bcd06177553a484cec111a12c5e24eb53bf18cc363b49b80631ad576b155556f2f9955ad53f1842e2f2e03c802dbf6e4143b02232123106b09
|
data/lib/http_stub.rb
CHANGED
@@ -16,7 +16,6 @@ require 'active_support/core_ext/string/inflections'
|
|
16
16
|
require 'active_support/core_ext/hash/slice'
|
17
17
|
require 'active_support/core_ext/hash/deep_merge'
|
18
18
|
require 'active_support/core_ext/hash/indifferent_access'
|
19
|
-
require 'active_support/json/encoding'
|
20
19
|
|
21
20
|
require_relative 'http_stub/extensions/core/hash/formatted'
|
22
21
|
require_relative 'http_stub/extensions/core/hash/indifferent_and_insensitive_access'
|
@@ -15,8 +15,8 @@ module HttpStub
|
|
15
15
|
@body = rack_request.body.read
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
19
|
-
{ uri: @uri, method: @method, headers: @headers, parameters: @parameters, body: @body }
|
18
|
+
def to_json(*args)
|
19
|
+
{ uri: @uri, method: @method, headers: @headers, parameters: @parameters, body: @body }.to_json(*args)
|
20
20
|
end
|
21
21
|
|
22
22
|
end
|
@@ -17,8 +17,8 @@ module HttpStub
|
|
17
17
|
@request.uri.include?(criteria[:uri]) && @request.method.casecmp(criteria[:method]).zero?
|
18
18
|
end
|
19
19
|
|
20
|
-
def
|
21
|
-
{ request: @request, response: @response, stub: @stub }
|
20
|
+
def to_json(*args)
|
21
|
+
{ request: @request, response: @response, stub: @stub }.to_json(*args)
|
22
22
|
end
|
23
23
|
|
24
24
|
end
|
@@ -21,8 +21,8 @@ module HttpStub
|
|
21
21
|
[ @uri, @method, @headers, @parameters, @body ].all? { |matcher| matcher.matches?(request, logger) }
|
22
22
|
end
|
23
23
|
|
24
|
-
def
|
25
|
-
{ uri: @uri, method: @method, headers: @headers, parameters: @parameters, body: @body }
|
24
|
+
def to_json(*args)
|
25
|
+
{ uri: @uri, method: @method, headers: @headers, parameters: @parameters, body: @body }.to_json(*args)
|
26
26
|
end
|
27
27
|
|
28
28
|
end
|
@@ -23,8 +23,8 @@ module HttpStub
|
|
23
23
|
@response.with_values_from(request)
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
27
|
-
{ id: @id, uri: @uri, match_rules: @match_rules, response: @response, triggers: @triggers }
|
26
|
+
def to_json(*args)
|
27
|
+
{ id: @id, uri: @uri, match_rules: @match_rules, response: @response, triggers: @triggers }.to_json(*args)
|
28
28
|
end
|
29
29
|
|
30
30
|
def to_s
|
@@ -4,7 +4,7 @@ module HttpStub
|
|
4
4
|
|
5
5
|
class Triggers
|
6
6
|
|
7
|
-
delegate :each,
|
7
|
+
delegate :each, to: :@triggers
|
8
8
|
|
9
9
|
def initialize(triggers)
|
10
10
|
@triggers = (triggers || []).map { |trigger| HttpStub::Server::Stub.create(trigger) }
|
@@ -14,6 +14,10 @@ module HttpStub
|
|
14
14
|
@triggers.each { |trigger| registry.add(trigger, logger) }
|
15
15
|
end
|
16
16
|
|
17
|
+
def to_json(*args)
|
18
|
+
@triggers.to_json(*args)
|
19
|
+
end
|
20
|
+
|
17
21
|
def to_s
|
18
22
|
@triggers.reduce("") { |result, trigger| "#{result}\n#{trigger}" }
|
19
23
|
end
|
data/lib/http_stub/version.rb
CHANGED
@@ -84,7 +84,15 @@ describe "Stub matches last acceptance" do
|
|
84
84
|
end
|
85
85
|
|
86
86
|
it "returns JSON containing the uri of the matched stub" do
|
87
|
-
|
87
|
+
expect_match_stub_to_include("uri" => stub_registrator.stub_uri)
|
88
|
+
end
|
89
|
+
|
90
|
+
it "returns JSON containing the request match rules of the matched stub" do
|
91
|
+
expect_match_stub_to_include("match_rules" => hash_including("uri" => stub_registrator.request_uri))
|
92
|
+
end
|
93
|
+
|
94
|
+
it "returns JSON containing the configured response of the matched stub" do
|
95
|
+
expect_match_stub_to_include("response" => hash_including("status" => stub_registrator.stub_response_status))
|
88
96
|
end
|
89
97
|
|
90
98
|
end
|
@@ -165,6 +173,10 @@ describe "Stub matches last acceptance" do
|
|
165
173
|
expect(json_response).to(include("response" => hash_including(hash)))
|
166
174
|
end
|
167
175
|
|
176
|
+
def expect_match_stub_to_include(hash)
|
177
|
+
expect(json_response).to(include("stub" => hash_including(hash)))
|
178
|
+
end
|
179
|
+
|
168
180
|
end
|
169
181
|
|
170
182
|
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
describe "JSON configuration" do
|
2
|
+
|
3
|
+
context "#to_json" do
|
4
|
+
|
5
|
+
context "when a class has a custom implmentation" do
|
6
|
+
|
7
|
+
module HttpStub
|
8
|
+
module JSONConfiguration
|
9
|
+
|
10
|
+
class HasCustomToJson
|
11
|
+
|
12
|
+
attr_reader :data
|
13
|
+
|
14
|
+
def initialize(name)
|
15
|
+
@data = { "#{name}" => "#{name} value" }
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_json(*args)
|
19
|
+
@data.to_json(*args)
|
20
|
+
end
|
21
|
+
|
22
|
+
def method_missing(name, *args, &block)
|
23
|
+
@data.send(name, *args, &block)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "and an instance is created" do
|
31
|
+
|
32
|
+
let(:instance) { HttpStub::JSONConfiguration::HasCustomToJson.new(1) }
|
33
|
+
|
34
|
+
subject { instance.to_json }
|
35
|
+
|
36
|
+
it "returns the value produced by the custom implementation" do
|
37
|
+
expect(subject).to eql(instance.data.to_json)
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
context "and a list of instances is created" do
|
43
|
+
|
44
|
+
let(:instances) { (1..3).map { |i| HttpStub::JSONConfiguration::HasCustomToJson.new(i) } }
|
45
|
+
|
46
|
+
subject { instances.to_json }
|
47
|
+
|
48
|
+
it "includes the JSON represenation of each instance" do
|
49
|
+
instances.each { |instance| expect(subject).to include(instance.to_json) }
|
50
|
+
end
|
51
|
+
|
52
|
+
it "excludes any instance variables" do
|
53
|
+
expect(subject).to_not include("data")
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
@@ -91,32 +91,28 @@ describe HttpStub::Server::Request::Request do
|
|
91
91
|
|
92
92
|
end
|
93
93
|
|
94
|
-
describe "#
|
94
|
+
describe "#to_json" do
|
95
95
|
|
96
|
-
subject { server_request.
|
96
|
+
subject { server_request.to_json }
|
97
97
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
expect(subject).to include(uri: server_request.uri)
|
102
|
-
end
|
103
|
-
|
104
|
-
it "contains the requests method" do
|
105
|
-
expect(subject).to include(method: server_request.method)
|
106
|
-
end
|
98
|
+
it "contains the requests uri" do
|
99
|
+
expect(subject).to include_in_json(uri: server_request.uri)
|
100
|
+
end
|
107
101
|
|
108
|
-
|
109
|
-
|
110
|
-
|
102
|
+
it "contains the requests method" do
|
103
|
+
expect(subject).to include_in_json(method: server_request.method)
|
104
|
+
end
|
111
105
|
|
112
|
-
|
113
|
-
|
114
|
-
|
106
|
+
it "contains the requests headers" do
|
107
|
+
expect(subject).to include_in_json(headers: server_request.headers)
|
108
|
+
end
|
115
109
|
|
116
|
-
|
117
|
-
|
118
|
-
|
110
|
+
it "contains the requests parameters" do
|
111
|
+
expect(subject).to include_in_json(parameters: server_request.parameters)
|
112
|
+
end
|
119
113
|
|
114
|
+
it "contains the requests body" do
|
115
|
+
expect(subject).to include_in_json(body: server_request.body)
|
120
116
|
end
|
121
117
|
|
122
118
|
end
|
@@ -121,24 +121,20 @@ describe HttpStub::Server::Stub::Match::Match do
|
|
121
121
|
|
122
122
|
end
|
123
123
|
|
124
|
-
describe "#
|
124
|
+
describe "#to_json" do
|
125
125
|
|
126
|
-
subject { match.
|
126
|
+
subject { match.to_json }
|
127
127
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
expect(subject).to include(request: request)
|
132
|
-
end
|
133
|
-
|
134
|
-
it "contains the served response" do
|
135
|
-
expect(subject).to include(response: response)
|
136
|
-
end
|
128
|
+
it "contains the matching request" do
|
129
|
+
expect(subject).to include_in_json(request: request)
|
130
|
+
end
|
137
131
|
|
138
|
-
|
139
|
-
|
140
|
-
|
132
|
+
it "contains the served response" do
|
133
|
+
expect(subject).to include_in_json(response: response)
|
134
|
+
end
|
141
135
|
|
136
|
+
it "contains the matched stub" do
|
137
|
+
expect(subject).to include_in_json(stub: stub)
|
142
138
|
end
|
143
139
|
|
144
140
|
end
|
@@ -214,32 +214,28 @@ describe HttpStub::Server::Stub::Match::Rules do
|
|
214
214
|
|
215
215
|
end
|
216
216
|
|
217
|
-
describe "#
|
217
|
+
describe "#to_json" do
|
218
218
|
|
219
|
-
subject { match_rules.
|
219
|
+
subject { match_rules.to_json }
|
220
220
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
expect(subject).to include(uri: match_rules.uri)
|
225
|
-
end
|
226
|
-
|
227
|
-
it "contains the rules method" do
|
228
|
-
expect(subject).to include(method: match_rules.method)
|
229
|
-
end
|
221
|
+
it "contains the rules uri" do
|
222
|
+
expect(subject).to include_in_json(uri: match_rules.uri)
|
223
|
+
end
|
230
224
|
|
231
|
-
|
232
|
-
|
233
|
-
|
225
|
+
it "contains the rules method" do
|
226
|
+
expect(subject).to include_in_json(method: match_rules.method)
|
227
|
+
end
|
234
228
|
|
235
|
-
|
236
|
-
|
237
|
-
|
229
|
+
it "contains the rules headers" do
|
230
|
+
expect(subject).to include_in_json(headers: match_rules.headers)
|
231
|
+
end
|
238
232
|
|
239
|
-
|
240
|
-
|
241
|
-
|
233
|
+
it "contains the rules parameters" do
|
234
|
+
expect(subject).to include_in_json(parameters: match_rules.parameters)
|
235
|
+
end
|
242
236
|
|
237
|
+
it "contains the rules body" do
|
238
|
+
expect(subject).to include_in_json(body: match_rules.body)
|
243
239
|
end
|
244
240
|
|
245
241
|
end
|
@@ -190,20 +190,26 @@ describe HttpStub::Server::Stub::Response::Base do
|
|
190
190
|
|
191
191
|
subject { response.to_hash }
|
192
192
|
|
193
|
-
|
193
|
+
it "contains the responses status" do
|
194
|
+
expect(subject).to include(status: response.status)
|
195
|
+
end
|
194
196
|
|
195
|
-
|
196
|
-
|
197
|
-
|
197
|
+
it "contains the responses headers" do
|
198
|
+
expect(subject).to include(headers: response.headers)
|
199
|
+
end
|
198
200
|
|
199
|
-
|
200
|
-
|
201
|
-
|
201
|
+
it "contains the responses delay in seconds" do
|
202
|
+
expect(subject).to include(delay_in_seconds: response.delay_in_seconds)
|
203
|
+
end
|
202
204
|
|
203
|
-
|
204
|
-
|
205
|
-
|
205
|
+
end
|
206
|
+
|
207
|
+
describe "#to_json" do
|
208
|
+
|
209
|
+
subject { response.to_json }
|
206
210
|
|
211
|
+
it "is the JSON representation of the responses hash" do
|
212
|
+
expect(subject).to eql(response.to_hash.to_json)
|
207
213
|
end
|
208
214
|
|
209
215
|
end
|
@@ -184,16 +184,12 @@ describe HttpStub::Server::Stub::Response::File do
|
|
184
184
|
|
185
185
|
subject { response_file.to_hash }
|
186
186
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
expect(subject).to include(file_uri: response_file.uri)
|
191
|
-
end
|
192
|
-
|
193
|
-
it "contains the standard response attributes" do
|
194
|
-
expect(subject).to include(headers: response_file.headers)
|
195
|
-
end
|
187
|
+
it "contains the files uri" do
|
188
|
+
expect(subject).to include(file_uri: response_file.uri)
|
189
|
+
end
|
196
190
|
|
191
|
+
it "contains the standard response elements" do
|
192
|
+
expect(subject).to include(headers: response_file.headers)
|
197
193
|
end
|
198
194
|
|
199
195
|
end
|
@@ -169,16 +169,12 @@ describe HttpStub::Server::Stub::Response::Text do
|
|
169
169
|
|
170
170
|
subject { response_text.to_hash }
|
171
171
|
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
expect(subject).to include(body: response_text.body)
|
176
|
-
end
|
177
|
-
|
178
|
-
it "contains the standard response attributes" do
|
179
|
-
expect(subject).to include(headers: response_text.headers)
|
180
|
-
end
|
172
|
+
it "contains the responses body" do
|
173
|
+
expect(subject).to include(body: response_text.body)
|
174
|
+
end
|
181
175
|
|
176
|
+
it "contains the standard response elements" do
|
177
|
+
expect(subject).to include(headers: response_text.headers)
|
182
178
|
end
|
183
179
|
|
184
180
|
end
|
@@ -175,32 +175,28 @@ describe HttpStub::Server::Stub::Stub do
|
|
175
175
|
|
176
176
|
end
|
177
177
|
|
178
|
-
describe "#
|
178
|
+
describe "#to_json" do
|
179
179
|
|
180
|
-
subject { the_stub.
|
180
|
+
subject { the_stub.to_json }
|
181
181
|
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
expect(subject).to include(id: stub_id)
|
186
|
-
end
|
187
|
-
|
188
|
-
it "contains the stubs uri" do
|
189
|
-
expect(subject).to include(uri: the_stub.uri)
|
190
|
-
end
|
182
|
+
it "contains the stubs id" do
|
183
|
+
expect(subject).to include_in_json(id: stub_id)
|
184
|
+
end
|
191
185
|
|
192
|
-
|
193
|
-
|
194
|
-
|
186
|
+
it "contains the stubs uri" do
|
187
|
+
expect(subject).to include_in_json(uri: the_stub.uri)
|
188
|
+
end
|
195
189
|
|
196
|
-
|
197
|
-
|
198
|
-
|
190
|
+
it "contains the stubs match rules" do
|
191
|
+
expect(subject).to include_in_json(match_rules: the_stub.match_rules)
|
192
|
+
end
|
199
193
|
|
200
|
-
|
201
|
-
|
202
|
-
|
194
|
+
it "contains the stubs response" do
|
195
|
+
expect(subject).to include_in_json(response: the_stub.response)
|
196
|
+
end
|
203
197
|
|
198
|
+
it "contains the stubs triggers" do
|
199
|
+
expect(subject).to include_in_json(triggers: the_stub.triggers)
|
204
200
|
end
|
205
201
|
|
206
202
|
end
|
@@ -41,16 +41,21 @@ describe HttpStub::Server::Stub::Triggers do
|
|
41
41
|
|
42
42
|
end
|
43
43
|
|
44
|
-
describe "#
|
44
|
+
describe "#to_json" do
|
45
45
|
|
46
|
-
let(:
|
46
|
+
let(:json_for_stubs) { (1..stubs_for_triggers.length).map { |i| "stub #{i} json" } }
|
47
|
+
let(:quoted_json_for_stubs) { json_for_stubs.map(&:to_json) }
|
48
|
+
|
49
|
+
subject { stub_triggers.to_json }
|
47
50
|
|
48
51
|
before(:example) do
|
49
|
-
stubs_for_triggers.zip(
|
52
|
+
stubs_for_triggers.zip(quoted_json_for_stubs).each do |stub, json|
|
53
|
+
allow(stub).to receive(:to_json).and_return(json)
|
54
|
+
end
|
50
55
|
end
|
51
56
|
|
52
|
-
it "returns
|
53
|
-
expect(
|
57
|
+
it "returns a JSON array containing the JSON representation of each stub" do
|
58
|
+
expect(subject).to eql(json_for_stubs.to_json)
|
54
59
|
end
|
55
60
|
|
56
61
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
RSpec::Matchers.define :include_in_json do |expected_hash|
|
2
|
+
|
3
|
+
match do |actual_json|
|
4
|
+
actual_json.include?(expected_hash.to_json[1..-2])
|
5
|
+
end
|
6
|
+
|
7
|
+
failure_message do |actual_json|
|
8
|
+
"expected the JSON #{actual_json} to include #{expected_hash.to_json}"
|
9
|
+
end
|
10
|
+
|
11
|
+
failure_message_when_negated do |actual_json|
|
12
|
+
"expected the JSON #{actual_json} to exclude #{expected_hash.to_json}"
|
13
|
+
end
|
14
|
+
|
15
|
+
description do
|
16
|
+
"include JSON"
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
[2016-08-10 14:43:30] INFO WEBrick 1.3.1
|
2
|
+
[2016-08-10 14:43:30] INFO ruby 2.3.1 (2016-04-26) [x86_64-darwin15]
|
3
|
+
== Sinatra (v1.4.7) has taken the stage on 8006 for test with backup from WEBrick
|
4
|
+
[2016-08-10 14:43:30] INFO WEBrick::HTTPServer#start: pid=938 port=8006
|
5
|
+
I, [2016-08-10T14:43:31.660265 #938] INFO -- : Finding stub matching: #<HttpStub::Server::Request::Request:0x007fd9e61670c0>
|
6
|
+
I, [2016-08-10T14:43:31.660336 #938] INFO -- : Registered stub miss: #<HttpStub::Server::Stub::Match::Miss:0x007fd9e615df70>
|
7
|
+
127.0.0.1 - - [10/Aug/2016:14:43:31 +1000] "GET / HTTP/1.1" 404 9 0.0078
|
8
|
+
127.0.0.1 - - [10/Aug/2016:14:43:31 AEST] "GET / HTTP/1.1" 404 9
|
9
|
+
- -> /
|
10
|
+
I, [2016-08-10T14:43:31.673732 #938] INFO -- : Registered stub: {"id"=>"16f8622e-316c-434e-b8e3-c920e7a50292", "uri"=>"/some_resource", "method"=>"get", "headers"=>{}, "parameters"=>{}, "body"=>{}, "response"=>{"status"=>200, "headers"=>{"content-type"=>"application/json"}, "body"=>"[{\"data\":{\"in_json\":\"some value in json\"},\"not_in_json\":\"some value not in json\"}]", "delay_in_seconds"=>""}, "triggers"=>[], "base_uri"=>"http://localhost:8006"}
|
11
|
+
127.0.0.1 - - [10/Aug/2016:14:43:31 +1000] "POST /http_stub/stubs HTTP/1.1" 200 2 0.0023
|
12
|
+
127.0.0.1 - - [10/Aug/2016:14:43:31 AEST] "POST /http_stub/stubs HTTP/1.1" 200 2
|
13
|
+
- -> /http_stub/stubs
|
14
|
+
127.0.0.1 - - [10/Aug/2016:14:43:31 +1000] "POST /http_stub/stubs/memory HTTP/1.1" 200 2 0.0004
|
15
|
+
127.0.0.1 - - [10/Aug/2016:14:43:31 AEST] "POST /http_stub/stubs/memory HTTP/1.1" 200 2
|
16
|
+
- -> /http_stub/stubs/memory
|
17
|
+
127.0.0.1 - - [10/Aug/2016:14:43:36 +1000] "GET /http_stub/stubs HTTP/1.1" 200 1738 0.0113
|
18
|
+
127.0.0.1 - - [10/Aug/2016:14:43:36 AEST] "GET /http_stub/stubs HTTP/1.1" 200 1738
|
19
|
+
- -> /http_stub/stubs
|
20
|
+
127.0.0.1 - - [10/Aug/2016:14:43:36 +1000] "GET /jquery-2.2.4.min.js HTTP/1.1" 304 - 0.0003
|
21
|
+
127.0.0.1 - - [10/Aug/2016:14:43:36 AEST] "GET /jquery-2.2.4.min.js HTTP/1.1" 304 0
|
22
|
+
http://localhost:8006/http_stub/stubs -> /jquery-2.2.4.min.js
|
23
|
+
127.0.0.1 - - [10/Aug/2016:14:43:36 +1000] "GET /application.css HTTP/1.1" 200 904 0.0091
|
24
|
+
127.0.0.1 - - [10/Aug/2016:14:43:36 AEST] "GET /application.css HTTP/1.1" 200 904
|
25
|
+
http://localhost:8006/http_stub/stubs -> /application.css
|
@@ -0,0 +1 @@
|
|
1
|
+
938
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_stub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dueckes
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2016-08-
|
15
|
+
date: 2016-08-12 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rake
|
@@ -443,6 +443,7 @@ files:
|
|
443
443
|
- "./spec/lib/http_stub/extensions/core/hash/with_indifferent_and_insensitive_access_spec.rb"
|
444
444
|
- "./spec/lib/http_stub/extensions/core/hash_spec.rb"
|
445
445
|
- "./spec/lib/http_stub/extensions/rack/handler_spec.rb"
|
446
|
+
- "./spec/lib/http_stub/json_spec.rb"
|
446
447
|
- "./spec/lib/http_stub/rake/server_daemon_tasks_smoke_spec.rb"
|
447
448
|
- "./spec/lib/http_stub/rake/server_tasks_smoke_spec.rb"
|
448
449
|
- "./spec/lib/http_stub/rake/server_tasks_spec.rb"
|
@@ -524,6 +525,9 @@ files:
|
|
524
525
|
- "./spec/support/http_stub/server_integration.rb"
|
525
526
|
- "./spec/support/http_stub/stub_fixture.rb"
|
526
527
|
- "./spec/support/http_stub/stub_registrator.rb"
|
528
|
+
- "./spec/support/include_in_json.rb"
|
529
|
+
- "./spec/tmp/log/json_stub_console.log"
|
530
|
+
- "./spec/tmp/pids/json_stub.pid"
|
527
531
|
homepage: http://github.com/MYOB-Technology/http_stub
|
528
532
|
licenses:
|
529
533
|
- MIT
|
@@ -544,7 +548,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
544
548
|
version: '0'
|
545
549
|
requirements: []
|
546
550
|
rubyforge_project: http_stub
|
547
|
-
rubygems_version: 2.
|
551
|
+
rubygems_version: 2.4.6
|
548
552
|
signing_key:
|
549
553
|
specification_version: 4
|
550
554
|
summary: A HTTP Server replaying configured stub responses
|
@@ -595,6 +599,7 @@ test_files:
|
|
595
599
|
- "./spec/lib/http_stub/extensions/core/hash/with_indifferent_and_insensitive_access_spec.rb"
|
596
600
|
- "./spec/lib/http_stub/extensions/core/hash_spec.rb"
|
597
601
|
- "./spec/lib/http_stub/extensions/rack/handler_spec.rb"
|
602
|
+
- "./spec/lib/http_stub/json_spec.rb"
|
598
603
|
- "./spec/lib/http_stub/rake/server_daemon_tasks_smoke_spec.rb"
|
599
604
|
- "./spec/lib/http_stub/rake/server_tasks_smoke_spec.rb"
|
600
605
|
- "./spec/lib/http_stub/rake/server_tasks_spec.rb"
|
@@ -676,3 +681,6 @@ test_files:
|
|
676
681
|
- "./spec/support/http_stub/server_integration.rb"
|
677
682
|
- "./spec/support/http_stub/stub_fixture.rb"
|
678
683
|
- "./spec/support/http_stub/stub_registrator.rb"
|
684
|
+
- "./spec/support/include_in_json.rb"
|
685
|
+
- "./spec/tmp/log/json_stub_console.log"
|
686
|
+
- "./spec/tmp/pids/json_stub.pid"
|