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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d8c13460cf708f5e18e6eb88460d82e5198de56
4
- data.tar.gz: 796d6154994eccc679d26147d16fe8c0e9a31952
3
+ metadata.gz: 13a9a1c5462671c49589451c2e28059126fb55ce
4
+ data.tar.gz: 272c8fed5d631caeb508d33322ae5714b1c1ef0f
5
5
  SHA512:
6
- metadata.gz: 0c6be2c7ec992a4686aa7d790d3d5ec13b3e6169f236181399cd5d2427284f9105bdb0e3d360c0c1594c1668d0a0756b077ab5eb4c014c8e72e98931adcbe60b
7
- data.tar.gz: 19391a96c1c2e1fd83e8096dcc13aa6fb3c86ae2c5a9a774d5ae970cde1136574dccc1866aadcce2298f3b75a0f4fe321ac9245ed372505c478a263ab43e601a
6
+ metadata.gz: fd24fd3709dd8822dfebbe52959fe4b38bcb3430a41eefa6a55bd9a641d1bdc8cd657a3031fd77adefc603fa1396d77dcae031b25e4e9b2f5c17e7f47ef45a25
7
+ data.tar.gz: bea438fdaba21b22eb68b4f92b303e8aa0d33f006c5b4c6f28613df734d5711da12d938338af5f01ac84d604f379963f1c7068285b1870b64d91f4b414306c29
@@ -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.1.1'
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
 
@@ -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,9 @@ module Aptible
3
3
  class Membership < Resource
4
4
  belongs_to :role
5
5
  belongs_to :user
6
+
7
+ field :id
8
+ field :created_at, type: Time
6
9
  end
7
10
  end
8
11
  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|
@@ -3,9 +3,11 @@ module Aptible
3
3
  class Role < Resource
4
4
  belongs_to :organization
5
5
 
6
- def privileged?
7
- !!attributes['privileged']
8
- end
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
@@ -2,6 +2,11 @@ module Aptible
2
2
  module Auth
3
3
  class Session < Resource
4
4
  belongs_to :user
5
+
6
+ field :id
7
+ field :verified, type: Aptible::Resource::Boolean
8
+ field :created_at, type: Time
9
+ field :updated_at, type: Time
5
10
  end
6
11
  end
7
12
  end
@@ -3,9 +3,14 @@ module Aptible
3
3
  class User < Resource
4
4
  has_many :roles
5
5
 
6
- def verified?
7
- !!attributes['verified']
8
- end
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)
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Auth
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
5
5
  end
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.0
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-20 00:00:00.000000000 Z
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.1.1
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.1.1
26
+ version: 0.2.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gem_config
29
29
  requirement: !ruby/object:Gem::Requirement