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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34caa61e053fc96d4a43bd90c73db5a00776c634
4
- data.tar.gz: fef45746c7c7ab4d42be4bf720f0b42c0f192edf
3
+ metadata.gz: 601ef2879f9405a59fabd7f46b2d7590f13789c5
4
+ data.tar.gz: 21659073f5e655cc2ea986c7c5f8accfc585012c
5
5
  SHA512:
6
- metadata.gz: 9f2d7eb28d29eddd7cf8e5473a3d143fc01ff67c3605f5471a8e34190c3256ddcd22784967001841a95a357d86eff03e144886f32772821536f2fb5b6aa4304e
7
- data.tar.gz: 06e82bb7831bbf3b3dfeda977dd3b655a5977986e7de8223567b3b693ea84ad719e84db86697c7e049cf2d82ae2ae9da1668b3178189ec2a096180825f8b71c2
6
+ metadata.gz: d54de93252131c3f19929525db1e37b502608e7adecc65cb17668f0aa790ccdeb33ce8e6f76356c8a33bd841484d6772b068aaa739a95a265adfd249760c3eaa
7
+ data.tar.gz: 9f92c097443b77c9128f1a49f64eca35539b512152927cd8694881ff847596416ddfd88bf356e0ade75a26037f14c1c7ca6b86a4279358607917b6bf919ea6a9
data/Gemfile CHANGED
@@ -1,4 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gem 'oauth2', github: 'fancyremarker/oauth2', branch: 'aptible'
4
+ gem 'hyperresource', github: 'fancyremarker/hyperresource', branch: 'aptible'
5
+
3
6
  # Specify your gem's dependencies in aptible-auth.gemspec
4
7
  gemspec
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'
@@ -1,4 +1,5 @@
1
1
  require 'hyperresource'
2
+ require 'fridge'
2
3
 
3
4
  module Aptible
4
5
  module Auth
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Auth
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
@@ -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.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 00:00:00.000000000 Z
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