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 +4 -4
- data/lib/aptible/resource/base.rb +4 -1
- data/lib/aptible/resource/version.rb +1 -1
- data/spec/aptible/resource/base_spec.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fe1293ad299a7eccf1b4138383c225b9957437d
|
4
|
+
data.tar.gz: 9c7ca8e1b928ee4518b213cbf3869c02d68e24a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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 = {})
|
@@ -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
|
+
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-
|
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.
|
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
|