pact-message 0.1.4 → 0.2.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 +21 -0
- data/Rakefile +2 -0
- data/lib/pact/consumer_contract/message.rb +7 -3
- data/lib/pact/consumer_contract/message/content.rb +5 -0
- data/lib/pact/message/cli.rb +2 -1
- data/lib/pact/message/consumer/interaction_builder.rb +1 -1
- data/lib/pact/message/version.rb +1 -1
- data/pact-message.gemspec +2 -0
- data/script/release.sh +12 -0
- data/tasks/release.rake +15 -0
- metadata +33 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e485798ab6743cfdc2d99c1bd54b66ca4e80e28
|
4
|
+
data.tar.gz: 40801208dfbcdd0db7a93e528819b63884a54381
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d459fe2831df7182485d1dd84c5bd44523ac33186016ce046f0c314464ede165091a548dca55cb06a891c43c5925531f76e8da187a742e65973536e4161f6f2
|
7
|
+
data.tar.gz: 128fc9bd83257fffbca3a27cb5a23586362b53c217daee5539d0e9ab3e4392a9816592692e937caea47e0a06fbba11a5bb0e44fb506b0ee03a542ecb5d6ffce2
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
<a name="v0.1.5"></a>
|
2
|
+
### v0.1.5 (2018-03-26)
|
3
|
+
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* upgrade to pact-support 1.5 ([20fea42](/../../commit/20fea42))
|
8
|
+
* move pact message classes out of pact-support into pact-message ([a187c4a](/../../commit/a187c4a))
|
9
|
+
* update DSL syntax ([8766965](/../../commit/8766965))
|
10
|
+
* add cli for other languages to use ([b111edd](/../../commit/b111edd))
|
11
|
+
* reuse consumer contract writer from pact-mock_service ([93aa122](/../../commit/93aa122))
|
12
|
+
* create dsl and basic pact file writer ([5333564](/../../commit/5333564))
|
13
|
+
|
14
|
+
|
15
|
+
#### Bug Fixes
|
16
|
+
|
17
|
+
* set pact_specification_version in cli ([834d671](/../../commit/834d671))
|
18
|
+
* requires ([886068c](/../../commit/886068c))
|
19
|
+
* change executables path from exe to bin ([921a1c3](/../../commit/921a1c3))
|
20
|
+
|
21
|
+
|
data/Rakefile
CHANGED
@@ -21,9 +21,13 @@ module Pact
|
|
21
21
|
@content = attributes[:content]
|
22
22
|
end
|
23
23
|
|
24
|
-
def self.from_hash hash, options
|
25
|
-
|
26
|
-
|
24
|
+
def self.from_hash hash, options = {}
|
25
|
+
opts = options.dup
|
26
|
+
unless opts[:pact_specification_version]
|
27
|
+
opts[:pact_specification_version] = Pact::SpecificationVersion::NIL_VERSION
|
28
|
+
end
|
29
|
+
content_hash = Pact::MatchingRules.merge(hash['content'], hash['content']['matchingRules'], opts)
|
30
|
+
content = Pact::ConsumerContract::Message::Content.from_hash(content_hash)
|
27
31
|
new(symbolize_keys(hash).merge(content: content))
|
28
32
|
end
|
29
33
|
|
data/lib/pact/message/cli.rb
CHANGED
@@ -13,7 +13,8 @@ module Pact
|
|
13
13
|
def update(message)
|
14
14
|
require 'pact/message'
|
15
15
|
require 'pact/message/consumer/update_pact'
|
16
|
-
|
16
|
+
pact_specification_version = Pact::SpecificationVersion.new(options.pact_specification_version)
|
17
|
+
message = Pact::Message.from_hash(JSON.parse(message), { pact_specification_version: pact_specification_version })
|
17
18
|
Pact::Message::Consumer::UpdatePact.call(message, options.pact_dir, options.consumer, options.provider, options.pact_specification_version)
|
18
19
|
end
|
19
20
|
end
|
data/lib/pact/message/version.rb
CHANGED
data/pact-message.gemspec
CHANGED
@@ -40,4 +40,6 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.add_development_dependency "rake", "~> 10.0"
|
41
41
|
spec.add_development_dependency "rspec", "~> 3.0"
|
42
42
|
spec.add_development_dependency "pry-byebug"
|
43
|
+
spec.add_development_dependency 'conventional-changelog', '~>1.2'
|
44
|
+
spec.add_development_dependency 'bump', '~> 0.5'
|
43
45
|
end
|
data/script/release.sh
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
set -e
|
3
|
+
|
4
|
+
git reset HEAD CHANGELOG.md lib/pact/message/version.rb # avoid accidentally double incrementing when previous run fails
|
5
|
+
git checkout -- lib/pact/message/version.rb # avoid accidentally double incrementing when previous run fails
|
6
|
+
# git checkout -- CHANGELOG.md # avoid accidentally double incrementing when previous run fails
|
7
|
+
bundle exec bump ${1:-minor} --no-commit
|
8
|
+
bundle exec rake generate_changelog
|
9
|
+
git add CHANGELOG.md lib/pact/message/version.rb
|
10
|
+
git commit -m "chore(release): version $(ruby -r ./lib/pact/message/version.rb -e "puts Pact::Message::VERSION")"
|
11
|
+
bundle exec rake tag_for_release
|
12
|
+
bundle exec rake release
|
data/tasks/release.rake
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
desc 'Generate change log'
|
2
|
+
task :generate_changelog do
|
3
|
+
require 'conventional_changelog'
|
4
|
+
require 'pact/message/version'
|
5
|
+
ConventionalChangelog::Generator.new.generate! version: "v#{Pact::Message::VERSION}"
|
6
|
+
end
|
7
|
+
|
8
|
+
desc 'Tag for release'
|
9
|
+
task :tag_for_release do | t, args |
|
10
|
+
require 'pact/message/version'
|
11
|
+
version = Pact::Message::VERSION
|
12
|
+
command = "git tag -a v#{version} -m \"chore(release): version #{version}\" && git push origin v#{version}"
|
13
|
+
puts command
|
14
|
+
puts `#{command}`
|
15
|
+
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.1
|
4
|
+
version: 0.2.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: 2018-03-
|
11
|
+
date: 2018-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pact-support
|
@@ -108,6 +108,34 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: conventional-changelog
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.2'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.2'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: bump
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.5'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.5'
|
111
139
|
description:
|
112
140
|
email:
|
113
141
|
- beth@bethesque.com
|
@@ -121,6 +149,7 @@ files:
|
|
121
149
|
- ".gitignore"
|
122
150
|
- ".rspec"
|
123
151
|
- ".travis.yml"
|
152
|
+
- CHANGELOG.md
|
124
153
|
- CONTRIBUTING.md
|
125
154
|
- DEVELOPER_DOCUMENTATION.md
|
126
155
|
- Gemfile
|
@@ -152,6 +181,8 @@ files:
|
|
152
181
|
- lib/pact/message/consumer_contract_parser.rb
|
153
182
|
- lib/pact/message/version.rb
|
154
183
|
- pact-message.gemspec
|
184
|
+
- script/release.sh
|
185
|
+
- tasks/release.rake
|
155
186
|
homepage: http://pact.io
|
156
187
|
licenses:
|
157
188
|
- MIT
|