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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fb6261613557a808dfda4002a86d4218d955804583135a3489ce5de01ba0e0e
4
- data.tar.gz: babfce64dd51938c50999db68237a920a9270701c85b415e5fde510796134189
3
+ metadata.gz: 5b075c92a3cfbcdaf6d194a8c10b5a6bc1adb503cce26dc9e54d1ce98e01e234
4
+ data.tar.gz: aa78b0efbaaff344675ee564c43db64b0da6118505b9bd66820925e146b8a40a
5
5
  SHA512:
6
- metadata.gz: b7b7521fc75776437521cbf73fc024fc15ffa2f1a5b59ed7c43319f4fa8b103083e7e8eced9ae63d74475d741d49f84b43f4413cd806ceb41199223bd545ee0e
7
- data.tar.gz: ef7eb6f76bd62d96d293303aed61d3ee884212145c6507cb373877b6fa19005c6bc5e6be6ce2c328ed963c11fee6b931c4dbbcdb68fbb2ef29d9fa04ff33d631
6
+ metadata.gz: 7b22ee332ef698a1f87daba95815adc0bb7a174e7d2985cd69f6e21fa0d038e85926a7d6a103202e2d7f26519acecdb554f75f1ba621a89e235384d0f12c8bfd
7
+ data.tar.gz: 396f15d23ddd21d3a5a76b243d99fc8cd591244b3c20b1610589af661e4d8ba30c3e7aab804c6b6fdd50138f70abccd372e938be7c4c17c7377f16cb875f2e27
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class OptParse2
4
- VERSION = "0.7.4"
4
+ VERSION = "0.7.5"
5
5
  end
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optparse2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamW