run_tasks 3.2.5 → 3.2.6

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 +6 -4
  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: '08041c87a941616b45fcbab38e5873b3b726c7f4be7e458b8ae24e5e26c845c5'
4
+ data.tar.gz: cabbf4e5a35336181d68f33aa713967e1e465da50276809eb9b8654e3c1d2a0b
5
5
  SHA512:
6
- metadata.gz: 8140498034cdf34b7293d1909a2c8c3d8c53636feae51e867b271216e714a12ba7103bd86d7b7e397b2907250eb534688aab195bb76d7769f9b59e27595fcc6e
7
- data.tar.gz: d022b3de66d9d7642b76ec7a852dc427e4ca67244f1fbc0cca5d9d0449bd4d5f6c8331892a6dcbad37b708239c0a406bbd84078023f3bd82c15a4a9ad2be2d0c
6
+ metadata.gz: 507949a5c939349c5d43d12dbc032eaca4d0816bf0ed718a9ced17bb5362879568f52930578782a14f336a8674aa1c83be29b0585875fae48e49f6c6d0c67600
7
+ data.tar.gz: 60ebf9ac0fba1f51cc3573256f917ff72d186f6a3a61de9a24c146c4bea235f8a94d14e786ab24584ee03a89d835ae74aabf5e1774fa7eaee6f01a4bf5bd6b39
data/src/run/core.rb CHANGED
@@ -115,13 +115,15 @@ 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
+ elsif (match = arg.match(/^-([a-zA-Z_]\w*)$/))
121
121
  options[match[1].to_sym] = false
122
+ elsif arg.match?(/^-?\d+$/)
123
+ args << Integer(arg)
124
+ elsif arg.match?(/^-?\d+\.\d+$/)
125
+ args << Float(arg)
122
126
  else
123
- value = Float(arg) rescue nil
124
- next args << value if !value.nil?
125
127
  next args << true if arg == "true"
126
128
  next args << false if arg == "false"
127
129
  next args << arg.to_sym if arg.match?(/^\w+$/)
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.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aurélien Delogu