service_contract_webmock 0.1.10 → 0.2.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
- SHA1:
3
- metadata.gz: bb4f315fdc10f76c10786f806d9d3051e694f69c
4
- data.tar.gz: 2d39a293ae483395826206ce091b3a7e623f60e3
2
+ SHA256:
3
+ metadata.gz: 8f9d42579bef47b5a4ce56cf5ba751b53275dc8a552ed2662dca90737a52b28b
4
+ data.tar.gz: 0cfbbeaf00bf05e8ef10e6d750c03ee4b4454301c9cb395f70a8a41538922dd7
5
5
  SHA512:
6
- metadata.gz: 90d36bbe02d3e09f529b232479b1d46fc55f5c4d21e87bf80ce2e2fd49ddaa1f6e938017f09377afc53f01495009bf0858852770818a7c7fe21c36808cafb813
7
- data.tar.gz: cadb35ca481586b2f9f6dbef13adba7449c227828de594f9c129b5f2863fb2d4a47209eee413fbab4ab15b83d0b590dd2e5dbced67fe05248f10f07424389abe
6
+ metadata.gz: 54c6973c731e562821c9587e64c2b62a9a382f8b769d11e96b3b7c4f1608e0010c7679072d084ba9bf5f5266105c17de56a7b868357e2fd52b28604304d31f6a
7
+ data.tar.gz: 1b09f3d753469ce2b4d6f15b1f6a22435661bacd44b67d5cb3d62825a6921033a2a517e0378406af3863b1edabae4b995e6a899b62da705b89ca20cb2b845e4b
@@ -46,9 +46,10 @@ module ServiceContractWebmock
46
46
  end
47
47
 
48
48
  def extract_request(query)
49
- params = CGI.parse(query).except("includes", "page", "per_page", "order")
50
- fields.select {|field| field.name.in?(params.keys)}.each_with_object({}) do |field, acc|
51
- data = params[field.name][0].split(',').flat_map {|value| field.convert(value)}
49
+ params = Rack::Utils.parse_nested_query(query).except("includes", "page", "per_page", "order")
50
+ fields.select {|field| field.name.in?(params.keys) }.each_with_object({}) do |field, acc|
51
+ val = params[field.name]
52
+ data = (val.is_a?(Array) ? val : val.split(',')).flat_map {|value| field.convert(value)}
52
53
  acc[field.name] = data
53
54
  end
54
55
  end
@@ -1,3 +1,3 @@
1
1
  module ServiceContractWebmock
2
- VERSION = "0.1.10"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency "avro"
22
22
  spec.add_dependency "service_contract"
23
23
  spec.add_dependency "webmock"
24
+ spec.add_dependency "rack", ">= 1.0"
24
25
 
25
26
  spec.add_development_dependency "bundler", "~> 1.10"
26
27
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: service_contract_webmock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donald Plummer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-12 00:00:00.000000000 Z
11
+ date: 2019-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rack
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '1.0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
150
  version: '0'
137
151
  requirements: []
138
152
  rubyforge_project:
139
- rubygems_version: 2.4.5.1
153
+ rubygems_version: 2.7.7
140
154
  signing_key:
141
155
  specification_version: 4
142
156
  summary: A library for generating webmock mocks with ServiceContract schemas