sensu-plugins-hipchat 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5ac4483194b7045988193f456e15f9673ac3e089
4
- data.tar.gz: ebd17ce3478e65f7fb4ede98a98988ca8860d4d5
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Njk0YWY0OWY3M2ZlMTMyMGY1NWM0ZjQ5MmJkM2I5ZGNmNjhiMTZhYQ==
5
+ data.tar.gz: !binary |-
6
+ YjNiYTZkYTczODAyNzg0MDcyYWE2YjI5ZTQ3NTU4NTc3ZGY0MDQwNw==
5
7
  SHA512:
6
- metadata.gz: 3f367757132393538a49b096074b3b0a52e4bc5cceec7b7baab6f76ee37847d23d2ad6a04872b767bf92fae311ac51451700ab0961051df41d8905e98e5c82e1
7
- data.tar.gz: 0a850d1f1d7bd8cf7c9df47f776d5f1e2001d0d10a2872bf09912a57302fbc705a583be5907a2955836c8a570386e310b61bf19540640e1cd21f38a5c6e115e0
8
+ metadata.gz: !binary |-
9
+ NzAxNjU5M2ZkZjQzOGI0ZjA0ZmQyNjg4YmZiODYzNmRmM2VhMGY1YTZhMzdm
10
+ YWRkNTFhZDkxMWIwOGIxMGQzYTA0MWE1N2RhODU1NTgzMmI2M2Q4MGE3NTAy
11
+ YjhlNmY2YzcyNDdmNGI0MTgxMDQyNDQwNjM1ZjlkYzU3MjE5MjU=
12
+ data.tar.gz: !binary |-
13
+ MTQ4ZmIyNDBiYmYxY2Q2NGIzMWMyMDM0OTQxZDY3ZDQ0ZTc1ZWQxMmNiNGIy
14
+ MzZhNTU5YWRlOGUyZTZlYzMyY2NiZTIxMjYwMzY2NjU0OGU1MmEwNDdkYjc5
15
+ OTIxMWEwM2I4MDE3YjM2NjZlZjYzZjFiZTM3ZGY0MjBhYjFjMjA=
data/CHANGELOG.md CHANGED
@@ -3,7 +3,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
4
  This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
5
 
6
- ## Unreleased][unreleased]
6
+ ## [Unreleased]
7
+
8
+ ## [0.0.4] - 2016-08-10
9
+ ### Changed
10
+ - Updated sensu-plugin dependency from `= 1.2.0` to `~> 1.2`
11
+ - improved description for --json_config option
7
12
 
8
13
  ## [0.0.3] - 2015-07-14
9
14
  ### Changed
@@ -13,7 +18,6 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
13
18
  - ability to specify the room at the check level
14
19
 
15
20
  ## [0.0.2] - 2015-06-02
16
-
17
21
  ### Fixed
18
22
  - added binstubs
19
23
  ### Changed
@@ -23,3 +27,7 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
23
27
  ### Added
24
28
  - initial release
25
29
 
30
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-hipchat/compare/0.0.4...HEAD
31
+ [0.0.4]: https://github.com/sensu-plugins/sensu-plugins-hipchat/compare/0.0.3...0.0.4
32
+ [0.0.3]: https://github.com/sensu-plugins/sensu-plugins-hipchat/compare/0.0.2...0.0.3
33
+ [0.0.2]: https://github.com/sensu-plugins/sensu-plugins-hipchat/compare/0.0.1...0.0.2
data/README.md CHANGED
@@ -5,7 +5,6 @@
5
5
  [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-hipchat/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-hipchat)
6
6
  [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-hipchat/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-hipchat)
7
7
  [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-hipchat.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-hipchat)
