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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de97a55e4f0426413608ac2336bb10152a27d585
4
- data.tar.gz: dae4ae1d019a5c468cb424d26329b19f5108cd10
3
+ metadata.gz: ea7e2616fd2d3e935b31c76ece6d0661e7629b69
4
+ data.tar.gz: e0600845d8af38042268b708ebb75b33a6c97f3c
5
5
  SHA512:
6
- metadata.gz: 7edc220e803b9befb996aa0ded1c1edd956f0921ac2e9fbe613ed8976073a84ae47f8c96feddd4527d34bde4a7e48e89186fb1301264e6adf953faac4b082e59
7
- data.tar.gz: 26f4455b8a8e03aedc70913dad6ae69c848530216103918cc8c768e7680253b443e3b497630def96ff39193239313c0492b6d15894fe055db479ee57faf48934
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'
@@ -1,4 +1,6 @@
1
1
  require 'hyperresource'
2
+ require 'aptible/auth'
3
+ require 'fridge'
2
4
 
3
5
  module Aptible
4
6
  module Api
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Api
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
@@ -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.0
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