hubbard 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/hubbard +10 -8
  3. data/hubbard.gemspec +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.15
1
+ 0.0.16
@@ -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"
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hubbard}
8
- s.version = "0.0.15"
8
+ s.version = "0.0.16"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matthew Foemmel"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubbard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Foemmel