Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12577
|
|
RDoc::RDoc#parse_files
(https://github.com/ruby/rdoc/pull/1274)
Commit https://github.com/ruby/rdoc/commit/6cf6e1647b97, which went to v6.5.0, changed `RDoc::Options#parse`
to not call `#finish` in it. While the commit adjusted other call sites,
it missed `lib/rdoc/rubygems_hook.rb`.
`RDoc::Options#finish` prepares the include paths for `:include:`
directives. This has to be done before starting to parse sources.
I think this should fix https://github.com/ruby/net-http/issues/193 +
https://github.com/ruby/net-http/pull/194.
https://github.com/ruby/rdoc/commit/d62da8ca09
|
|
RDoc::RubyGemsHook
(https://github.com/ruby/rdoc/pull/1244)
Rubygems creates an instance of RDoc::RubygemsHook, sets `doc.force = overwrite`, then calls `doc.generate` the document.
RDoc::RubygemsHook needs attribute `:force` just like RDoc::RubyGemsHook.
https://github.com/ruby/rdoc/commit/01bdbcdd4d
|
|
* Make it loose coupling between RubyGems and RDoc
\### Problems
There are following problems because of tight coupling between RubyGems and RDoc.
1. If there are braking changes in RDoc, RubyGems is also broken.
2. When we maintain RDoc, we have to change RubyGems.
The reason why they are happened is that RubyGems creates documents about a gem with installing it.
Note that RubyGems uses functions of RDoc to create documents.
Specifically,
- Creating documents is executed by `rubygems/lib/rubygems/rdoc.rb`.
- `::RDoc::RubygemsHook` which is defined by RDoc is called by the file.
\### Solution
RubyGems has the plugin system.
If a gem includes `rubygems_plugin.rb`, RubyGems loads it.
RubyGems executes a process defined in it while installing gems, uninstalling gems or other events.
We can use the system to solve the problems.
The root cause is RubyGems directly references the class of RDoc.
We can remove the root cause by making RDoc RubyGems plugin.
Alternatively `rubygems_plugin.rb` creates documents about gems.
\### FAQ
Q1. Do we need to change codes of RubyGems?
A.
No, we don't.
This change keeps compatibility of API used from RubyGems.
Q2. Is it better to delete existing codes related to RDoc in RubyGems?
No, it isn't.
If we change codes of RubyGems,
we can't keep a compatibility.
Example:
If we delete codes that uses `RDoc::RubygemsHook` in `rubygems/lib/rubygems/rdoc.rb`,
documentations are not created with old RDoc.
Q3. When can we delete `rubygems/lib/rubygems/rdoc.rb`?
A.
We can delete it when all users use RDoc including `rubygems_plugin`.
Next ruby version is 3.4.
If it includes the RDoc including `rubygems_plugin`,
we can delete `rubygems/lib/rubygems/rdoc.rb` after ruby 3.3 is EOL.
Q4. Is it a breaking change that Rubygems creates documents with
rubygems_plugin not RDoc::RubygemsHook?
A.
No, it isn't.
If we simply implement this approach,
we move the implementation from `rdoc/lib/rdoc/rubygems_hook.rb` to
`rubygems_plugin.rb`.
This way can be breaking change.
It seems to be fine that we just need to delete `rdoc/rubygems_hook.rb` but it doesn't work.
It generates multiple documents.
`rubygems/lib/rubygems/rdoc.rb` has the following code.
```
begin
require "rdoc/rubygems_hook"
# ...
rescue LoadError
end
```
This code ignores RDoc related processes when `rdoc/rubygems_hook` can't be required.
But, this 'require' is not failed.
This is because Ruby installs Rdoc as a default gem.
So, Rdoc installed as a default gem generates documents and one installed as a normal gem does it too.
If you think that this behavior is accectable,
we can just delete `rdoc/rubygems_hook.rb`.
What do you think about this approach?
In this change, we take another approach to solve the problem that creates multiple documents.
If `Gem.done_installing(&Gem::RDoc.method(:generation_hook))` in `rubygems/rdoc.rb` doesn't create documents,
we can solve the problem.
We have some options.
* We change `rubygems/rdoc.rb` and then don't execute `Gem.done_installing`.
(This is a change for RubyGems.)
* We change `rdoc/rubygems_hook.rb` and then make `generation_hook` a no-op method.
(This is a change for RDoc.)
We choose the latter to avoid changing for RubyGems.
\### Test
\#### Preparation
Install Rdoc which including our changes by executing `rake install`.
❯ rake install
We confirmed that Rdoc which including our changes was installed.
❯ gem list | grep rdoc
rdoc (6.6.0, default: 6.4.0)
\#### Check point
We tested to check compatibility.
How to chack the compatibility?
We tested creating same documents by our RDoc and old RDoc with latest RubyGems.
We used following versions to test.
```
❯ ruby -v
ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin22]
❯ gem list | grep rdoc
rdoc (default: 6.4.0)
❯ ruby -I rubygems/lib rubygems/exe/gem --version
3.5.14
```
Here is a result of test with old RDoc.
We can see that the document is created correctlly with `Parsing...` and `Done installing...`.
```
❯ ruby -I rubygems/lib rubygems/exe/gem install pkg-config
Successfully installed pkg-config-1.5.6
Parsing documentation for pkg-config-1.5.6
Done installing documentation for pkg-config after 0 seconds
1 gem installed
```
Here is a result of test with our RDoc.
We can see that the document is created correctlly with `Parsing...` and `Done installing...`.
```
❯ ruby -I rubygems/lib rubygems/exe/gem install pkg-config
Successfully installed pkg-config-1.5.6
Parsing documentation for pkg-config-1.5.6
Done installing documentation for pkg-config after 0 seconds
1 gem installed
```
As you can see we got the same results, our RDoc keeps compatibility.
* rename a test file
* Revert "rename a test file"
This reverts commit 70a144bf3fb8f2cc653972e858b5fed3747765d7.
* revert a test class name
* exclude `TestRDocRubyGemsHook` at job of ruby-core
* When `rubygems_plugin.rb` is not found, `test_rdoc_rubygems_hook.rb` is skipped.
* remove unnecessary whitespace
* add comment
* Add support for the case that RDoc is installed as a default gem
* Fix problems
Co-authored-by: mterada1228 <[email protected]>
* Simplify
* removed unused blank lines and revert test
* for rerun tests
* add comment for rubygems_plugin.rb
---------
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
|
|
(https://github.com/ruby/rdoc/pull/821)
This patch makes sure we only load relative code. Hence when coding or
testing rdoc, we'll be sure to always be using the correct code.
Discussion started at https://github.com/ruby/rdoc/pull/817.
Signed-off-by: Ulysse Buonomo <[email protected]>
https://github.com/ruby/rdoc/commit/aa41bd48eb
Co-authored-by: Nobuyoshi Nakada <[email protected]>
|
|
These conditions are not temporary, rather platform dependent.
https://github.com/ruby/rdoc/pull/815#discussion_r654660411
https://github.com/ruby/rdoc/commit/92545fa250
|
|
|
|
|
|
|
|
Remove environment variables which can affect the default
configurations.
|
|
|
|
|
|
https://github.com/ruby/rdoc/commit/8460a36d84
|
|
https://github.com/ruby/rdoc/commit/fb264c4cc4
Co-authored-by: Nobuyoshi Nakada <[email protected]>
|
|
https://github.com/ruby/rdoc/commit/f8d1087ce5
|
|
https://github.com/ruby/rdoc/commit/b8d68fdd87
|
|
Use test-unit assertions instead of minitest.
https://github.com/ruby/rdoc/commit/d6a6209d7f
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4491
|
|
|
|
|
|
|
|
Gem::Specification.default_specifications_dir is deprecated.
|
|
|
|
root user can access a file whose permission is 0000.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
It fixed the several bugs that was found after RDoc 6 releasing.
From: SHIBATA Hiroshi <[email protected]>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Some tests had failed on `sudo make test-all`, mainly because root can
access any files regardless of permission. This change adds `skip`
guards into such tests.
Note that almost all tests in which `skip` guards is added, already have
"windows" guard. This is because there is no support to avoid read
access by owner on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
It version applied `frozen_string_literal: true`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Release note: https://github.com/rdoc/rdoc/blob/b825775647f62c5b525e9780a28ff2fbb1d5bf6f/History.rdoc#500--2016-11-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Fixed ri parse defect with left-hand matched classes.
https://github.com/rdoc/rdoc/pull/420
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
cross-compile environment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[fix GH-867][Feature #11057]
* test/ruby/test_extlibs.rb: removed json gem from existence extentions.
* gems/bundled_gems: added json gem into bundled gem.
* lib/rdoc/rubygems_hook.rb: ignored no json environment.
* lib/rubygems/test_case.rb, test/rubygems/*: ditto.
* lib/rdoc/test_case.rb, test/rdoc/*: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Improved accessibility of the main sidebar navigation.
Fixed handling of regexp options in HTML source highlighting.
* test/rdoc: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Fixed tests on Windows (I hope) by forcing platform for
platform-dependent tests.
Fixed File.exists? warnings.
Improved testing infrastructure.
* test/rubygems: ditto.
* test/rdoc/test_rdoc_rubygems_hook.rb: Switch to util_spec like
RubyGems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Disabled rdoc generation by default to match RubyGems defaults.
Reduced diff with RubyGems::RDoc.
* test/rdoc/test_rdoc_rubygems_hook.rb: Tests for the above.
* test/rubygems/test_gem_rdoc.rb: ditto.
* lib/rdoc/store.rb: Removed useless variable assignment
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(TestRDocRubygemsHook#test_setup_unwritable): 1. check the existance
of the file(directory) before touch it. 2. remove test
file(directory) after the test. see [ruby-core:50388].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* test/rdoc/test_rdoc_rdoc.rb: ditto
* lib/rdoc/markup/parser.rb: Use byteslice when available for
performance
* test/rdoc/test_rdoc_markup_parser.rb: Test for above
* lib/rdoc/test_case.rb: ditto
* lib/rdoc/parser/ruby.rb: Fixed bug parsing yield({})
* test/rdoc/test_rdoc_parser_ruby.rb (end):
* lib/rdoc/rubygems_hook.rb: Skip default gems. Display generator
name properly.
* test/rdoc/test_rdoc_rubygems_hook.rb: Test for above
* lib/rdoc/servlet.rb: Fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
import.
* test/rdoc/test_rdoc_rubygems_hook.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* bin/rdoc: ditto
* test/rdoc: ditto
* NEWS: Updated with RDoc 4.0 information
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|