to_hipchat 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,11 +8,16 @@ class App
8
8
  include Methadone::Main
9
9
  include Methadone::CLILogging
10
10
 
11
- main do |data|
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
 
@@ -1,3 +1,3 @@
1
1
  module ToHipchat
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_hipchat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: