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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 018d3ae9713ef03859f625a0e4cb29b9b059751e
4
- data.tar.gz: e7793a1108d38a04d99bb5eb9efd30bb7ce2df76
3
+ metadata.gz: 0e5d8a51818b48a65ac8a6a95e418fed52689669
4
+ data.tar.gz: 0239e5c4ec9700a0524c10bc9b55a5af6b574737
5
5
  SHA512:
6
- metadata.gz: 75f2948593065190a82b1e305bee4cbe62dc309ce8a1387b567b1bdc72193a124da268514771b838e1c24261eae74430aed4ec92f8955d9fde6e1b70b390a750
7
- data.tar.gz: 66592d6a067761a7b988752d30b579af76ca6b0344bc18b97155134f2ba0de1d801b66a7b99f09c0692d3b14366d93aeb20f006264156f56d11ee0b3827fce1f
6
+ metadata.gz: ea2c50242915207cd8a5487321d41f6b0165767decbd0de7edd067f27b372cbc50060f4528b76826eb790690b41d634c31d360ca598fce6d5a6e54402896e0db
7
+ data.tar.gz: affee37997d92c015e81a662db6281b14cc50df3547790c1a5e85a61ef7b1fcc28a9969f116bb6a4bfd2663608f7b50c3cdf9a15816e5e6522304be14684cc92
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
3
3
  gem 'rails', '4.2.4'
4
4
  gem 'jbuilder', '~> 2.0'
5
5
  gem 'sdoc', '~> 0.4.0', group: :doc
6
+ gem 'omniauth-oauth2', '~> 1.3.1'
6
7
 
7
8
  gemspec
8
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-galvanize (0.0.4)
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/v2/me').parsed
44
+ @raw_info ||= access_token.get('/api/v3/me').parsed
45
45
  end
46
46
  end
47
47
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Galvanize
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.7"
4
4
  end
5
5
  end
@@ -1,5 +1,3 @@
1
- require "omniauth-galvanize/version"
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'
@@ -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.3.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-22 00:00:00.000000000 Z
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: '1.3'
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: '1.3'
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