mumukit-login 3.0.1 → 3.1.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: 68df3ecbf4fc49738ef0080e9d1d35ef4b572168
4
- data.tar.gz: 28363afe0c466691257be19bf95b057e66dc7063
3
+ metadata.gz: f16e919eeb9fc48de71b34a38fcc4f6a5ea7a4d3
4
+ data.tar.gz: d9b076858c90a0504ab288db82f9ebf33e560974
5
5
  SHA512:
6
- metadata.gz: 6f0933eb36310d0c6d5d3ee7fda736fdb57b61111bb2f22c5492599080072de0722804ee815fdca15349e82e3b849fa333850bf941f437fe904710c74d35a9d6
7
- data.tar.gz: 8345275e39c269d6576bf8ddaa69ba70b70209fc2df96ff5d74c055b65fe75b1a0fa23b3609a3f2ab900e318bab62a71bcf22e2b25dacea3ea31319dac51d848
6
+ metadata.gz: 2f5f142ac1f6598e0417ae12de968fc93bbeec9be297428e217b913c4376cd8c68177ab9834f3a6080affc7c4eeae87fc09e3ed3d7110cfb1bdda555736a8b2b
7
+ data.tar.gz: e40c810c5441d2803802c9b65fff8d53e65eabfb849c1591d204e04507993bc4f16ece04d03379f6ac80c167d1a72fb634caeec128ebfb0c9c7037b51bfb10ba
data/lib/mumukit/login.rb CHANGED
@@ -7,6 +7,7 @@ require 'omniauth-saml'
7
7
 
8
8
  require 'mumukit/core'
9
9
  require 'mumukit/auth'
10
+ require 'mumukit/platform'
10
11
 
11
12
  module Mumukit::Login
12
13
  def self.configure
@@ -69,21 +70,21 @@ module Mumukit::Login
69
70
  end
70
71
 
71
72
  def self.configure_login_routes!(native)
72
- framework.configure_login_routes! native
73
+ web_framework.configure_login_routes! native
73
74
  end
74
75
 
75
76
  def self.configure_login_controller!(native)
76
- framework.configure_login_controller!(native)
77
+ web_framework.configure_login_controller!(native)
77
78
  end
78
79
 
79
80
  def self.configure_controller!(native)
80
- framework.configure_controller! native
81
+ web_framework.configure_controller! native
81
82
  end
82
83
 
83
84
  private
84
85
 
85
- def self.framework
86
- Mumukit::Login.config.framework
86
+ def self.web_framework
87
+ Mumukit::Platform.web_framework
87
88
  end
88
89
 
89
90
  def self.provider
@@ -1,5 +1,2 @@
1
- module Mumukit::Login::Framework
2
- end
3
-
4
1
  require_relative './framework/rails'
5
2
  require_relative './framework/sinatra'
@@ -1,4 +1,4 @@
1
- module Mumukit::Login::Framework::Rails
1
+ module Mumukit::Platform::WebFramework::Rails
2
2
  def self.env(rails_controller)
3
3
  rails_controller.request.env
4
4
  end
@@ -1,4 +1,4 @@
1
- module Mumukit::Login::Framework::Sinatra
1
+ module Mumukit::Platform::WebFramework::Sinatra
2
2
  def self.env(sinatra_handler)
3
3
  sinatra_handler.request.env
4
4
  end
@@ -25,7 +25,7 @@ module Mumukit::Login::AuthenticationHelpers
25
25
  end
26
26
 
27
27
  def mumukit_controller
28
- @mumukit_controller ||= Mumukit::Login::Controller.new login_framework, self
28
+ @mumukit_controller ||= Mumukit::Login::Controller.new Mumukit::Platform.web_framework, self
29
29
  end
30
30
 
31
31
  def login_form
@@ -36,10 +36,6 @@ module Mumukit::Login::AuthenticationHelpers
36
36
  @after_login_redirector ||= Mumukit::Login::OriginRedirector.new mumukit_controller
37
37
  end
38
38
 
39
- def login_framework
40
- Mumukit::Login.config.framework
41
- end
42
-
43
39
  def login_provider
44
40
  Mumukit::Login.config.provider
45
41
  end
@@ -2,6 +2,8 @@ module Mumukit::Login::Profile
2
2
  def self.from_omniauth(omniauth)
3
3
  struct provider: omniauth.provider,
4
4
  name: omniauth.info.nickname || omniauth.info.name,
5
+ first_name: omniauth.info.first_name,
6
+ last_name: omniauth.info.last_name,
5
7
  social_id: omniauth.uid,
6
8
  email: omniauth.info.email,
7
9
  uid: omniauth.info.email || omniauth.uid,
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Login
3
- VERSION = '3.0.1'
3
+ VERSION = '3.1.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumukit-login
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-24 00:00:00.000000000 Z
11
+ date: 2017-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -178,6 +178,20 @@ dependencies:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: '7.0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: mumukit-platform
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '0.2'
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '0.2'
181
195
  description:
182
196
  email:
183
197
  - franco@mumuki.org