Skip to content

Commit

Permalink
Add extra_rdoc_files to the gemspec parser
Browse files Browse the repository at this point in the history
This option was seen in the wild here:

  https://github.com/codahale/bcrypt-ruby/blob/master/bcrypt.gemspec

After this patch, it works:

```
[aaron@TC ~/g/bcrypt-ruby (update-deps)]$ ruby --disable-gems -I ~/git/gel/lib ~/git/gel/bin/gel install
Installing rspec-support (3.8.0)
Installing diff-lcs (1.3)
Installing rake-compiler (0.9.9)
Installing rspec-mocks (3.8.0)
Installing rspec-expectations (3.8.3)
Installing rspec (3.8.0)
Installing rspec-core (3.8.0)
Installed 7 gems
```
  • Loading branch information
tenderlove committed May 31, 2019
1 parent e44d85c commit 968c826
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/gel/gemspec_parser.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def initialize
self.metadata = {} self.metadata = {}
self.requirements = [] self.requirements = []
self.rdoc_options = [] self.rdoc_options = []
self.extra_rdoc_files = []
self.development_dependencies = [] self.development_dependencies = []
self.runtime_dependencies = [] self.runtime_dependencies = []
self.executables = [] self.executables = []
Expand Down
6 changes: 6 additions & 0 deletions test/gemspec_parser_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,4 +48,10 @@ def test_simple_parse
assert gemspec.files.include?("lib/gel/gemspec_parser.rb") assert gemspec.files.include?("lib/gel/gemspec_parser.rb")
assert_equal [["rake", ["~> 10.0"]], ["minitest", ["~> 5.0"]]], gemspec.development_dependencies assert_equal [["rake", ["~> 10.0"]], ["minitest", ["~> 5.0"]]], gemspec.development_dependencies
end end

def test_spec_with_extra_rdoc_files
result = Gel::GemspecParser::Result.new
result.extra_rdoc_files += ["README.md"]
assert_equal ["README.md"], result.extra_rdoc_files
end
end end

0 comments on commit 968c826

Please sign in to comment.