pacto 0.2.5 → 0.3.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/.gitignore +3 -0
  2. data/.rspec +0 -2
  3. data/.rubocop-todo.yml +51 -0
  4. data/.rubocop.yml +1 -0
  5. data/.travis.yml +4 -2
  6. data/Guardfile +28 -14
  7. data/README.md +81 -51
  8. data/Rakefile +24 -11
  9. data/features/generation/generation.feature +25 -0
  10. data/features/journeys/validation.feature +74 -0
  11. data/features/support/env.rb +16 -0
  12. data/lib/pacto.rb +63 -34
  13. data/lib/pacto/contract.rb +25 -11
  14. data/lib/pacto/contract_factory.rb +13 -44
  15. data/lib/pacto/core/callback.rb +11 -0
  16. data/lib/pacto/core/configuration.rb +34 -0
  17. data/lib/pacto/core/contract_repository.rb +44 -0
  18. data/lib/pacto/erb_processor.rb +18 -0
  19. data/lib/pacto/exceptions/invalid_contract.rb +10 -1
  20. data/lib/pacto/extensions.rb +2 -2
  21. data/lib/pacto/generator.rb +75 -0
  22. data/lib/pacto/hash_merge_processor.rb +14 -0
  23. data/lib/pacto/hooks/erb_hook.rb +17 -0
  24. data/lib/pacto/logger.rb +42 -0
  25. data/lib/pacto/meta_schema.rb +17 -0
  26. data/lib/pacto/rake_task.rb +75 -12
  27. data/lib/pacto/request.rb +3 -4
  28. data/lib/pacto/response.rb +27 -19
  29. data/lib/pacto/server.rb +2 -0
  30. data/lib/pacto/server/dummy.rb +45 -0
  31. data/lib/pacto/server/playback_servlet.rb +21 -0
  32. data/lib/pacto/stubs/built_in.rb +57 -0
  33. data/lib/pacto/version.rb +1 -1
  34. data/pacto.gemspec +8 -2
  35. data/resources/contract_schema.json +216 -0
  36. data/spec/coveralls_helper.rb +10 -0
  37. data/spec/integration/data/strict_contract.json +33 -0
  38. data/spec/integration/data/templating_contract.json +25 -0
  39. data/spec/integration/e2e_spec.rb +40 -7
  40. data/spec/integration/templating_spec.rb +55 -0
  41. data/spec/spec_helper.rb +17 -0
  42. data/spec/unit/data/simple_contract.json +22 -0
  43. data/spec/unit/hooks/erb_hook_spec.rb +51 -0
  44. data/spec/unit/pacto/configuration_spec.rb +51 -0
  45. data/spec/unit/pacto/contract_factory_spec.rb +4 -35
  46. data/spec/unit/pacto/contract_spec.rb +59 -31
  47. data/spec/unit/pacto/core/configuration_spec.rb +28 -0
  48. data/spec/unit/pacto/core/contract_repository_spec.rb +133 -0
  49. data/spec/unit/pacto/erb_processor_spec.rb +23 -0
  50. data/spec/unit/pacto/extensions_spec.rb +11 -11
  51. data/spec/unit/pacto/generator_spec.rb +142 -0
  52. data/spec/unit/pacto/hash_merge_processor_spec.rb +20 -0
  53. data/spec/unit/pacto/logger_spec.rb +44 -0
  54. data/spec/unit/pacto/meta_schema_spec.rb +70 -0
  55. data/spec/unit/pacto/pacto_spec.rb +32 -58
  56. data/spec/unit/pacto/request_spec.rb +83 -34
  57. data/spec/unit/pacto/response_adapter_spec.rb +9 -11
  58. data/spec/unit/pacto/response_spec.rb +68 -68
  59. data/spec/unit/pacto/server/playback_servlet_spec.rb +24 -0
  60. data/spec/unit/pacto/stubs/built_in_spec.rb +168 -0
  61. metadata +291 -147
  62. data/.rspec_integration +0 -4
  63. data/.rspec_unit +0 -4
  64. data/lib/pacto/file_pre_processor.rb +0 -12
  65. data/lib/pacto/instantiated_contract.rb +0 -62
  66. data/spec/integration/spec_helper.rb +0 -1
  67. data/spec/integration/utils/dummy_server.rb +0 -34
  68. data/spec/unit/pacto/file_pre_processor_spec.rb +0 -13
  69. data/spec/unit/pacto/instantiated_contract_spec.rb +0 -224
  70. data/spec/unit/spec_helper.rb +0 -5
