eye-hipchat 0.0.2 → 0.0.3
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 +8 -8
- data/README.md +11 -7
- data/lib/eye/notify/hipchat.rb +6 -2
- data/lib/eye/notify/hipchat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDFjMjQyYTY2N2VkOTE1OWFlZDg2ZWFhNjM2ZmU1ZWQ2ODAzZTgyYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzMzNTQwN2QxNDhkMTBiOThlNDRiN2RiYzQxYzdjN2M4MGRhYjI5OQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTViODkzZDA0OTg2YjlkZWRkNGE4YTMxYzA0NGU0ZjQwMDc4ZGI4NzE3NWQ2
|
10
|
+
ZDIxNTFlYjFkYWJkM2YyZjVlZGEwOTc2N2I1NWMxMmRlNjgxNDJkNWMwOTZh
|
11
|
+
YjA2YWViMDg1ZGVmNTRjODg5YTk2ZjEwNzU3NzlmZDVkMWMyZWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzljMGFjNDBjYzhjNTM1YzAwYjM1OGQwYTA5ZDNhNDA0MmUxMTM4ZmI3MTFm
|
14
|
+
NzE4NzkyNTZlODBjNTQyYzNiNDdhNzM3YjFmYjFhNTRmY2U3MzQ0NmU3NDJl
|
15
|
+
ZWMwMjZiNjlkMWJlOTVhNzU5ZTg2Y2I5ODczMWQxMDhkY2Y5ZjA=
|
data/README.md
CHANGED
@@ -54,14 +54,18 @@ end
|
|
54
54
|
* `api` - use *v1* (default) or v2
|
55
55
|
* `name` - who is reporting to hipchat, *Eye Bot* as a default
|
56
56
|
* `color` - *yellow* is default. You can choose from gray, green, purple, red, yellow or random
|
57
|
+
* `notify_all` - notify everyone in the room. Default is *false*
|
58
|
+
* `format` - format of the message. Either `html` or `text`. Default is *html*
|
57
59
|
* `message` - message to be sent, default is `<strong>#name#</strong> on #host# #message# at #time#.`
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
60
|
+
|
61
|
+
* `message` has following variables (variable must be enclosed to ##)
|
62
|
+
* `time` - human readable time of the event
|
63
|
+
* `host` - hostname
|
64
|
+
* `message` - full message
|
65
|
+
* `name` - name of process
|
66
|
+
* `full_name` - full process name (like group::process)
|
67
|
+
* `pid` - process ID
|
68
|
+
* `level` - message info level
|
65
69
|
|
66
70
|
## Contributing
|
67
71
|
|
data/lib/eye/notify/hipchat.rb
CHANGED
@@ -19,10 +19,14 @@ module Eye
|
|
19
19
|
# not required, if not specified, we're using 'Eye Bot'
|
20
20
|
param :name, String, false, 'Eye Bot'
|
21
21
|
# not required, 'yellow' as default color
|
22
|
-
param :color, String, false, 'yellow', ['gray','green','purple','red','yellow','random']
|
22
|
+
param :color, String, false, 'yellow', ['gray', 'green', 'purple', 'red', 'yellow', 'random']
|
23
23
|
# available messages:
|
24
24
|
# time host message name full_name pid level
|
25
25
|
param :message, String, false, '<strong>#name#</strong> on #host# #message# at #time#.'
|
26
|
+
# whether to notify room or not
|
27
|
+
param :notify_all, [TrueClass, FalseClass], false, false
|
28
|
+
# format of the message
|
29
|
+
param :format, String, false, 'html', ['text', 'html']
|
26
30
|
|
27
31
|
def execute
|
28
32
|
say(parse_message)
|
@@ -46,7 +50,7 @@ module Eye
|
|
46
50
|
end
|
47
51
|
|
48
52
|
def say(what)
|
49
|
-
client[contact].send(name, what, message_format:
|
53
|
+
client[contact].send(name, what, message_format: format, color: color, notify: notify_all)
|
50
54
|
end
|
51
55
|
end
|
52
56
|
|