aptible-auth 0.8.8 → 0.9.0
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 -0
- data/lib/aptible/auth/organization.rb +6 -1
- data/lib/aptible/auth/version.rb +1 -1
- data/spec/aptible/auth/organization_spec.rb +2 -2
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6a1bb671ba72edd68c9996d1ff790b7fa3f43fc
|
4
|
+
data.tar.gz: 6c5d617a4dcc968932248036e09fd7ea08025aec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50cbaba9a177ce9e8a07b6cc2cd7d8e3afda43b91aed09df402e1a627623deea7a1201f0f29c0921635f051ecade5724e04e4de96c6af28393d86af5fd4a298f
|
7
|
+
data.tar.gz: a07ab1141877e19ad589fb7556f1e90e366b732af3fae8433d3b2d86d64aec06541b189237910a96564d7ba857acb7f8932e728a289913e5ea95340334d78af6
|
data/aptible-auth.gemspec
CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^spec/})
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
+
spec.add_dependency 'aptible-billing'
|
22
23
|
spec.add_dependency 'aptible-resource', '>= 0.2.1'
|
23
24
|
spec.add_dependency 'stripe', '>= 1.13.0'
|
24
25
|
spec.add_dependency 'gem_config'
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'stripe'
|
2
|
+
require 'aptible/billing'
|
2
3
|
require 'aptible/billforward'
|
3
4
|
|
4
5
|
module Aptible
|
@@ -44,7 +45,11 @@ module Aptible
|
|
44
45
|
end
|
45
46
|
|
46
47
|
def can_manage_compliance?
|
47
|
-
%w(production pilot).include?(plan)
|
48
|
+
%w(production pilot).include?(billing_details.plan)
|
49
|
+
end
|
50
|
+
|
51
|
+
def billing_details
|
52
|
+
@billing_details ||= Aptible::Billing::BillingDetail.find(id)
|
48
53
|
end
|
49
54
|
|
50
55
|
def subscription
|
data/lib/aptible/auth/version.rb
CHANGED
@@ -21,12 +21,12 @@ describe Aptible::Auth::Organization do
|
|
21
21
|
|
22
22
|
describe '#can_manage_compliance?' do
|
23
23
|
it 'should return true with compliance plan' do
|
24
|
-
subject.stub(:
|
24
|
+
subject.stub(:billing_details) { OpenStruct.new(plan: 'production') }
|
25
25
|
expect(subject.can_manage_compliance?).to be_true
|
26
26
|
end
|
27
27
|
|
28
28
|
it 'should return false without compliance plan' do
|
29
|
-
subject.stub(:
|
29
|
+
subject.stub(:billing_details) { OpenStruct.new(plan: 'platform') }
|
30
30
|
expect(subject.can_manage_compliance?).to be_false
|
31
31
|
end
|
32
32
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aptible-billing
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: aptible-resource
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
221
|
version: '0'
|
208
222
|
requirements: []
|
209
223
|
rubyforge_project:
|
210
|
-
rubygems_version: 2.
|
224
|
+
rubygems_version: 2.4.5
|
211
225
|
signing_key:
|
212
226
|
specification_version: 4
|
213
227
|
summary: Ruby client for auth.aptible.com
|