sensu-plugins-mailer 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +9 -1
- data/bin/handler-mailer.rb +13 -4
- data/lib/sensu-plugins-mailer/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmE5ODc5MzBiNzQ3NGVhZjhlNzQ4M2YzOWVlNjE3MzE4OGVlMWRhMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTczMWU2OTU2ODJiMDZjMWJmZTBhZTVkMWU5NzFhMTI2ZWQ4NzFhMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzUxYzMzZTU2NmJmY2M3ZTUwNWEwY2VlMmQ1MzlkODRkYWU3MjY3ZGI5MThj
|
10
|
+
OWZhZjIzYzdlMTJjNjA4YmNjOTIzMDE1YWI3ZjM3ZjgzM2Q1MTU3OTNlZjIz
|
11
|
+
ZmE0N2Q5MTZlYWQ3Y2U4NmYyZmVhZjgwN2QxNzdjMWY2N2U5ZGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGFhZDc1OGFhOGU4OWEwZDJkYzE3YzQyYjdiNTg3YzAwMmZlNDBiOTBiYmMy
|
14
|
+
NjNhNTI5ZWEwOGY4MjQ1NDk3NTk1ZjcyOTlhMTQxZWQ0YjdjZmQ0YWY2MDcw
|
15
|
+
NmMzYzlkZDkzMDE0MzEwNDliNGVkMmRhZjgxMDhjMTRmMDdkZTY=
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,13 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [0.3.0] - 2016-04-23
|
9
|
+
### Fixed
|
10
|
+
- Fix aws-ses gem dependency
|
11
|
+
|
12
|
+
### Added
|
13
|
+
- handler-mailer.rb: add ability to build mailing list from client subscriptions
|
14
|
+
|
8
15
|
## [0.2.0] - 2016-03-17
|
9
16
|
### Added
|
10
17
|
- Support for prefixing the email subject
|
@@ -54,7 +61,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
54
61
|
### Added
|
55
62
|
- initial release
|
56
63
|
|
57
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/0.
|
64
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/0.3.0...HEAD
|
65
|
+
[0.3.0]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/v0.2.0...0.3.0
|
58
66
|
[0.2.0]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/v0.1.5...0.2.0
|
59
67
|
[0.1.5]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/0.1.4...v0.1.5
|
60
68
|
[0.1.4]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/0.1.3...0.1.4
|
data/bin/handler-mailer.rb
CHANGED
@@ -110,10 +110,19 @@ class Mailer < Sensu::Handler
|
|
110
110
|
def build_mail_to_list
|
111
111
|
json_config = config[:json_config]
|
112
112
|
mail_to = @event['client']['mail_to'] || settings[json_config]['mail_to']
|
113
|
-
if settings[json_config].key?('subscriptions')
|
114
|
-
@event['check']['subscribers']
|
115
|
-
|
116
|
-
|
113
|
+
if settings[json_config].key?('subscriptions')
|
114
|
+
if @event['check']['subscribers']
|
115
|
+
@event['check']['subscribers'].each do |sub|
|
116
|
+
if settings[json_config]['subscriptions'].key?(sub)
|
117
|
+
mail_to << ", #{settings[json_config]['subscriptions'][sub]['mail_to']}"
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
if @event['client']['subscriptions']
|
122
|
+
@event['client']['subscriptions'].each do |sub|
|
123
|
+
if settings[json_config]['subscriptions'].key?(sub)
|
124
|
+
mail_to << ", #{settings[json_config]['subscriptions'][sub]['mail_to']}"
|
125
|
+
end
|
117
126
|
end
|
118
127
|
end
|
119
128
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: aws
|
14
|
+
name: aws-ses
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mail
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|