aptible-auth 0.7.0 → 0.7.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: ae72a74b0226dafa4fd0fcdc42c052a922ec1f2c
4
- data.tar.gz: 0195bdaece29eb5dc31dc7f855f5fef1922e6386
3
+ metadata.gz: 2be2c6ded4793b2f3ca17c3f090b2987a3f8d483
4
+ data.tar.gz: d2e407cfb0d6f5c9dd9601728472d9c5932eca7c
5
5
  SHA512:
6
- metadata.gz: bc732dcfb0a6c3927464588ebfc0d7da06dba4fc61c94394637b168e58afed8f506b7ef1212ef6a4bbbf615d17fe1714eae6dc000a87d57b853e9a8649101411
7
- data.tar.gz: 9e98569ee07825b3eb1f786a79df29635e378ac51830843812680d633395a1e05bc7486023ef60b9c30c679728fd4e36bfbb6287694d599bb863ff9083016324
6
+ metadata.gz: 5172825e130142534a25cefa418e728874ab474e8a591eba6a2e5fb17d82be32a8233f99d36b67103e201101ffcb42f71775231551a53e9c3cf38691de099651
7
+ data.tar.gz: b478a51b2f8f710ec4972300ee4007f83ae8a877187f976d02f514bcd199fb6311e02e6853230aac0d7413f14502c9c549f9bacf39ba929c61eaf898eae9d935
@@ -47,6 +47,10 @@ module Aptible
47
47
  !!stripe_subscription_id
48
48
  end
49
49
 
50
+ def privileged_roles
51
+ roles.select(&:privileged?)
52
+ end
53
+
50
54
  def accounts
51
55
  require 'aptible/api'
52
56
 
@@ -34,6 +34,18 @@ module Aptible
34
34
  roles.map(&:organization).uniq(&:id)
35
35
  end
36
36
 
37
+ def organization_roles(organization)
38
+ roles.select do |role|
39
+ role.links['organization'].href == organization.href
40
+ end
41
+ end
42
+
43
+ def organization_privileged_roles(organization)
44
+ privileged_roles.select do |role|
45
+ role.links['organization'].href == organization.href
46
+ end
47
+ end
48
+
37
49
  def operations
38
50
  # TODO: Implement query params for /operations
39
51
  []
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Auth
3
- VERSION = '0.7.0'
3
+ VERSION = '0.7.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.7.0
4
+ version: 0.7.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-08-20 00:00:00.000000000 Z
11
+ date: 2014-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aptible-resource
@@ -205,4 +205,3 @@ test_files:
205
205
  - spec/aptible/auth_spec.rb
206
206
  - spec/shared/set_env.rb
207
207
  - spec/spec_helper.rb
208
- has_rdoc: