sensu-plugins-mailer 0.2.0 → 0.3.0

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGYwZGU2YjMyODY1MTE5M2NmZTk0YWVmMTRjMmUwMTQyMGYwODU1Mg==
4
+ ZmE5ODc5MzBiNzQ3NGVhZjhlNzQ4M2YzOWVlNjE3MzE4OGVlMWRhMw==
5
5
  data.tar.gz: !binary |-
6
- YmE4NjllY2RkNDYyOTczOGJjNzc5NGIxZTY1ZWYxZWE1NGE0OWI4YQ==
6
+ MTczMWU2OTU2ODJiMDZjMWJmZTBhZTVkMWU5NzFhMTI2ZWQ4NzFhMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjFiYThkNTQxOTU5NzI1MjRiYzYwOGEzOTY0Yjg1NjRhZjBkN2Y0M2JiZDQw
10
- NTgzYmI0ZWYzYmFhMWQzNDBiZWNiN2E1MGIxZTA5YzVkM2Y5ZTc5Y2EzYzhj
11
- MmJlMGU2Y2FmZDg4ODBjOTM3YTZlYTI1MzhjOTc1OGIzZWYyYWU=
9
+ YzUxYzMzZTU2NmJmY2M3ZTUwNWEwY2VlMmQ1MzlkODRkYWU3MjY3ZGI5MThj
10
+ OWZhZjIzYzdlMTJjNjA4YmNjOTIzMDE1YWI3ZjM3ZjgzM2Q1MTU3OTNlZjIz
11
+ ZmE0N2Q5MTZlYWQ3Y2U4NmYyZmVhZjgwN2QxNzdjMWY2N2U5ZGQ=
12
12
  data.tar.gz: !binary |-
13
- ZDk0N2QxZTM4NTc0NDdmOTVmM2M1M2FjZTYwNDliZmI0MDg2YjA2M2M2MmNl
14
- M2MzYzQ4NWY3ZjA4ZmM0Yjk3NWFhMDEyMjUzZjdiZjUwZTBkZjhjYjg1YTcw
15
- NzhjZDcyZDZhYjNlNDExNTZmMGFlZmVhZTg1OWNiNGM3MTYwYjY=
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.2.0...HEAD
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
@@ -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') && @event['check']['subscribers']
114
- @event['check']['subscribers'].each do |sub|
115
- if settings[json_config]['subscriptions'].key?(sub)
116
- mail_to << ", #{settings[json_config]['subscriptions'][sub]['mail_to']}"
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
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsMailer
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 2
4
+ MINOR = 3
5
5
  PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
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.2.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-03-17 00:00:00.000000000 Z
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: 2.10.2
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: 2.10.2
26
+ version: 0.6.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mail
29
29
  requirement: !ruby/object:Gem::Requirement