-
Notifications
You must be signed in to change notification settings - Fork 137
[WIP] Support for RDoc 4+ #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
fc53432
Allow RDoc ~> 4.0.0.rc
JeanMertz 2b0bad0
First pass to make sdoc work with RDoc 4
JeanMertz 7dd0e9b
bump rdoc to released 4.0.0
cce41b1
default to RDoc::Options#pipe = true
2e5485f
add Gemfile, just points to sdoc.gemspec
3b35bd0
add development dependencies
55a9e63
remove rspec task and add rake testtask
c4253d1
added specs for SDoc::Generator using MiniTest::Spec::DSL with RDoc::…
dfe72cd
update .gitignore
59e97cc
fixed search index option with @KevinSjoberg
6ac2482
Rename the search index option template since being changed in 59e97cc
vikassy df8f32a
Remove version specification from 'gem' definition in lib/sdoc.rb
0b076f5
Remove unused TestCase subclass
c99d955
Move spec/sdoc/* to spec/*
687141a
Update Rake::TestTask to reflect re-organization of spec folder
4e26bf0
Use RDoc::TopLevel#last_modified instead of #file_stat.mtime
27d29c2
Move Rails search_index template file to match generator changes
83066f4
Use RDoc ~> 4.0 and < 5.0
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| *.gem | ||
| .bundle | ||
| pkg | ||
| doc | ||
| /test.rb | ||
| /test.rb | ||
| Gemfile.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| source "https://rubygems.org" | ||
|
|
||
| gemspec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| begin | ||
| gem 'rdoc', '~> 3' | ||
| gem 'rdoc', '~> 4.0.0' | ||
| require File.join(File.dirname(__FILE__), '/../sdoc') | ||
| rescue Gem::LoadError | ||
| end | ||
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| $:.unshift File.dirname(__FILE__) | ||
| require "rubygems" | ||
| gem 'rdoc', '~> 3' | ||
| gem 'rdoc' | ||
|
|
||
| module SDoc end | ||
|
|
||
| require 'sdoc/generator' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| require File.join(File.dirname(__FILE__), '/spec_helper') | ||
|
|
||
| describe RDoc::Generator::SDoc do | ||
| before :each do | ||
| @options = RDoc::Options.new | ||
| @options.setup_generator 'sdoc' | ||
| @parser = @options.option_parser | ||
| end | ||
|
|
||
| it "should find sdoc generator" do | ||
| RDoc::RDoc::GENERATORS.must_include 'sdoc' | ||
| end | ||
|
|
||
| it "should use sdoc generator" do | ||
| @options.generator.must_equal RDoc::Generator::SDoc | ||
| @options.generator_name.must_equal 'sdoc' | ||
| end | ||
|
|
||
| it "should parse github option" do | ||
| assert !@options.github | ||
|
|
||
| out, err = capture_io do | ||
| @parser.parse %w[--github] | ||
| end | ||
|
|
||
| err.wont_match /^invalid options/ | ||
| @options.github.must_equal true | ||
| end | ||
|
|
||
| it "should parse github short-hand option" do | ||
| assert !@options.github | ||
|
|
||
| out, err = capture_io do | ||
| @parser.parse %w[-g] | ||
| end | ||
|
|
||
| err.wont_match /^invalid options/ | ||
| @options.github.must_equal true | ||
| end | ||
|
|
||
| it "should parse no search engine index option" do | ||
| @options.search_index.must_equal true | ||
|
|
||
| out, err = capture_io do | ||
| @parser.parse %w[--without-search] | ||
| end | ||
|
|
||
| err.wont_match /^invalid options/ | ||
| @options.search_index.must_equal false | ||
| end | ||
|
|
||
| it "should parse search-index shorthand option" do | ||
| @options.search_index.must_equal true | ||
| out, err = capture_io do | ||
| @parser.parse %w[-s] | ||
| end | ||
|
|
||
| err.wont_match /^invalid options/ | ||
| @options.search_index.must_equal false | ||
| end | ||
|
|
||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| require 'rubygems' | ||
| require 'bundler/setup' | ||
|
|
||
| require 'sdoc' | ||
|
|
||
| require 'rdoc/test_case' | ||
|
|
||
| require 'minitest/autorun' |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about allowing
~> 4.0? All the tests are green locally with ruby/rdoc#279By the way thanks for your work, everything seems fine on Rails' master with your branch! ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could do ~> 4.0 and < 5.0
I'll work out the version dependency soon