nub 0.0.49 → 0.0.50
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.
- checksums.yaml +4 -4
- data/lib/nub/commander.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 627778afb0e5b413aa85a3b1a7182e8a15d81b8c084733cf89f477e7c92e9a0f
|
4
|
+
data.tar.gz: f7f523646f54628242273367e2eb9803dd3f586f31a283797bb176cecd00da34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afecc349dd342d53a177078bfaae6cda4ef69482a1c3ee68598337692ad3d70e7688aecf3140349ec839a5c5d3bf132ebe64e64fce0be53c9777a1550f5ef87f
|
7
|
+
data.tar.gz: daf23c611f74974a8704afb8da1f6f8e26422942e31218e1bd05609eacbce81c4dd99d9428373bd5ff00bf0161f1f8b68d4ebadbd91ac12f323f78a1a5f18f66
|
data/lib/nub/commander.rb
CHANGED
@@ -208,7 +208,7 @@ class Commander
|
|
208
208
|
# Process global options
|
209
209
|
#---------------------------------------------------------------------------
|
210
210
|
cmd_names = @config.map{|x| x.name }
|
211
|
-
ARGV.unshift('global') if
|
211
|
+
ARGV.unshift('global') if @config.find{|x| x.name == 'global'}
|
212
212
|
|
213
213
|
# Process command options
|
214
214
|
#---------------------------------------------------------------------------
|
@@ -300,10 +300,10 @@ class Commander
|
|
300
300
|
# --------------------------------------------------------------------
|
301
301
|
else
|
302
302
|
pos += 1
|
303
|
+
value = opt
|
303
304
|
cmd_opt = cmd_pos_opts.shift
|
304
305
|
!puts("Error: invalid positional option '#{opt}'!".colorize(:red)) && !puts(cmd.help) and
|
305
|
-
|
306
|
-
value = opt
|
306
|
+
exit if cmd_opt.nil? || cmd_names.include?(value)
|
307
307
|
sym = "#{cmd.name}#{pos}".to_sym
|
308
308
|
end
|
309
309
|
|