easy_login 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/easy_login/session.rb +2 -2
- data/lib/easy_login/version.rb +1 -1
- data/pkg/easy_login-0.1.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: ede1c77976bf355b2b823aab4226ad02ed28d21e
|
4
|
+
data.tar.gz: f084dc73e36be0aca1ad12b20b284850cfb71b3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f0354d736be598e38b9e78c31eb82efe759ed98da58ed83b62e9535f6d2a2b285458129e04e24e1ec92d5f6ded11fc90bbe27aae058bef2ff84bd2b000a5310
|
7
|
+
data.tar.gz: 95f0907e09a121d3ca8876f17396da91b8acb1408c6c2663d4b976414b4f6e62755ccd489716ea00b07861c010d513a74c4f8662a14b1e1ff06badfe95a795ba
|
data/README.md
CHANGED
@@ -45,6 +45,8 @@ end
|
|
45
45
|
|
46
46
|
And then you can use all the methods above in controller and view
|
47
47
|
|
48
|
+
※ make sure that you have decalre a model named User
|
49
|
+
|
48
50
|
## Contributing
|
49
51
|
|
50
52
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/easy_login. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
data/lib/easy_login/session.rb
CHANGED
@@ -12,7 +12,7 @@ module EasyLogin
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def sign_in(user)
|
15
|
-
cookies.
|
15
|
+
cookies.signed[:f] = [user.id, EasyLogin::Config.salt]
|
16
16
|
end
|
17
17
|
|
18
18
|
def sign_out
|
@@ -26,7 +26,7 @@ module EasyLogin
|
|
26
26
|
private
|
27
27
|
def user_from_session_token
|
28
28
|
user_id = session_token[0]
|
29
|
-
return nil if user_id == nil
|
29
|
+
return nil if user_id == nil
|
30
30
|
user = User.find_by_id(user_id)
|
31
31
|
return user
|
32
32
|
end
|
data/lib/easy_login/version.rb
CHANGED
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: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- goshan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -59,6 +59,7 @@ files:
|
|
59
59
|
- lib/easy_login/version.rb
|
60
60
|
- pkg/easy_login-0.1.0.gem
|
61
61
|
- pkg/easy_login-0.1.1.gem
|
62
|
+
- pkg/easy_login-0.1.2.gem
|
62
63
|
homepage: https://github.com/goshan/easy_login
|
63
64
|
licenses:
|
64
65
|
- MIT
|