optparse2 0.7.4 → 0.7.5
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/lib/optparse2/version.rb +1 -1
- data/lib/optparse2.rb +3 -0
- 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: 5b075c92a3cfbcdaf6d194a8c10b5a6bc1adb503cce26dc9e54d1ce98e01e234
|
|
4
|
+
data.tar.gz: aa78b0efbaaff344675ee564c43db64b0da6118505b9bd66820925e146b8a40a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b22ee332ef698a1f87daba95815adc0bb7a174e7d2985cd69f6e21fa0d038e85926a7d6a103202e2d7f26519acecdb554f75f1ba621a89e235384d0f12c8bfd
|
|
7
|
+
data.tar.gz: 396f15d23ddd21d3a5a76b243d99fc8cd591244b3c20b1610589af661e4d8ba30c3e7aab804c6b6fdd50138f70abccd372e938be7c4c17c7377f16cb875f2e27
|
data/lib/optparse2/version.rb
CHANGED
data/lib/optparse2.rb
CHANGED
|
@@ -131,12 +131,15 @@ class OptParse2
|
|
|
131
131
|
visit :each_option do |sw|
|
|
132
132
|
next if !sw.default? || context.key?(key = sw.switch_name.to_sym)
|
|
133
133
|
|
|
134
|
+
=begin TODO: figure out how to re-parse variables (so it goes thru the whole validation scheme for defaults?)
|
|
134
135
|
if sw.default_bypass?
|
|
135
136
|
context[key] = sw.default
|
|
136
137
|
else
|
|
137
138
|
flag = sw.short.first || sw.long.first || raise("<INTERNAL ERROR: CAN THIS EVER HAPPEN?>")
|
|
138
139
|
_super_order! [flag, sw.default], into: context
|
|
139
140
|
end
|
|
141
|
+
=end
|
|
142
|
+
context[key] = sw.default
|
|
140
143
|
end
|
|
141
144
|
end
|
|
142
145
|
|