omniauth-galvanize 0.3.0 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +2 -1
- data/lib/omniauth/strategies/galvanize.rb +3 -3
- data/lib/omniauth-galvanize/version.rb +1 -1
- data/lib/omniauth-galvanize.rb +2 -4
- data/omniauth-galvanize.gemspec +2 -2
- metadata +4 -6
- data/lib/omniauth/strategies/galvanize_local.rb +0 -48
- data/lib/omniauth/strategies/galvanize_stage.rb +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e5d8a51818b48a65ac8a6a95e418fed52689669
|
4
|
+
data.tar.gz: 0239e5c4ec9700a0524c10bc9b55a5af6b574737
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea2c50242915207cd8a5487321d41f6b0165767decbd0de7edd067f27b372cbc50060f4528b76826eb790690b41d634c31d360ca598fce6d5a6e54402896e0db
|
7
|
+
data.tar.gz: affee37997d92c015e81a662db6281b14cc50df3547790c1a5e85a61ef7b1fcc28a9969f116bb6a4bfd2663608f7b50c3cdf9a15816e5e6522304be14684cc92
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
omniauth-galvanize (0.
|
4
|
+
omniauth-galvanize (0.4.3)
|
5
5
|
multi_json (~> 1.2)
|
6
6
|
omniauth (~> 1.2)
|
7
7
|
omniauth-oauth2 (~> 1.3)
|
@@ -132,6 +132,7 @@ PLATFORMS
|
|
132
132
|
DEPENDENCIES
|
133
133
|
jbuilder (~> 2.0)
|
134
134
|
omniauth-galvanize!
|
135
|
+
omniauth-oauth2 (~> 1.3)
|
135
136
|
rails (= 4.2.4)
|
136
137
|
sdoc (~> 0.4.0)
|
137
138
|
|
@@ -29,8 +29,8 @@ module OmniAuth
|
|
29
29
|
:last_name => raw_info['results'][0]['last_name'],
|
30
30
|
:galvanize_id => raw_info['results'][0]['id'],
|
31
31
|
:about => raw_info['results'][0]['about'],
|
32
|
-
:photo => raw_info['results'][0]['photo']
|
33
|
-
|
32
|
+
:photo => raw_info['results'][0]['photo'],
|
33
|
+
:roles => raw_info['results'][0]['roles']
|
34
34
|
}
|
35
35
|
end
|
36
36
|
|
@@ -41,7 +41,7 @@ module OmniAuth
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def raw_info
|
44
|
-
@raw_info ||= access_token.get('/api/
|
44
|
+
@raw_info ||= access_token.get('/api/v3/me').parsed
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
data/lib/omniauth-galvanize.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require
|
1
|
+
require 'omniauth-galvanize/version'
|
2
|
+
require 'omniauth/strategies/galvanize'
|
2
3
|
require 'omniauth/strategies/galvanize_developer'
|
3
|
-
require 'omniauth/strategies/galvanize_local'
|
4
|
-
require 'omniauth/strategies/galvanize_stage'
|
5
|
-
require 'omniauth/strategies/galvanize'
|
data/omniauth-galvanize.gemspec
CHANGED
@@ -5,7 +5,7 @@ require 'omniauth-galvanize/version'
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.add_dependency 'omniauth', '~> 1.2'
|
7
7
|
gem.add_dependency 'multi_json', '~> 1.2'
|
8
|
-
gem.add_dependency 'omniauth-oauth2', '~> 1.3'
|
8
|
+
gem.add_dependency 'omniauth-oauth2', '~> 1.3.1'
|
9
9
|
|
10
10
|
gem.authors = ['Chris Cunningham']
|
11
11
|
gem.email = ['chris.cunningham@galvanize.com']
|
@@ -20,4 +20,4 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.name = 'omniauth-galvanize'
|
21
21
|
gem.require_paths = ['lib']
|
22
22
|
gem.version = OmniAuth::Galvanize::VERSION
|
23
|
-
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-galvanize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Cunningham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.3.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.3.1
|
55
55
|
description: Galvanize adapter for OmniAuth.
|
56
56
|
email:
|
57
57
|
- chris.cunningham@galvanize.com
|
@@ -69,8 +69,6 @@ files:
|
|
69
69
|
- lib/omniauth-galvanize/version.rb
|
70
70
|
- lib/omniauth/strategies/galvanize.rb
|
71
71
|
- lib/omniauth/strategies/galvanize_developer.rb
|
72
|
-
- lib/omniauth/strategies/galvanize_local.rb
|
73
|
-
- lib/omniauth/strategies/galvanize_stage.rb
|
74
72
|
- omniauth-galvanize.gemspec
|
75
73
|
homepage: https://github.com/irishkurisu
|
76
74
|
licenses:
|
@@ -1,48 +0,0 @@
|
|
1
|
-
require 'omniauth-oauth2'
|
2
|
-
|
3
|
-
module OmniAuth
|
4
|
-
module Strategies
|
5
|
-
class GalvanizeLocal < OmniAuth::Strategies::OAuth2
|
6
|
-
option :name, 'galvanize_local'
|
7
|
-
|
8
|
-
option :client_options, {
|
9
|
-
:site => 'http://localhost:4000',
|
10
|
-
:authorize_url => '/accounts/authorize',
|
11
|
-
:token_url => '/accounts/token'
|
12
|
-
}
|
13
|
-
|
14
|
-
SETUP_PROC = lambda do |env|
|
15
|
-
if env['omniauth.strategy'].options[:sign_up]
|
16
|
-
env['omniauth.strategy'].options[:client_options][:authorize_url] = 'accounts/signup'
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
OmniAuth.config.before_request_phase = SETUP_PROC
|
21
|
-
|
22
|
-
uid{ raw_info['results'][0]['id'] }
|
23
|
-
|
24
|
-
info do
|
25
|
-
{
|
26
|
-
:email => raw_info['results'][0]['email'],
|
27
|
-
:name => raw_info['results'][0]['name'],
|
28
|
-
:first_name => raw_info['results'][0]['first_name'],
|
29
|
-
:last_name => raw_info['results'][0]['last_name'],
|
30
|
-
:galvanize_id => raw_info['results'][0]['id'],
|
31
|
-
:about => raw_info['results'][0]['about'],
|
32
|
-
:photo => raw_info['results'][0]['photo'],
|
33
|
-
:roles => raw_info['results'][0]['roles']
|
34
|
-
}
|
35
|
-
end
|
36
|
-
|
37
|
-
extra do
|
38
|
-
{
|
39
|
-
'raw_info' => raw_info
|
40
|
-
}
|
41
|
-
end
|
42
|
-
|
43
|
-
def raw_info
|
44
|
-
@raw_info ||= access_token.get('/api/v3/me').parsed
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
require 'omniauth-oauth2'
|
2
|
-
|
3
|
-
module OmniAuth
|
4
|
-
module Strategies
|
5
|
-
class GalvanizeStage < OmniAuth::Strategies::OAuth2
|
6
|
-
option :name, 'galvanize_stage'
|
7
|
-
|
8
|
-
option :client_options, {
|
9
|
-
:site => 'https://muslin.galvanize.com/',
|
10
|
-
:authorize_url => '/accounts/authorize',
|
11
|
-
:token_url => '/accounts/token'
|
12
|
-
}
|
13
|
-
|
14
|
-
SETUP_PROC = lambda do |env|
|
15
|
-
if env['omniauth.strategy'].options[:sign_up]
|
16
|
-
env['omniauth.strategy'].options[:client_options][:authorize_url] = 'accounts/signup'
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
OmniAuth.config.before_request_phase = SETUP_PROC
|
21
|
-
|
22
|
-
uid{ raw_info['results'][0]['id'] }
|
23
|
-
|
24
|
-
info do
|
25
|
-
{
|
26
|
-
:email => raw_info['results'][0]['email'],
|
27
|
-
:name => raw_info['results'][0]['name'],
|
28
|
-
:first_name => raw_info['results'][0]['first_name'],
|
29
|
-
:last_name => raw_info['results'][0]['last_name'],
|
30
|
-
:galvanize_id => raw_info['results'][0]['id'],
|
31
|
-
:about => raw_info['results'][0]['about'],
|
32
|
-
:photo => raw_info['results'][0]['photo'],
|
33
|
-
:roles => raw_info['results'][0]['roles']
|
34
|
-
|
35
|
-
}
|
36
|
-
end
|
37
|
-
|
38
|
-
extra do
|
39
|
-
{
|
40
|
-
'raw_info' => raw_info
|
41
|
-
}
|
42
|
-
end
|
43
|
-
|
44
|
-
def raw_info
|
45
|
-
@raw_info ||= access_token.get('/api/v3/me').parsed
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|