pact-support 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/pact/consumer_contract/interaction_v2_parser.rb +1 -1
- data/lib/pact/consumer_contract/pact_file.rb +4 -4
- data/lib/pact/matchers/embedded_diff_formatter.rb +2 -4
- data/lib/pact/matching_rules/merge.rb +1 -1
- data/lib/pact/support/version.rb +1 -1
- data/lib/pact/term.rb +1 -0
- data/lib/tasks/pact.rake +2 -2
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de37b2bfd95226cbb14e9aa0fa8819b93fc30d74e6877125d793b36f79e4d018
|
4
|
+
data.tar.gz: 8068cfe03241082eb4fa06cfda9ba03428d631bd678cde7587273b2418786fe3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e46c8c29d66f7c03550980930a91a9a2237df1e5f4f2418a26df5f2e4bab6d78021e4c578a448d2233bd3c4c7bdb8f19b08fd02429015680ff904f07b2c363af
|
7
|
+
data.tar.gz: f716a73d157be342c86a5e0bca7af0b891af640c1095bd8d75dd78e9698d722e73d1b03b06901354442a32fe247397ba0848106602b4735dc06fc994bc8045ca
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
<a name="v1.18.0"></a>
|
2
|
+
### v1.18.0 (2022-03-28)
|
3
|
+
|
4
|
+
#### Features
|
5
|
+
|
6
|
+
* replace term-ansicolor with rainbow ([e8b6ada](/../../commit/e8b6ada))
|
7
|
+
|
8
|
+
#### Bug Fixes
|
9
|
+
|
10
|
+
* Fixup ruby warnings (#96) ([cee7113](/../../commit/cee7113))
|
11
|
+
|
1
12
|
<a name="v1.17.0"></a>
|
2
13
|
### v1.17.0 (2021-10-01)
|
3
14
|
|
@@ -38,7 +38,7 @@ module Pact
|
|
38
38
|
if query_is_string
|
39
39
|
request_hash['query'] = Pact::QueryHash.new(request_hash['query'], original_query_string, Pact::Query.parsed_as_nested?(request_hash['query']))
|
40
40
|
end
|
41
|
-
|
41
|
+
Pact::Request::Expected.from_hash(request_hash)
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.parse_response response_hash, options
|
@@ -35,7 +35,7 @@ module Pact
|
|
35
35
|
def save_pactfile_to_tmp pact, name
|
36
36
|
::FileUtils.mkdir_p Pact.configuration.tmp_dir
|
37
37
|
::File.open(Pact.configuration.tmp_dir + "/#{name}", "w") { |file| file << pact}
|
38
|
-
rescue Errno::EROFS
|
38
|
+
rescue Errno::EROFS
|
39
39
|
# do nothing, probably on RunKit
|
40
40
|
end
|
41
41
|
|
@@ -56,9 +56,9 @@ module Pact
|
|
56
56
|
def get_remote_with_retry(uri_string, options)
|
57
57
|
uri = URI(uri_string)
|
58
58
|
if uri.userinfo
|
59
|
-
|
60
|
-
|
61
|
-
|
59
|
+
options[:username] = uri.user unless options[:username]
|
60
|
+
options[:password] = uri.password unless options[:password]
|
61
|
+
end
|
62
62
|
((options[:retry_limit] || RETRY_LIMIT) + 1).times do |i|
|
63
63
|
begin
|
64
64
|
response = get_remote(uri, options)
|
@@ -1,13 +1,11 @@
|
|
1
1
|
require 'pact/shared/active_support_support'
|
2
|
-
require '
|
2
|
+
require 'rainbow'
|
3
3
|
|
4
4
|
module Pact
|
5
5
|
module Matchers
|
6
6
|
class EmbeddedDiffFormatter
|
7
7
|
|
8
8
|
include Pact::ActiveSupportSupport
|
9
|
-
C = ::Term::ANSIColor
|
10
|
-
|
11
9
|
|
12
10
|
EXPECTED = /"EXPECTED([A-Z_]*)":/
|
13
11
|
|
@@ -53,7 +51,7 @@ module Pact
|
|
53
51
|
end
|
54
52
|
|
55
53
|
def coloured_key match, colour
|
56
|
-
'"' +
|
54
|
+
'"' + Rainbow(match.downcase.gsub(/^"|":$/,'')).send(colour) + '":'
|
57
55
|
end
|
58
56
|
|
59
57
|
end
|
data/lib/pact/support/version.rb
CHANGED
data/lib/pact/term.rb
CHANGED
data/lib/tasks/pact.rake
CHANGED
@@ -15,12 +15,12 @@ namespace :pact do
|
|
15
15
|
|
16
16
|
desc "Verifies the pact at the given URI against this service provider."
|
17
17
|
task 'verify:at', :pact_uri do | t, args |
|
18
|
-
require '
|
18
|
+
require 'rainbow'
|
19
19
|
require 'pact/tasks/task_helper'
|
20
20
|
|
21
21
|
include Pact::TaskHelper
|
22
22
|
|
23
|
-
abort(
|
23
|
+
abort(Rainbow("Please provide a pact URI. eg. rake pact:verify:at[../my-consumer/spec/pacts/my_consumer-my_provider.json]").red) unless args[:pact_uri]
|
24
24
|
handle_verification_failure do
|
25
25
|
execute_pact_verify args[:pact_uri]
|
26
26
|
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.
|
4
|
+
version: 1.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Fraser
|
@@ -9,25 +9,25 @@ authors:
|
|
9
9
|
- Brent Snook
|
10
10
|
- Ronald Holshausen
|
11
11
|
- Beth Skurrie
|
12
|
-
autorequire:
|
12
|
+
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2022-06-14 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
|
-
name:
|
18
|
+
name: rainbow
|
19
19
|
requirement: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
21
|
- - "~>"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
23
|
+
version: 3.1.1
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
30
|
+
version: 3.1.1
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: awesome_print
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
@@ -216,7 +216,7 @@ dependencies:
|
|
216
216
|
- - "~>"
|
217
217
|
- !ruby/object:Gem::Version
|
218
218
|
version: '0.5'
|
219
|
-
description:
|
219
|
+
description:
|
220
220
|
email:
|
221
221
|
- james.fraser@alumni.swinburne.edu
|
222
222
|
- sergei.matheson@gmail.com
|
@@ -304,7 +304,7 @@ homepage: https://github.com/pact-foundation/pact-support
|
|
304
304
|
licenses:
|
305
305
|
- MIT
|
306
306
|
metadata: {}
|
307
|
-
post_install_message:
|
307
|
+
post_install_message:
|
308
308
|
rdoc_options: []
|
309
309
|
require_paths:
|
310
310
|
- lib
|
@@ -319,8 +319,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
319
319
|
- !ruby/object:Gem::Version
|
320
320
|
version: '0'
|
321
321
|
requirements: []
|
322
|
-
rubygems_version: 3.
|
323
|
-
signing_key:
|
322
|
+
rubygems_version: 3.3.15
|
323
|
+
signing_key:
|
324
324
|
specification_version: 4
|
325
325
|
summary: Shared code for Pact gems
|
326
326
|
test_files: []
|