password_expiration_notifier 0.1.0 → 0.1.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 141290380f4400fd8061fb82741ef268f927e668
|
|
4
|
+
data.tar.gz: 6f921b22555fe1359a4e120351c53a4345bb7300
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d6d3c2b1dce047e9a00c69c99104ecff85236f7c5141c56049aee34512e96bcaebd6750c1f0bc71e9305981a3432bdfa5db9282829fcd3c72decebef1bb7be14
|
|
7
|
+
data.tar.gz: 43c43ce6ec474a17be9f65f044a34111da1ba7492e20b0036b43a9a0890015f2f39ffad3aeacaa21ba199a4f7550e74f0c2222f8ebebf53f64dbeae01b5af72d
|
|
@@ -58,12 +58,17 @@ module PasswordExpirationNotifier
|
|
|
58
58
|
type: :boolean,
|
|
59
59
|
desc: "exclude password expiration",
|
|
60
60
|
default: true
|
|
61
|
+
option :verbose,
|
|
62
|
+
type: :boolean,
|
|
63
|
+
desc: "notify to stdout",
|
|
64
|
+
default: false
|
|
61
65
|
def notify()
|
|
62
66
|
conf = config(options)
|
|
63
67
|
users = fetch_users(conf)
|
|
64
68
|
slack = PasswordExpirationNotifier::Slack.new(conf)
|
|
65
69
|
users.each do |user|
|
|
66
|
-
slack.notify_to(user)
|
|
70
|
+
message = slack.notify_to(user)
|
|
71
|
+
puts message if options[:verbose]
|
|
67
72
|
end
|
|
68
73
|
end
|
|
69
74
|
end
|
|
@@ -17,11 +17,10 @@ module PasswordExpirationNotifier
|
|
|
17
17
|
link_names: @conf.slack.link_names
|
|
18
18
|
)
|
|
19
19
|
message = "Your domain account #{attr[:samaccountname]}'s password expire at #{attr[:expire_at]}. Please update your password."
|
|
20
|
-
|
|
21
|
-
puts message
|
|
22
|
-
else
|
|
20
|
+
unless @conf.dry_run
|
|
23
21
|
client.notify(message)
|
|
24
22
|
end
|
|
23
|
+
return message
|
|
25
24
|
end
|
|
26
25
|
end
|
|
27
26
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: password_expiration_notifier
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ISOBE Kazuhiko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-04-
|
|
11
|
+
date: 2015-04-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|