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.
- checksums.yaml +4 -4
- data/src/run/core.rb +6 -4
- 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: '08041c87a941616b45fcbab38e5873b3b726c7f4be7e458b8ae24e5e26c845c5'
|
|
4
|
+
data.tar.gz: cabbf4e5a35336181d68f33aa713967e1e465da50276809eb9b8654e3c1d2a0b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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+$/)
|