pact-message 0.11.0 → 0.11.1

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
  SHA256:
3
- metadata.gz: f26e9b2d322f3bb375df2197aa2180f8de0b4d62e45decf77e4c4b3802505ffa
4
- data.tar.gz: 130523097c7c65ddc0bf9d9dbf4464d7d17dfb7de97c7ef97471535be265e382
3
+ metadata.gz: 8ce8daa35756cfc3bf55b364cc91d123ab92be909f37d56fa237bcdb2a4051b2
4
+ data.tar.gz: d404290cbd697430bc277ef2298e37f17ab8c2770b999d0824cde92f8eafd306
5
5
  SHA512:
6
- metadata.gz: 184da6d526714237d5ec94c7a27b5c8e8562a91023cd6ede596e6a7aa8adf34ba1249650a01f4f50bcdcbd78fa529799cfd04922a00a51f90f832477f7cd35ff
7
- data.tar.gz: 8b24b7de4e4d24c41e4520d5ba0008d3ca719f7be4c17fa7c0d70d7bf4ea0fcb32e1910fcb37b543b4040d16e02f9ac672e478dfe06f6961bdbff86a67b7378f
6
+ metadata.gz: 6b5a5052f06c36a369453082962d74c893ca7a235efbfae622c7fa64b3f156267db773708e3ae0d783cbe39d7d620e97f7ad70f7a728aa7d4322ab11cd148f35
7
+ data.tar.gz: 551b8239e8bc1374405acfcee1f4dee500df58bd4a6f63bccee2f85fe5231ba680a4df4113685e1e8c30ff4b52cca8ba210d9032399d9ad0dc2c8553e5e7eed8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ <a name="v0.11.1"></a>
2
+ ### v0.11.1 (2021-04-20)
3
+
4
+ #### Bug Fixes
5
+
6
+ * JSON load message document so that the Ruby objects are created properly ([2bab66c](/../../commit/2bab66c))
7
+
1
8
  <a name="v0.11.0"></a>
2
9
  ### v0.11.0 (2021-03-22)
3
10
 
data/README.md CHANGED
@@ -31,6 +31,7 @@ The key to using Message Pact is to completely separate the business logic that
31
31
  ### Consumer
32
32
 
33
33
  Not finished yet as nobody has asked for it. Ping @Beth Skurrie on slack.pact.io if you'd like use this.
34
+ Update: Done but not documented yet. See https://github.com/pact-foundation/pact-message-ruby/blob/master/spec/features/create_message_pact_spec.rb#L78 for an example.
34
35
 
35
36
  ### Provider
36
37
 
@@ -14,17 +14,17 @@ module Pact
14
14
  long_desc <<-MSG, wrapping: false
15
15
  Update a pact with the given message, or create the pact if it does not exist.
16
16
  The MESSAGE_JSON may be in the legacy Ruby JSON format or the v2+ format.
17
- If MESSAGE_JSON is not provided or is '-', the content will be read from
17
+ If MESSAGE_JSON is not provided or is '-', the content will be read from
18
18
  standard input.
19
19
  MSG
20
20
  def update(maybe_json = '-')
21
21
  require 'pact/message'
22
22
  require 'pact/message/consumer/write_pact'
23
23
 
24
- message_json = JSON.parse(maybe_json == '-' ? $stdin.read : maybe_json)
24
+ message_object = JSON.load(maybe_json == '-' ? $stdin.read : maybe_json)
25
25
 
26
26
  pact_specification_version = Pact::SpecificationVersion.new(options.pact_specification_version)
27
- message_hash = Pact::Message.from_hash(message_json, { pact_specification_version: pact_specification_version })
27
+ message_hash = Pact::Message.from_hash(message_object, { pact_specification_version: pact_specification_version })
28
28
  Pact::Message::Consumer::WritePact.call(message_hash, options.pact_dir, options.consumer, options.provider, options.pact_specification_version, :update)
29
29
  end
30
30
 
@@ -39,6 +39,12 @@ module Pact
39
39
  require 'pact/message/version.rb'
40
40
  puts Pact::Message::VERSION
41
41
  end
42
+
43
+ no_commands do
44
+ def self.exit_on_failure?
45
+ true
46
+ end
47
+ end
42
48
  end
43
49
  end
44
50
  end
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Message
3
- VERSION = "0.11.0"
3
+ VERSION = "0.11.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact-message
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Beth Skurrie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-22 00:00:00.000000000 Z
11
+ date: 2021-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pact-support
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  - !ruby/object:Gem::Version
213
213
  version: '0'
214
214
  requirements: []
215
- rubygems_version: 3.2.15
215
+ rubygems_version: 3.2.16
216
216
  signing_key:
217
217
  specification_version: 4
218
218
  summary: Consumer contract library for messages