hipnote 0.0.6 → 0.0.7

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: 1b88c777c7a4212784e43e53758f5f67dfe2653e
4
- data.tar.gz: f6be4ae0f15e2e2fe2b42a25c60229e7b08d1266
3
+ metadata.gz: 81a6c3c3d9e6c5dd558302cbe2fa380f930dc822
4
+ data.tar.gz: f2c2f1181cb97a685bfe5c71d71188f4c7bcce53
5
5
  SHA512:
6
- metadata.gz: e2e51803cde200ade7f1e8a8033838cbe5fd17d8f825da7bb7af9e69de2c38e22089785704505d63f45aa19d0010b02b1ad68c06924c9f292b7f6b67c258b3cc
7
- data.tar.gz: 36d0eac56c006600e30d29dbdc86a8925311fcd3a7fe30fee242b80e50d191226368adb239b8c5a04e9964e50efc705b7a85e9721e65dd1c7967c070d89ae56d
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
- Make sure you set `ENV['HIPCHAT_API_TOKEN']`
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'`)
@@ -6,13 +6,13 @@ module Hipnote
6
6
  @client = HipChat::Client.new(@token)
7
7
 
8
8
  def self.post(room, msg, options = {})
9
- user = options[:user] || 'Note'
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
- user,
15
+ title,
16
16
  msg,
17
17
  message_format: format,
18
18
  color: color
@@ -1,3 +1,3 @@
1
1
  module Hipnote
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hipnote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse La Russo