pact-support 1.12.1 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 171e5b772049e31feff77cf009c1e389bcf84d36
4
- data.tar.gz: 341dcea8ecd04447e6adc2e72407a2df21296ff5
3
+ metadata.gz: c50b1966502c423ba346bd03b9d812b5ba93b7ab
4
+ data.tar.gz: 9f6ffbd0645c74e5c64f97917e57970d87e52735
5
5
  SHA512:
6
- metadata.gz: 8a03eeba6d24f58d80996656d12f271e2779099ca5f1339470b57fa69d3c990c19351f1c9399c55549bfeebc068f113a353d6bddb2f099eecf028fc40a6afba6
7
- data.tar.gz: 21b7c796b12bd6aacc49929ebb43827fc59f325136757d64df3c04be5cb5f910a903d7e4cfedca02a8848f2e3c88d6aee204b2daedebff867b0bb714e89e848c
6
+ metadata.gz: 8ff872db398c3abc1c69533e0cf08a7ff2d26abcef145555078246c504661067ce101f8b161e92fb9aba0847c0f78871186608c235b10a1cdcfd573ff4783e2c
7
+ data.tar.gz: ed538859061709631e5ce1ba0bd214cdbcb840a80afcf03064166464d15e17d63cf807500f0e5429e3d876a13c4b5e9bb00f3012b18042736340b9ba4b8a1947
@@ -1,3 +1,12 @@
1
+ <a name="v1.13.0"></a>
2
+ ### v1.13.0 (2020-01-24)
3
+
4
+
5
+ #### Features
6
+
7
+ * give each interaction an index when parsing the contract ([74e9568](/../../commit/74e9568))
8
+
9
+
1
10
  <a name="v1.12.1"></a>
2
11
  ### v1.12.1 (2020-01-22)
3
12
 
@@ -13,7 +13,7 @@ module Pact
13
13
  Pact.configuration.error_stream.puts "WARN: This code only knows how to parse v3 pacts, attempting to parse v#{options[:pact_specification_version]} pact using v3 code."
14
14
  end
15
15
 
16
- interactions = hash[:interactions].collect { |hash| Interaction.from_hash(hash, options) }
16
+ interactions = hash[:interactions].each_with_index.collect { |hash, index| Interaction.from_hash({ index: index }.merge(hash), options) }
17
17
  ConsumerContract.new(
18
18
  :consumer => ServiceConsumer.from_hash(hash[:consumer]),
19
19
  :provider => ServiceProvider.from_hash(hash[:provider]),
@@ -5,7 +5,7 @@ module Pact
5
5
  class Interaction
6
6
  include ActiveSupportSupport
7
7
 
8
- attr_accessor :description, :request, :response, :provider_state, :provider_states, :metadata, :_id
8
+ attr_accessor :description, :request, :response, :provider_state, :provider_states, :metadata, :_id, :index
9
9
 
10
10
  def initialize attributes = {}
11
11
  @description = attributes[:description]
@@ -15,6 +15,7 @@ module Pact
15
15
  @provider_states = attributes[:provider_states]
16
16
  @metadata = attributes[:metadata]
17
17
  @_id = attributes[:_id]
18
+ @index = attributes[:index]
18
19
  end
19
20
 
20
21
  def self.from_hash hash, options = {}
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Support
3
- VERSION = "1.12.1"
3
+ VERSION = "1.13.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.1
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Fraser
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2020-01-22 00:00:00.000000000 Z
15
+ date: 2020-01-24 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: randexp