Граф коммитов

293 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada f6330a45f2 [ruby/rdoc] Fix typos in test method names [ci skip]
https://github.com/ruby/rdoc/commit/8386333323
2021-11-04 08:56:38 +09:00
Mike Dalessio 4ffc3fb019 [ruby/rdoc] fix: alias to method with call-seq
This change fixes alias call-seq to return nil if the method's
call-seq does not specify the alias.

Previously, the alias's call-seq would be an empty string in this case
which broke darkfish rendering.

This change also backfills test coverage for 0ead786 which moved
call-seq deduplication into AnyMethod.

https://github.com/ruby/rdoc/commit/5ce2789b6f
2021-10-16 06:31:11 +09:00
Mike Dalessio 4c42540da2 [ruby/rdoc] Support linking #==
See related commits:

- ebc66662 for #===
- 4943d208 for #[], #[]=, #<<, and #>>

https://github.com/ruby/rdoc/commit/8e47f7840a
2021-10-16 01:40:47 +09:00
Mike Dalessio 7aec65add4 [ruby/rdoc] feat: add support for :category: on C functions
https://github.com/ruby/rdoc/commit/45c92005fe
2021-10-16 01:39:36 +09:00
Mike Dalessio fbd0516afc [ruby/rdoc] fix: comments in C files use the global markup option
Previously, Parser::C comments all defaulted to "rdoc" format, even
when the user had set a different default with the `--markup=<choice>`
option.

https://github.com/ruby/rdoc/commit/4643b08a26
2021-10-16 01:39:06 +09:00
Mike Dalessio 9225f3c1c6 [ruby/rdoc] test: add coverage for comment format in a C file
https://github.com/ruby/rdoc/commit/3b8334a796
2021-10-16 01:39:04 +09:00
Hiroshi SHIBATA ec6b444fbf
Fixed leaked file descriptor
Leaked file descriptor: TestRDocGeneratorDarkfish#test_template_stylesheets: 11 : #<File:./tmp20210913-30865-7c4ey8/hoge20210913-30865-evm2uo.css>
2021-09-13 09:36:42 +09:00
Nobuyoshi Nakada 0fbde94b27 [ruby/rdoc] Convert upper case copyright and registered marks
https://github.com/ruby/rdoc/commit/3bca7dc093
2021-09-11 17:03:52 +09:00
Nobuyoshi Nakada bc0ea95ca8 [ruby/rdoc] Convert tick double quote in character entity references
https://github.com/ruby/rdoc/commit/6ed889aac9
2021-09-11 17:03:38 +09:00
Nobuyoshi Nakada 6944163415 [ruby/rdoc] Convert a backtick to an open single quote
https://github.com/ruby/rdoc/commit/82eaefbae4
2021-09-11 17:03:33 +09:00
Nobuyoshi Nakada c5c0f5c652 [ruby/rdoc] Convert single quotes in character entity references
As well as double quotes.

https://github.com/ruby/rdoc/pull/824#discussion_r683173389

https://github.com/ruby/rdoc/commit/09002bdab5
2021-09-11 17:03:26 +09:00
Hiroshi SHIBATA afd7d1672f
Removed obsoleted comment 2021-09-06 19:36:04 +09:00
Hiroshi SHIBATA 13dd07e397 Removed redundant tests 2021-09-06 13:11:29 +09:00
Hiroshi SHIBATA a68a1b0b7d Removed MiniTest::Assertion from test/rdoc 2021-09-06 13:11:29 +09:00
Nobuyoshi Nakada 76c7388c1f [ruby/rdoc] Add tests for `--template-stylesheets` option
Also flattens `@options.template_stylesheets` when parsing the
command lines.

Fixes #205
Fixes #828 too

https://github.com/ruby/rdoc/commit/857002a763
2021-09-03 19:13:15 +09:00
Vít Ondruch 33676a7aa6 [ruby/rdoc] Try to load WEBrick for testing
This is in similar vein Rake is optionally loaded in:

5437418baf/test/rdoc/test_rdoc_task.rb (L3-L6)

https://github.com/ruby/rdoc/commit/5f3901ae60
2021-09-03 19:12:24 +09:00
Hiroshi SHIBATA b809e5a4a9 [ruby/rdoc] s/minitest/test-unit/g
https://github.com/ruby/rdoc/commit/73c030c7b0
2021-09-03 19:10:34 +09:00
Hiroshi SHIBATA 0a9a3799bb [ruby/rdoc] Removed duplicated doc
https://github.com/ruby/rdoc/commit/0dd36a5c35
2021-09-03 19:10:28 +09:00
aycabta cf2faf2e33 [ruby/rdoc] Move RDoc::RDoc#load_options to RDoc::RDoc.load_options
https://github.com/ruby/rdoc/commit/ac85e01756
2021-09-02 00:32:13 +09:00
Nobuyoshi Nakada 3dacc14fd3 [ruby/rdoc] Fix links without paths
https://github.com/ruby/rdoc/commit/424bd5db4d
2021-07-05 11:34:37 +09:00
Nobuyoshi Nakada f88a9097a4 [ruby/rdoc] Fix for explicit http link
https://github.com/ruby/rdoc/commit/caf234665c
2021-07-05 11:34:35 +09:00
Nobuyoshi Nakada 7c8aa0a5d2 [ruby/rdoc] Allow a label in a link to another document text
https://github.com/ruby/rdoc/commit/85bb2d33bb
2021-07-05 11:34:33 +09:00
Nobuyoshi Nakada 46ab28d6c9 [ruby/rdoc] Fix assertions which look very likely unintended
https://github.com/ruby/rdoc/commit/dc7c890a3d
2021-07-05 11:34:31 +09:00
aycabta caa123b50e [ruby/rdoc] Support ActiveSupport::Concern.included
ref. 168ddaa08a/activerecord/lib/active_record/core.rb (L9-L20)

https://github.com/ruby/rdoc/commit/a2d651dade

Co-authored-by: Fumiaki MATSUSHIMA <mtsmfm@gmail.com>
2021-07-05 11:34:29 +09:00
Nobuyoshi Nakada 2f3edf28f3 [ruby/rdoc] Prefer omit to pend
These conditions are not temporary, rather platform dependent.

https://github.com/ruby/rdoc/pull/815#discussion_r654660411

https://github.com/ruby/rdoc/commit/92545fa250
2021-07-05 11:34:27 +09:00
Ulysse Buonomo ec9a9af375 [ruby/rdoc] Fix chained inclusion ancestors_of
Fixes #814

Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>

https://github.com/ruby/rdoc/commit/b45f747216
2021-07-05 11:34:25 +09:00
Nobuyoshi Nakada 298d65b1e4
Discard RDOCOPT environment variable to make tests stable 2021-06-23 18:57:39 +09:00
Nobuyoshi Nakada 09e7a0c4a4
Dispose the global rubygems configuration wholely 2021-06-23 18:56:10 +09:00
Nobuyoshi Nakada ddb8739634
Clear rdoc options in the global rubygems configuration 2021-06-23 18:46:53 +09:00
Nobuyoshi Nakada 69ce9e4187
Clear default configurations
Remove environment variables which can affect the default
configurations.
2021-06-23 15:14:21 +09:00
Nobuyoshi Nakada 950c7a12ef
Make temporary directory under the regular location 2021-06-23 14:17:43 +09:00
Nobuyoshi Nakada 923b365224
Close UserInteraction for tests to fix leaked file descriptors 2021-06-23 12:52:32 +09:00
Hiroshi SHIBATA 6aaa1c4d09 [ruby/rdoc] Use pend instead of skip
https://github.com/ruby/rdoc/commit/8460a36d84
2021-06-23 11:05:18 +09:00
Hiroshi SHIBATA f2e39e5fed [ruby/rdoc] Update test/rdoc/test_rdoc_rubygems_hook.rb
https://github.com/ruby/rdoc/commit/fb264c4cc4

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-06-23 11:05:14 +09:00
Hiroshi SHIBATA c483aa8394 [ruby/rdoc] Rwrite test-case for rubygems_hook without Gem::TestCase
https://github.com/ruby/rdoc/commit/f8d1087ce5
2021-06-23 11:05:11 +09:00
aycabta 77e1b47729 [ruby/rdoc] Add an alias for test-unit with older versions of RubyGems
https://github.com/ruby/rdoc/commit/b8d68fdd87
2021-06-02 11:35:45 +09:00
aycabta c9ab8fe2b1 The test for command injection on Unix platforms should be omitted on Windows 2021-05-31 23:34:40 +09:00
aycabta c264d30261 Use YAML.safe_load to use the permitted_classes option 2021-05-21 21:45:03 +09:00
Nobuyoshi Nakada 59b327aa58
[ruby/rdoc] Drop support for Ruby 2.4
https://github.com/ruby/rdoc/commit/f480b970cc
2021-05-21 15:53:34 +09:00
Nobuyoshi Nakada f18a0b7654
[ruby/rdoc] Follow-up rubygems
Use test-unit assertions instead of minitest.

