optparshie 1.2.1 → 1.2.2
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.
- data/VERSION +1 -1
- data/example/example1.rb +3 -0
- data/lib/optparshie.rb +3 -2
- data/optparshie.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.2
|
data/example/example1.rb
CHANGED
data/lib/optparshie.rb
CHANGED
@@ -15,6 +15,7 @@ class OptionParshie < OptionParser
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def hash_key_sanitize(switch)
|
18
|
+
switch = switch.dup();
|
18
19
|
switch.gsub!(/^--\[no-\]/,"--");
|
19
20
|
switch.gsub!(/^-+/,"")
|
20
21
|
switch.gsub!(/\W/,"_");
|
@@ -70,7 +71,7 @@ class OptionParshie < OptionParser
|
|
70
71
|
# ------------------------------------------------------------------
|
71
72
|
# optparshie code by l.p.m.11
|
72
73
|
# ------------------------------------------------------------------
|
73
|
-
hash_sw_add(sw,val);
|
74
|
+
hash_sw_add(sw, val);
|
74
75
|
|
75
76
|
val = cb.call(val) if cb
|
76
77
|
setter.call(sw.switch_name, val) if setter
|
@@ -106,7 +107,7 @@ class OptionParshie < OptionParser
|
|
106
107
|
# ------------------------------------------------------------------
|
107
108
|
# optparshie code by l.p.m.11
|
108
109
|
# ------------------------------------------------------------------
|
109
|
-
hash_sw_add(sw,val);
|
110
|
+
hash_sw_add(sw, val);
|
110
111
|
|
111
112
|
argv.unshift(opt) if opt and (!rest or (opt = opt.sub(/\A-*/, '-')) != '-')
|
112
113
|
val = cb.call(val) if cb
|
data/optparshie.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: optparshie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -95,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
segments:
|
97
97
|
- 0
|
98
|
-
hash: -
|
98
|
+
hash: -2890419790334627916
|
99
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
100
|
none: false
|
101
101
|
requirements:
|