aptible-api 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/aptible-api.gemspec +1 -0
- data/lib/aptible/api/client.rb +2 -0
- data/lib/aptible/api/version.rb +1 -1
- data/spec/aptible/api/client_spec.rb +21 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea7e2616fd2d3e935b31c76ece6d0661e7629b69
|
4
|
+
data.tar.gz: e0600845d8af38042268b708ebb75b33a6c97f3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5b392099aafa2cd1352451fe736903395f566bebcf7a6176985fd56600386d74501c1c8a0cf639987ee5b8b04a7eaa526a09aad96e71ba74f4ec87421b2103a
|
7
|
+
data.tar.gz: 0021aeb7fa253f60327c9f836dccd3cccd2d7e4189e4a716499d7668f89d0c59f87ad6e66ef70c20040b49445c5de62da1df3eecf5daa8605be1dea31de5ca92
|
data/aptible-api.gemspec
CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency 'gem_config'
|
23
23
|
spec.add_dependency 'hyperresource'
|
24
24
|
spec.add_dependency 'aptible-auth'
|
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/api/client.rb
CHANGED
data/lib/aptible/api/version.rb
CHANGED
@@ -6,4 +6,25 @@ describe Aptible::Api::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,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
@@ -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
|