to_hipchat 0.0.1 → 1.0.0
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.
- data/bin/to_hipchat +7 -2
- data/lib/to_hipchat/version.rb +1 -1
- metadata +1 -1
data/bin/to_hipchat
CHANGED
@@ -8,11 +8,16 @@ class App
|
|
8
8
|
include Methadone::Main
|
9
9
|
include Methadone::CLILogging
|
10
10
|
|
11
|
-
main do
|
11
|
+
main do
|
12
12
|
unless options[:token] && options[:room]
|
13
13
|
help_now! "You need to supply at least token and room options so I know where to send data. You can also set them up on an environment variable named TO_HIPCHAT_DEFAULT_OPTIONS"
|
14
14
|
end
|
15
15
|
|
16
|
+
data = ARGV.shift
|
17
|
+
data = ARGF.read unless data
|
18
|
+
|
19
|
+
exit_now! "Supply data to send" unless data
|
20
|
+
|
16
21
|
debug "Token: " + options[:token]
|
17
22
|
debug "Room: " + options[:room]
|
18
23
|
debug "Username: " + options[:username]
|
@@ -26,7 +31,7 @@ class App
|
|
26
31
|
on("-r ROOM", "--room ROOM", "Hipchat Room")
|
27
32
|
on("-u USERNAME", "--username USERNAME", "Hipchat display username")
|
28
33
|
|
29
|
-
arg :data
|
34
|
+
arg :data, :optional
|
30
35
|
|
31
36
|
version ToHipchat::VERSION
|
32
37
|
|
data/lib/to_hipchat/version.rb
CHANGED