easy_login 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/easy_login/redirect.rb +1 -0
- data/lib/easy_login/version.rb +1 -1
- data/lib/easy_login.rb +15 -7
- data/pkg/easy_login-1.0.2.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd2b5799e90f0746d45eda813f79e6c7f40aad0d
|
4
|
+
data.tar.gz: af8feb14d87000766c6932743323c8f3532fa303
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5deb09ad7d7bfec4f6b27fc9db6fbff3d2c3e545a470a92159247aa58c991291355876a3e60dd61c8fa242987cce0aefc77c4355c3737a6acc1db9f87f51a3cc
|
7
|
+
data.tar.gz: a8cc6ced54dc7929142ef8225e6c6485ae655de2ea1e1c883b944baefa5a62600c67b79a4838c0351c0047bd9482131724d50a6f6ff78cada858f2080cc0fce9
|
data/README.md
CHANGED
@@ -39,6 +39,16 @@ Added following code to `application_controller.rb`
|
|
39
39
|
include EasyLogin
|
40
40
|
```
|
41
41
|
|
42
|
+
※ *updated at 2017-03-21* for ActionCable::Connection in Rails 5, write code like below. `include EasyLogin` will be error.
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
module ApplicationCable
|
46
|
+
class Connection < ActionCable::Connection::Base
|
47
|
+
include EasyLogin::Session
|
48
|
+
end
|
49
|
+
end
|
50
|
+
```
|
51
|
+
|
42
52
|
And then abosultely use all methods above in controller and view
|
43
53
|
|
44
54
|
Also you can declare a redirect schema for differenct user accessing differect
|
data/lib/easy_login/redirect.rb
CHANGED
data/lib/easy_login/version.rb
CHANGED
data/lib/easy_login.rb
CHANGED
@@ -20,12 +20,20 @@ module EasyLogin
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
23
|
+
def self.included(base)
|
24
|
+
base.send :include, Session
|
25
|
+
if base == ApplicationController
|
26
|
+
base.helper_method EasyLogin.helper_method
|
27
|
+
base.send :before_action do |controller|
|
28
|
+
Redirect.parse controller
|
29
|
+
end
|
30
|
+
elsif base == ApplicationCable::Connection
|
31
|
+
base.send :identified_by, :client
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.cable_authorize(connection, current_user)
|
36
|
+
connection.client = current_user
|
37
|
+
end
|
30
38
|
|
31
39
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_login
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- goshan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- pkg/easy_login-0.1.3.gem
|
65
65
|
- pkg/easy_login-1.0.0.gem
|
66
66
|
- pkg/easy_login-1.0.1.gem
|
67
|
+
- pkg/easy_login-1.0.2.gem
|
67
68
|
homepage: https://github.com/goshan/easy_login
|
68
69
|
licenses:
|
69
70
|
- MIT
|