aptible-resource 0.3.4 → 0.3.5

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
  SHA1:
3
- metadata.gz: 3f853b404f5592c14f4604e6338d0c6f6e563540
4
- data.tar.gz: 749de9d4d56f4c106595206d1fe287ec0151331d
3
+ metadata.gz: 8fe1293ad299a7eccf1b4138383c225b9957437d
4
+ data.tar.gz: 9c7ca8e1b928ee4518b213cbf3869c02d68e24a3
5
5
  SHA512:
6
- metadata.gz: eaedd3c259edab267e029a7b5a908b6dad516561cd0a884775f4a993cb249414b2cf34535fbfdc8c3ab85ca656bfe7a0ae5d71f0f5fa8cd8892336b1a439ab9f
7
- data.tar.gz: a5358768fbac108d5863074a0b13d0fb42e4febc13efc9cb1402118ed12b7e7dd8f3cb560c45cc7bfb31415c91ad5e0a87064ee37edc5b3350a73122f4fea026
6
+ metadata.gz: d97541a3c1e762fae33810ac916f8143b759730f12edd809a4218e9cdfd5a10c37ae0fbd0e9a3a48b1afa63072ae759c0afde9092068b93d4f4b9f4cb34590bc
7
+ data.tar.gz: 4ba7510ecde1e02264c534f7ac0b448f74349e26d4fcb37a964da5b31dcbde90b0b5215355006d7a52d103f94510403bbe8fe66ab6d288b0ce0c230efc1aedfb
@@ -58,7 +58,10 @@ module Aptible
58
58
  end
59
59
 
60
60
  def self.find(id, options = {})
61
- find_by_url("#{collection_href}/#{id}", options)
61
+ params = options.except(:token, :root, :namespace, :headers)
62
+ params = normalize_params(params)
63
+ params = params.empty? ? '' : '?' + params.to_query
64
+ find_by_url("#{collection_href}/#{id}#{params}", options)
62
65
  end
63
66
 
64
67
  def self.find_by_url(url, options = {})
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Resource
3
- VERSION = '0.3.4'
3
+ VERSION = '0.3.5'
4
4
  end
5
5
  end
@@ -24,6 +24,12 @@ describe Aptible::Resource::Base do
24
24
  expect(Api::Mainframe).to receive(:find_by_url).with url, {}
25
25
  Api::Mainframe.find(42)
26
26
  end
27
+
28
+ it 'should call find_by_url with query params' do
29
+ url = '/mainframes/42?test=123'
30
+ expect(Api::Mainframe).to receive(:find_by_url).with url, test: 123
31
+ Api::Mainframe.find(42, test: 123)
32
+ end
27
33
  end
28
34
 
29
35
  describe '.all' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-16 00:00:00.000000000 Z
11
+ date: 2016-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uri_template
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  version: '0'
226
226
  requirements: []
227
227
  rubyforge_project:
228
- rubygems_version: 2.4.5
228
+ rubygems_version: 2.5.1
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: Foundation classes for Aptible resource server gems