hipchat 0.10.1 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.textile +5 -1
- data/lib/hipchat/capistrano.rb +1 -7
- data/lib/hipchat/rails3_tasks.rb +8 -3
- data/lib/hipchat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b14a3d503b8dd0e2328c0428d84ce558d8610997
|
4
|
+
data.tar.gz: 149915edf47032db069730107a43b85e00a57dfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bc937a5155d8c7c7b5f666fec0bec676b26517a8c3b5834faafffa0097b8faab3d742fd66f521ebca98325aadd94c6d8acc7483c69393fb5fc45446ebb57051
|
7
|
+
data.tar.gz: 3f03b59bb670761e06120cfc91e84e497b20418e7e9c7aa9b29d60ed1a14cfe73fbe0de0fd453f7be17b07d2beebb5d046e8639eb69fb3771671f5a664fbf848
|
data/README.textile
CHANGED
@@ -26,7 +26,7 @@ client['my room'].topic('Free Ice Cream in the kitchen')
|
|
26
26
|
# Change the from field for a topic update (default "API")
|
27
27
|
client['my room'].topic('Weekely sales: $10,000', :from => 'Sales Team')
|
28
28
|
|
29
|
-
# Get history from a room
|
29
|
+
# Get history from a room
|
30
30
|
client['my room'].history()
|
31
31
|
|
32
32
|
# Get history for a date in time with a particular timezone (default is latest 75 messages, timezone default is 'UTC')
|
@@ -60,6 +60,10 @@ Send a message using a rake task:
|
|
60
60
|
|
61
61
|
bc. rake hipchat:send["hello world"]
|
62
62
|
|
63
|
+
or
|
64
|
+
|
65
|
+
bc. rake hipchat:send MESSAGE="hello world"
|
66
|
+
|
63
67
|
Options like the room, API token, user name and notification flag can be set in YAML.
|
64
68
|
|
65
69
|
RAILS_ROOT/config/hipchat.yml:
|
data/lib/hipchat/capistrano.rb
CHANGED
@@ -65,13 +65,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
65
65
|
rooms.each { |room|
|
66
66
|
begin
|
67
67
|
hipchat_client[room].send(deploy_user, message, options)
|
68
|
-
rescue
|
69
|
-
puts e.message
|
70
|
-
puts e.backtrace
|
71
|
-
rescue Unauthorized => e
|
72
|
-
puts e.message
|
73
|
-
puts e.backtrace
|
74
|
-
rescue UnknownResponseCode => e
|
68
|
+
rescue => e
|
75
69
|
puts e.message
|
76
70
|
puts e.backtrace
|
77
71
|
end
|
data/lib/hipchat/rails3_tasks.rb
CHANGED
@@ -2,7 +2,7 @@ require 'hipchat'
|
|
2
2
|
|
3
3
|
namespace :hipchat do
|
4
4
|
desc "Sends a HipChat message as a particular user"
|
5
|
-
task :send do
|
5
|
+
task :send, [:message] do |t, args|
|
6
6
|
required_options = [:message, :room, :token, :user]
|
7
7
|
config_file = Rails.root.join 'config', 'hipchat.yml'
|
8
8
|
|
@@ -14,16 +14,21 @@ namespace :hipchat do
|
|
14
14
|
:room => ENV['ROOM'],
|
15
15
|
:token => ENV['TOKEN']
|
16
16
|
}.reject { |k, v| v.blank? }
|
17
|
-
|
17
|
+
|
18
18
|
system_options = {
|
19
19
|
:user => ENV['USER']
|
20
20
|
}.reject { |k, v| v.blank? }
|
21
21
|
|
22
|
+
argument_options = {
|
23
|
+
:message => args.message
|
24
|
+
}.reject { |k, v| v.blank? }
|
25
|
+
|
22
26
|
if File.exists? config_file
|
23
27
|
options.reverse_merge! YAML.load_file(config_file).symbolize_keys
|
24
28
|
end
|
25
|
-
|
29
|
+
|
26
30
|
options.reverse_merge! system_options
|
31
|
+
options.merge! argument_options
|
27
32
|
|
28
33
|
options[:notify] = options[:notify].to_s != 'false'
|
29
34
|
|
data/lib/hipchat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hipchat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HipChat/Atlassian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|