aptible-auth 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/aptible-auth.gemspec +1 -1
- data/lib/aptible/auth/adapter.rb +1 -0
- data/lib/aptible/auth/client.rb +1 -0
- data/lib/aptible/auth/membership.rb +1 -0
- data/lib/aptible/auth/organization.rb +1 -0
- data/lib/aptible/auth/resource.rb +8 -3
- data/lib/aptible/auth/role.rb +1 -0
- data/lib/aptible/auth/session.rb +1 -0
- data/lib/aptible/auth/token.rb +1 -0
- data/lib/aptible/auth/user.rb +1 -0
- 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: 43d3b3d8495d9fa28087f251c458b515abbe30b9
|
4
|
+
data.tar.gz: 39012d00859e3399cb74e143bcfceb1da538b34c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 236005d58bd5fbe2852c82115dbdfa5a8ede1fbc676c63768cf2ff65c9fac4d0c05650583832236237d091c006ae11f92149371565ffd1547c515c324f66bf54
|
7
|
+
data.tar.gz: ac7ebe93e7342b4a87820ae5aaf843c6dda08116b8860f5451e5b04c4f5a12e5617a64ff067ab1bfb86742412e15e87712e46a1303453be5f4e30a52e0ed3551
|
data/aptible-auth.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'English'
|
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'aptible-auth'
|
9
|
-
spec.version = '0.4.
|
9
|
+
spec.version = '0.4.2'
|
10
10
|
spec.authors = ['Frank Macreery']
|
11
11
|
spec.email = ['frank@macreery.com']
|
12
12
|
spec.description = 'Ruby client for auth.aptible.com'
|
data/lib/aptible/auth/adapter.rb
CHANGED
data/lib/aptible/auth/client.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'active_support/inflector'
|
2
2
|
|
3
|
+
# rubocop:disable ClassAndModuleChildren
|
3
4
|
module Aptible
|
4
5
|
class Auth::Resource < Auth
|
5
6
|
def self.basename
|
@@ -13,6 +14,7 @@ module Aptible
|
|
13
14
|
|
14
15
|
def self.all(options = {})
|
15
16
|
resource = find_by_url(collection_url, options)
|
17
|
+
return [] unless resource
|
16
18
|
resource.send(basename).entries
|
17
19
|
end
|
18
20
|
|
@@ -23,9 +25,12 @@ module Aptible
|
|
23
25
|
def self.find_by_url(url, options = {})
|
24
26
|
# REVIEW: Should exception be raised if return type mismatch?
|
25
27
|
new(options).find_by_url(url)
|
26
|
-
rescue
|
27
|
-
|
28
|
-
|
28
|
+
rescue HyperResource::ClientError => e
|
29
|
+
if e.response.status == 404
|
30
|
+
return nil
|
31
|
+
else
|
32
|
+
raise e
|
33
|
+
end
|
29
34
|
end
|
30
35
|
|
31
36
|
def self.create(options)
|
data/lib/aptible/auth/role.rb
CHANGED
data/lib/aptible/auth/session.rb
CHANGED
data/lib/aptible/auth/token.rb
CHANGED
data/lib/aptible/auth/user.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
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
|