@@ -0,0 +1,168 @@
1
+ module Pacto
2
+ module Stubs
3
+ describe BuiltIn do
4
+ let(:request) do
5
+ double({
6
+ :host => 'http://localhost',
7
+ :method => method,
8
+ :path => '/hello_world',
9
+ :headers => {'Accept' => 'application/json'},
10
+ :params => {'foo' => 'bar'}
11
+ })
12
+ end
13
+
14
+ let(:method) { :get }
15
+
16
+ let(:response) do
17
+ double({
18
+ :status => 200,
19
+ :headers => {},
20
+ :body => body
21
+ })
22
+ end
23
+
24
+ let(:body) do
25
+ {'message' => 'foo'}
26
+ end
27
+
28
+ let(:stubbed_request) { double('stubbed request') }
29
+ let(:processor) { double('processor') }
30
+
31
+ describe '#initialize' do
32
+ it 'sets up a callback' do
33
+ WebMock.should_receive(:after_request) do | arg, &block |
34
+ expect(block.parameters).to have(2).items
35
+ end
36
+
37
+ described_class.new
38
+ end
39
+ end
40
+
41
+ describe '#stub_request!' do
42
+ before do
43
+ WebMock.should_receive(:stub_request).
44
+ with(request.method, "#{request.host}#{request.path}").
45
+ and_return(stubbed_request)
46
+
47
+ stubbed_request.stub(:to_return).with({
48
+ :status => response.status,
49
+ :headers => response.headers,
50
+ :body => response.body.to_json
51
+ })
52
+ end
53
+
54
+ context 'when the response body is an object' do
55
+ let(:body) do
56
+ {'message' => 'foo'}
57
+ end
58
+
59
+ it 'stubs the response body with a json representation' do
60
+ stubbed_request.should_receive(:to_return).with({
61
+ :status => response.status,
62
+ :headers => response.headers,
63
+ :body => response.body.to_json
64
+ })
65
+
66
+ stubbed_request.stub(:with).and_return(stubbed_request)
67
+
68
+ described_class.new.stub_request! request, response
69
+ end
70
+ end
71
+
72
+ context 'when the response body is an array' do
73
+ let(:body) do
74
+ [1, 2, 3]
75
+ end
76
+
77
+ it 'stubs the response body with a json representation' do
78
+ stubbed_request.should_receive(:to_return).with({
79
+ :status => response.status,
80
+ :headers => response.headers,
81
+ :body => response.body.to_json
82
+ })
83
+
84
+ stubbed_request.stub(:with).and_return(stubbed_request)
85
+
86
+ described_class.new.stub_request! request, response
87
+ end
88
+ end
89
+
90
+ context 'when the response body is not an object or an array' do
91
+ let(:body) { nil }
92
+
93
+ it 'stubs the response body with the original body' do
94
+ stubbed_request.should_receive(:to_return).with({
95
+ :status => response.status,
96
+ :headers => response.headers,
97
+ :body => response.body
98
+ })
99
+
100
+ stubbed_request.stub(:with).and_return(stubbed_request)
101
+
102
+ described_class.new.stub_request! request, response
103
+ end
104
+ end
105
+
106
+ context 'a GET request' do
107
+ let(:method) { :get }
108
+
109
+ it 'uses WebMock to stub the request' do
110
+ stubbed_request.should_receive(:with).
111
+ with({:headers => request.headers, :query => request.params}).
112
+ and_return(stubbed_request)
113
+ described_class.new.stub_request! request, response
114
+ end
115
+ end
116
+
117
+ context 'a POST request' do
118
+ let(:method) { :post }
119
+
120
+ it 'uses WebMock to stub the request' do
121
+ stubbed_request.should_receive(:with).
122
+ with({:headers => request.headers, :body => request.params}).
123
+ and_return(stubbed_request)
124
+ described_class.new.stub_request! request, response
125
+ end
126
+ end
127
+
128
+ context 'a request with no headers' do
129
+ let(:request) do
130
+ double({
131
+ :host => 'http://localhost',
132
+ :method => :get,
133
+ :path => '/hello_world',
134
+ :headers => {},
135
+ :params => {'foo' => 'bar'}
136
+ })
137
+ end
138
+
139
+ it 'uses WebMock to stub the request' do
140
+ stubbed_request.should_receive(:with).
141
+ with({:query => request.params}).
142
+ and_return(stubbed_request)
143
+ described_class.new.stub_request! request, response
144
+ end
145
+ end
146
+
147
+ context 'a request with no params' do
148
+ let(:request) do
149
+ double({
150
+ :host => 'http://localhost',
151
+ :method => :get,
152
+ :path => '/hello_world',
153
+ :headers => {},
154
+ :params => {}
155
+ })
156
+ end
157
+
158
+ it 'uses WebMock to stub the request' do
159
+ stubbed_request.should_receive(:with).
160
+ with({}).
161
+ and_return(stubbed_request)
162
+ described_class.new.stub_request! request, response
163
+ end
164
+ end
165
+ end
166
+ end
167
+ end
168
+ end
metadata CHANGED
@@ -1,306 +1,450 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pacto
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.2.5
4
+ version: 0.3.0.pre
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - ThoughtWorks & Abril
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-21 00:00:00.000000000 Z
12
+ date: 2013-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: webmock
16
- version_requirements: !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
17
18
  requirements:
