hipnote 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -5
- data/lib/hipnote.rb +2 -2
- data/lib/hipnote/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81a6c3c3d9e6c5dd558302cbe2fa380f930dc822
|
4
|
+
data.tar.gz: f2c2f1181cb97a685bfe5c71d71188f4c7bcce53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eff70f21e52659852d735ec934d247f6e09b6b05aec545aa4924c6e9d9e861eef6d85dc88ededb09cf105709ee105a45c752aac8deb7070d85e14578dd9af68b
|
7
|
+
data.tar.gz: e3cb680c112fe2b214e4226e6c6e384b88fc950a6192a0c82828e6897a957112d060acdbb7eab9827b7bc1e699bfb866563963d27588a5796b4bb3e0dd2f82e8
|
data/README.md
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
# Hipnote
|
2
|
-
|
3
2
|
Post a notification in hipchat
|
4
3
|
|
5
4
|
## Installation
|
6
|
-
|
7
5
|
Add this line to your application's Gemfile:
|
8
6
|
|
9
7
|
gem 'hipnote'
|
@@ -17,11 +15,18 @@ Or install it yourself as:
|
|
17
15
|
$ gem install hipnote
|
18
16
|
|
19
17
|
## Usage
|
20
|
-
|
21
|
-
|
18
|
+
Make sure you set `ENV['HIPCHAT_API_TOKEN']`
|
19
|
+
`Hipnote.post([room], [message], { title: [title], color: [color], format: [format] })`
|
20
|
+
- `room` (where you want the message to post)
|
21
|
+
- `message` (what you want to post)
|
22
|
+
- `title` (title of the post) Default: 'Note'
|
23
|
+
- `color` (color of the pos) Default: 'yellow'
|
24
|
+
- `format` (format of the post. 'text' or 'html') Default: 'text'
|
25
|
+
Examples:
|
26
|
+
`Hipnote.post('project room', 'Deploying now', title: 'Deployment')`
|
27
|
+
`Hipnote.post('technical comms', 'Attention, this is an <strong>alert.</strong>', color: 'red', format: 'html')`
|
22
28
|
|
23
29
|
## Contributing
|
24
|
-
|
25
30
|
1. Fork it ( https://github.com/[my-github-username]/hipnote/fork )
|
26
31
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
32
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
data/lib/hipnote.rb
CHANGED
@@ -6,13 +6,13 @@ module Hipnote
|
|
6
6
|
@client = HipChat::Client.new(@token)
|
7
7
|
|
8
8
|
def self.post(room, msg, options = {})
|
9
|
-
|
9
|
+
title = options[:title] || 'Note'
|
10
10
|
format = options[:format] || 'text'
|
11
11
|
color = options[:color] || 'yellow'
|
12
12
|
|
13
13
|
if msg && room
|
14
14
|
@client[room].send(
|
15
|
-
|
15
|
+
title,
|
16
16
|
msg,
|
17
17
|
message_format: format,
|
18
18
|
color: color
|
data/lib/hipnote/version.rb
CHANGED