8
- [![Codeship Status for sensu-plugins/sensu-plugins-hipchat](https://codeship.com/projects/6a226580-e891-0132-adeb-62885e5c211b/status?branch=master)](https://codeship.com/projects/82832)
9
8
 
10
9
  ## Functionality
11
10
 
@@ -26,6 +25,6 @@
26
25
  ```
27
26
  ## Installation
28
27
 
29
- [Installation and Setup](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md)
28
+ [Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
30
29
 
31
30
  ## Notes
@@ -9,17 +9,16 @@
9
9
  # @event['action'] - Property to figure out the event type i.e. whether it is create or resolve.
10
10
  # @event['check'] - Map of attributes from the check config which is calling this handler
11
11
  # @event['client'] - Map of attributes from the client config for the clients from which this event is generated.
12
- # option: json_config - By default, assumes the hipchat config parameters are in a file called "hipchat.json" with
13
- # "hipchat" being the top-level key of the json. This command line option allows to specify
14
- # a custom file instead of "hipchat.json" to fetch the hipchat config from.
12
+ # option: json_config - By default, assumes the hipchat config parameters are in the "hipchat" top-level json key.
13
+ # This command line option allows to specify a custom json key.
15
14
  #
16
15
  # Output:
17
16
  # Green coloured notification on the Hipchat room if a resolve event is seen.
18
17
  # Yellow coloured notification used to notify warning if a create event is seen with a status of 1
19
18
  # Red coloured notification used to notify critical if a create event is seen with a status other than 1
20
19
  #
21
- # Note: The default hipchat config is fetched from the predefined json config file which is "hipchat.json" or any other
22
- # file defiend using the "json_config" command line option. The hipchat room could also be configured on a per client basis
20
+ # Note: The handler config is fetched and merged from all json config files. The "hipchat" json key is used by default which can
21
+ # be overridden with the "json_config" command line option. The hipchat room could also be configured on a per client basis
23
22
  # by defining the "hipchat_room" attribute in the client config file. This will override the default hipchat room where the
24
23
  # alerts are being routed to for that particular client.
25
24
 
@@ -29,17 +28,18 @@ require 'timeout'
29
28
 
30
29
  class HipChatNotif < Sensu::Handler
31
30
  option :json_config,
32
- description: 'Config Name',
33
- short: '-j JsonConfig',
34
- long: '--json_config JsonConfig',
35
- required: false
31
+ description: 'JSON config key name',
32
+ short: '-j JsonKeyName',
33
+ long: '--json_config JsonKeyName',
34
+ required: false,
35
+ default: 'hipchat'
36
36
 
37
37
  def event_name
38
38
  @event['client']['name'] + '/' + @event['check']['name']
39
39
  end
40
40
 
41
41
  def handle
42
- json_config = config[:json_config] || 'hipchat'
42
+ json_config = config[:json_config]
43
43
  server_url = settings[json_config]['server_url'] || 'https://api.hipchat.com'
44
44
  apiversion = settings[json_config]['apiversion'] || 'v1'
45
45
  proxy_url = settings[json_config]['proxy_url']
@@ -54,11 +54,11 @@ class HipChatNotif < Sensu::Handler
54
54
  if @event['check']['playbook']
55
55
  begin
56
56
  uri = URI.parse(@event['check']['playbook'])
57
- if %w( http https ).include?(uri.scheme)
58
- message << " [<a href='#{@event['check']['playbook']}'>Playbook</a>]"
59
- else
60
- message << " Playbook: #{@event['check']['playbook']}"
61
- end
57
+ message << if %w( http https ).include?(uri.scheme)
58
+ " [<a href='#{@event['check']['playbook']}'>Playbook</a>]"
59
+ else
60
+ " Playbook: #{@event['check']['playbook']}"
61
+ end
62
62
  rescue
63
63
  message << " Playbook: #{@event['check']['playbook']}"
64
64
  end
@@ -2,7 +2,7 @@ module SensuPluginsHipchat
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 3
5
+ PATCH = 4
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,51 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-hipchat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDgDCCAmigAwIBAgIBATANBgkqhkiG9w0BAQUFADBDMRIwEAYDVQQDDAltYXR0
14
- am9uZXMxGDAWBgoJkiaJk/IsZAEZFgh5aWVsZGJvdDETMBEGCgmSJomT8ixkARkW
15
- A2NvbTAeFw0xNTAxMjgyMTAyNTFaFw0xNjAxMjgyMTAyNTFaM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OjNVGN4gz1wwPr
32
- -----END CERTIFICATE-----
33
- date: 2015-07-14 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2016-08-11 00:00:00.000000000 Z
34
12
  dependencies:
35
13
  - !ruby/object:Gem::Dependency
36
14
  name: sensu-plugin
37
15
  requirement: !ruby/object:Gem::Requirement
38
16
  requirements:
39
- - - '='
17
+ - - ~>
40
18
  - !ruby/object:Gem::Version
41
- version: 1.2.0
19
+ version: '1.2'
42
20
  type: :runtime
43
21
  prerelease: false
44
22
  version_requirements: !ruby/object:Gem::Requirement
45
23
  requirements:
46
- - - '='
24
+ - - ~>
47
25
  - !ruby/object:Gem::Version
48
- version: 1.2.0
26
+ version: '1.2'
49
27
  - !ruby/object:Gem::Dependency
50
28
  name: hipchat
51
29
  requirement: !ruby/object:Gem::Requirement
@@ -61,133 +39,133 @@ dependencies:
61
39
  - !ruby/object:Gem::Version
62
40
  version: 1.5.1
63
41
  - !ruby/object:Gem::Dependency
64
- name: codeclimate-test-reporter
42
+ name: bundler
65
43
  requirement: !ruby/object:Gem::Requirement
66
44
  requirements:
67
- - - "~>"
45
+ - - ~>
68
46
  - !ruby/object:Gem::Version
69
- version: '0.4'
47
+ version: '1.7'
70
48
  type: :development
71
49
  prerelease: false
72
50
  version_requirements: !ruby/object:Gem::Requirement
73
51
  requirements:
74
- - - "~>"
52
+ - - ~>
75
53
  - !ruby/object:Gem::Version
76
- version: '0.4'
54
+ version: '1.7'
77
55
  - !ruby/object:Gem::Dependency
78
- name: rubocop
56
+ name: codeclimate-test-reporter
79
57
  requirement: !ruby/object:Gem::Requirement
80
58
  requirements:
81
- - - '='
59
+ - - ~>
82
60
  - !ruby/object:Gem::Version
83
- version: '0.30'
61
+ version: '0.4'
84
62
  type: :development
85
63
  prerelease: false
86
64
  version_requirements: !ruby/object:Gem::Requirement
87
65
  requirements:
88
- - - '='
66
+ - - ~>
89
67
  - !ruby/object:Gem::Version
90
- version: '0.30'
68
+ version: '0.4'
91
69
  - !ruby/object:Gem::Dependency
92
- name: rspec
70
+ name: github-markup
93
71
  requirement: !ruby/object:Gem::Requirement
94
72
  requirements:
95
- - - "~>"
73
+ - - ~>
96
74
  - !ruby/object:Gem::Version
97
- version: '3.1'
75
+ version: '1.3'
98
76
  type: :development
99
77
  prerelease: false
100
78
  version_requirements: !ruby/object:Gem::Requirement
101
79
  requirements:
102
- - - "~>"
80
+ - - ~>
103
81
  - !ruby/object:Gem::Version
104
- version: '3.1'
82
+ version: '1.3'
105
83
  - !ruby/object:Gem::Dependency
106
- name: bundler
84
+ name: pry
107
85
  requirement: !ruby/object:Gem::Requirement
108
86
  requirements:
109
- - - "~>"
87
+ - - ~>
110
88
  - !ruby/object:Gem::Version
111
- version: '1.7'
89
+ version: '0.10'
112
90
  type: :development
113
91
  prerelease: false
114
92
  version_requirements: !ruby/object:Gem::Requirement
115
93
  requirements:
116
- - - "~>"
94
+ - - ~>
117
95
  - !ruby/object:Gem::Version
118
- version: '1.7'
96
+ version: '0.10'
119
97
  - !ruby/object:Gem::Dependency
120
98
  name: rake
121
99
  requirement: !ruby/object:Gem::Requirement
122
100
  requirements:
123
- - - "~>"
101
+ - - ~>
124
102
  - !ruby/object:Gem::Version
125
- version: '10.0'
103
+ version: '10.5'
126
104
  type: :development
127
105
  prerelease: false
128
106
  version_requirements: !ruby/object:Gem::Requirement
129
107
  requirements:
130
- - - "~>"
108
+ - - ~>
131
109
  - !ruby/object:Gem::Version
132
- version: '10.0'
110
+ version: '10.5'
133
111
  - !ruby/object:Gem::Dependency
134
- name: github-markup
112
+ name: redcarpet
135
113
  requirement: !ruby/object:Gem::Requirement
136
114
  requirements:
137
- - - "~>"
115
+ - - ~>
138
116
  - !ruby/object:Gem::Version
139
- version: '1.3'
117
+ version: '3.2'
140
118
  type: :development
141
119
  prerelease: false
142
120
  version_requirements: !ruby/object:Gem::Requirement
143
121
  requirements:
144
- - - "~>"
122
+ - - ~>
145
123
  - !ruby/object:Gem::Version
146
- version: '1.3'
124
+ version: '3.2'
147
125
  - !ruby/object:Gem::Dependency
148
- name: redcarpet
126
+ name: rubocop
149
127
  requirement: !ruby/object:Gem::Requirement
150
128
  requirements:
151
- - - "~>"
129
+ - - ~>
152
130
  - !ruby/object:Gem::Version
153
- version: '3.2'
131
+ version: 0.40.0
154
132
  type: :development
155
133
  prerelease: false
156
134
  version_requirements: !ruby/object:Gem::Requirement
157
135
  requirements:
158
- - - "~>"
136
+ - - ~>
159
137
  - !ruby/object:Gem::Version
160
- version: '3.2'
138
+ version: 0.40.0
161
139
  - !ruby/object:Gem::Dependency
162
- name: yard
140
+ name: rspec
163
141
  requirement: !ruby/object:Gem::Requirement
164
142
  requirements:
165
- - - "~>"
143
+ - - ~>
166
144
  - !ruby/object:Gem::Version
167
- version: '0.8'
145
+ version: '3.4'
168
146
  type: :development
169
147
  prerelease: false
170
148
  version_requirements: !ruby/object:Gem::Requirement
171
149
  requirements:
172
- - - "~>"
150
+ - - ~>
173
151
  - !ruby/object:Gem::Version
174
- version: '0.8'
152
+ version: '3.4'
175
153
  - !ruby/object:Gem::Dependency
176
- name: pry
154
+ name: yard
177
155
  requirement: !ruby/object:Gem::Requirement
178
156
  requirements:
179
- - - "~>"
157
+ - - ~>
180
158
  - !ruby/object:Gem::Version
181
- version: '0.10'
159
+ version: '0.8'
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
163
  requirements:
186
- - - "~>"
164
+ - - ~>
187
165
  - !ruby/object:Gem::Version
188
- version: '0.10'
166
+ version: '0.8'
189
167
  description: Sensu plugins for hipchat
190
- email: "<sensu-users@googlegroups.com>"
168
+ email: <sensu-users@googlegroups.com>
191
169
  executables:
192
170
  - handler-hipchat.rb
193
171
  extensions: []
@@ -215,17 +193,17 @@ require_paths:
215
193
  - lib
216
194
  required_ruby_version: !ruby/object:Gem::Requirement
217
195
  requirements:
218
- - - ">="
196
+ - - ! '>='
219
197
  - !ruby/object:Gem::Version
220
198
  version: 1.9.3
221
199
  required_rubygems_version: !ruby/object:Gem::Requirement
222
200
  requirements:
223
- - - ">="
201
+ - - ! '>='
224
202
  - !ruby/object:Gem::Version
225
203
  version: '0'
226
204
  requirements: []
227
205
  rubyforge_project:
228
- rubygems_version: 2.4.6
206
+ rubygems_version: 2.4.5
229
207
  signing_key:
230
208
  specification_version: 4
231
209
  summary: Sensu plugins for hipchat
checksums.yaml.gz.sig DELETED
Binary file
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file