aptible-auth 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/aptible-auth.gemspec +1 -0
- data/lib/aptible/auth/client.rb +1 -0
- data/lib/aptible/auth/version.rb +1 -1
- data/spec/aptible/auth/client_spec.rb +21 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 601ef2879f9405a59fabd7f46b2d7590f13789c5
|
4
|
+
data.tar.gz: 21659073f5e655cc2ea986c7c5f8accfc585012c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d54de93252131c3f19929525db1e37b502608e7adecc65cb17668f0aa790ccdeb33ce8e6f76356c8a33bd841484d6772b068aaa739a95a265adfd249760c3eaa
|
7
|
+
data.tar.gz: 9f92c097443b77c9128f1a49f64eca35539b512152927cd8694881ff847596416ddfd88bf356e0ade75a26037f14c1c7ca6b86a4279358607917b6bf919ea6a9
|
data/Gemfile
CHANGED
data/aptible-auth.gemspec
CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency 'gem_config'
|
23
23
|
spec.add_dependency 'oauth2'
|
24
24
|
spec.add_dependency 'hyperresource'
|
25
|
+
spec.add_dependency 'fridge'
|
25
26
|
|
26
27
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
27
28
|
spec.add_development_dependency 'aptible-tasks', '>= 0.2.0'
|
data/lib/aptible/auth/client.rb
CHANGED
data/lib/aptible/auth/version.rb
CHANGED
@@ -6,4 +6,25 @@ describe Aptible::Auth::Client do
|
|
6
6
|
expect(subject).to be_a HyperResource
|
7
7
|
end
|
8
8
|
end
|
9
|
+
|
10
|
+
describe '#bearer_token' do
|
11
|
+
it 'should accept an Aptible::Auth::Token' do
|
12
|
+
token = Aptible::Auth::Token.new
|
13
|
+
token.stub(:access_token) { 'abtible_auth_token' }
|
14
|
+
subject.stub(:token) { token }
|
15
|
+
expect(subject.bearer_token).to eq token.access_token
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should accept an Fridge::AccessToken' do
|
19
|
+
token = Fridge::AccessToken.new
|
20
|
+
token.stub(:to_s) { 'fridge_access_token' }
|
21
|
+
subject.stub(:token) { token }
|
22
|
+
expect(subject.bearer_token).to eq token.to_s
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should accept a String' do
|
26
|
+
subject.stub(:token) { 'token' }
|
27
|
+
expect(subject.bearer_token).to eq 'token'
|
28
|
+
end
|
29
|
+
end
|
9
30
|
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.1.
|
4
|
+
version: 0.1.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-02-
|
11
|
+
date: 2014-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_config
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: fridge
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: bundler
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|