18
- - - ">="
19
+ - - ! '>='
19
20
  - !ruby/object:Gem::Version
20
- version: !binary |-
21
- MA==
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
22
25
  none: false
23
- requirement: !ruby/object:Gem::Requirement
24
26
  requirements:
25
- - - ">="
27
+ - - ! '>='
26
28
  - !ruby/object:Gem::Version
27
- version: !binary |-
28
- MA==
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: multi_json
32
+ requirement: !ruby/object:Gem::Requirement
29
33
  none: false
30
- prerelease: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
31
38
  type: :runtime
32
- - !ruby/object:Gem::Dependency
33
- name: json
39
+ prerelease: false
34
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
35
42
  requirements:
36
- - - ">="
43
+ - - ! '>='
37
44
  - !ruby/object:Gem::Version
38
- version: !binary |-
39
- MA==
40
- none: false
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: json-schema
41
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
42
50
  requirements:
43
- - - ">="
51
+ - - ~>
44
52
  - !ruby/object:Gem::Version
45
- version: !binary |-
46
- MA==
47
- none: false
48
- prerelease: false
53
+ version: '2.0'
49
54
  type: :runtime
50
- - !ruby/object:Gem::Dependency
51
- name: json-schema
55
+ prerelease: false
52
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
53
58
  requirements:
54
- - - '='
59
+ - - ~>
55
60
  - !ruby/object:Gem::Version
56
- version: 1.0.4
57
- none: false
61
+ version: '2.0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: json-generator
58
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
59
66
  requirements:
60
- - - '='
67
+ - - ! '>='
61
68
  - !ruby/object:Gem::Version
62
- version: 1.0.4
63
- none: false
64
- prerelease: false
69
+ version: '0'
65
70
  type: :runtime
66
- - !ruby/object:Gem::Dependency
67
- name: json-generator
71
+ prerelease: false
68
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
69
74
  requirements:
70
- - - ">="
75
+ - - ! '>='
71
76
  - !ruby/object:Gem::Version
72
- version: !binary |-
73
- MA==
74
- none: false
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: hash-deep-merge
75
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
76
82
  requirements:
77
- - - ">="
83
+ - - ! '>='
78
84
  - !ruby/object:Gem::Version
79
- version: !binary |-
80
- MA==
81
- none: false
82
- prerelease: false
85
+ version: '0'
83
86
  type: :runtime
84
- - !ruby/object:Gem::Dependency
85
- name: hash-deep-merge
87
+ prerelease: false
86
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
87
90
  requirements:
88
- - - ">="
91
+ - - ! '>='
89
92
  - !ruby/object:Gem::Version
90
- version: !binary |-
91
- MA==
92
- none: false
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: httparty
93
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
94
98
  requirements:
95
- - - ">="
99
+ - - ! '>='
96
100
  - !ruby/object:Gem::Version
97
- version: !binary |-
98
- MA==
99
- none: false
100
- prerelease: false
101
+ version: '0'
101
102
  type: :runtime
102
- - !ruby/object:Gem::Dependency
103
- name: httparty
103
+ prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
105
106
  requirements:
106
- - - ">="
107
+ - - ! '>='
107
108
  - !ruby/object:Gem::Version
108
- version: !binary |-
109
- MA==
110
- none: false
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: addressable
111
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
112
114
  requirements:
113
- - - ">="
115
+ - - ! '>='
114
116
  - !ruby/object:Gem::Version
115
- version: !binary |-
116
- MA==
117
- none: false
118
- prerelease: false
117
+ version: '0'
119
118
  type: :runtime
120
- - !ruby/object:Gem::Dependency
121
- name: addressable
119
+ prerelease: false
122
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
123
122
  requirements:
124
- - - ">="
123
+ - - ! '>='
125
124
  - !ruby/object:Gem::Version
126
- version: !binary |-
127
- MA==
128
- none: false
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: coveralls
129
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
130
  requirements:
131
- - - ">="
131
+ - - ! '>='
132
132
  - !ruby/object:Gem::Version
133
- version: !binary |-
134
- MA==
135
- none: false
136
- prerelease: false
133
+ version: '0'
137
134
  type: :runtime
138
- - !ruby/object:Gem::Dependency
139
- name: coveralls
135
+ prerelease: false
140
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
141
138
  requirements:
142
- - - ">="
139
+ - - ! '>='
143
140
  - !ruby/object:Gem::Version
144
- version: !binary |-
145
- MA==
146
- none: false
141
+ version: '0'
142
+ - !ruby/object:Gem::Dependency
143
+ name: json-schema-generator
147
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
148
146
  requirements:
149
- - - ">="
147
+ - - ! '>='
150
148
  - !ruby/object:Gem::Version
151
- version: !binary |-
152
- MA==
153
- none: false
154
- prerelease: false
149
+ version: '0'
155
150
  type: :runtime
156
- - !ruby/object:Gem::Dependency
157
- name: rake
151
+ prerelease: false
158
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
159
154
  requirements:
160
- - - ">="
155
+ - - ! '>='
161
156
  - !ruby/object:Gem::Version
162
- version: !binary |-
163
- MA==
164
- none: false
157
+ version: '0'
158
+ - !ruby/object:Gem::Dependency
159
+ name: rake
165
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
166
162
  requirements:
167
- - - ">="
163
+ - - ! '>='
168
164
  - !ruby/object:Gem::Version
169
- version: !binary |-
170
- MA==
171
- none: false
172
- prerelease: false
165
+ version: '0'
173
166
  type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: rspec
176
- version_requirements: !ruby/object:Gem::Requirement
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
177
178
  requirements:
178
- - - ">="
179
+ - - ! '>='
179
180
  - !ruby/object:Gem::Version
