mothership 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mothership/help.rb +11 -5
- data/lib/mothership/version.rb +1 -1
- metadata +4 -4
data/lib/mothership/help.rb
CHANGED
@@ -150,16 +150,22 @@ module Mothership::Help
|
|
150
150
|
|
151
151
|
flag = name.to_s.gsub("_", "-")
|
152
152
|
|
153
|
-
full
|
153
|
+
# move full form to the front
|
154
|
+
fs.unshift fs.delete("--#{flag}")
|
154
155
|
|
155
|
-
short = fs.find { |x| x =~ /^-.$/ }
|
156
|
-
|
156
|
+
if short = fs.find { |x| x =~ /^-.$/ }
|
157
|
+
fs.delete short
|
158
|
+
end
|
157
159
|
|
158
160
|
if info[:type] == :boolean && info[:default] == true
|
159
|
-
|
161
|
+
fs.unshift "--[no-]#{flag}"
|
162
|
+
end
|
163
|
+
|
164
|
+
if info.key?(:default) && info.key?(:interact)
|
165
|
+
fs.unshift "--ask-#{flag}"
|
160
166
|
end
|
161
167
|
|
162
|
-
usage = "#{short ? short + "," : " "} #{
|
168
|
+
usage = "#{short ? short + "," : " "} #{fs.join ", "}"
|
163
169
|
|
164
170
|
unless info[:type] == :boolean
|
165
171
|
usage << " #{(info[:value] || name).to_s.upcase}"
|
data/lib/mothership/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mothership
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alex Suraci
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-10-
|
18
|
+
date: 2012-10-11 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|