sensu-plugins-mailer 0.3.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MmZmY2U4ZWYzZjYzNTM1MDg0M2QyYjk2ODNkODRlNzZmNTBkZjdhZQ==
5
- data.tar.gz: !binary |-
6
- Njg3NmQ0ZjNmYmMwYzU5OWRmZjRlNDg3YmQ5ZGRhYmM4NTJhYzgwZA==
2
+ SHA1:
3
+ metadata.gz: e06c5e384471722d7c338d98fcde9c61f3255f0c
4
+ data.tar.gz: 5ddf68c6d934fa6a65efa8ceebe1967cb4f30816
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MmI1YWQxMDhmNjVmYTc3YjI4ZWMyYWQ5OTQ2NmYzNzFmZDA4ZjljMGNkMTk2
10
- Y2ZkYmRhOTM5MjZjNzRjYWU4NThhMzEwZTYyNzYwYmY1MGMyYzZiZDRjYjNh
11
- N2RjN2U5YWM4ODJkMGU1MmUwY2JmNmM1ZGYwNTgzMTgwZDkwYzQ=
12
- data.tar.gz: !binary |-
13
- MjU0YjFjMTA2NDI1Y2ViMjg2NmM0ZDg3NTg4NGQzMzJlMzNkZmRkM2RjM2Ix
14
- YzA2ODkxZThlM2QzYzA3NTUyNGQzOWEyNmIxMTIwMzI1MWE1ZWVjNjE2NTc4
15
- MDU0M2Q5MGI1OTRlNTgyYmEwYTkyYjdiNDVlYTYyM2Y1YzM5NjA=
6
+ metadata.gz: e208de9a67fb9c5239c92a60e8d1148365b7317da845615e9ddbb8d2904adbd609fb014a1cf9af092862a94ec8777ef8a64f13aae6c5fb6545a519555319bb7d
7
+ data.tar.gz: 1b4fa18f200b0d072d8dbb7b3a0acbc5706fb7fc51af93e4612ee53a12b8ccac14de4ecaf2e861c01f1b81fe322a808e7bc585e1e0cc67486a7f7cd2ed1ffc70
data/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.0.0] - 2016-06-23
9
+ ### Fixed
10
+ - fixing timeout deprecation for ruby 2.3.0
11
+ - handler-mailer-mailgun.rb/handler-mailer-ses.rb: fixing undefined local variable or method params error
12
+
13
+ ### Removed
14
+ - Support for Ruby 1.9.3; Added support for Ruby 2.3.0
15
+
16
+ ### Changed
17
+ - Update to Rubocop 0.40 and cleanup
18
+
8
19
  ## [0.3.1] - 2016-05-11
9
20
  ### Added
10
21
  - handler-mailer.rb: add smtp_use_tls setting to support SMTPS in Amazon SES
@@ -68,9 +79,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
68
79
  ### Added
69
80
  - initial release
70
81
 
