man_parser 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/man_parser.rb +1 -1
- data/man_parser.gemspec +1 -1
- data/spec/man_parser_spec.rb +4 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/man_parser.rb
CHANGED
@@ -10,7 +10,7 @@ class ManParser
|
|
10
10
|
def self.parse(cmd)
|
11
11
|
sections = sections(source(cmd))
|
12
12
|
description, options = find_options(sections['OPTIONS']||sections['DESCRIPTION'])
|
13
|
-
description
|
13
|
+
description = sections['DESCRIPTION'] if description.to_s.empty?
|
14
14
|
options = parse_options(options)
|
15
15
|
{:description => description.map{|l|l.strip}.join(''), :options=>options, :sections=>sections}
|
16
16
|
end
|
data/man_parser.gemspec
CHANGED
data/spec/man_parser_spec.rb
CHANGED