signinable 2.0.2 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d8325bf916e92dc6a85dee3d346c0538f3aa380
4
- data.tar.gz: 1739fe9e7b699bab8ff51ab3b747fda9cbc65262
3
+ metadata.gz: ed8b7004a61e8356629c4043414ac984c2c220ad
4
+ data.tar.gz: 3c04410f2c4690f100c75990210f9adb0ff16fae
5
5
  SHA512:
6
- metadata.gz: 2a95ab6cc9bad781f8b5eae2b81832b13c932d5074985404987262c7947a8119f720695533bfb1cdace0baeb35ec8a8156d48bfc231426e6231f9e19bac95db3
7
- data.tar.gz: 93e2a5f0cb30aa271ad28291d9841fd63e91fc034d3ff4c04979ea295dd1f4d096101ca0dc3d9f1b4fbf8915073628fa70740b51ab1cfa55f693f409cc3048a0
6
+ metadata.gz: 99741bb1307f71aabad86d3b259917501d7db9f48c0d21c2375968bd178c17b6df4e52ce7580bb1e3b5175d84178d3454e7408ceb932ee17890c04f3d6a07a93
7
+ data.tar.gz: e2f1997057b4171c04482822bfa86fa1ceb6deb18924caab04da6eef02379b4ea64b15593323a3c978b63e4aaace9c954a5de6d4ecac865d4f6d9b867cc880cb
@@ -51,6 +51,9 @@ module Signinable
51
51
  end
52
52
 
53
53
  def signin(ip, user_agent, referer)
54
+ if self.class.signin_expiration.respond_to?(:call)
55
+ self.class.signin_expiration = self.class.signin_expiration.call(self)
56
+ end
54
57
  expiration_time = self.class.signin_expiration == 0 ? nil : (Time.zone.now + self.class.signin_expiration)
55
58
  Signin.create!(signinable: self, ip: ip, referer: referer, user_agent: user_agent, expiration_time: expiration_time).token
56
59
  end
@@ -1,3 +1,3 @@
1
1
  module Signinable
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signinable
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Novozhenets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-07 00:00:00.000000000 Z
11
+ date: 2017-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails