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.
- checksums.yaml +4 -4
- data/src/run/core.rb +16 -9
- 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: 8e555958efc86d7844123107f0292ca6ed17b031fe2eaf97ab90e92a3cd2af1a
|
|
4
|
+
data.tar.gz: 6368108584d16bf4bc26008abfad9c6ffe35a7cd412ea302ee5e4d06f4973c2f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
120
|
+
next
|
|
121
|
+
elsif (match = arg.match(/^-([a-zA-Z_]\w*)$/))
|
|
121
122
|
options[match[1].to_sym] = false
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
next
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|