acts_as_hoc_user 1.0.4 → 1.0.5

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: 792e900e62a1d6f5bc3107a94836d85ec3875c36
4
- data.tar.gz: 19531285b81124e6ed6ee161190f7f02f51aa583
3
+ metadata.gz: 84d52cb850c3ccf03e9f140ff62d46a500eaa987
4
+ data.tar.gz: 328385427cf08a7138231973037d89d74c7b9e8f
5
5
  SHA512:
6
- metadata.gz: 349aacc8eb79ff1fe367ff7ff4716ebb1cd533e78eecf6dd099e60b053f991f59370d91780c1a6efe9a42f00323270c5bdca83d81275f7fb6a41e5a7822fa1d7
7
- data.tar.gz: cf9777b2097afbae5161d341a6b6247b204c36019bc0d3ecde8944a0b1b9812e58637589c7f67ac6f85d7918312b8cc974594ce4349262222787a707640bcb9f
6
+ metadata.gz: 7b88bf942bcccd322362eb17f0ba8ecb993e9d0660c37762f4c49ddb81484bb157800ffd55c5fb8c7abd2c3f239705e58dc5456a96fad0e58ef6a8c8282bd410
7
+ data.tar.gz: fc447951930ec00aa25bc1d32a46ea1d1a8e93d447f865818e90b8fc1a145bdbffa21999743013d83f57953c9037d55944f43e5e2a16e5b1d0ad9ce9102625c3
@@ -12,7 +12,8 @@
12
12
  module ClassMethods
13
13
  def authenticate_with_credentials(email, password, expiration = 14.days.from_now)
14
14
  user = User.find_by(email:email)
15
- return user.authentication_token(expiration) if user && user.authenticate(password)
15
+ return nil if user.nil?
16
+ return user.authentication_token(expiration) if user.authenticate(password)
16
17
  nil
17
18
  end
18
19
 
@@ -1,3 +1,3 @@
1
1
  module ActsAsHocUser
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_hoc_user
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gert Lavsen