shoutbox-client 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shoutbox/shout.rb +3 -6
- metadata +3 -3
data/lib/shoutbox/shout.rb
CHANGED
@@ -12,8 +12,7 @@ module Shoutbox
|
|
12
12
|
def parse_options
|
13
13
|
|
14
14
|
sub_commands = %w(red green destroy)
|
15
|
-
|
16
|
-
|
15
|
+
|
17
16
|
@conf = Trollop::options do
|
18
17
|
banner <<-EOS
|
19
18
|
usage: shout <subcommand> <statusId>
|
@@ -28,15 +27,13 @@ shout allows the folling options:
|
|
28
27
|
EOS
|
29
28
|
opt :host, "The hostname of the Shoutbox", :type => String
|
30
29
|
opt :port, "The port of the Shoutbox", :type => Integer
|
31
|
-
opt :group, "The group to use", :type => String, :default => "
|
32
|
-
|
33
|
-
stop_on sub_commands
|
30
|
+
opt :group, "The group to use", :type => String, :default => "Shoutbox Default Group"
|
34
31
|
end
|
35
32
|
|
36
33
|
@conf[:status] = ARGV.shift
|
37
34
|
@conf[:statusId] = ARGV.shift
|
38
35
|
|
39
|
-
|
36
|
+
case @conf[:status]
|
40
37
|
when "red"
|
41
38
|
@conf[:message] = ARGV.shift
|
42
39
|
Trollop::die "provide <statusId> and <message> when shouting red" if @conf[:message].to_s.empty?
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 8
|
9
|
+
version: 0.0.8
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Benjamin Krause
|
@@ -134,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
134
134
|
requirements:
|
135
135
|
- - ">="
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
hash:
|
137
|
+
hash: 3514835620310691199
|
138
138
|
segments:
|
139
139
|
- 0
|
140
140
|
version: "0"
|