https://github.com/ruby/rdoc/commit/d6a6209d7f
2021-05-21 15:53:34 +09:00
Nobuyoshi Nakada 10e63f3f56
[ruby/rdoc] Vertical-bar is disallowed in path names on Windows
No risk of remote code execution, when the file cannot be created.

https://github.com/ruby/rdoc/runs/2565343916?check_suite_focus=true#step:5:58
```
Error: test_remove_unparseable_CVE_2021_31799(TestRDocRDoc): Errno::EINVAL: Invalid argument @ utime_failed - | touch evil.txt && echo tags
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1142:in `utime'
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1142:in `block in touch'
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1139:in `each'
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1139:in `touch'
D:/a/rdoc/rdoc/test/rdoc/test_rdoc_rdoc.rb:463:in `block (2 levels) in test_remove_unparseable_CVE_2021_31799'
     460:     temp_dir do
     461:       file_list = ['| touch evil.txt && echo tags']
     462:       file_list.each do |f|
  => 463:         FileUtils.touch f
     464:       end
     465:
     466:       assert_equal file_list, @rdoc.remove_unparseable(file_list)
```

https://github.com/ruby/rdoc/commit/a7df7dc8fa
2021-05-21 15:53:34 +09:00
Nobuyoshi Nakada a298bdf860
[ruby/rdoc] Dir.children is 2.5+
RDoc seems still supporting outdated 2.4.

https://github.com/ruby/rdoc/runs/2565344070?check_suite_focus=true#step:5:64
```
Error: test_remove_unparseable_CVE_2021_31799(TestRDocRDoc): NoMethodError: undefined method `children' for Dir:Class
/home/runner/work/rdoc/rdoc/test/rdoc/test_rdoc_rdoc.rb:467:in `block in test_remove_unparseable_CVE_2021_31799'
     464:       end
     465:
     466:       assert_equal file_list, @rdoc.remove_unparseable(file_list)
  => 467:       assert_equal file_list, Dir.children('.')
     468:     end
     469:   end
     470:
```

https://github.com/ruby/rdoc/commit/5a4a64dc0f
2021-05-21 15:53:34 +09:00
aycabta b1c73f239f [ruby/rdoc] Use File.open to fix the OS Command Injection vulnerability in CVE-2021-31799
https://github.com/ruby/rdoc/commit/a7f5d6ab88
2021-05-21 13:42:24 +09:00
Yusuke Endoh ffdf0232ef lib/rdoc/rdoc.rb: Allow only RDoc::Options in .rdoc_options
Follow-up of d8fd92f620. Instead of using
unsafe_load blindly, RDoc::Options is only supposed to be allowed.
2021-05-17 12:53:42 +09:00
Hiroshi SHIBATA d8fd92f620
Workaround with fbb4e3f96c in rdoc 2021-05-17 12:04:40 +09:00
Hiroshi SHIBATA 81720b947a Use assert_raise instead of assert_raises 2021-05-12 17:24:43 +09:00
Nobuyoshi Nakada 64b991b0cd [ruby/rdoc] Links to document texts without "rdoc-ref:" prefix
While links to generated HTML from RDoc file needs to be prefixed
by "rdoc-ref:" currently, in case of explicit references this
seems just redundant.

Also GitHub RDoc support does not work with this prefix.

This patch lets links to such document texts (".rb", ".rdoc" and
".md" now) refer URLs generated by `RDoc::TopLevel#http_url`
without the prefix.

https://github.com/ruby/rdoc/commit/f18b27b69d
2021-04-03 01:22:09 +09:00
Nobuyoshi Nakada a6948329f8 [ruby/rdoc] Clarify that dots in URL are replaced
The dots in all path components from the document root are
replaced with underscores, not only in the basename.

https://github.com/ruby/rdoc/commit/7a3417ea4c
2021-04-03 01:22:00 +09:00
aycabta 61e1cf23ac [ruby/rdoc] Treat emphasis tags as excluding other notations
And exclusive notations don't exclude other exclusive notations.

https://github.com/ruby/rdoc/commit/b8baa9a435
2021-04-03 01:21:50 +09:00
aycabta e84d275fe6 [ruby/rdoc] Treat other tags as word boundaries
https://github.com/ruby/rdoc/commit/8222f85a17
2021-04-03 01:21:38 +09:00