pact-support 1.15.4 → 1.16.3

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: bbf781395b4831b71e7c146cd7b4b4147720735a4d215c03809f63f6914355b6
4
- data.tar.gz: dc33661cde8c26da60d3377152de106a7eb018c936366cf2eb27cefc8b2ec8e5
3
+ metadata.gz: 21b34941c3f361a8b7de218ebbbcd6327da07bdbc751a44a05fec1a3b9c1c54b
4
+ data.tar.gz: 7b0fa37d00fcafe3850b22ce19657e1cbef146d3d9ee77d1cc92503376409289
5
5
  SHA512:
6
- metadata.gz: 23424ffbcfc67d2e1a6f71e451f777ea56b1ad4ea1f5bbc017e40ccd236516ed88faa1724f1cfa5867da9f72904e4e0dd42f3e15aec4638441df44f94cfdc095
7
- data.tar.gz: 0c844a6243463605b30bbb8f0de186603ff7fe93ba032f5ee702b1496b562d4877daafa155d6680077dc8258235049ecf816b52a6bd496b9531f4886ac6f06bf
6
+ metadata.gz: aa6230402d114538c81e6d1a90bed0267f86a21a18e9bda1cd75545a8853e9bebce1b1babb965e2eb07a50cb863f9c2567720f31efd884e3aeca8d74cd442094
7
+ data.tar.gz: 7b35d7033cba46c342f0eba471e5bbb3409875a9715fed8e4033903e1332d601d449d505b9d0ebd9ae789607abcdf8398cae4df65b9834542407c29c83b451ff
@@ -1,3 +1,39 @@
1
+ <a name="v1.16.3"></a>
2
+ ### v1.16.3 (2020-11-10)
3
+
4
+ #### Bug Fixes
5
+
6
+ * add missing params_hash_has_key ([700efa7](/../../commit/700efa7))
7
+
8
+ <a name="v1.16.2"></a>
9
+ ### v1.16.2 (2020-11-07)
10
+
11
+ #### Bug Fixes
12
+
13
+ * removed undefined depth from query ([53a373d](/../../commit/53a373d))
14
+
15
+ <a name="v1.16.1"></a>
16
+ ### v1.16.1 (2020-11-06)
17
+
18
+ #### Bug Fixes
19
+
20
+ * add missing params_hash_type? from Rack ([3195b0a](/../../commit/3195b0a))
21
+
22
+ <a name="v1.16.0"></a>
23
+ ### v1.16.0 (2020-11-04)
24
+
25
+ #### Features
26
+
27
+ * remove runtime dependency on rspec ([aca30e2](/../../commit/aca30e2))
28
+
29
+ <a name="v1.15.5"></a>
30
+ ### v1.15.5 (2020-11-04)
31
+
32
+ #### Bug Fixes
33
+
34
+ * add missing outputs to release workflow ([d565d0f](/../../commit/d565d0f))
35
+ * try different output syntax ([b11e8fb](/../../commit/b11e8fb))
36
+
1
37
  <a name="v1.15.4"></a>
2
38
  ### v1.15.4 (2020-11-04)
3
39
 
@@ -99,12 +99,28 @@ module Pact
99
99
  else
100
100
  params[k] ||= {}
101
101
  raise ParameterTypeError, "expected Hash (got #{params[k].class.name}) for param `#{k}'" unless params_hash_type?(params[k])
102
- params[k] = normalize_params(params[k], after, v, depth - 1)
102
+ params[k] = normalize_params(params[k], after, v)
103
103
  end
104
104
 
105
105
  params
106
106
  end
107
107
 
108
+ def self.params_hash_type?(obj)
109
+ obj.is_a?(Hash)
110
+ end
111
+
112
+ def self.params_hash_has_key?(hash, key)
113
+ return false if /\[\]/.match?(key)
114
+
115
+ key.split(/[\[\]]+/).inject(hash) do |h, part|
116
+ next h if part == ''
117
+ return false unless params_hash_type?(h) && h.key?(part)
118
+ h[part]
119
+ end
120
+
121
+ true
122
+ end
123
+
108
124
  def self.unescape(s, encoding = Encoding::UTF_8)
109
125
  URI.decode_www_form_component(s, encoding)
110
126
  end
@@ -1,4 +1,3 @@
1
- require 'rspec'
2
1
  # This is horrible, must work out a better way of doing this
3
2
  module Pact
4
3
  module RSpec
@@ -19,7 +18,6 @@ module Pact
19
18
  require 'pact/provider/rspec/formatter_rspec_2'
20
19
  Pact::Provider::RSpec::Formatter2
21
20
  end
22
-
23
21
  end
24
22
 
25
23
  def self.full_description example
@@ -31,11 +29,11 @@ module Pact
31
29
  end
32
30
 
33
31
  def self.is_rspec_3
34
- ::RSpec::Core::Formatters.respond_to?(:register)
32
+ defined?(::RSpec) && ::RSpec::Core::Formatters.respond_to?(:register)
35
33
  end
36
34
 
37
35
  def self.is_rspec_2
38
- !is_rspec_3
36
+ defined?(::RSpec) && !is_rspec_3
39
37
  end
40
38
 
41
39
  def self.with_rspec_3
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Support
3
- VERSION = "1.15.4"
3
+ VERSION = "1.16.3"
4
4
  end
5
5
  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.15.4
4
+ version: 1.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Fraser
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2020-11-04 00:00:00.000000000 Z
15
+ date: 2020-11-10 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: randexp
@@ -28,20 +28,6 @@ dependencies:
28
28
  - - "~>"
29
29
  - !ruby/object:Gem::Version
30
30
  version: 0.1.7
31
- - !ruby/object:Gem::Dependency
32
- name: rspec
33
- requirement: !ruby/object:Gem::Requirement
34
- requirements:
35
- - - ">="
36
- - !ruby/object:Gem::Version
37
- version: '2.14'
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- version: '2.14'
45
31
  - !ruby/object:Gem::Dependency
46
32
  name: term-ansicolor
47
33
  requirement: !ruby/object:Gem::Requirement
@@ -84,6 +70,26 @@ dependencies:
84
70
  - - "~>"
85
71
  - !ruby/object:Gem::Version
86
72
  version: '1.4'
73
+ - !ruby/object:Gem::Dependency
74
+ name: rspec
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '2.14'
80
+ - - "<"
81
+ - !ruby/object:Gem::Version
82
+ version: '4.0'
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '2.14'
90
+ - - "<"
91
+ - !ruby/object:Gem::Version
92
+ version: '4.0'
87
93
  - !ruby/object:Gem::Dependency
88
94
  name: rake
89
95
  requirement: !ruby/object:Gem::Requirement