180
- version: !binary |-
181
- MA==
181
+ version: '0'
182
+ type: :development
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
182
185
  none: false
183
- requirement: !ruby/object:Gem::Requirement
184
186
  requirements:
185
- - - ">="
187
+ - - ! '>='
186
188
  - !ruby/object:Gem::Version
187
- version: !binary |-
188
- MA==
189
+ version: '0'
190
+ - !ruby/object:Gem::Dependency
191
+ name: should_not
192
+ requirement: !ruby/object:Gem::Requirement
189
193
  none: false
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ type: :development
190
199
  prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ - !ruby/object:Gem::Dependency
207
+ name: aruba
208
+ requirement: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
191
214
  type: :development
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
192
222
  - !ruby/object:Gem::Dependency
193
223
  name: guard-rspec
224
+ requirement: !ruby/object:Gem::Requirement
225
+ none: false
226
+ requirements:
227
+ - - ! '>='
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
194
232
  version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
195
234
  requirements:
196
- - - ">="
235
+ - - ! '>='
197
236
  - !ruby/object:Gem::Version
198
- version: !binary |-
199
- MA==
237
+ version: '0'
238
+ - !ruby/object:Gem::Dependency
239
+ name: rubocop
240
+ requirement: !ruby/object:Gem::Requirement
200
241
  none: false
242
+ requirements:
243
+ - - ! '>='
244
+ - !ruby/object:Gem::Version
245
+ version: '0'
246
+ type: :development
247
+ prerelease: false
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ! '>='
252
+ - !ruby/object:Gem::Version
253
+ version: '0'
254
+ - !ruby/object:Gem::Dependency
255
+ name: guard-rubocop
201
256
  requirement: !ruby/object:Gem::Requirement
257
+ none: false
258
+ requirements:
259
+ - - ! '>='
260
+ - !ruby/object:Gem::Version
261
+ version: '0'
262
+ type: :development
263
+ prerelease: false
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ none: false
202
266
  requirements:
203
- - - ">="
267
+ - - ! '>='
204
268
  - !ruby/object:Gem::Version
205
- version: !binary |-
206
- MA==
269
+ version: '0'
270
+ - !ruby/object:Gem::Dependency
271
+ name: guard-cucumber
272
+ requirement: !ruby/object:Gem::Requirement
207
273
  none: false
274
+ requirements:
275
+ - - ! '>='
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :development
208
279
  prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ none: false
282
+ requirements:
283
+ - - ! '>='
284
+ - !ruby/object:Gem::Version
285
+ version: '0'
286
+ - !ruby/object:Gem::Dependency
287
+ name: rb-fsevent
288
+ requirement: !ruby/object:Gem::Requirement
289
+ none: false
290
+ requirements:
291
+ - - ! '>='
292
+ - !ruby/object:Gem::Version
293
+ version: '0'
209
294
  type: :development
210
- description: Pacto is a Ruby implementation of the [Consumer-Driven Contracts](http://martinfowler.com/articles/consumerDrivenContracts.html) pattern for evolving services
295
+ prerelease: false
296
+ version_requirements: !ruby/object:Gem::Requirement
297
+ none: false
298
+ requirements:
299
+ - - ! '>='
300
+ - !ruby/object:Gem::Version
301
+ version: '0'
302
+ - !ruby/object:Gem::Dependency
303
+ name: terminal-notifier-guard
304
+ requirement: !ruby/object:Gem::Requirement
305
+ none: false
306
+ requirements:
307
+ - - ! '>='
308
+ - !ruby/object:Gem::Version
309
+ version: '0'
310
+ type: :development
311
+ prerelease: false
312
+ version_requirements: !ruby/object:Gem::Requirement
313
+ none: false
314
+ requirements:
315
+ - - ! '>='
316
+ - !ruby/object:Gem::Version
317
+ version: '0'
318
+ description: Pacto is a Ruby implementation of the [Consumer-Driven Contracts](http://martinfowler.com/articles/consumerDrivenContracts.html)
319
+ pattern for evolving services
211
320
  email:
212
321
  - abril_vejasp_dev@thoughtworks.com
213
322
  executables: []
214
323
  extensions: []
215
324
  extra_rdoc_files: []
216
325
  files:
217
- - ".gitignore"
218
- - ".rspec"
219
- - ".rspec_integration"
220
- - ".rspec_unit"
221
- - ".travis.yml"
326
+ - .gitignore
327
+ - .rspec
328
+ - .rubocop-todo.yml
329
+ - .rubocop.yml
330
+ - .travis.yml
222
331
  - Gemfile
223
332
  - Guardfile
224
333
  - LICENSE.txt
225
334
  - README.md
226
335
  - Rakefile
227
336
  - TODO.md
337
+ - features/generation/generation.feature
338
+ - features/journeys/validation.feature
339
+ - features/support/env.rb
228
340
  - lib/pacto.rb
229
341
  - lib/pacto/contract.rb
230
342
  - lib/pacto/contract_factory.rb
343
+ - lib/pacto/core/callback.rb
344
+ - lib/pacto/core/configuration.rb
345
+ - lib/pacto/core/contract_repository.rb
346
+ - lib/pacto/erb_processor.rb
231
347
  - lib/pacto/exceptions/invalid_contract.rb
232
348
  - lib/pacto/extensions.rb
233
- - lib/pacto/file_pre_processor.rb
234
- - lib/pacto/instantiated_contract.rb
349
+ - lib/pacto/generator.rb
350
+ - lib/pacto/hash_merge_processor.rb
351
+ - lib/pacto/hooks/erb_hook.rb
352
+ - lib/pacto/logger.rb
353
+ - lib/pacto/meta_schema.rb
235
354
  - lib/pacto/rake_task.rb
236
355
  - lib/pacto/request.rb
237
356
  - lib/pacto/response.rb
238
357
  - lib/pacto/response_adapter.rb
358
+ - lib/pacto/server.rb
359
+ - lib/pacto/server/dummy.rb
360
+ - lib/pacto/server/playback_servlet.rb
361
+ - lib/pacto/stubs/built_in.rb
239
362
  - lib/pacto/version.rb
240
363
  - pacto.gemspec
364
+ - resources/contract_schema.json
365
+ - spec/coveralls_helper.rb
241
366
  - spec/integration/data/simple_contract.json
367
+ - spec/integration/data/strict_contract.json
368
+ - spec/integration/data/templating_contract.json
242
369
  - spec/integration/e2e_spec.rb
243
- - spec/integration/spec_helper.rb
244
- - spec/integration/utils/dummy_server.rb
370
+ - spec/integration/templating_spec.rb
245
371
  - spec/spec_helper.rb
246
372
  - spec/unit/data/contract.json
373
+ - spec/unit/data/simple_contract.json
374
+ - spec/unit/hooks/erb_hook_spec.rb
375
+ - spec/unit/pacto/configuration_spec.rb
247
376
  - spec/unit/pacto/contract_factory_spec.rb
248
377
  - spec/unit/pacto/contract_spec.rb
378
+ - spec/unit/pacto/core/configuration_spec.rb
379
+ - spec/unit/pacto/core/contract_repository_spec.rb
380
+ - spec/unit/pacto/erb_processor_spec.rb
249
381
  - spec/unit/pacto/extensions_spec.rb
250
- - spec/unit/pacto/file_pre_processor_spec.rb
251
- - spec/unit/pacto/instantiated_contract_spec.rb
382
+ - spec/unit/pacto/generator_spec.rb
383
+ - spec/unit/pacto/hash_merge_processor_spec.rb
384
+ - spec/unit/pacto/logger_spec.rb
385
+ - spec/unit/pacto/meta_schema_spec.rb
252
386
  - spec/unit/pacto/pacto_spec.rb
253
387
  - spec/unit/pacto/request_spec.rb
254
388
  - spec/unit/pacto/response_adapter_spec.rb
255
389
  - spec/unit/pacto/response_spec.rb
256
- - spec/unit/spec_helper.rb
390
+ - spec/unit/pacto/server/playback_servlet_spec.rb
391
+ - spec/unit/pacto/stubs/built_in_spec.rb
257
392
  homepage: https://github.com/thoughtworks/pacto
258
393
  licenses:
259
394
  - MIT
260
- post_install_message:
395
+ post_install_message:
261
396
  rdoc_options: []
262
397
  require_paths:
263
398
  - lib
264
399
  required_ruby_version: !ruby/object:Gem::Requirement
400
+ none: false
265
401
  requirements:
266
- - - ">="
402
+ - - ! '>='
267
403
  - !ruby/object:Gem::Version
404
+ version: '0'
268
405
  segments:
269
406
  - 0
270
- hash: 2
271
- version: !binary |-
272
- MA==
273
- none: false
407
+ hash: -1773890357225402507
274
408
  required_rubygems_version: !ruby/object:Gem::Requirement
409
+ none: false
275
410
  requirements:
276
- - - ">="
411
+ - - ! '>'
277
412
  - !ruby/object:Gem::Version
278
- segments:
279
- - 0
280
- hash: 2
281
- version: !binary |-
282
- MA==
283
- none: false
413
+ version: 1.3.1
284
414
  requirements: []
285
- rubyforge_project:
286
- rubygems_version: 1.8.24
287
- signing_key:
415
+ rubyforge_project:
416
+ rubygems_version: 1.8.25
417
+ signing_key:
288
418
  specification_version: 3
289
419
  summary: Consumer-Driven Contracts implementation
290
420
  test_files:
421
+ - features/generation/generation.feature
422
+ - features/journeys/validation.feature
423
+ - features/support/env.rb
424
+ - spec/coveralls_helper.rb
291
425
  - spec/integration/data/simple_contract.json
426
+ - spec/integration/data/strict_contract.json
427
+ - spec/integration/data/templating_contract.json
292
428
  - spec/integration/e2e_spec.rb
293
- - spec/integration/spec_helper.rb
294
- - spec/integration/utils/dummy_server.rb
429
+ - spec/integration/templating_spec.rb
295
430
  - spec/spec_helper.rb
296
431
  - spec/unit/data/contract.json
432
+ - spec/unit/data/simple_contract.json
433
+ - spec/unit/hooks/erb_hook_spec.rb
434
+ - spec/unit/pacto/configuration_spec.rb
297
435
  - spec/unit/pacto/contract_factory_spec.rb
298
436
  - spec/unit/pacto/contract_spec.rb
437
+ - spec/unit/pacto/core/configuration_spec.rb
438
+ - spec/unit/pacto/core/contract_repository_spec.rb
439
+ - spec/unit/pacto/erb_processor_spec.rb
299
440
  - spec/unit/pacto/extensions_spec.rb
300
- - spec/unit/pacto/file_pre_processor_spec.rb
301
- - spec/unit/pacto/instantiated_contract_spec.rb
441
+ - spec/unit/pacto/generator_spec.rb
442
+ - spec/unit/pacto/hash_merge_processor_spec.rb
443
+ - spec/unit/pacto/logger_spec.rb
444
+ - spec/unit/pacto/meta_schema_spec.rb
302
445
  - spec/unit/pacto/pacto_spec.rb
303
446
  - spec/unit/pacto/request_spec.rb
304
447
  - spec/unit/pacto/response_adapter_spec.rb
305
448
  - spec/unit/pacto/response_spec.rb
306
- - spec/unit/spec_helper.rb
449
+ - spec/unit/pacto/server/playback_servlet_spec.rb
450
+ - spec/unit/pacto/stubs/built_in_spec.rb