pact-support 1.17.0 → 1.18.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
  SHA256:
3
- metadata.gz: ffae927e01cda7b4e78b62dbf4e60d0c5b51907f882b1aedf9e81d37458033a7
4
- data.tar.gz: 3dae3b8274a7a9f3b8631e209eb14999758e6eb3f501826928f0860ff4a2c0cc
3
+ metadata.gz: de37b2bfd95226cbb14e9aa0fa8819b93fc30d74e6877125d793b36f79e4d018
4
+ data.tar.gz: 8068cfe03241082eb4fa06cfda9ba03428d631bd678cde7587273b2418786fe3
5
5
  SHA512:
6
- metadata.gz: d285d2dd1ecbbd99576591c816d4e0ce867313672e20ad3f4f113c5520378e7b83b533557734ba7315a2b1fa776e052e5457c860b40f3ef5dc82d0a251a327c3
7
- data.tar.gz: 3209c1f4ce99e5765c98b86dc67b53cd0f364d71b576208cda7982d830610eb93a01402b896adb33d4feee21c46fb7c3ffccb968b0d3991fb1365df3ab91ba00
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
- request = Pact::Request::Expected.from_hash(request_hash)
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 => e
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
- options[:username] = uri.user unless options[:username]
60
- options[:password] = uri.password unless options[:password]
61
- end
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 'term/ansicolor'
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
- '"' + C.color(colour, match.downcase.gsub(/^"|":$/,'')) + '":'
54
+ '"' + Rainbow(match.downcase.gsub(/^"|":$/,'')).send(colour) + '":'
57
55
  end
58
56
 
59
57
  end
@@ -42,7 +42,7 @@ module Pact
42
42
  end
43
43
 
44
44
  def recurse_hash hash, path
45
- recursed = hash.each_with_object({}) do | (k, v), new_hash |
45
+ hash.each_with_object({}) do | (k, v), new_hash |
46
46
  new_path = path + "['#{k}']"
47
47
  new_hash[k] = recurse(v, new_path)
48
48
  end
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Support
3
- VERSION = "1.17.0"
3
+ VERSION = "1.18.0"
4
4
  end
5
5
  end
data/lib/pact/term.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'pact/shared/active_support_support'
2
+ Regexp.remove_method(:as_json) if Regexp.method_defined?(:as_json)
2
3
  require 'json/add/regexp'
3
4
  require 'pact/errors'
4
5
 
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 'term/ansicolor'
18
+ require 'rainbow'
19
19
  require 'pact/tasks/task_helper'
20
20
 
21
21
  include Pact::TaskHelper
22
22
 
23
- abort(::Term::ANSIColor.red("Please provide a pact URI. eg. rake pact:verify:at[../my-consumer/spec/pacts/my_consumer-my_provider.json]")) unless args[:pact_uri]
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.17.0
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: 2021-10-01 00:00:00.000000000 Z
15
+ date: 2022-06-14 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
- name: term-ansicolor
18
+ name: rainbow
19
19
  requirement: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - "~>"
22
22
  - !ruby/object:Gem::Version
23
- version: '1.0'
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: '1.0'
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.2.28
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: []