sensu-plugins-rocket-chat 1.0.1 → 1.0.2

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 907a6317875acb87e033e8c46fe88f61ba8de161
4
- data.tar.gz: 85b93fbb5d86fbbeea387370b8dbfbe7664e6054
3
+ metadata.gz: 15597ed42f6f127d363724fe534d758ef3e007c1
4
+ data.tar.gz: df98b3930e5c6529d2b5849080306cf32e0be985
5
5
  SHA512:
6
- metadata.gz: 8d1eeae7a405e018fab67e1e5f5aed984d2c30c4609e491b3c0ba753e3f80a5ef08c05f6da746452823577bf76319e52460974b794001787e5b96e75c6151c4f
7
- data.tar.gz: ff42064a664074cd28709558911c57d0735fd35d41e4bc07fde163c11e9f59733d1567319a63e1a37fe36d2f84517eed114a9f2474d7f0b6f474b83dbe62b947
6
+ metadata.gz: 941f821fd361b26a05c9b567b69d654afce4c295c6e563388dfaa3885a2385b9622cc3a9c1b46b9f9340c7b84f802e6846449db3c56e4fa02d166db1ea6d22d2
7
+ data.tar.gz: 2b9cb5503a0045fb151856d73bb2909bcccd3d42c0661311b56106f5b5e513a05c045bb099c03b9f84a535fe04250d880eff322decfb62894e8cc05feb5f21b7
@@ -5,6 +5,14 @@ This CHANGELOG follows [this format](https://github.com/sensu-plugins/community/
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## 1.0.2 - 2018-11-22
9
+ ### Changed
10
+ - Don't escape HTML, since RocketChat doesn't support HTML formatting.
11
+ - Don't format the output as code, since newlines are not supported. If there
12
+ are newlines between backticks, then RocketChat does not format the text as
13
+ code and shows the backticks.
14
+
15
+
8
16
  ## 1.0.1 - 2018-11-20
9
17
  ### Added
10
18
  - Initial release
@@ -132,19 +132,15 @@ class RocketChatHandler < Sensu::Handler
132
132
  end
133
133
 
134
134
  def client_name
135
- escape_html @event['client']['name']
135
+ @event['client']['name']
136
136
  end
137
137
 
138
138
  def check_name
139
- escape_html @event['check']['name']
139
+ @event['check']['name']
140
140
  end
141
141
 
142
142
  def output
143
- escape_html @event['check']['output']
144
- end
145
-
146
- def escape_html(string)
147
- CGI.escapeHTML(string)
143
+ @event['check']['output'].strip
148
144
  end
149
145
 
150
146
  def build_message
@@ -167,7 +163,7 @@ class RocketChatHandler < Sensu::Handler
167
163
  '**Host:** <%= client_name %>',
168
164
  '**Check:** <%= check_name %>',
169
165
  '**Status:** <%= status %> <%= status_icon %>',
170
- '**Output:** `<%= output %>`'
166
+ '**Output:** <%= output %>'
171
167
  ].join("\n")
172
168
  end
173
169
 
@@ -4,7 +4,7 @@ module SensuPluginsRocketChat
4
4
  module Version
5
5
  MAJOR = 1
6
6
  MINOR = 0
7
- PATCH = 1
7
+ PATCH = 2
8
8
 
9
9
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-rocket-chat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hernan Schmidt
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-11-20 00:00:00.000000000 Z
12
+ date: 2018-11-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rocketchat