hubbard 0.0.15 → 0.0.16
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/VERSION +1 -1
- data/bin/hubbard +10 -8
- data/hubbard.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.16
|
data/bin/hubbard
CHANGED
|
@@ -12,7 +12,7 @@ FileUtils.mkdir_p(Hubbard::ACCOUNTS_PATH)
|
|
|
12
12
|
formats = [:text, :yaml]
|
|
13
13
|
defaults = { :format => formats.first }
|
|
14
14
|
options = {}
|
|
15
|
-
OptionParser.new do |opts|
|
|
15
|
+
opts = OptionParser.new do |opts|
|
|
16
16
|
opts.banner = <<BANNER
|
|
17
17
|
Usage: hubbard [options] <command>
|
|
18
18
|
|
|
@@ -43,13 +43,6 @@ BANNER
|
|
|
43
43
|
"Output format (#{formats.join(', ')})") do |o|
|
|
44
44
|
options[:format] = o
|
|
45
45
|
end
|
|
46
|
-
end.parse!
|
|
47
|
-
OPTIONS = defaults.merge(options)
|
|
48
|
-
OPTIONS.freeze
|
|
49
|
-
|
|
50
|
-
if ARGV.length < 1
|
|
51
|
-
puts opts
|
|
52
|
-
exit 0
|
|
53
46
|
end
|
|
54
47
|
|
|
55
48
|
def next_arg(msg)
|
|
@@ -104,6 +97,15 @@ if ENV['SSH_ORIGINAL_COMMAND']
|
|
|
104
97
|
end
|
|
105
98
|
end
|
|
106
99
|
|
|
100
|
+
opts.parse!
|
|
101
|
+
OPTIONS = defaults.merge(options)
|
|
102
|
+
OPTIONS.freeze
|
|
103
|
+
|
|
104
|
+
if ARGV.empty? || ARGV[0] == 'help'
|
|
105
|
+
puts opts
|
|
106
|
+
exit 0
|
|
107
|
+
end
|
|
108
|
+
|
|
107
109
|
command = next_arg "Please specify a command to run"
|
|
108
110
|
|
|
109
111
|
if command == "run-as"
|
data/hubbard.gemspec
CHANGED