kommand 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c93514c50147c756e6f34a4df0abd8e4e6b3b46
4
- data.tar.gz: 96585365c341cf167ef613f1bb4e6c0784c2a87e
3
+ metadata.gz: 6b5aa41925a11edfed6b7adeb85e2bede5734442
4
+ data.tar.gz: 55be7e210ab341fdb8def85653cfe4790c816e6d
5
5
  SHA512:
6
- metadata.gz: 6542a0fe4fdbf15aa9580a4bc2d959152da03e90e9ead5b0dd45e999cd1043aef310a31ff54a0bafa67f0f0439dfa0f7bd2da4237fdd3b64f6757dcf4c11ed2b
7
- data.tar.gz: ea0071ccd76f4021d989e7bd87e65ce998f3c5a6a72a9b9d1bbec3e636a8f0544de53e87a8bb4f17c182d12ff7e5ff8b553ad5bdd26cbde500868fa33d26c5a5
6
+ metadata.gz: 0edec37fb0149bb4f6ffce5a62cb96a1d616bd18ac3abafd5343ef37a9959b574aa1d14cf3cf1146bb6b5248d0931eb6a5aaf4ec49ec0a653e20d078af881454
7
+ data.tar.gz: 693e7d4981bcbc6ed7b8f75f6c5184ace268d00c7ff917e29dc4c199095504e3be004a2b397b94be91e7e10a0b8888f09d458446f8a33f0105ed5aa1d952f4ce
@@ -74,9 +74,9 @@ module Kommand
74
74
  next
75
75
  end
76
76
 
77
- # swap key/val to create an unnamed arg - if next argument is a valid flag we must be
78
- # a standalone argument
79
- if (!args[a+1] || valid_argument?(args[a+1])) && (argv.nil? || argv.empty?) && !Commands::exists?(arg)
77
+ # swap key/val to create an unnamed arg - if we're not a valid arg and we're the last argument or the
78
+ # next argument is a valid arg we must be an unnamed argument
79
+ if !valid_argument?(argk) && (!args[a+1] || valid_argument?(parse_arg(args[a+1])[0])) && (argv.nil? || argv.empty?) && !Commands::exists?(arg)
80
80
  argv = argk
81
81
  argk = nil
82
82
  end
@@ -1,3 +1,3 @@
1
1
  module Kommand
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kommand
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rebec