http_stub 0.14.2 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/http_stub/configurer/request/http/basic.rb +21 -0
- data/lib/http_stub/configurer/request/http/factory.rb +43 -0
- data/lib/http_stub/configurer/request/http/multipart.rb +33 -0
- data/lib/http_stub/configurer/request/stub.rb +24 -8
- data/lib/http_stub/configurer/request/stub_activator.rb +12 -8
- data/lib/http_stub/configurer/request/{stub_activator_payload_builder.rb → stub_activator_builder.rb} +4 -4
- data/lib/http_stub/configurer/request/stub_builder.rb +34 -0
- data/lib/http_stub/configurer/request/stub_response.rb +40 -0
- data/lib/http_stub/configurer/request/stub_response_file.rb +20 -0
- data/lib/http_stub/configurer/server/command.rb +5 -1
- data/lib/http_stub/configurer/server/command_processor.rb +1 -1
- data/lib/http_stub/configurer/server/dsl.rb +4 -4
- data/lib/http_stub/configurer/server/facade.rb +25 -11
- data/lib/http_stub/extensions/core/hash.rb +26 -0
- data/lib/http_stub/rake/server_daemon_tasks.rb +1 -1
- data/lib/http_stub/rake/server_tasks.rb +1 -1
- data/lib/http_stub/rake/task_generators.rb +3 -3
- data/lib/http_stub/server/application.rb +117 -0
- data/lib/http_stub/server/daemon.rb +39 -0
- data/lib/http_stub/{models → server}/exact_value_matcher.rb +1 -1
- data/lib/http_stub/{models → server}/hash_with_string_value_matchers.rb +2 -2
- data/lib/http_stub/{models → server}/headers.rb +1 -1
- data/lib/http_stub/{models → server}/omitted_value_matcher.rb +1 -1
- data/lib/http_stub/{models → server}/regexp_value_matcher.rb +1 -1
- data/lib/http_stub/{models → server}/registry.rb +10 -3
- data/lib/http_stub/{models → server}/request_header_parser.rb +1 -1
- data/lib/http_stub/server/response.rb +13 -0
- data/lib/http_stub/server/response_pipeline.rb +18 -0
- data/lib/http_stub/{models → server}/string_value_matcher.rb +4 -4
- data/lib/http_stub/server/stub.rb +37 -0
- data/lib/http_stub/{models → server}/stub_activator.rb +10 -2
- data/lib/http_stub/{controllers → server}/stub_activator_controller.rb +5 -5
- data/lib/http_stub/{controllers → server}/stub_controller.rb +4 -4
- data/lib/http_stub/server/stub_factory.rb +30 -0
- data/lib/http_stub/{models → server}/stub_headers.rb +4 -4
- data/lib/http_stub/{models → server}/stub_parameters.rb +2 -2
- data/lib/http_stub/{models → server}/stub_registry.rb +4 -4
- data/lib/http_stub/server/stub_response/base.rb +62 -0
- data/lib/http_stub/server/stub_response/file.rb +48 -0
- data/lib/http_stub/server/stub_response/text.rb +17 -0
- data/lib/http_stub/server/stub_response.rb +14 -0
- data/lib/http_stub/{models → server}/stub_triggers.rb +6 -2
- data/lib/http_stub/{models → server}/stub_uri.rb +2 -2
- data/lib/http_stub/{views → server/views}/_stub.haml +0 -0
- data/lib/http_stub/{views → server/views}/application.sass +0 -0
- data/lib/http_stub/{views → server/views}/layout.haml +0 -0
- data/lib/http_stub/{views → server/views}/stub_activators.haml +0 -0
- data/lib/http_stub/{views → server/views}/stubs.haml +0 -0
- data/lib/http_stub/version.rb +1 -1
- data/lib/http_stub.rb +41 -24
- data/spec/lib/http_stub/configurer/deprecated_dsl_spec.rb +2 -2
- data/spec/lib/http_stub/configurer/request/http/basic_spec.rb +15 -0
- data/spec/lib/http_stub/configurer/request/http/factory_spec.rb +148 -0
- data/spec/lib/http_stub/configurer/request/http/multipart_spec.rb +74 -0
- data/spec/lib/http_stub/configurer/request/stub_activator_builder_spec.rb +119 -0
- data/spec/lib/http_stub/configurer/request/stub_activator_spec.rb +24 -22
- data/spec/lib/http_stub/configurer/request/stub_builder_spec.rb +154 -0
- data/spec/lib/http_stub/configurer/request/stub_response_spec.rb +136 -0
- data/spec/lib/http_stub/configurer/request/stub_spec.rb +238 -17
- data/spec/lib/http_stub/configurer/server/command_processor_integration_spec.rb +7 -3
- data/spec/lib/http_stub/configurer/server/command_spec.rb +7 -6
- data/spec/lib/http_stub/configurer/server/dsl_spec.rb +58 -94
- data/spec/lib/http_stub/configurer/server/facade_spec.rb +56 -41
- data/spec/lib/http_stub/configurer_integration_spec.rb +180 -81
- data/spec/lib/http_stub/{hash_extensions_spec.rb → extensions/core/hash_spec.rb} +1 -1
- data/spec/lib/http_stub/rake/server_daemon_tasks_smoke_spec.rb +1 -1
- data/spec/lib/http_stub/{server_integration_spec.rb → server/application_integration_spec.rb} +1 -1
- data/spec/lib/http_stub/server/application_spec.rb +205 -0
- data/spec/lib/http_stub/server/daemon_integration_spec.rb +7 -0
- data/spec/lib/http_stub/{server_daemon_spec.rb → server/daemon_spec.rb} +4 -4
- data/spec/lib/http_stub/{models → server}/exact_value_matcher_spec.rb +2 -2
- data/spec/lib/http_stub/{models → server}/hash_with_string_value_matchers_spec.rb +5 -5
- data/spec/lib/http_stub/{models → server}/headers_spec.rb +2 -2
- data/spec/lib/http_stub/{models → server}/omitted_value_matcher_spec.rb +2 -2
- data/spec/lib/http_stub/{models → server}/regexp_value_matcher_spec.rb +2 -2
- data/spec/lib/http_stub/{models → server}/registry_spec.rb +52 -55
- data/spec/lib/http_stub/{models → server}/request_header_parser_spec.rb +4 -4
- data/spec/lib/http_stub/server/response_pipeline_spec.rb +29 -0
- data/spec/lib/http_stub/server/response_spec.rb +41 -0
- data/spec/lib/http_stub/{models → server}/string_value_matcher_spec.rb +11 -11
- data/spec/lib/http_stub/server/stub_activator_controller_spec.rb +85 -0
- data/spec/lib/http_stub/server/stub_activator_spec.rb +124 -0
- data/spec/lib/http_stub/server/stub_controller_spec.rb +74 -0
- data/spec/lib/http_stub/server/stub_factory_spec.rb +117 -0
- data/spec/lib/http_stub/{models → server}/stub_headers_spec.rb +9 -9
- data/spec/lib/http_stub/{models → server}/stub_parameters_spec.rb +6 -6
- data/spec/lib/http_stub/{models → server}/stub_registry_integration_spec.rb +3 -3
- data/spec/lib/http_stub/{models → server}/stub_registry_spec.rb +15 -35
- data/spec/lib/http_stub/server/stub_response/base_spec.rb +225 -0
- data/spec/lib/http_stub/server/stub_response/file_spec.rb +140 -0
- data/spec/lib/http_stub/server/stub_response/text_spec.rb +103 -0
- data/spec/lib/http_stub/server/stub_response_spec.rb +49 -0
- data/spec/lib/http_stub/{models → server}/stub_spec.rb +34 -18
- data/spec/lib/http_stub/{models → server}/stub_triggers_spec.rb +26 -16
- data/spec/lib/http_stub/{models → server}/stub_uri_spec.rb +5 -5
- data/spec/resources/sample.pdf +0 -0
- data/spec/resources/sample.txt +1 -0
- data/spec/spec_helper.rb +13 -4
- data/spec/support/stub_fixture.rb +106 -0
- metadata +148 -102
- data/lib/http_stub/configurer/request/stub_payload_builder.rb +0 -46
- data/lib/http_stub/hash_extensions.rb +0 -22
- data/lib/http_stub/models/request_pipeline.rb +0 -13
- data/lib/http_stub/models/response.rb +0 -43
- data/lib/http_stub/models/stub.rb +0 -35
- data/lib/http_stub/server.rb +0 -114
- data/lib/http_stub/server_daemon.rb +0 -36
- data/spec/lib/http_stub/configurer/request/stub_activator_payload_builder_spec.rb +0 -103
- data/spec/lib/http_stub/configurer/request/stub_payload_builder_spec.rb +0 -304
- data/spec/lib/http_stub/controllers/stub_activator_controller_spec.rb +0 -94
- data/spec/lib/http_stub/controllers/stub_controller_spec.rb +0 -83
- data/spec/lib/http_stub/models/request_pipeline_spec.rb +0 -17
- data/spec/lib/http_stub/models/response_spec.rb +0 -206
- data/spec/lib/http_stub/models/stub_activator_spec.rb +0 -76
- data/spec/lib/http_stub/server_daemon_integration_spec.rb +0 -7
- data/spec/lib/http_stub/server_spec.rb +0 -234
- data/spec/support/http_stub/configurer/request/stub_payload_builder_shared_context.rb +0 -27
@@ -1,18 +1,18 @@
|
|
1
|
-
describe HttpStub::
|
1
|
+
describe HttpStub::Server::StubTriggers do
|
2
2
|
|
3
3
|
let(:trigger_bodies) { (1..3).map { |i| "trigger body #{i}" } }
|
4
|
-
let(:stubs_for_triggers) { (1..trigger_bodies.length).map { instance_double(HttpStub::
|
5
|
-
let(:stub_triggers) { HttpStub::
|
4
|
+
let(:stubs_for_triggers) { (1..trigger_bodies.length).map { instance_double(HttpStub::Server::Stub) } }
|
5
|
+
let(:stub_triggers) { HttpStub::Server::StubTriggers.new(trigger_bodies) }
|
6
6
|
|
7
7
|
before(:example) do
|
8
|
-
allow(HttpStub::
|
8
|
+
allow(HttpStub::Server::Stub).to receive(:new).and_return(*stubs_for_triggers)
|
9
9
|
end
|
10
10
|
|
11
11
|
describe "constructor" do
|
12
12
|
|
13
13
|
it "creates a stub for each provided trigger" do
|
14
14
|
trigger_bodies.zip(stubs_for_triggers).each do |body, stub|
|
15
|
-
expect(HttpStub::
|
15
|
+
expect(HttpStub::Server::Stub).to receive(:new).with(body).and_return(stub)
|
16
16
|
end
|
17
17
|
|
18
18
|
stub_triggers
|
@@ -22,7 +22,7 @@ describe HttpStub::Models::StubTriggers do
|
|
22
22
|
|
23
23
|
describe "#add_to" do
|
24
24
|
|
25
|
-
let(:registry) { instance_double(HttpStub::
|
25
|
+
let(:registry) { instance_double(HttpStub::Server::StubRegistry) }
|
26
26
|
let(:request) { instance_double("HttpRequest") }
|
27
27
|
|
28
28
|
it "adds each stub to the provided registry" do
|
@@ -33,6 +33,26 @@ describe HttpStub::Models::StubTriggers do
|
|
33
33
|
|
34
34
|
end
|
35
35
|
|
36
|
+
describe "#clear" do
|
37
|
+
|
38
|
+
it "clears each stub" do
|
39
|
+
stubs_for_triggers.each { |stub| expect(stub).to receive(:clear) }
|
40
|
+
|
41
|
+
stub_triggers.clear
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "#each" do
|
47
|
+
|
48
|
+
it "yields to the stubs for each trigger" do
|
49
|
+
yielded_stubs = stub_triggers.each.map.to_a
|
50
|
+
|
51
|
+
expect(yielded_stubs).to eql(stubs_for_triggers)
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
|
36
56
|
describe "#to_s" do
|
37
57
|
|
38
58
|
let(:trigger_strings) { (1..stubs_for_triggers.length).map { |i| "trigger string ##{i}" } }
|
@@ -51,14 +71,4 @@ describe HttpStub::Models::StubTriggers do
|
|
51
71
|
|
52
72
|
end
|
53
73
|
|
54
|
-
describe "#each" do
|
55
|
-
|
56
|
-
it "yields to the stubs for each trigger" do
|
57
|
-
yielded_stubs = stub_triggers.each.map.to_a
|
58
|
-
|
59
|
-
expect(yielded_stubs).to eql(stubs_for_triggers)
|
60
|
-
end
|
61
|
-
|
62
|
-
end
|
63
|
-
|
64
74
|
end
|
@@ -1,16 +1,16 @@
|
|
1
|
-
describe HttpStub::
|
1
|
+
describe HttpStub::Server::StubUri do
|
2
2
|
|
3
3
|
let(:stubbed_uri) { "/some/uri" }
|
4
4
|
let(:request) { double("HttpRequest", path_info: request_uri) }
|
5
|
-
let(:value_matcher) { double(HttpStub::
|
6
|
-
let(:stub_uri) { HttpStub::
|
5
|
+
let(:value_matcher) { double(HttpStub::Server::StringValueMatcher).as_null_object }
|
6
|
+
let(:stub_uri) { HttpStub::Server::StubUri.new(stubbed_uri) }
|
7
7
|
|
8
|
-
before(:example) { allow(HttpStub::
|
8
|
+
before(:example) { allow(HttpStub::Server::StringValueMatcher).to receive(:new).and_return(value_matcher) }
|
9
9
|
|
10
10
|
describe "constructor" do
|
11
11
|
|
12
12
|
it "creates a value matcher for the provided uri" do
|
13
|
-
expect(HttpStub::
|
13
|
+
expect(HttpStub::Server::StringValueMatcher).to receive(:new).with(stubbed_uri)
|
14
14
|
|
15
15
|
stub_uri
|
16
16
|
end
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
Some sample text
|
data/spec/spec_helper.rb
CHANGED
@@ -7,7 +7,7 @@ SimpleCov.start do
|
|
7
7
|
add_filter "/spec/"
|
8
8
|
add_filter "/vendor/"
|
9
9
|
|
10
|
-
minimum_coverage 99.
|
10
|
+
minimum_coverage 99.55
|
11
11
|
refuse_coverage_drop
|
12
12
|
end if ENV["coverage"]
|
13
13
|
|
@@ -21,10 +21,19 @@ require_relative '../examples/configurer_with_class_stub'
|
|
21
21
|
require_relative '../examples/configurer_with_initialize_callback'
|
22
22
|
require_relative '../examples/configurer_with_complex_initializer'
|
23
23
|
require_relative '../examples/configurer_with_response_defaults'
|
24
|
+
require_relative '../examples/configurer_with_file_response'
|
24
25
|
|
25
|
-
HttpStub::
|
26
|
-
HttpStub::
|
26
|
+
HttpStub::Server::Daemon.log_dir = ::File.expand_path('../../tmp/log', __FILE__)
|
27
|
+
HttpStub::Server::Daemon.pid_dir = ::File.expand_path('../../tmp/pids', __FILE__)
|
27
28
|
|
28
29
|
HttpServerManager.logger = HttpServerManager::Test::SilentLogger
|
29
30
|
|
30
|
-
|
31
|
+
module HttpStub
|
32
|
+
|
33
|
+
module Spec
|
34
|
+
RESOURCES_DIR = ::File.expand_path('../resources', __FILE__)
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
Dir[::File.expand_path('../support/**/*.rb', __FILE__)].each { |file| require file }
|
@@ -0,0 +1,106 @@
|
|
1
|
+
module HttpStub
|
2
|
+
|
3
|
+
class StubFixture
|
4
|
+
|
5
|
+
attr_reader :id, :request, :response
|
6
|
+
|
7
|
+
class Part
|
8
|
+
|
9
|
+
attr_writer :payload
|
10
|
+
|
11
|
+
def initialize(payload)
|
12
|
+
@payload = payload
|
13
|
+
end
|
14
|
+
|
15
|
+
def merge!(options)
|
16
|
+
@payload.merge!(options)
|
17
|
+
end
|
18
|
+
|
19
|
+
def symbolized
|
20
|
+
@payload
|
21
|
+
end
|
22
|
+
|
23
|
+
def stringified
|
24
|
+
JSON.parse(@payload.to_json)
|
25
|
+
end
|
26
|
+
|
27
|
+
def http_method
|
28
|
+
@payload[:method]
|
29
|
+
end
|
30
|
+
|
31
|
+
def method_missing(name, *args)
|
32
|
+
if name.to_s.end_with?("=")
|
33
|
+
attribute_name = name.to_s[0..-2].to_sym
|
34
|
+
@payload[attribute_name] = args.first
|
35
|
+
else
|
36
|
+
@payload[name]
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
def initialize
|
43
|
+
@id = SecureRandom.uuid
|
44
|
+
@request = HttpStub::StubFixture::Part.new(
|
45
|
+
uri: "/stub/uri/#{@id}",
|
46
|
+
method: "some #{@id} method",
|
47
|
+
headers: { "request_header_name" => "request header value #{@id}" },
|
48
|
+
parameters: { "parameter_name" => "request parameter value #{@id}" }
|
49
|
+
)
|
50
|
+
@response = HttpStub::StubFixture::Part.new(
|
51
|
+
status: 500,
|
52
|
+
headers: { "response_header_name" => "response header value #{@id}" },
|
53
|
+
body: "body #{@id}",
|
54
|
+
delay_in_seconds: 8
|
55
|
+
)
|
56
|
+
@trigger_fixtures = []
|
57
|
+
end
|
58
|
+
|
59
|
+
def response=(options)
|
60
|
+
self.tap { @response.payload = options }
|
61
|
+
end
|
62
|
+
|
63
|
+
def with_response!(options)
|
64
|
+
self.tap { @response.merge!(options) }
|
65
|
+
end
|
66
|
+
|
67
|
+
def with_text_response!
|
68
|
+
with_response!(body: "payload #{@id} text response")
|
69
|
+
end
|
70
|
+
|
71
|
+
def with_file_response!
|
72
|
+
with_response!(body: { file: { path: "payload/#{@id}/file.path",
|
73
|
+
name: "payload_#{@id}_file.name" } })
|
74
|
+
end
|
75
|
+
|
76
|
+
def with_triggers!(triggers)
|
77
|
+
self.tap { @trigger_fixtures.concat(triggers) }
|
78
|
+
end
|
79
|
+
|
80
|
+
def configurer_payload
|
81
|
+
{
|
82
|
+
request: @request.symbolized,
|
83
|
+
response: @response.symbolized,
|
84
|
+
triggers: @trigger_fixtures.map(&:configurer_payload)
|
85
|
+
}
|
86
|
+
end
|
87
|
+
|
88
|
+
def server_payload
|
89
|
+
{
|
90
|
+
"id" => @id,
|
91
|
+
"uri" => @request.uri,
|
92
|
+
"method" => @request.http_method,
|
93
|
+
"headers" => @request.headers,
|
94
|
+
"parameters" => @request.parameters,
|
95
|
+
"response" => @response.stringified,
|
96
|
+
"triggers" => @trigger_fixtures.map(&:server_payload)
|
97
|
+
}
|
98
|
+
end
|
99
|
+
|
100
|
+
def file_parameter
|
101
|
+
@file_parameter ||= { filename: "#{@id}.payload", tempfile: StringIO.new("payload #{@id} content") }
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
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.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Ueckerman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-05-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -81,6 +81,20 @@ dependencies:
|
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '3.4'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: multipart-post
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '2.0'
|
91
|
+
type: :runtime
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '2.0'
|
84
98
|
- !ruby/object:Gem::Dependency
|
85
99
|
name: http_server_manager
|
86
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,14 +171,14 @@ dependencies:
|
|
157
171
|
requirements:
|
158
172
|
- - "~>"
|
159
173
|
- !ruby/object:Gem::Version
|
160
|
-
version: '0.
|
174
|
+
version: '0.10'
|
161
175
|
type: :development
|
162
176
|
prerelease: false
|
163
177
|
version_requirements: !ruby/object:Gem::Requirement
|
164
178
|
requirements:
|
165
179
|
- - "~>"
|
166
180
|
- !ruby/object:Gem::Version
|
167
|
-
version: '0.
|
181
|
+
version: '0.10'
|
168
182
|
- !ruby/object:Gem::Dependency
|
169
183
|
name: rack-test
|
170
184
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,61 +194,61 @@ dependencies:
|
|
180
194
|
- !ruby/object:Gem::Version
|
181
195
|
version: '0.6'
|
182
196
|
- !ruby/object:Gem::Dependency
|
183
|
-
name:
|
197
|
+
name: json
|
184
198
|
requirement: !ruby/object:Gem::Requirement
|
185
199
|
requirements:
|
186
200
|
- - "~>"
|
187
201
|
- !ruby/object:Gem::Version
|
188
|
-
version: '1.
|
202
|
+
version: '1.8'
|
189
203
|
type: :development
|
190
204
|
prerelease: false
|
191
205
|
version_requirements: !ruby/object:Gem::Requirement
|
192
206
|
requirements:
|
193
207
|
- - "~>"
|
194
208
|
- !ruby/object:Gem::Version
|
195
|
-
version: '1.
|
209
|
+
version: '1.8'
|
196
210
|
- !ruby/object:Gem::Dependency
|
197
|
-
name:
|
211
|
+
name: nokogiri
|
198
212
|
requirement: !ruby/object:Gem::Requirement
|
199
213
|
requirements:
|
200
214
|
- - "~>"
|
201
215
|
- !ruby/object:Gem::Version
|
202
|
-
version: '
|
216
|
+
version: '1.6'
|
203
217
|
type: :development
|
204
218
|
prerelease: false
|
205
219
|
version_requirements: !ruby/object:Gem::Requirement
|
206
220
|
requirements:
|
207
221
|
- - "~>"
|
208
222
|
- !ruby/object:Gem::Version
|
209
|
-
version: '
|
223
|
+
version: '1.6'
|
210
224
|
- !ruby/object:Gem::Dependency
|
211
|
-
name:
|
225
|
+
name: httparty
|
212
226
|
requirement: !ruby/object:Gem::Requirement
|
213
227
|
requirements:
|
214
228
|
- - "~>"
|
215
229
|
- !ruby/object:Gem::Version
|
216
|
-
version: '0.
|
230
|
+
version: '0.13'
|
217
231
|
type: :development
|
218
232
|
prerelease: false
|
219
233
|
version_requirements: !ruby/object:Gem::Requirement
|
220
234
|
requirements:
|
221
235
|
- - "~>"
|
222
236
|
- !ruby/object:Gem::Version
|
223
|
-
version: '0.
|
237
|
+
version: '0.13'
|
224
238
|
- !ruby/object:Gem::Dependency
|
225
|
-
name:
|
239
|
+
name: wait_until
|
226
240
|
requirement: !ruby/object:Gem::Requirement
|
227
241
|
requirements:
|
228
242
|
- - "~>"
|
229
243
|
- !ruby/object:Gem::Version
|
230
|
-
version: '1
|
244
|
+
version: '0.1'
|
231
245
|
type: :development
|
232
246
|
prerelease: false
|
233
247
|
version_requirements: !ruby/object:Gem::Requirement
|
234
248
|
requirements:
|
235
249
|
- - "~>"
|
236
250
|
- !ruby/object:Gem::Version
|
237
|
-
version: '1
|
251
|
+
version: '0.1'
|
238
252
|
description: fakeweb for a HTTP server, informing it to stub / fake responses
|
239
253
|
email: matthew.ueckerman@myob.com
|
240
254
|
executables: []
|
@@ -245,58 +259,72 @@ files:
|
|
245
259
|
- "./lib/http_stub/configurer.rb"
|
246
260
|
- "./lib/http_stub/configurer/deprecated_dsl.rb"
|
247
261
|
- "./lib/http_stub/configurer/request/controllable_value.rb"
|
262
|
+
- "./lib/http_stub/configurer/request/http/basic.rb"
|
263
|
+
- "./lib/http_stub/configurer/request/http/factory.rb"
|
264
|
+
- "./lib/http_stub/configurer/request/http/multipart.rb"
|
248
265
|
- "./lib/http_stub/configurer/request/omittable.rb"
|
249
266
|
- "./lib/http_stub/configurer/request/regexpable.rb"
|
250
267
|
- "./lib/http_stub/configurer/request/stub.rb"
|
251
268
|
- "./lib/http_stub/configurer/request/stub_activator.rb"
|
252
|
-
- "./lib/http_stub/configurer/request/
|
253
|
-
- "./lib/http_stub/configurer/request/
|
269
|
+
- "./lib/http_stub/configurer/request/stub_activator_builder.rb"
|
270
|
+
- "./lib/http_stub/configurer/request/stub_builder.rb"
|
271
|
+
- "./lib/http_stub/configurer/request/stub_response.rb"
|
272
|
+
- "./lib/http_stub/configurer/request/stub_response_file.rb"
|
254
273
|
- "./lib/http_stub/configurer/server/buffered_command_processor.rb"
|
255
274
|
- "./lib/http_stub/configurer/server/command.rb"
|
256
275
|
- "./lib/http_stub/configurer/server/command_processor.rb"
|
257
276
|
- "./lib/http_stub/configurer/server/dsl.rb"
|
258
277
|
- "./lib/http_stub/configurer/server/facade.rb"
|
259
278
|
- "./lib/http_stub/configurer/server/request_processor.rb"
|
260
|
-
- "./lib/http_stub/
|
261
|
-
- "./lib/http_stub/controllers/stub_controller.rb"
|
279
|
+
- "./lib/http_stub/extensions/core/hash.rb"
|
262
280
|
- "./lib/http_stub/extensions/rack/handler.rb"
|
263
|
-
- "./lib/http_stub/hash_extensions.rb"
|
264
|
-
- "./lib/http_stub/models/exact_value_matcher.rb"
|
265
|
-
- "./lib/http_stub/models/hash_with_string_value_matchers.rb"
|
266
|
-
- "./lib/http_stub/models/headers.rb"
|
267
|
-
- "./lib/http_stub/models/omitted_value_matcher.rb"
|
268
|
-
- "./lib/http_stub/models/regexp_value_matcher.rb"
|
269
|
-
- "./lib/http_stub/models/registry.rb"
|
270
|
-
- "./lib/http_stub/models/request_header_parser.rb"
|
271
|
-
- "./lib/http_stub/models/request_pipeline.rb"
|
272
|
-
- "./lib/http_stub/models/response.rb"
|
273
|
-
- "./lib/http_stub/models/string_value_matcher.rb"
|
274
|
-
- "./lib/http_stub/models/stub.rb"
|
275
|
-
- "./lib/http_stub/models/stub_activator.rb"
|
276
|
-
- "./lib/http_stub/models/stub_headers.rb"
|
277
|
-
- "./lib/http_stub/models/stub_parameters.rb"
|
278
|
-
- "./lib/http_stub/models/stub_registry.rb"
|
279
|
-
- "./lib/http_stub/models/stub_triggers.rb"
|
280
|
-
- "./lib/http_stub/models/stub_uri.rb"
|
281
281
|
- "./lib/http_stub/rake/server_daemon_tasks.rb"
|
282
282
|
- "./lib/http_stub/rake/server_tasks.rb"
|
283
283
|
- "./lib/http_stub/rake/task_generators.rb"
|
284
|
-
- "./lib/http_stub/server.rb"
|
285
|
-
- "./lib/http_stub/
|
284
|
+
- "./lib/http_stub/server/application.rb"
|
285
|
+
- "./lib/http_stub/server/daemon.rb"
|
286
|
+
- "./lib/http_stub/server/exact_value_matcher.rb"
|
287
|
+
- "./lib/http_stub/server/hash_with_string_value_matchers.rb"
|
288
|
+
- "./lib/http_stub/server/headers.rb"
|
289
|
+
- "./lib/http_stub/server/omitted_value_matcher.rb"
|
290
|
+
- "./lib/http_stub/server/regexp_value_matcher.rb"
|
291
|
+
- "./lib/http_stub/server/registry.rb"
|
292
|
+
- "./lib/http_stub/server/request_header_parser.rb"
|
293
|
+
- "./lib/http_stub/server/response.rb"
|
294
|
+
- "./lib/http_stub/server/response_pipeline.rb"
|
295
|
+
- "./lib/http_stub/server/string_value_matcher.rb"
|
296
|
+
- "./lib/http_stub/server/stub.rb"
|
297
|
+
- "./lib/http_stub/server/stub_activator.rb"
|
298
|
+
- "./lib/http_stub/server/stub_activator_controller.rb"
|
299
|
+
- "./lib/http_stub/server/stub_controller.rb"
|
300
|
+
- "./lib/http_stub/server/stub_factory.rb"
|
301
|
+
- "./lib/http_stub/server/stub_headers.rb"
|
302
|
+
- "./lib/http_stub/server/stub_parameters.rb"
|
303
|
+
- "./lib/http_stub/server/stub_registry.rb"
|
304
|
+
- "./lib/http_stub/server/stub_response.rb"
|
305
|
+
- "./lib/http_stub/server/stub_response/base.rb"
|
306
|
+
- "./lib/http_stub/server/stub_response/file.rb"
|
307
|
+
- "./lib/http_stub/server/stub_response/text.rb"
|
308
|
+
- "./lib/http_stub/server/stub_triggers.rb"
|
309
|
+
- "./lib/http_stub/server/stub_uri.rb"
|
310
|
+
- "./lib/http_stub/server/views/_stub.haml"
|
311
|
+
- "./lib/http_stub/server/views/application.sass"
|
312
|
+
- "./lib/http_stub/server/views/layout.haml"
|
313
|
+
- "./lib/http_stub/server/views/stub_activators.haml"
|
314
|
+
- "./lib/http_stub/server/views/stubs.haml"
|
286
315
|
- "./lib/http_stub/version.rb"
|
287
|
-
- "./lib/http_stub/views/_stub.haml"
|
288
|
-
- "./lib/http_stub/views/application.sass"
|
289
|
-
- "./lib/http_stub/views/layout.haml"
|
290
|
-
- "./lib/http_stub/views/stub_activators.haml"
|
291
|
-
- "./lib/http_stub/views/stubs.haml"
|
292
316
|
- "./spec/curl_samples.txt"
|
293
317
|
- "./spec/lib/http_stub/configurer/deprecated_dsl_spec.rb"
|
294
318
|
- "./spec/lib/http_stub/configurer/request/controllable_value_spec.rb"
|
319
|
+
- "./spec/lib/http_stub/configurer/request/http/basic_spec.rb"
|
320
|
+
- "./spec/lib/http_stub/configurer/request/http/factory_spec.rb"
|
321
|
+
- "./spec/lib/http_stub/configurer/request/http/multipart_spec.rb"
|
295
322
|
- "./spec/lib/http_stub/configurer/request/omittable_spec.rb"
|
296
323
|
- "./spec/lib/http_stub/configurer/request/regexpable_spec.rb"
|
297
|
-
- "./spec/lib/http_stub/configurer/request/
|
324
|
+
- "./spec/lib/http_stub/configurer/request/stub_activator_builder_spec.rb"
|
298
325
|
- "./spec/lib/http_stub/configurer/request/stub_activator_spec.rb"
|
299
|
-
- "./spec/lib/http_stub/configurer/request/
|
326
|
+
- "./spec/lib/http_stub/configurer/request/stub_builder_spec.rb"
|
327
|
+
- "./spec/lib/http_stub/configurer/request/stub_response_spec.rb"
|
300
328
|
- "./spec/lib/http_stub/configurer/request/stub_spec.rb"
|
301
329
|
- "./spec/lib/http_stub/configurer/server/buffered_command_processor_spec.rb"
|
302
330
|
- "./spec/lib/http_stub/configurer/server/command_processor_integration_spec.rb"
|
@@ -306,38 +334,45 @@ files:
|
|
306
334
|
- "./spec/lib/http_stub/configurer/server/request_processor_spec.rb"
|
307
335
|
- "./spec/lib/http_stub/configurer_integration_spec.rb"
|
308
336
|
- "./spec/lib/http_stub/configurer_spec.rb"
|
309
|
-
- "./spec/lib/http_stub/
|
310
|
-
- "./spec/lib/http_stub/controllers/stub_controller_spec.rb"
|
337
|
+
- "./spec/lib/http_stub/extensions/core/hash_spec.rb"
|
311
338
|
- "./spec/lib/http_stub/extensions/rack/handler_spec.rb"
|
312
|
-
- "./spec/lib/http_stub/hash_extensions_spec.rb"
|
313
|
-
- "./spec/lib/http_stub/models/exact_value_matcher_spec.rb"
|
314
|
-
- "./spec/lib/http_stub/models/hash_with_string_value_matchers_spec.rb"
|
315
|
-
- "./spec/lib/http_stub/models/headers_spec.rb"
|
316
|
-
- "./spec/lib/http_stub/models/omitted_value_matcher_spec.rb"
|
317
|
-
- "./spec/lib/http_stub/models/regexp_value_matcher_spec.rb"
|
318
|
-
- "./spec/lib/http_stub/models/registry_spec.rb"
|
319
|
-
- "./spec/lib/http_stub/models/request_header_parser_spec.rb"
|
320
|
-
- "./spec/lib/http_stub/models/request_pipeline_spec.rb"
|
321
|
-
- "./spec/lib/http_stub/models/response_spec.rb"
|
322
|
-
- "./spec/lib/http_stub/models/string_value_matcher_spec.rb"
|
323
|
-
- "./spec/lib/http_stub/models/stub_activator_spec.rb"
|
324
|
-
- "./spec/lib/http_stub/models/stub_headers_spec.rb"
|
325
|
-
- "./spec/lib/http_stub/models/stub_parameters_spec.rb"
|
326
|
-
- "./spec/lib/http_stub/models/stub_registry_integration_spec.rb"
|
327
|
-
- "./spec/lib/http_stub/models/stub_registry_spec.rb"
|
328
|
-
- "./spec/lib/http_stub/models/stub_spec.rb"
|
329
|
-
- "./spec/lib/http_stub/models/stub_triggers_spec.rb"
|
330
|
-
- "./spec/lib/http_stub/models/stub_uri_spec.rb"
|
331
339
|
- "./spec/lib/http_stub/rake/server_daemon_tasks_smoke_spec.rb"
|
332
340
|
- "./spec/lib/http_stub/rake/server_tasks_smoke_spec.rb"
|
333
341
|
- "./spec/lib/http_stub/rake/server_tasks_spec.rb"
|
334
|
-
- "./spec/lib/http_stub/
|
335
|
-
- "./spec/lib/http_stub/
|
336
|
-
- "./spec/lib/http_stub/
|
337
|
-
- "./spec/lib/http_stub/
|
342
|
+
- "./spec/lib/http_stub/server/application_integration_spec.rb"
|
343
|
+
- "./spec/lib/http_stub/server/application_spec.rb"
|
344
|
+
- "./spec/lib/http_stub/server/daemon_integration_spec.rb"
|
345
|
+
- "./spec/lib/http_stub/server/daemon_spec.rb"
|
346
|
+
- "./spec/lib/http_stub/server/exact_value_matcher_spec.rb"
|
347
|
+
- "./spec/lib/http_stub/server/hash_with_string_value_matchers_spec.rb"
|
348
|
+
- "./spec/lib/http_stub/server/headers_spec.rb"
|
349
|
+
- "./spec/lib/http_stub/server/omitted_value_matcher_spec.rb"
|
350
|
+
- "./spec/lib/http_stub/server/regexp_value_matcher_spec.rb"
|
351
|
+
- "./spec/lib/http_stub/server/registry_spec.rb"
|
352
|
+
- "./spec/lib/http_stub/server/request_header_parser_spec.rb"
|
353
|
+
- "./spec/lib/http_stub/server/response_pipeline_spec.rb"
|
354
|
+
- "./spec/lib/http_stub/server/response_spec.rb"
|
355
|
+
- "./spec/lib/http_stub/server/string_value_matcher_spec.rb"
|
356
|
+
- "./spec/lib/http_stub/server/stub_activator_controller_spec.rb"
|
357
|
+
- "./spec/lib/http_stub/server/stub_activator_spec.rb"
|
358
|
+
- "./spec/lib/http_stub/server/stub_controller_spec.rb"
|
359
|
+
- "./spec/lib/http_stub/server/stub_factory_spec.rb"
|
360
|
+
- "./spec/lib/http_stub/server/stub_headers_spec.rb"
|
361
|
+
- "./spec/lib/http_stub/server/stub_parameters_spec.rb"
|
362
|
+
- "./spec/lib/http_stub/server/stub_registry_integration_spec.rb"
|
363
|
+
- "./spec/lib/http_stub/server/stub_registry_spec.rb"
|
364
|
+
- "./spec/lib/http_stub/server/stub_response/base_spec.rb"
|
365
|
+
- "./spec/lib/http_stub/server/stub_response/file_spec.rb"
|
366
|
+
- "./spec/lib/http_stub/server/stub_response/text_spec.rb"
|
367
|
+
- "./spec/lib/http_stub/server/stub_response_spec.rb"
|
368
|
+
- "./spec/lib/http_stub/server/stub_spec.rb"
|
369
|
+
- "./spec/lib/http_stub/server/stub_triggers_spec.rb"
|
370
|
+
- "./spec/lib/http_stub/server/stub_uri_spec.rb"
|
371
|
+
- "./spec/resources/sample.pdf"
|
372
|
+
- "./spec/resources/sample.txt"
|
338
373
|
- "./spec/spec_helper.rb"
|
339
|
-
- "./spec/support/http_stub/configurer/request/stub_payload_builder_shared_context.rb"
|
340
374
|
- "./spec/support/server_integration.rb"
|
375
|
+
- "./spec/support/stub_fixture.rb"
|
341
376
|
homepage: http://github.com/MYOB-Technology/http_stub
|
342
377
|
licenses:
|
343
378
|
- MIT
|
@@ -358,7 +393,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
358
393
|
version: '0'
|
359
394
|
requirements: []
|
360
395
|
rubyforge_project: http_stub
|
361
|
-
rubygems_version: 2.
|
396
|
+
rubygems_version: 2.4.6
|
362
397
|
signing_key:
|
363
398
|
specification_version: 4
|
364
399
|
summary: A HTTP Server replaying configured stub responses
|
@@ -366,11 +401,15 @@ test_files:
|
|
366
401
|
- "./spec/curl_samples.txt"
|
367
402
|
- "./spec/lib/http_stub/configurer/deprecated_dsl_spec.rb"
|
368
403
|
- "./spec/lib/http_stub/configurer/request/controllable_value_spec.rb"
|
404
|
+
- "./spec/lib/http_stub/configurer/request/http/basic_spec.rb"
|
405
|
+
- "./spec/lib/http_stub/configurer/request/http/factory_spec.rb"
|
406
|
+
- "./spec/lib/http_stub/configurer/request/http/multipart_spec.rb"
|
369
407
|
- "./spec/lib/http_stub/configurer/request/omittable_spec.rb"
|
370
408
|
- "./spec/lib/http_stub/configurer/request/regexpable_spec.rb"
|
371
|
-
- "./spec/lib/http_stub/configurer/request/
|
409
|
+
- "./spec/lib/http_stub/configurer/request/stub_activator_builder_spec.rb"
|
372
410
|
- "./spec/lib/http_stub/configurer/request/stub_activator_spec.rb"
|
373
|
-
- "./spec/lib/http_stub/configurer/request/
|
411
|
+
- "./spec/lib/http_stub/configurer/request/stub_builder_spec.rb"
|
412
|
+
- "./spec/lib/http_stub/configurer/request/stub_response_spec.rb"
|
374
413
|
- "./spec/lib/http_stub/configurer/request/stub_spec.rb"
|
375
414
|
- "./spec/lib/http_stub/configurer/server/buffered_command_processor_spec.rb"
|
376
415
|
- "./spec/lib/http_stub/configurer/server/command_processor_integration_spec.rb"
|
@@ -380,35 +419,42 @@ test_files:
|
|
380
419
|
- "./spec/lib/http_stub/configurer/server/request_processor_spec.rb"
|
381
420
|
- "./spec/lib/http_stub/configurer_integration_spec.rb"
|
382
421
|
- "./spec/lib/http_stub/configurer_spec.rb"
|
383
|
-
- "./spec/lib/http_stub/
|
384
|
-
- "./spec/lib/http_stub/controllers/stub_controller_spec.rb"
|
422
|
+
- "./spec/lib/http_stub/extensions/core/hash_spec.rb"
|
385
423
|
- "./spec/lib/http_stub/extensions/rack/handler_spec.rb"
|
386
|
-
- "./spec/lib/http_stub/hash_extensions_spec.rb"
|
387
|
-
- "./spec/lib/http_stub/models/exact_value_matcher_spec.rb"
|
388
|
-
- "./spec/lib/http_stub/models/hash_with_string_value_matchers_spec.rb"
|
389
|
-
- "./spec/lib/http_stub/models/headers_spec.rb"
|
390
|
-
- "./spec/lib/http_stub/models/omitted_value_matcher_spec.rb"
|
391
|
-
- "./spec/lib/http_stub/models/regexp_value_matcher_spec.rb"
|
392
|
-
- "./spec/lib/http_stub/models/registry_spec.rb"
|
393
|
-
- "./spec/lib/http_stub/models/request_header_parser_spec.rb"
|
394
|
-
- "./spec/lib/http_stub/models/request_pipeline_spec.rb"
|
395
|
-
- "./spec/lib/http_stub/models/response_spec.rb"
|
396
|
-
- "./spec/lib/http_stub/models/string_value_matcher_spec.rb"
|
397
|
-
- "./spec/lib/http_stub/models/stub_activator_spec.rb"
|
398
|
-
- "./spec/lib/http_stub/models/stub_headers_spec.rb"
|
399
|
-
- "./spec/lib/http_stub/models/stub_parameters_spec.rb"
|
400
|
-
- "./spec/lib/http_stub/models/stub_registry_integration_spec.rb"
|
401
|
-
- "./spec/lib/http_stub/models/stub_registry_spec.rb"
|
402
|
-
- "./spec/lib/http_stub/models/stub_spec.rb"
|
403
|
-
- "./spec/lib/http_stub/models/stub_triggers_spec.rb"
|
404
|
-
- "./spec/lib/http_stub/models/stub_uri_spec.rb"
|
405
424
|
- "./spec/lib/http_stub/rake/server_daemon_tasks_smoke_spec.rb"
|
406
425
|
- "./spec/lib/http_stub/rake/server_tasks_smoke_spec.rb"
|
407
426
|
- "./spec/lib/http_stub/rake/server_tasks_spec.rb"
|
408
|
-
- "./spec/lib/http_stub/
|
409
|
-
- "./spec/lib/http_stub/
|
410
|
-
- "./spec/lib/http_stub/
|
411
|
-
- "./spec/lib/http_stub/
|
427
|
+
- "./spec/lib/http_stub/server/application_integration_spec.rb"
|
428
|
+
- "./spec/lib/http_stub/server/application_spec.rb"
|
429
|
+
- "./spec/lib/http_stub/server/daemon_integration_spec.rb"
|
430
|
+
- "./spec/lib/http_stub/server/daemon_spec.rb"
|
431
|
+
- "./spec/lib/http_stub/server/exact_value_matcher_spec.rb"
|
432
|
+
- "./spec/lib/http_stub/server/hash_with_string_value_matchers_spec.rb"
|
433
|
+
- "./spec/lib/http_stub/server/headers_spec.rb"
|
434
|
+
- "./spec/lib/http_stub/server/omitted_value_matcher_spec.rb"
|
435
|
+
- "./spec/lib/http_stub/server/regexp_value_matcher_spec.rb"
|
436
|
+
- "./spec/lib/http_stub/server/registry_spec.rb"
|
437
|
+
- "./spec/lib/http_stub/server/request_header_parser_spec.rb"
|
438
|
+
- "./spec/lib/http_stub/server/response_pipeline_spec.rb"
|
439
|
+
- "./spec/lib/http_stub/server/response_spec.rb"
|
440
|
+
- "./spec/lib/http_stub/server/string_value_matcher_spec.rb"
|
441
|
+
- "./spec/lib/http_stub/server/stub_activator_controller_spec.rb"
|
442
|
+
- "./spec/lib/http_stub/server/stub_activator_spec.rb"
|
443
|
+
- "./spec/lib/http_stub/server/stub_controller_spec.rb"
|
444
|
+
- "./spec/lib/http_stub/server/stub_factory_spec.rb"
|
445
|
+
- "./spec/lib/http_stub/server/stub_headers_spec.rb"
|
446
|
+
- "./spec/lib/http_stub/server/stub_parameters_spec.rb"
|
447
|
+
- "./spec/lib/http_stub/server/stub_registry_integration_spec.rb"
|
448
|
+
- "./spec/lib/http_stub/server/stub_registry_spec.rb"
|
449
|
+
- "./spec/lib/http_stub/server/stub_response/base_spec.rb"
|
450
|
+
- "./spec/lib/http_stub/server/stub_response/file_spec.rb"
|
451
|
+
- "./spec/lib/http_stub/server/stub_response/text_spec.rb"
|
452
|
+
- "./spec/lib/http_stub/server/stub_response_spec.rb"
|
453
|
+
- "./spec/lib/http_stub/server/stub_spec.rb"
|
454
|
+
- "./spec/lib/http_stub/server/stub_triggers_spec.rb"
|
455
|
+
- "./spec/lib/http_stub/server/stub_uri_spec.rb"
|
456
|
+
- "./spec/resources/sample.pdf"
|
457
|
+
- "./spec/resources/sample.txt"
|
412
458
|
- "./spec/spec_helper.rb"
|
413
|
-
- "./spec/support/http_stub/configurer/request/stub_payload_builder_shared_context.rb"
|
414
459
|
- "./spec/support/server_integration.rb"
|
460
|
+
- "./spec/support/stub_fixture.rb"
|