cratus 0.2.5 → 0.2.6

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: 95854c5b9a4fc245547081d9a0b87b59c68262d8
4
- data.tar.gz: 2a74ec2d2bc5078a22217315b55c7c6679109023
3
+ metadata.gz: bcc42a91850c24730a36d61f38e48b2a0db73972
4
+ data.tar.gz: 9d9a96515547a15e6744f5c0d13179ce51001be7
5
5
  SHA512:
6
- metadata.gz: db3ae770253d2b97fbb5dacf1b75d63c4fe886fba393bf03e8639e059b0a0a30daaef64f9251827a912bd2d11c3a0c4c28493b3e004ccd92e9efe6cbcca283b4
7
- data.tar.gz: c6c2563ed6498dbb4dd6f495d79c4863d2910a6d7a1d3e9480c03d17732cb3ccc8bba248ef4b58fe27a0e81bde50f9392848e697c6d1c0808c851571bca2ee83
6
+ metadata.gz: 0ec26ce5a450ec200c286195388e1f650fe418ca318167446b1742f58ed78b217ff9c31b11d9777bd5d2ab852e17e927192588d6d55cff1c7f68d48ac12dc298
7
+ data.tar.gz: d3bea33a3efd9169ede51b5948fc1a0d0ce5a4b9c65856b70460ab4968feaa05cf8c77d90cc6065e7aeb7f9f99017ec8adb597af5f8e7c69f4d58d33fe51cb65
data/lib/cratus/user.rb CHANGED
@@ -31,14 +31,14 @@ module Cratus
31
31
  end
32
32
 
33
33
  def lockouttime
34
- @raw_ldap_data[Cratus.config.user_lockout_attribute].last
34
+ Integer(@raw_ldap_data[Cratus.config.user_lockout_attribute].last.to_s)
35
35
  end
36
36
 
37
37
  # https://fossies.org/linux/web2ldap/pylib/w2lapp/schema/plugins/activedirectory.py
38
38
  # https://msdn.microsoft.com/en-us/library/windows/desktop/ms676843(v=vs.85).aspx
39
39
  #
40
40
  def locked?
41
- return false if lockouttime == '0'
41
+ return false if lockouttime.zero?
42
42
  epoch = 116_444_736_000_000_000
43
43
  current = Time.now.to_i * 10_000_000
44
44
  current - (lockouttime - epoch) < lockoutduration
@@ -3,7 +3,7 @@ module Cratus
3
3
  def self.version
4
4
  major = 0 # Breaking, incompatible releases
5
5
  minor = 2 # Compatible, but new features
6
- patch = 5 # Fixes to existing features
6
+ patch = 6 # Fixes to existing features
7
7
  [major, minor, patch].map(&:to_s).join('.')
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cratus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Gnagy