eye-hipchat 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2I4NTI5NmQ0OWVkYjM2YjRlMmUyZWNjZDZkY2I3YzYwYTBiMjFhYg==
4
+ ZDFjMjQyYTY2N2VkOTE1OWFlZDg2ZWFhNjM2ZmU1ZWQ2ODAzZTgyYw==
5
5
  data.tar.gz: !binary |-
6
- Y2VhZDM2MWJlNTJjMzg4YTc2N2YxNWQzZmRhOTkwZjY0Y2JmZDlhZg==
6
+ MzMzNTQwN2QxNDhkMTBiOThlNDRiN2RiYzQxYzdjN2M4MGRhYjI5OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTUxYTFlYjdmMDU2YmNiZWJlZTdkMTNmM2JjZWRiYjBiNDkxNTNkNTJiYTE5
10
- ZmU1MDM5NTIxZGJkM2I2ZTZmNjFjNTlkNDRmMmFhYTBhNTQzYzJkZWE1Nzdh
11
- M2YwNGMzYWQxMWM5NTgxZTY1NTUyN2RjM2ViZDhkZThlNTU1Yjg=
9
+ MTViODkzZDA0OTg2YjlkZWRkNGE4YTMxYzA0NGU0ZjQwMDc4ZGI4NzE3NWQ2
10
+ ZDIxNTFlYjFkYWJkM2YyZjVlZGEwOTc2N2I1NWMxMmRlNjgxNDJkNWMwOTZh
11
+ YjA2YWViMDg1ZGVmNTRjODg5YTk2ZjEwNzU3NzlmZDVkMWMyZWQ=
12
12
  data.tar.gz: !binary |-
13
- NTNiOWVmY2ViZDhjMWE1ZjAxOTZiZWZiNTc2MjJhNjU3MGM1ZjA2MzJhYTBl
14
- NDM0YmIyNDFjM2RlZTE4NDkwMThkYzJmYjhlYWFiYzJjZjY1MzUwOGM1YWYy
15
- ODQ3NWNiODk2MzUxZTM0NDA1Y2ZkNTU0ODBiYmNmNjNlN2JmMTQ=
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
- * `time` - human readable time of the event
59
- * `host` - hostname
60
- * `message` - full message
61
- * `name` - name of process
62
- * `full_name` - full process name (like group::process)
63
- * `pid` - process ID
64
- * `level` - message info level
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
 
@@ -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: 'html')
53
+ client[contact].send(name, what, message_format: format, color: color, notify: notify_all)
50
54
  end
51
55
  end
52
56
 
@@ -4,7 +4,7 @@ module Eye
4
4
  class Eye::Notify::Custom < Eye::Notify; end
5
5
 
6
6
  class Hipchat < Eye::Notify::Custom
7
- VERSION = "0.0.2"
7
+ VERSION = "0.0.3"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eye-hipchat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Meinlschmidt