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 +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -0
- data/lib/pact/message/cli.rb +9 -3
- data/lib/pact/message/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ce8daa35756cfc3bf55b364cc91d123ab92be909f37d56fa237bcdb2a4051b2
|
4
|
+
data.tar.gz: d404290cbd697430bc277ef2298e37f17ab8c2770b999d0824cde92f8eafd306
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b5a5052f06c36a369453082962d74c893ca7a235efbfae622c7fa64b3f156267db773708e3ae0d783cbe39d7d620e97f7ad70f7a728aa7d4322ab11cd148f35
|
7
|
+
data.tar.gz: 551b8239e8bc1374405acfcee1f4dee500df58bd4a6f63bccee2f85fe5231ba680a4df4113685e1e8c30ff4b52cca8ba210d9032399d9ad0dc2c8553e5e7eed8
|
data/CHANGELOG.md
CHANGED
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
|
|
data/lib/pact/message/cli.rb
CHANGED
@@ -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
|
-
|
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(
|
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
|
data/lib/pact/message/version.rb
CHANGED
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.
|
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-
|
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.
|
215
|
+
rubygems_version: 3.2.16
|
216
216
|
signing_key:
|
217
217
|
specification_version: 4
|
218
218
|
summary: Consumer contract library for messages
|