rocketchat-notifier 0.1.1 → 0.1.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: 98f339e91f49520922bb2bd6c2f2f1a1f5f656fa
4
- data.tar.gz: 3a41085c11f56ee439d5c4d2093509bcd4c14b3d
3
+ metadata.gz: 89dca59bb9629eb2aed0b7f1d841f6588c5ab5dd
4
+ data.tar.gz: ed20791fbc36f328f896be408c89450779998268
5
5
  SHA512:
6
- metadata.gz: b16bbf0eb0a3f09bdf960608431a03948e9d4e8c386072ec086a0577f9b99345226ae33112f1b35f688a4a1996114556a2c5d80c507215a4817246f041feb772
7
- data.tar.gz: 2105c491d6f4bf59e1bf8b4c33fe8b6c29c576aa8ce302047501219848acaa5624c86c7b4ee8a56fc02c78b1d35150629e434f8f573ec77c74668bbd77835ad6
6
+ metadata.gz: ec4575b3aaedf029269ee94ea60fbed1d9544ba917d21edc379fbdaaea18b3712ee41a5f72340b2397e666dfdc471dc22fbce3fffbf15b72ae61300027c6db76
7
+ data.tar.gz: cd195c9d89123ba0236696eeb4f9ab8fd7c3958c4fc3258d45740531bd89af5bf8325b8ee02cebd6764aa6a675b70566588e33f339e735d88b4b06dff5b1c8a9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocketchat-notifier (0.1.0)
4
+ rocketchat-notifier (0.1.1)
5
5
  httparty (~> 0.13.7, >= 0.13.7)
6
6
 
7
7
  GEM
@@ -10,9 +10,9 @@ GEM
10
10
  httparty (0.13.7)
11
11
  json (~> 1.8)
12
12
  multi_xml (>= 0.5.2)
13
- json (1.8.3)
13
+ json (1.8.6)
14
14
  minitest (5.9.1)
15
- multi_xml (0.5.5)
15
+ multi_xml (0.6.0)
16
16
  rake (10.5.0)
17
17
 
18
18
  PLATFORMS
@@ -25,4 +25,4 @@ DEPENDENCIES
25
25
  rocketchat-notifier!
26
26
 
27
27
  BUNDLED WITH
28
- 1.13.6
28
+ 1.16.1
data/README.md CHANGED
@@ -36,7 +36,7 @@ And you are ready to go
36
36
  Fire a notification with: `RocketChatNotifier.notify "my message"`
37
37
 
38
38
  Optional parameters:
39
- * emoji: set a avatar emoji (`ok`, or `smile` e.g.)
39
+ * emoji: set a avatar emoji (`:ok:`, or `:smile:` e.g. See http://emoji.codes/ for a quick lookup)
40
40
  * event: set a eventname (will be shown as "username" in rocket.chat)
41
41
  * attachment: set an attachment hash. Example:
42
42
  ```ruby
@@ -54,7 +54,7 @@ Use the optional parameters as named parameters.
54
54
  Example:
55
55
 
56
56
  ```ruby
57
- RocketChatNotifier.notify 'my message', emoji: 'ok', event: 'my notifier', attachment: {title: 'my att. title', text: 'attachment text', color: '#FF0000'}
57
+ RocketChatNotifier.notify 'my message', emoji: ':ok:', event: 'my notifier', attachment: {title: 'my att. title', text: 'attachment text', color: '#FF0000'}
58
58
  ```
59
59
 
60
60
  Additionally you will need a parser script for your rocket.chat for the incoming webhook integration.
@@ -72,7 +72,7 @@ Simple:
72
72
  {
73
73
  "message": "my message\nwith second line",
74
74
  "event": "my notifier",
75
- "emoji": "ok",
75
+ "emoji": ":ok:",
76
76
  "attachment": {
77
77
  "title": "my att. title",
78
78
  "text": "attachment text",
@@ -86,7 +86,7 @@ Extended with some optional parameters:
86
86
  {
87
87
  "message": "my message\nwith second line",
88
88
  "event": "my notifier",
89
- "emoji": "ok",
89
+ "emoji": ":ok:",
90
90
  "attachment": {
91
91
  "title": "my att. title",
92
92
  "text": "attachment text",
@@ -0,0 +1 @@
1
+ theme: jekyll-theme-hacker
@@ -28,7 +28,7 @@ module RocketChatNotifier
28
28
  begin
29
29
  Rails.logger.debug("\nsending rocket chat notification request to webhook url:\n#{webhook_url}") if verbose_mode == true
30
30
 
31
- response = JSON.parse HTTParty.post(webhook_url, body: request_body).body
31
+ response = JSON.parse HTTParty.post(webhook_url, body: request_body.to_json, headers: { 'Content-Type' => 'application/json' }).body
32
32
 
33
33
  Rails.logger.debug("\nrocket chat response:\n#{response.inspect}\n") if verbose_mode == true
34
34
  warn("\nrocket chat notifier - warning: rocket chat could not be notified. rocket chat response: `#{response['error']}`") unless response['success'] || response['success'] == true
@@ -1,5 +1,5 @@
1
1
  module RocketChat
2
2
  module Notifier
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocketchat-notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Bajohr
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-29 00:00:00.000000000 Z
11
+ date: 2018-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -87,6 +87,7 @@ files:
87
87
  - LICENSE
88
88
  - README.md
89
89
  - Rakefile
90
+ - _config.yml
90
91
  - bin/console
91
92
  - bin/setup
92
93
  - lib/rocketchat/notifier.rb