config_parser 0.5.1 → 0.5.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/History +4 -0
- data/lib/config_parser.rb +3 -3
- data/lib/config_parser/version.rb +1 -1
- metadata +4 -4
data/History
CHANGED
data/lib/config_parser.rb
CHANGED
@@ -102,10 +102,10 @@ class ConfigParser
|
|
102
102
|
end
|
103
103
|
|
104
104
|
# Sorts options in the registry as specified by the block. Groups of
|
105
|
-
# options as delimited by separators are sorted independently. If no
|
106
|
-
#
|
105
|
+
# options as delimited by separators are sorted independently. If no block
|
106
|
+
# is given, options are sorted by their long and short keys.
|
107
107
|
def sort_opts!(&block)
|
108
|
-
block ||= lambda {|option| option.long || option.short }
|
108
|
+
block ||= lambda {|option| (option.long || option.short).to_s.sub(/^-+/, '') }
|
109
109
|
|
110
110
|
splits = []
|
111
111
|
current = []
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: config_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 2
|
10
|
+
version: 0.5.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Simon Chiang
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-27 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|