aptible-api 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/aptible-api.gemspec +1 -1
- data/lib/aptible/api/resource.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c774e10f821b26ab78c7eeccf051c95a03e916a
|
4
|
+
data.tar.gz: b864ee0b17047f0f44429f17923c5bcc8759507e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 893fa1a9ec6a8933be486363134656dd5b8b557c230d6f45d52223d8c3f024fdebc834348dff740d60a03b6543a0c05524e6d397a574cd892ecd5675f913784d
|
7
|
+
data.tar.gz: 1ba6d451ac6b92c2ba8f7195fe6912e1df21f8cb9d0b52d444b821729a49096f9d1831c289dc43a1e420bfcec3d234df902270ce79f0957109b411d9c7902fbe
|
data/aptible-api.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'English'
|
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'aptible-api'
|
9
|
-
spec.version = '0.4.
|
9
|
+
spec.version = '0.4.4'
|
10
10
|
spec.authors = ['Frank Macreery']
|
11
11
|
spec.email = ['frank@macreery.com']
|
12
12
|
spec.description = %q(Ruby client for api.aptible.com)
|
data/lib/aptible/api/resource.rb
CHANGED
@@ -22,6 +22,7 @@ module Aptible
|
|
22
22
|
|
23
23
|
def self.all(options = {})
|
24
24
|
resource = find_by_url(collection_url, options)
|
25
|
+
return [] unless resource
|
25
26
|
resource.send(basename).entries
|
26
27
|
end
|
27
28
|
|
@@ -32,9 +33,12 @@ module Aptible
|
|
32
33
|
def self.find_by_url(url, options = {})
|
33
34
|
# REVIEW: Should exception be raised if return type mismatch?
|
34
35
|
new(options).find_by_url(url)
|
35
|
-
rescue
|
36
|
-
|
37
|
-
|
36
|
+
rescue HyperResource::ClientError => e
|
37
|
+
if e.response.status == 404
|
38
|
+
return nil
|
39
|
+
else
|
40
|
+
raise e
|
41
|
+
end
|
38
42
|
end
|
39
43
|
|
40
44
|
def self.create(options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_config
|