omniauth-galvanize 0.4.10 → 0.4.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 686b79292789db3eee4b9a60fac9ebe875ac103a
|
4
|
+
data.tar.gz: cb7d632aa488ce09af88287e94643984f51b3f97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 984272d6605dcc3c9a8d840f29c235229dc6c44a336e7781781c16733d79e713d96a66b06baf1dba28056dad505e0f3113912458bbcf0eabb6bea4c66284a5da
|
7
|
+
data.tar.gz: 81646da54e66664d573e353627d6cdccea44bcdc1d8f14f63c8e2169ae4945e648047c1442873fa272bcffb9e83a59f014984816a2175862bd17f0abbf39a510
|
@@ -8,6 +8,7 @@ module OmniAuth
|
|
8
8
|
option :name, 'galvanize_developer'
|
9
9
|
option :fields, [:first_name, :last_name, :email, :role, :cohorts, :galvanize_id, :home_location]
|
10
10
|
option :role_fields, [:role]
|
11
|
+
option :cohort_fields, [:cohort]
|
11
12
|
option :uid_field, :galvanize_id
|
12
13
|
|
13
14
|
def request_phase
|
@@ -25,13 +26,18 @@ module OmniAuth
|
|
25
26
|
|
26
27
|
info do
|
27
28
|
roles_array = []
|
29
|
+
cohorts_array = []
|
28
30
|
options.fields.inject({}) do |hash, field|
|
29
31
|
if options.role_fields.include?(field)
|
30
32
|
roles_array << {name: request.params[field.to_s], description: "The description for #{field.to_s}"} unless request.params[field.to_s].blank?
|
33
|
+
elsif options.cohort_fields.include?(field)
|
34
|
+
cohorts_array << {name: request.params[field.to_s]} unless request.params[field.to_s].blank?
|
31
35
|
else
|
32
36
|
hash[field] = request.params[field.to_s]
|
33
37
|
end
|
38
|
+
|
34
39
|
hash[:roles] = roles_array
|
40
|
+
hash[:cohorts] = cohorts_array
|
35
41
|
hash
|
36
42
|
end
|
37
43
|
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.
|
4
|
+
version: 0.4.11
|
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-12-
|
11
|
+
date: 2015-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|