pact-support 1.16.3 → 1.16.4

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: 21b34941c3f361a8b7de218ebbbcd6327da07bdbc751a44a05fec1a3b9c1c54b
4
- data.tar.gz: 7b0fa37d00fcafe3850b22ce19657e1cbef146d3d9ee77d1cc92503376409289
3
+ metadata.gz: c13a4b7ad88f078970d7e0991fc8e7406a20267b038d67b3c583003b3b18814e
4
+ data.tar.gz: f72c487f5e7f11a5d6db48812028130487d0a0d4a9ac1f8c2726bf5d8d487d4c
5
5
  SHA512:
6
- metadata.gz: aa6230402d114538c81e6d1a90bed0267f86a21a18e9bda1cd75545a8853e9bebce1b1babb965e2eb07a50cb863f9c2567720f31efd884e3aeca8d74cd442094
7
- data.tar.gz: 7b35d7033cba46c342f0eba471e5bbb3409875a9715fed8e4033903e1332d601d449d505b9d0ebd9ae789607abcdf8398cae4df65b9834542407c29c83b451ff
6
+ metadata.gz: 985481757b4ec8880946efceb5929aceb818defcd80233ef908ed0cb8f55ed4e8ceb6c9f6e89cee4856dd581fd42dca4b6dc1d244dc9dece6a51fffe456c6915
7
+ data.tar.gz: 8c5bfdc029b6461fb80a64089ef1d003f3dc0f93d2677020c37f9bd733423e1e976058f14199b2d8dcc36e5a648450d786d91a6fb215dbef0aab1e453c56d52a
@@ -1,3 +1,10 @@
1
+ <a name="v1.16.4"></a>
2
+ ### v1.16.4 (2020-11-13)
3
+
4
+ #### Bug Fixes
5
+
6
+ * ensure expected and actual query strings are parsed consistently ([4e9ca9c](/../../commit/4e9ca9c))
7
+
1
8
  <a name="v1.16.3"></a>
2
9
  ### v1.16.3 (2020-11-10)
3
10
 
@@ -18,7 +18,7 @@ module Pact
18
18
  parsed_query = parse_query(query_string)
19
19
 
20
20
  # If Rails nested params...
21
- if parsed_query.keys.any?{ | key| key.include?("[") }
21
+ if parsed_query.keys.any?{ | key| key =~ /\[.*\]/ }
22
22
  parse_nested_query(query_string)
23
23
  else
24
24
  parsed_query.each_with_object({}) do | (key, value), new_hash |
@@ -110,7 +110,7 @@ module Pact
110
110
  end
111
111
 
112
112
  def self.params_hash_has_key?(hash, key)
113
- return false if /\[\]/.match?(key)
113
+ return false if key =~ /\[\]/
114
114
 
115
115
  key.split(/[\[\]]+/).inject(hash) do |h, part|
116
116
  next h if part == ''
@@ -32,7 +32,7 @@ module Pact
32
32
  # from the actual query string.
33
33
  def difference(other)
34
34
  require 'pact/matchers' # avoid recursive loop between this file, pact/reification and pact/matchers
35
- Pact::Matchers.diff(query, symbolize_keys(CGI::parse(other.query)), allow_unexpected_keys: false)
35
+ Pact::Matchers.diff(query, symbolize_keys(convert_to_hash_of_arrays(Query.parse_string(other.query))), allow_unexpected_keys: false)
36
36
  end
37
37
 
38
38
  def query
@@ -3,9 +3,7 @@ require 'pact/consumer_contract/headers'
3
3
  require 'pact/consumer_contract/query'
4
4
 
5
5
  module Pact
6
-
7
6
  module Request
8
-
9
7
  class Base
10
8
  include Pact::SymbolizeKeys
11
9
 
@@ -91,7 +89,6 @@ module Pact
91
89
  def display_query
92
90
  (query.nil? || query.empty?) ? '' : "?#{Pact::Reification.from_term(query)}"
93
91
  end
94
-
95
92
  end
96
93
  end
97
- end
94
+ end
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Support
3
- VERSION = "1.16.3"
3
+ VERSION = "1.16.4"
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.16.3
4
+ version: 1.16.4
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-10 00:00:00.000000000 Z
15
+ date: 2020-11-12 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: randexp