smartnotify 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/modules/rotation_emailer/rotation_emailer.rb +14 -0
- data/lib/smartnotify.rb +7 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3377902c934cc52889ab639681c53feea7a1893
|
4
|
+
data.tar.gz: ba9f6d02ebead014adcc0247fbb244b405b20c9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99519da8c43c2163d2d31e252d3fd79f5f4050ef53d380bbbe228049ad3f733513a9cfd4a3c3490b3831381ffb6cb1950917bbfa5963fa9de1837a1f4338831e
|
7
|
+
data.tar.gz: f90bbb756f83c385dd8a460543e5ea71ef4ac46a6d361ba9fbf271d6d04dcb895eb30153b8a4f24467942dc172404e6aa44941006d238f5b8335fa9b14a2b395
|
@@ -12,9 +12,23 @@ class NotificationModule
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def run
|
15
|
+
|
15
16
|
c = @config
|
16
17
|
|
18
|
+
if c[:global]['debug']
|
19
|
+
puts 'DEBUG:'
|
20
|
+
puts 'DEBUG: Starting rotation_emailer logic...'
|
21
|
+
end
|
22
|
+
|
23
|
+
|
17
24
|
# Setup Mailer
|
25
|
+
|
26
|
+
if c[:global]['debug']
|
27
|
+
puts 'DEBUG:'
|
28
|
+
puts 'DEBUG: Setting up Mail.defaults with the following configuration:'
|
29
|
+
puts "DEBUG: host: #{c[:global]['smtp']['host']}"
|
30
|
+
puts "DEBUG: port: #{c[:global]['smtp']['port']}"
|
31
|
+
end
|
18
32
|
Mail.defaults do
|
19
33
|
delivery_method :smtp, {
|
20
34
|
:address => c[:global]['smtp']['host'],
|
data/lib/smartnotify.rb
CHANGED
@@ -60,14 +60,13 @@ class SmartNotify
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
# end
|
63
|
+
if module_config[:config]['module'] == 'rotation_emailer'
|
64
|
+
require_relative 'modules/rotation_emailer/rotation_emailer'
|
65
|
+
else
|
66
|
+
puts "'#{module_config[:config]['module']}' module does not exist."
|
67
|
+
puts 'Ensure the correct module name is defined in the configuration.'
|
68
|
+
return false
|
69
|
+
end
|
71
70
|
|
72
71
|
# Run Module
|
73
72
|
NotificationModule.new(module_config).run
|