unix_ugm 0.0.5 → 0.0.6

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.
Files changed (2) hide show
  1. data/lib/unix_user.rb +10 -0
  2. metadata +3 -2
@@ -53,4 +53,14 @@ class UnixUser
53
53
  @shell = options[:shell]
54
54
  end
55
55
 
56
+ def locked?
57
+ m = /^.*?\s(.)/.match(status)
58
+ m[1] == 'L'
59
+ end
60
+
61
+ private
62
+ def status
63
+ `passwd -S #{@username}`
64
+ end
65
+
56
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unix_ugm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-31 00:00:00.000000000 Z
12
+ date: 2012-04-15 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A manager for unix users and group to control /etc/passwd and /etc/group
15
15
  email: myself@paulridgway.co.uk
@@ -46,3 +46,4 @@ signing_key:
46
46
  specification_version: 3
47
47
  summary: Unix User/Group Manager
48
48
  test_files: []
49
+ has_rdoc: