any_login 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/any_login/providers/devise.rb +6 -3
- data/lib/any_login/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5bf2e4379dc3292f4370eccad6f0e9f25ae89d7f871525cfe8dc631b25ec38e
|
4
|
+
data.tar.gz: 8272a7055d6aca546c6f78375c026520691900b8f35c854724488cd767cf73dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c44e654790b0df3ed3c8280e6f3bad9ea29513068a2f0fa7529a127884342dae5b707916bdee2b0d9b5a6e1f1c04b666c31419293c634f9532f7d262290279d0
|
7
|
+
data.tar.gz: 9b38b9cf3010608a432c818c8ae52b2f4ef4d12129ece50daf61cd8e048b6b2b8696fad525156ab99d962f8647260ea53e6a9222d04b5180510bf41e3d6ac200
|
@@ -6,11 +6,15 @@ module AnyLogin
|
|
6
6
|
|
7
7
|
DEFAULT_SIGN_IN = proc do |loginable|
|
8
8
|
reset_session
|
9
|
-
sign_in
|
9
|
+
sign_in Controller.mapping_key, loginable
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.any_login_current_user_method
|
13
|
-
@@any_login_current_user_method ||= "current_#{
|
13
|
+
@@any_login_current_user_method ||= "current_#{mapping_key}".to_sym
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.mapping_key
|
17
|
+
@@mapping_key ||= ::Devise.mappings.detect {|_key, mapping| mapping.class_name == AnyLogin.klass.name }.first
|
14
18
|
end
|
15
19
|
|
16
20
|
def any_login_sign_in
|
@@ -21,7 +25,6 @@ module AnyLogin
|
|
21
25
|
|
22
26
|
redirect_to main_app.send(AnyLogin.redirect_path_after_login)
|
23
27
|
end
|
24
|
-
|
25
28
|
end
|
26
29
|
|
27
30
|
end
|
data/lib/any_login/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: any_login
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Kasyanchuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -254,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
254
|
- !ruby/object:Gem::Version
|
255
255
|
version: '0'
|
256
256
|
requirements: []
|
257
|
-
rubygems_version: 3.
|
257
|
+
rubygems_version: 3.3.7
|
258
258
|
signing_key:
|
259
259
|
specification_version: 4
|
260
260
|
summary: AnyLogin is created to speedup development process and allow developer's
|