aptible-auth 0.5.0 → 0.5.1
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/client.rb +7 -0
- data/lib/aptible/auth/membership.rb +3 -0
- data/lib/aptible/auth/organization.rb +6 -0
- data/lib/aptible/auth/role.rb +5 -3
- data/lib/aptible/auth/session.rb +5 -0
- data/lib/aptible/auth/user.rb +8 -3
- data/lib/aptible/auth/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13a9a1c5462671c49589451c2e28059126fb55ce
|
4
|
+
data.tar.gz: 272c8fed5d631caeb508d33322ae5714b1c1ef0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd24fd3709dd8822dfebbe52959fe4b38bcb3430a41eefa6a55bd9a641d1bdc8cd657a3031fd77adefc603fa1396d77dcae031b25e4e9b2f5c17e7f47ef45a25
|
7
|
+
data.tar.gz: bea438fdaba21b22eb68b4f92b303e8aa0d33f006c5b4c6f28613df734d5711da12d938338af5f01ac84d604f379963f1c7068285b1870b64d91f4b414306c29
|
data/aptible-auth.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = spec.files.grep(/^spec\//)
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
-
spec.add_dependency 'aptible-resource', '>= 0.
|
22
|
+
spec.add_dependency 'aptible-resource', '>= 0.2.1'
|
23
23
|
spec.add_dependency 'gem_config'
|
24
24
|
spec.add_dependency 'oauth2-aptible'
|
25
25
|
|
data/lib/aptible/auth/client.rb
CHANGED
@@ -2,6 +2,13 @@ module Aptible
|
|
2
2
|
module Auth
|
3
3
|
class Client < Resource
|
4
4
|
belongs_to :user
|
5
|
+
|
6
|
+
field :id
|
7
|
+
field :name
|
8
|
+
field :client_id
|
9
|
+
field :privileged, type: Aptible::Resource::Boolean
|
10
|
+
field :created_at, type: Time
|
11
|
+
field :updated_at, type: Time
|
5
12
|
end
|
6
13
|
end
|
7
14
|
end
|
@@ -3,6 +3,12 @@ module Aptible
|
|
3
3
|
class Organization < Resource
|
4
4
|
has_many :roles
|
5
5
|
|
6
|
+
field :id
|
7
|
+
field :name
|
8
|
+
field :handle
|
9
|
+
field :created_at, type: Time
|
10
|
+
field :updated_at, type: Time
|
11
|
+
|
6
12
|
def security_officer
|
7
13
|
# REVIEW: Examine underlying data model for a less arbitrary solution
|
8
14
|
security_officers_role = roles.find do |role|
|
data/lib/aptible/auth/role.rb
CHANGED
@@ -3,9 +3,11 @@ module Aptible
|
|
3
3
|
class Role < Resource
|
4
4
|
belongs_to :organization
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
field :id
|
7
|
+
field :name
|
8
|
+
field :privileged, type: Aptible::Resource::Boolean
|
9
|
+
field :created_at, type: Time
|
10
|
+
field :updated_at, type: Time
|
9
11
|
end
|
10
12
|
end
|
11
13
|
end
|
data/lib/aptible/auth/session.rb
CHANGED
data/lib/aptible/auth/user.rb
CHANGED
@@ -3,9 +3,14 @@ module Aptible
|
|
3
3
|
class User < Resource
|
4
4
|
has_many :roles
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
field :id
|
7
|
+
field :name
|
8
|
+
field :email
|
9
|
+
field :username
|
10
|
+
field :verified, type: Aptible::Resource::Boolean
|
11
|
+
field :public_key_fingerprint
|
12
|
+
field :created_at, type: Time
|
13
|
+
field :updated_at, type: Time
|
9
14
|
|
10
15
|
def organizations
|
11
16
|
roles.map(&:organization)
|
data/lib/aptible/auth/version.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.5.
|
4
|
+
version: 0.5.1
|
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-04-
|
11
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aptible-resource
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.2.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.2.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: gem_config
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|