71
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/0.3.1...HEAD
72
- [0.3.1]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/v0.3.0...0.3.1
73
- [0.3.0]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/v0.2.0...0.3.0
82
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/1.0.0...HEAD
83
+ [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/0.3.1...1.0.0
84
+ [0.3.1]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/0.3.0...0.3.1
85
+ [0.3.0]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/0.2.0...0.3.0
74
86
  [0.2.0]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/v0.1.5...0.2.0
75
87
  [0.1.5]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/0.1.4...v0.1.5
76
88
  [0.1.4]: https://github.com/sensu-plugins/sensu-plugins-mailer/compare/0.1.3...0.1.4
@@ -41,14 +41,6 @@ class Mailer < Sensu::Handler
41
41
  @event['action'].eql?('resolve') ? 'RESOLVED' : 'ALERT'
42
42
  end
43
43
 
44
- def prefix_subject
45
- if params[:subject_prefix]
46
- params[:subject_prefix] + ' '
47
- else
48
- ''
49
- end
50
- end
51
-
52
44
  def handle
53
45
  params = {
54
46
  mail_to: settings['mailer-mailgun']['mail_to'],
@@ -68,12 +60,13 @@ class Mailer < Sensu::Handler
68
60
  Status: #{@event['check']['status']}
69
61
  Occurrences: #{@event['occurrences']}
70
62
  BODY
63
+ prefix_subject = params[:subject_prefix] + ' ' if params[:subject_prefix]
71
64
  subject = "#{prefix_subject}#{action_to_string} - #{short_name}: #{@event['check']['notification']}"
72
65
 
73
66
  mg_client = Mailgun::Client.new params[:mg_apikey]
74
67
 
75
68
  begin
76
- timeout 10 do
69
+ Timeout.timeout 10 do
77
70
  message_params = {
78
71
  from: params[:mail_from],
79
72
  to: params[:mail_to],
@@ -24,14 +24,6 @@ class Mailer < Sensu::Handler
24
24
  @event['action'].eql?('resolve') ? 'RESOLVED' : 'ALERT'
25
25
  end
26
26
 
27
- def prefix_subject
28
- if params[:subject_prefix]
29
- params[:subject_prefix] + ' '
30
- else
31
- ''
32
- end
33
- end
34
-
35
27
  def handle
36
28
  params = {
37
29
  mail_to: settings['mailer-ses']['mail_to'],
@@ -52,6 +44,7 @@ class Mailer < Sensu::Handler
52
44
  Status: #{@event['check']['status']}
53
45
  Occurrences: #{@event['occurrences']}
54
46
  BODY
47
+ prefix_subject = params[:subject_prefix] + ' ' if params[:subject_prefix]
55
48
  subject = "#{prefix_subject}#{action_to_string} - #{short_name}: #{@event['check']['notification']}"
56
49
 
57
50
  ses = AWS::SES::Base.new(
@@ -61,7 +54,7 @@ class Mailer < Sensu::Handler
61
54
  )
62
55
 
63
56
  begin
64
- timeout 10 do
57
+ Timeout.timeout 10 do
65
58
  ses.send_email(
66
59
  to: params[:mail_to],
67
60
  source: params[:mail_from],
@@ -223,7 +223,7 @@ class Mailer < Sensu::Handler
223
223
  end
224
224
 
225
225
  begin
226
- timeout timeout_interval do
226
+ Timeout.timeout timeout_interval do
227
227
  Mail.deliver do
228
228
  to mail_to
229
229
  from mail_from
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsMailer
2
2
  module Version
3
- MAJOR = 0
4
- MINOR = 3
5
- PATCH = 1
3
+ MAJOR = 1
4
+ MINOR = 0
5
+ PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 1.0.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-05-11 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-ses
@@ -56,14 +56,14 @@ dependencies:
56
56
  name: sensu-plugin
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.2'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.2'
69
69
  - !ruby/object:Gem::Dependency
@@ -84,130 +84,130 @@ dependencies:
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.7'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.7'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: codeclimate-test-reporter
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0.4'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.4'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: github-markup
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '1.3'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '1.3'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: pry
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0.10'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0.10'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rake
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: '10.5'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '10.5'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: redcarpet
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ~>
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: '3.2'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ~>
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '3.2'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rubocop
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ~>
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
173
  version: 0.40.0
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ~>
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: 0.40.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: rspec
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ~>
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
187
  version: '3.4'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ~>
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: '3.4'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: yard
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ~>
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0.8'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ~>
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0.8'
209
209
  description: Sensu mailer plugins
210
- email: <sensu-users@googlegroups.com>
210
+ email: "<sensu-users@googlegroups.com>"
211
211
  executables:
212
212
  - handler-mailer-mailgun.rb
213
213
  - handler-mailer-ses.rb
@@ -239,18 +239,19 @@ require_paths:
239
239
  - lib
240
240
  required_ruby_version: !ruby/object:Gem::Requirement
241
241
  requirements:
242
- - - ! '>='
242
+ - - ">="
243
243
  - !ruby/object:Gem::Version
244
- version: 1.9.3
244
+ version: 2.0.0
245
245
  required_rubygems_version: !ruby/object:Gem::Requirement
246
246
  requirements:
247
- - - ! '>='
247
+ - - ">="
248
248
  - !ruby/object:Gem::Version
249
249
  version: '0'
250
250
  requirements: []
251
251
  rubyforge_project:
252
- rubygems_version: 2.4.5
252
+ rubygems_version: 2.5.1
253
253
  signing_key:
254
254
  specification_version: 4
255
255
  summary: Sensu plugins for mailer
256
256
  test_files: []
257
+ has_rdoc: