pact 1.8.1 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 510d58c42f3fd2cdb9682547577a52749055aaab
4
+ data.tar.gz: f3d9773a090e6e9672b025f816d3b7f752128f68
5
+ SHA512:
6
+ metadata.gz: 1b24f7ace1aaaf2134c049f22bf3ca3536f968b955c01c8fe9d26cdb035425a70cc95875f114ab9ecc66aa77a612ab99579406bdb3288d3b7f6bbe0c3ed8447c
7
+ data.tar.gz: cf3fe151dc45cc00f394c7f453fe28e1922d86397a76aaa683b5a7ee6593575a181cb0e054e6f90fa3b7dd0d33138ff7f6370b0bff4033147cd154fa7d8cd27a
@@ -2,6 +2,16 @@ Do this to generate your change history
2
2
 
3
3
  git log --pretty=format:' * %h - %s (%an, %ad)' vX.Y.Z..HEAD
4
4
 
5
+ ### 1.9.0 (10 July 2015)
6
+
7
+ * 3e9f310 - Include Pact helper methods to create Terms, ArrayLikes and SomethingLikes. (Beth Skurrie, Fri Jul 10 13:33:50 2015 +1000)
8
+ * 583b03d - Added spec to show v2 provider verification works (Beth Skurrie, Thu Jul 9 15:54:09 2015 +1000)
9
+ * 1871e91 - Upgraded an losened pact-support and pact-mock_service dependencies (Beth Skurrie, Thu Jul 9 15:53:03 2015 +1000)
10
+ * d8010e4 - Updated .ruby-version to 2.2.2 (Beth Skurrie, Thu Jul 9 14:25:04 2015 +1000)
11
+ * c1881c4 - Added test to show mock service will use v2 matching rules when the pact specification version is set to 2 (Beth Skurrie, Thu Jul 9 14:01:13 2015
12
+ * 5d44285 - Fixed hanging CLI spec (Beth Skurrie, Thu Jul 9 13:33:10 2015 +1000)
13
+ * dbf26f2 - Escape markdown chars in consumer and provider names when rendering markdown docs (Beth Skurrie, Tue Jun 16 10:56:43 2015 +1000)
14
+
5
15
  ### 1.8.1 (15 June 2015)
6
16
 
7
17
  * 207a33d - Escape HTML characters in description when generating 'a' tag IDs. https://github.com/bethesque/pact_broker/issues/28 (Beth, Mon Jun 15 17:39:02 2015 +1000)
@@ -33,16 +33,6 @@ module Pact
33
33
  interaction_builder.upon_receiving(description)
34
34
  end
35
35
 
36
- def interaction_builder
37
- @interaction_builder ||=
38
- begin
39
- interaction_builder = InteractionBuilder.new do | interaction |
40
- self.handle_interaction_fully_defined(interaction)
41
- end
42
- interaction_builder
43
- end
44
- end
45
-
46
36
  def verify example_description
47
37
  mock_service_client.verify example_description
48
38
  end
@@ -71,6 +61,16 @@ module Pact
71
61
  attr_reader :mock_service_client
72
62
  attr_writer :interaction_builder
73
63
 
64
+ def interaction_builder
65
+ @interaction_builder ||=
66
+ begin
67
+ interaction_builder = InteractionBuilder.new do | interaction |
68
+ self.handle_interaction_fully_defined(interaction)
69
+ end
70
+ interaction_builder
71
+ end
72
+ end
73
+
74
74
  end
75
75
  end
76
76
  end
@@ -1,11 +1,13 @@
1
1
  require 'pact/consumer'
2
2
  require 'pact/consumer/spec_hooks'
3
3
  require 'pact/rspec'
4
+ require 'pact/helpers'
4
5
 
5
6
  module Pact
6
7
  module Consumer
7
8
  module RSpec
8
9
  include Pact::Consumer::ConsumerContractBuilders
10
+ include Pact::Helpers
9
11
  end
10
12
  end
11
13
  end
@@ -37,11 +37,11 @@ module Pact
37
37
  end
38
38
 
39
39
  def consumer_name
40
- @consumer_contract.consumer.name
40
+ markdown_escape @consumer_contract.consumer.name
41
41
  end
42
42
 
43
43
  def provider_name
44
- @consumer_contract.provider.name
44
+ markdown_escape @consumer_contract.provider.name
45
45
  end
46
46
 
47
47
  def has_provider_state?
@@ -115,6 +115,9 @@ module Pact
115
115
  string[0].downcase + string[1..-1]
116
116
  end
117
117
 
118
+ def markdown_escape string
119
+ string.gsub('*','\*').gsub('_','\_')
120
+ end
118
121
  end
119
122
  end
120
- end
123
+ end
@@ -23,7 +23,7 @@ module Pact
23
23
  attr_reader :consumer_contract
24
24
 
25
25
  def title
26
- "### A pact between #{consumer_contract.consumer.name} and #{consumer_contract.provider.name}\n\n"
26
+ "### A pact between #{consumer_name} and #{provider_name}\n\n"
27
27
  end
28
28
 
29
29
  def interaction_renderers
@@ -31,7 +31,7 @@ module Pact
31
31
  end
32
32
 
33
33
  def summaries_title
34
- "#### Requests from #{consumer_contract.consumer.name} to #{consumer_contract.provider.name}\n\n"
34
+ "#### Requests from #{consumer_name} to #{provider_name}\n\n"
35
35
  end
36
36
 
37
37
  def interactions_title
@@ -50,6 +50,18 @@ module Pact
50
50
  SortInteractions.call(consumer_contract.interactions)
51
51
  end
52
52
 
53
+ def consumer_name
54
+ markdown_escape consumer_contract.consumer.name
55
+ end
56
+
57
+ def provider_name
58
+ markdown_escape consumer_contract.provider.name
59
+ end
60
+
61
+ def markdown_escape string
62
+ string.gsub('*','\*').gsub('_','\_')
63
+ end
64
+
53
65
  end
54
66
  end
55
67
  end
@@ -1,3 +1,3 @@
1
1
  module Pact
2
- VERSION = "1.8.1"
2
+ VERSION = "1.9.0"
3
3
  end
@@ -28,8 +28,8 @@ Gem::Specification.new do |gem|
28
28
  gem.add_runtime_dependency 'webrick'
29
29
  gem.add_runtime_dependency 'term-ansicolor', '~> 1.0'
30
30
 
31
- gem.add_runtime_dependency 'pact-support', '~> 0.4.1'
32
- gem.add_runtime_dependency 'pact-mock_service', '~> 0.5.0'
31
+ gem.add_runtime_dependency 'pact-support', '~> 0.5'
32
+ gem.add_runtime_dependency 'pact-mock_service', '~> 0.7'
33
33
 
34
34
  gem.add_development_dependency 'rake', '~> 10.0.3'
35
35
  gem.add_development_dependency 'webmock', '~> 1.18.0'
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
5
- prerelease:
4
+ version: 1.9.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - James Fraser
@@ -13,236 +12,207 @@ authors:
13
12
  autorequire:
14
13
  bindir: bin
15
14
  cert_chain: []
16
- date: 2015-06-15 00:00:00.000000000 Z
15
+ date: 2015-07-10 00:00:00.000000000 Z
17
16
  dependencies:
18
17
  - !ruby/object:Gem::Dependency
19
18
  name: randexp
20
19
  requirement: !ruby/object:Gem::Requirement
21
- none: false
22
20
  requirements:
23
- - - ~>
21
+ - - "~>"
24
22
  - !ruby/object:Gem::Version
25
23
  version: 0.1.7
26
24
  type: :runtime
27
25
  prerelease: false
28
26
  version_requirements: !ruby/object:Gem::Requirement
29
- none: false
30
27
  requirements:
31
- - - ~>
28
+ - - "~>"
32
29
  - !ruby/object:Gem::Version
33
30
  version: 0.1.7
34
31
  - !ruby/object:Gem::Dependency
35
32
  name: rspec
36
33
  requirement: !ruby/object:Gem::Requirement
37
- none: false
38
34
  requirements:
39
- - - ! '>='
35
+ - - ">="
40
36
  - !ruby/object:Gem::Version
41
37
  version: '2.14'
42
38
  type: :runtime
43
39
  prerelease: false
44
40
  version_requirements: !ruby/object:Gem::Requirement
45
- none: false
46
41
  requirements:
47
- - - ! '>='
42
+ - - ">="
48
43
  - !ruby/object:Gem::Version
49
44
  version: '2.14'
50
45
  - !ruby/object:Gem::Dependency
51
46
  name: find_a_port
52
47
  requirement: !ruby/object:Gem::Requirement
53
- none: false
54
48
  requirements:
55
- - - ~>
49
+ - - "~>"
56
50
  - !ruby/object:Gem::Version
57
51
  version: 1.0.1
58
52
  type: :runtime
59
53
  prerelease: false
60
54
  version_requirements: !ruby/object:Gem::Requirement
61
- none: false
62
55
  requirements:
63
- - - ~>
56
+ - - "~>"
64
57
  - !ruby/object:Gem::Version
65
58
  version: 1.0.1
66
59
  - !ruby/object:Gem::Dependency
67
60
  name: rack-test
68
61
  requirement: !ruby/object:Gem::Requirement
69
- none: false
70
62
  requirements:
71
- - - ~>
63
+ - - "~>"
72
64
  - !ruby/object:Gem::Version
73
65
  version: 0.6.2
74
66
  type: :runtime
75
67
  prerelease: false
76
68
  version_requirements: !ruby/object:Gem::Requirement
77
- none: false
78
69
  requirements:
79
- - - ~>
70
+ - - "~>"
80
71
  - !ruby/object:Gem::Version
81
72
  version: 0.6.2
82
73
  - !ruby/object:Gem::Dependency
83
74
  name: awesome_print
84
75
  requirement: !ruby/object:Gem::Requirement
85
- none: false
86
76
  requirements:
87
- - - ~>
77
+ - - "~>"
88
78
  - !ruby/object:Gem::Version
89
79
  version: '1.1'
90
80
  type: :runtime
91
81
  prerelease: false
92
82
  version_requirements: !ruby/object:Gem::Requirement
93
- none: false
94
83
  requirements:
95
- - - ~>
84
+ - - "~>"
96
85
  - !ruby/object:Gem::Version
97
86
  version: '1.1'
98
87
  - !ruby/object:Gem::Dependency
99
88
  name: thor
100
89
  requirement: !ruby/object:Gem::Requirement
101
- none: false
102
90
  requirements:
103
- - - ! '>='
91
+ - - ">="
104
92
  - !ruby/object:Gem::Version
105
93
  version: '0'
106
94
  type: :runtime
107
95
  prerelease: false
108
96
  version_requirements: !ruby/object:Gem::Requirement
109
- none: false
110
97
  requirements:
111
- - - ! '>='
98
+ - - ">="
112
99
  - !ruby/object:Gem::Version
113
100
  version: '0'
114
101
  - !ruby/object:Gem::Dependency
115
102
  name: json
116
103
  requirement: !ruby/object:Gem::Requirement
117
- none: false
118
104
  requirements:
119
- - - ! '>='
105
+ - - ">="
120
106
  - !ruby/object:Gem::Version
121
107
  version: '0'
122
108
  type: :runtime
123
109
  prerelease: false
124
110
  version_requirements: !ruby/object:Gem::Requirement
125
- none: false
126
111
  requirements:
127
- - - ! '>='
112
+ - - ">="
128
113
  - !ruby/object:Gem::Version
129
114
  version: '0'
130
115
  - !ruby/object:Gem::Dependency
131
116
  name: webrick
132
117
  requirement: !ruby/object:Gem::Requirement
133
- none: false
134
118
  requirements:
135
- - - ! '>='
119
+ - - ">="
136
120
  - !ruby/object:Gem::Version
137
121
  version: '0'
138
122
  type: :runtime
139
123
  prerelease: false
140
124
  version_requirements: !ruby/object:Gem::Requirement
141
- none: false
142
125
  requirements:
143
- - - ! '>='
126
+ - - ">="
144
127
  - !ruby/object:Gem::Version
145
128
  version: '0'
146
129
  - !ruby/object:Gem::Dependency
147
130
  name: term-ansicolor
148
131
  requirement: !ruby/object:Gem::Requirement
149
- none: false
150
132
  requirements:
151
- - - ~>
133
+ - - "~>"
152
134
  - !ruby/object:Gem::Version
153
135
  version: '1.0'
154
136
  type: :runtime
155
137
  prerelease: false
156
138
  version_requirements: !ruby/object:Gem::Requirement
157
- none: false
158
139
  requirements:
159
- - - ~>
140
+ - - "~>"
160
141
  - !ruby/object:Gem::Version
161
142
  version: '1.0'
162
143
  - !ruby/object:Gem::Dependency
163
144
  name: pact-support
164
145
  requirement: !ruby/object:Gem::Requirement
165
- none: false
166
146
  requirements:
167
- - - ~>
147
+ - - "~>"
168
148
  - !ruby/object:Gem::Version
169
- version: 0.4.1
149
+ version: '0.5'
170
150
  type: :runtime
171
151
  prerelease: false
172
152
  version_requirements: !ruby/object:Gem::Requirement
173
- none: false
174
153
  requirements:
175
- - - ~>
154
+ - - "~>"
176
155
  - !ruby/object:Gem::Version
177
- version: 0.4.1
156
+ version: '0.5'
178
157
  - !ruby/object:Gem::Dependency
179
158
  name: pact-mock_service
180
159
  requirement: !ruby/object:Gem::Requirement
181
- none: false
182
160
  requirements:
183
- - - ~>
161
+ - - "~>"
184
162
  - !ruby/object:Gem::Version
185
- version: 0.5.0
163
+ version: '0.7'
186
164
  type: :runtime
187
165
  prerelease: false
188
166
  version_requirements: !ruby/object:Gem::Requirement
189
- none: false
190
167
  requirements:
191
- - - ~>
168
+ - - "~>"
192
169
  - !ruby/object:Gem::Version
193
- version: 0.5.0
170
+ version: '0.7'
194
171
  - !ruby/object:Gem::Dependency
195
172
  name: rake
196
173
  requirement: !ruby/object:Gem::Requirement
197
- none: false
198
174
  requirements:
199
- - - ~>
175
+ - - "~>"
200
176
  - !ruby/object:Gem::Version
201
177
  version: 10.0.3
202
178
  type: :development
203
179
  prerelease: false
204
180
  version_requirements: !ruby/object:Gem::Requirement
205
- none: false
206
181
  requirements:
207
- - - ~>
182
+ - - "~>"
208
183
  - !ruby/object:Gem::Version
209
184
  version: 10.0.3
210
185
  - !ruby/object:Gem::Dependency
211
186
  name: webmock
212
187
  requirement: !ruby/object:Gem::Requirement
213
- none: false
214
188
  requirements:
215
- - - ~>
189
+ - - "~>"
216
190
  - !ruby/object:Gem::Version
217
191
  version: 1.18.0
218
192
  type: :development
219
193
  prerelease: false
220
194
  version_requirements: !ruby/object:Gem::Requirement
221
- none: false
222
195
  requirements:
223
- - - ~>
196
+ - - "~>"
224
197
  - !ruby/object:Gem::Version
225
198
  version: 1.18.0
226
199
  - !ruby/object:Gem::Dependency
227
200
  name: pry
228
201
  requirement: !ruby/object:Gem::Requirement
229
- none: false
230
202
  requirements:
231
- - - ! '>='
203
+ - - ">="
232
204
  - !ruby/object:Gem::Version
233
205
  version: '0'
234
206
  type: :development
235
207
  prerelease: false
236
208
  version_requirements: !ruby/object:Gem::Requirement
237
- none: false
238
209
  requirements:
239
- - - ! '>='
210
+ - - ">="
240
211
  - !ruby/object:Gem::Version
241
212
  version: '0'
242
213
  - !ruby/object:Gem::Dependency
243
214
  name: fakefs
244
215
  requirement: !ruby/object:Gem::Requirement
245
- none: false
246
216
  requirements:
247
217
  - - '='
248
218
  - !ruby/object:Gem::Version
@@ -250,7 +220,6 @@ dependencies:
250
220
  type: :development
251
221
  prerelease: false
252
222
  version_requirements: !ruby/object:Gem::Requirement
253
- none: false
254
223
  requirements:
255
224
  - - '='
256
225
  - !ruby/object:Gem::Version
@@ -258,65 +227,57 @@ dependencies:
258
227
  - !ruby/object:Gem::Dependency
259
228
  name: hashie
260
229
  requirement: !ruby/object:Gem::Requirement
261
- none: false
262
230
  requirements:
263
- - - ~>
231
+ - - "~>"
264
232
  - !ruby/object:Gem::Version
265
233
  version: '2.0'
266
234
  type: :development
267
235
  prerelease: false
268
236
  version_requirements: !ruby/object:Gem::Requirement
269
- none: false
270
237
  requirements:
271
- - - ~>
238
+ - - "~>"
272
239
  - !ruby/object:Gem::Version
273
240
  version: '2.0'
274
241
  - !ruby/object:Gem::Dependency
275
242
  name: activesupport
276
243
  requirement: !ruby/object:Gem::Requirement
277
- none: false
278
244
  requirements:
279
- - - ! '>='
245
+ - - ">="
280
246
  - !ruby/object:Gem::Version
281
247
  version: '0'
282
248
  type: :development
283
249
  prerelease: false
284
250
  version_requirements: !ruby/object:Gem::Requirement
285
- none: false
286
251
  requirements:
287
- - - ! '>='
252
+ - - ">="
288
253
  - !ruby/object:Gem::Version
289
254
  version: '0'
290
255
  - !ruby/object:Gem::Dependency
291
256
  name: faraday
292
257
  requirement: !ruby/object:Gem::Requirement
293
- none: false
294
258
  requirements:
295
- - - ! '>='
259
+ - - ">="
296
260
  - !ruby/object:Gem::Version
297
261
  version: '0'
298
262
  type: :development
299
263
  prerelease: false
300
264
  version_requirements: !ruby/object:Gem::Requirement
301
- none: false
302
265
  requirements:
303
- - - ! '>='
266
+ - - ">="
304
267
  - !ruby/object:Gem::Version
305
268
  version: '0'
306
269
  - !ruby/object:Gem::Dependency
307
270
  name: appraisal
308
271
  requirement: !ruby/object:Gem::Requirement
309
- none: false
310
272
  requirements:
311
- - - ! '>='
273
+ - - ">="
312
274
  - !ruby/object:Gem::Version
313
275
  version: '0'
314
276
  type: :development
315
277
  prerelease: false
316
278
  version_requirements: !ruby/object:Gem::Requirement
317
- none: false
318
279
  requirements:
319
- - - ! '>='
280
+ - - ">="
320
281
  - !ruby/object:Gem::Version
321
282
  version: '0'
322
283
  description: Enables consumer driven contract testing, providing a mock service and
@@ -411,33 +372,26 @@ files:
411
372
  homepage: https://github.com/realestate-com-au/pact
412
373
  licenses:
413
374
  - MIT
375
+ metadata: {}
414
376
  post_install_message:
415
377
  rdoc_options: []
416
378
  require_paths:
417
379
  - lib
418
380
  required_ruby_version: !ruby/object:Gem::Requirement
419
- none: false
420
381
  requirements:
421
- - - ! '>='
382
+ - - ">="
422
383
  - !ruby/object:Gem::Version
423
384
  version: '0'
424
- segments:
425
- - 0
426
- hash: -3727160494816609368
427
385
  required_rubygems_version: !ruby/object:Gem::Requirement
428
- none: false
429
386
  requirements:
430
- - - ! '>='
387
+ - - ">="
431
388
  - !ruby/object:Gem::Version
432
389
  version: '0'
433
- segments:
434
- - 0
435
- hash: -3727160494816609368
436
390
  requirements: []
437
391
  rubyforge_project:
438
- rubygems_version: 1.8.23
392
+ rubygems_version: 2.4.5
439
393
  signing_key:
440
- specification_version: 3
394
+ specification_version: 4
441
395
  summary: Enables consumer driven contract testing, providing a mock service and DSL
442
396
  for the consumer project, and interaction playback and verification for the service
443
397
  provider project.