omniauth-digitalocean 0.1.0 → 0.2.0

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: 1ecf5857a455548bfac71fabcd0652fc2a6e5688
4
- data.tar.gz: 9d75f94f15bbe926e341a3f78688cc656a34071c
3
+ metadata.gz: 14748fd5f32fe8328b7ad8cf15e17a3c0d0726b0
4
+ data.tar.gz: d28f1f2dbd3093a26820962a15293ac7942a007c
5
5
  SHA512:
6
- metadata.gz: 2a130160fd01c55795ed5403a31b493ef3e4819364cacd19aa70937619601449ec7470ae89ba16787cd07bbfe36fb18b5c9531abeafa2b04f585d5cee61043d8
7
- data.tar.gz: 7773ec958e792fd55cc7229eab21413b3b76ff25733caf5754f703973aa4f815636d50046b457ad7845876c922977c53a138d29c121c5aad85cfcda54de167b2
6
+ metadata.gz: 38758990c7d3443ab1266e868ffef1eacf609474975fccb46a8cec884d0c591d6ba9f1013ede0b9e5cdefd154a190b1245d238f43ccbfa265b687db3b0b58061
7
+ data.tar.gz: 901f4f71dd1d202918ca37ae73559e83a77e84272c34c5450e0fcc4b4c0b579ed9dbb4e2a46ce9cf4eee0298f6c1c671b633c94c99556cada5b2e9c7d91ac01a
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ cache: bundler
3
+
4
+ rvm:
5
+ - "2.0.0"
6
+ - "2.1.5"
7
+ - "2.2.0"
8
+
9
+ script:
10
+ - bundle exec rspec ./spec
@@ -31,7 +31,7 @@ module OmniAuth
31
31
  option :authorize_options, AUTHENTICATION_PARAMETERS
32
32
 
33
33
  uid do
34
- access_token.params['uid']
34
+ access_token.params['info']['uuid']
35
35
  end
36
36
 
37
37
  info do
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Digitalocean
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -1,11 +1,11 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe OmniAuth::Strategies::DigitalOcean do
3
+ describe OmniAuth::Strategies::Digitalocean do
4
4
  subject do
5
- OmniAuth::Strategies::DigitalOcean.new({})
5
+ described_class.new({})
6
6
  end
7
7
 
8
- context "client options" do
8
+ describe "production client options" do
9
9
  it { expect(subject.options.name).to eq(:digitalocean) }
10
10
 
11
11
  it { expect(subject.options.client_options.site).to eq("https://cloud.digitalocean.com") }
@@ -13,4 +13,25 @@ describe OmniAuth::Strategies::DigitalOcean do
13
13
  it { expect(subject.options.client_options.token_url).to eq("https://cloud.digitalocean.com/v1/oauth/token") }
14
14
  end
15
15
 
16
- end
16
+ describe "callback phase instance methods" do
17
+ let(:uuid) { 123 }
18
+ let(:response_params) {
19
+ {
20
+ 'info' => {
21
+ 'uuid' => uuid
22
+ }
23
+ }
24
+ }
25
+ let(:access_token) { double('AccessToken', params: response_params) }
26
+
27
+ before do
28
+ allow(subject).to receive(:access_token).and_return(access_token)
29
+ end
30
+
31
+ describe "#uid" do
32
+ it "returns uuid from the info hash" do
33
+ expect(subject.uid).to eq(uuid)
34
+ end
35
+ end
36
+ end
37
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-digitalocean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phillip Baker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-24 00:00:00.000000000 Z
11
+ date: 2015-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -130,6 +130,7 @@ extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
132
  - ".gitignore"
133
+ - ".travis.yml"
133
134
  - Gemfile
134
135
  - LICENSE.txt
135
136
  - README.md
@@ -163,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
164
  version: '0'
164
165
  requirements: []
165
166
  rubyforge_project:
166
- rubygems_version: 2.2.0
167
+ rubygems_version: 2.4.2
167
168
  signing_key:
168
169
  specification_version: 4
169
170
  summary: Official OmniAuth strategy for Digitalocean