man_parser 0.1.1 → 0.1.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 CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -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 ||= sections['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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{man_parser}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
@@ -42,6 +42,10 @@ describe ManParser do
42
42
  ManParser.parse('acpi')[:options]
43
43
  end
44
44
 
45
+ it "has a description" do
46
+ ManParser.parse('acpi')[:description].to_s.should_not be_empty
47
+ end
48
+
45
49
  it "finds all options x" do
46
50
  options.size.should == 18
47
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: man_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser