resource_set 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f936e09657915c36808b2b1a0c2e368fafa21a12
4
- data.tar.gz: e713a7190fe61f818b6f3b518bb8ce07325cfb0b
3
+ metadata.gz: 199e6cae46b5d40e23d93e44b622907af24b9f6f
4
+ data.tar.gz: 85895526b28f26f827538d09306c9967fc2d7015
5
5
  SHA512:
6
- metadata.gz: fc3b5b8e875e1349b8604d1c570ddc20c1efddbda3a24430e98d45d0975665ff6e7e00a50ca41cfde5709a92788c5182060925d006c0f45889006f8bf778721c
7
- data.tar.gz: 054b597cfff3d5d71693b52117b88183cf9108094ff7cabd9a16398c53a4fc4bd670c39249795c1c0939e8234faf3ff615ba48defc59ca33cd11c8024bd80502
6
+ metadata.gz: 1a0ccf19ca424af833707141818c4035ae68f6da3525ff15e2b6dfb4c2cc1acf235ba3b2f3f139c371f0a60ebb8087b2326bae5bb3d568f388a646cc800fafeb
7
+ data.tar.gz: 8bea098ff031f0c9050bf9d8d7489b1a20a2ab241c9740f1c34ed53ee45e289699775afa3e6819f8839de2688db77dd3a16848301df88bb5ae86384dd898e0be
@@ -3,6 +3,11 @@ Resource Set Changelog
3
3
 
4
4
  ### master
5
5
 
6
+ ### [v1.0.2][v1.0.2] (April 10, 2018)
7
+
8
+ * Added support for duplicate query parameter keys
9
+ ([#9](https://github.com/kyrylo/resource_set/pull/9))
10
+
6
11
  ### [v1.0.1][v1.0.1] (September 8, 2017)
7
12
 
8
13
  * Fixed Ruby warnings ([#7](https://github.com/kyrylo/resource_set/pull/7))
@@ -14,3 +19,4 @@ Resource Set Changelog
14
19
 
15
20
  [v1.0.0]: https://github.com/kyrylo/resource_set/releases/tag/v1.0.0
16
21
  [v1.0.1]: https://github.com/kyrylo/resource_set/releases/tag/v1.0.1
22
+ [v1.0.2]: https://github.com/kyrylo/resource_set/releases/tag/v1.0.2
@@ -6,6 +6,10 @@ module ResourceSet
6
6
  @action = action
7
7
  @resource = resource
8
8
  @connection = resource.connection
9
+
10
+ # Support for duplicate query parameter keys.
11
+ @connection.options.params_encoder = Faraday::FlatParamsEncoder
12
+
9
13
  @args = args
10
14
  @options = args.last.kind_of?(Hash) ? args.last : {}
11
15
  @response = nil
@@ -1,3 +1,3 @@
1
1
  module ResourceSet
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -104,13 +104,17 @@ RSpec.describe ResourceSet::ActionInvoker do
104
104
 
105
105
  context 'for requests with query params' do
106
106
  it 'appends the query parameters to the endpoint' do
107
- action.query_keys :per_page, :page
107
+ action.query_keys :per_page, :page, :name
108
108
  action.path '/paged'
109
109
 
110
- result = ResourceSet::ActionInvoker.call(action, resource, page: 3, per_page: 300)
110
+ result = ResourceSet::ActionInvoker.call(
111
+ action, resource, page: 3, name: %w(foo bar)
112
+ )
111
113
  addressed = Addressable::URI.parse(result)
112
114
 
113
- expect(addressed.query_values).to include('per_page' => '300', 'page' => '3')
115
+ expect(addressed.query_values(Array)).to eq(
116
+ [%w(name foo), %w(name bar), %w(page 3)]
117
+ )
114
118
  end
115
119
  end
116
120
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resource_set
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Ross
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-09-07 00:00:00.000000000 Z
13
+ date: 2018-04-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  requirements: []
184
184
  rubyforge_project:
185
- rubygems_version: 2.6.8
185
+ rubygems_version: 2.6.13
186
186
  signing_key:
187
187
  specification_version: 4
188
188
  summary: Resource Set provides tools to aid in making API Clients. Such as URL resolving,