easy_login 0.1.2 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39db57cec3bd5212851e136badc1549cfcefe2cc
4
- data.tar.gz: dba3456318ffb13cfce2ef9a069e77d61c83ae1a
3
+ metadata.gz: ede1c77976bf355b2b823aab4226ad02ed28d21e
4
+ data.tar.gz: f084dc73e36be0aca1ad12b20b284850cfb71b3d
5
5
  SHA512:
6
- metadata.gz: 1d9d4e1a4bb037cb900c433aa7f9e5656f6fad91a65b63d6f8ffb13d197e4e09cfffe2544676292a71c8b414ffc1bbb663363785a9643941956b25513d5a651b
7
- data.tar.gz: 091e7adcd7ce21ba3c10d4607cae543356eaa20f4206e26076de11453e0085eba4e96cf95bdbe0270c427ec77473ec902dfe27c96c823fd26c814e4a68b51c7d
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.
@@ -12,7 +12,7 @@ module EasyLogin
12
12
  end
13
13
 
14
14
  def sign_in(user)
15
- cookies.permanent.signed[:f] = [user.id, EasyLogin::Config.salt]
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 || !Object.const_defined?('User')
29
+ return nil if user_id == nil
30
30
  user = User.find_by_id(user_id)
31
31
  return user
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module EasyLogin
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  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: 0.1.2
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-08 00:00:00.000000000 Z
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