run_tasks 3.2.5 → 3.2.7

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/src/run/core.rb +16 -9
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c30b258f0878bc9ffc2f0a08c5f36783b6cbbfbac8336e784d08cc5286abcbb
4
- data.tar.gz: dd121f1d5f725e9497fe05a3b04423415f65c1621f53ba9f59a9c453b4569c7e
3
+ metadata.gz: 8e555958efc86d7844123107f0292ca6ed17b031fe2eaf97ab90e92a3cd2af1a
4
+ data.tar.gz: 6368108584d16bf4bc26008abfad9c6ffe35a7cd412ea302ee5e4d06f4973c2f
5
5
  SHA512:
6
- metadata.gz: 8140498034cdf34b7293d1909a2c8c3d8c53636feae51e867b271216e714a12ba7103bd86d7b7e397b2907250eb534688aab195bb76d7769f9b59e27595fcc6e
7
- data.tar.gz: d022b3de66d9d7642b76ec7a852dc427e4ca67244f1fbc0cca5d9d0449bd4d5f6c8331892a6dcbad37b708239c0a406bbd84078023f3bd82c15a4a9ad2be2d0c
6
+ metadata.gz: 666dad6bf1e5a1c3d9cebbc2c73f1c81786a3efefb426d653856de32dc29b37f048fa4dfa6b6ac8412545af6332e736dd0cf3b5e357ef3245e58f192827371e4
7
+ data.tar.gz: 84d029de83a9f21b3a4775108678b48eb0b4befb9afdecb66b30346c68872c964e8860ca4c5b9afe0ce19f082f914bdea25b28a2a2b95dac575e8636fda205e6
data/src/run/core.rb CHANGED
@@ -115,18 +115,25 @@ module Run
115
115
  options = {}
116
116
 
117
117
  ARGV.slice(1, ARGV.size - 1).each do |arg|
118
- if (match = arg.match(/^\+(\w+)$/))
118
+ if (match = arg.match(/^\+([a-zA-Z_]\w*)$/))
119
119
  options[match[1].to_sym] = true
120
- elsif (match = arg.match(/^-(\w+)$/))
120
+ next
121
+ elsif (match = arg.match(/^-([a-zA-Z_]\w*)$/))
121
122
  options[match[1].to_sym] = false
122
- else
123
- value = Float(arg) rescue nil
124
- next args << value if !value.nil?
125
- next args << true if arg == "true"
126
- next args << false if arg == "false"
127
- next args << arg.to_sym if arg.match?(/^\w+$/)
128
- args << arg
123
+ next
124
+ elsif arg.match?(/^-?\d+$/)
125
+ args << Integer(arg)
126
+ next
127
+ elsif arg.match?(/^-?\d+\.\d+$/)
128
+ args << Float(arg)
129
+ next
129
130
  end
131
+ raise
132
+ rescue
133
+ next args << true if arg == "true"
134
+ next args << false if arg == "false"
135
+ next args << arg.to_sym if arg.match?(/^\w+$/)
136
+ args << arg
130
137
  end
131
138
 
132
139
  run name, *args, **options
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: run_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.5
4
+ version: 3.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aurélien Delogu