-
Notifications
You must be signed in to change notification settings - Fork 447
Comparing changes
Open a pull request
base repository: ruby/rdoc
base: 9a7ab17
head repository: ruby/rdoc
compare: dba9474
- 17 commits
- 27 files changed
- 12 contributors
Commits on Nov 25, 2024
-
Bump step-security/harden-runner from 2.10.1 to 2.10.2 (#1215)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.10.1 to 2.10.2. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](step-security/harden-runner@91182cc...0080882) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 189ccb4 - Browse repository at this point
Copy the full SHA 189ccb4View commit details -
Bump rubygems/release-gem (#1214)
Bumps [rubygems/release-gem](https://github.com/rubygems/release-gem) from 612653d273a73bdae1df8453e090060bb4db5f31 to 9e85cb11501bebc2ae661c1500176316d3987059. - [Release notes](https://github.com/rubygems/release-gem/releases) - [Commits](rubygems/release-gem@612653d...9e85cb1) --- updated-dependencies: - dependency-name: rubygems/release-gem dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 6c1c650 - Browse repository at this point
Copy the full SHA 6c1c650View commit details
Commits on Nov 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6909516 - Browse repository at this point
Copy the full SHA 6909516View commit details
Commits on Nov 28, 2024
-
Improve how gemspec's files are defined (#1212)
Currently, the gemspec's files are defined by hand, which is error-prone. For example: #1211 This commit uses `Dir.glob` where possible to reduce the risk of that happening again. - Additional files added with this approach: ``` # This should have been added by only captured by this commit lib/rdoc/parser/prism_ruby.rb # These are folders and can be included/ignored either way lib/rdoc/generator/template/darkfish lib/rdoc/generator/template/darkfish/css lib/rdoc/generator/template/darkfish/fonts lib/rdoc/generator/template/darkfish/images lib/rdoc/generator/template/darkfish/js lib/rdoc/generator/template/json_index lib/rdoc/generator/template/json_index/js ``` - Files that are ignored after this change: ``` # They make no difference on documentation generation # Probably can be removed lib/rdoc/generator/template/darkfish/.document lib/rdoc/generator/template/json_index/.document ```
Configuration menu - View commit details
-
Copy full SHA for ac2a151 - Browse repository at this point
Copy the full SHA ac2a151View commit details
Commits on Nov 30, 2024
-
fix: C variables should never show up in Ancestors tree (#1217)
If a NormalClass's superclass is a C enclosure, then update the superclass to point to the RDoc::NormalClass. This is done in a single pass after all files have been parsed. Fixes #1205.
Configuration menu - View commit details
-
Copy full SHA for 1ecd958 - Browse repository at this point
Copy the full SHA 1ecd958View commit details -
Methods are sorted symbols-first (#1219)
There are three distinct ranges of symbols in ASCII: - the range below "A", 0..64 in decimal - the range between "Z" and "a", 91..96 in decimal - the range above "z", 123..127 in decimal With this change, any method starting with a character in these "symbol ranges" will be sorted before a method starting with an alpha ASCII character. The remaining methods, all starting with alpha or 8-bit characters, will be sorted against each other exactly as before. Specifically this addresses the issue from #1204 which is that `#[]` and `#^` were previously sorted _after_ the alpha methods. These methods will now be sorted before alpha methods. Fixes #1204
Configuration menu - View commit details
-
Copy full SHA for a4f13d2 - Browse repository at this point
Copy the full SHA a4f13d2View commit details
Commits on Dec 2, 2024
-
ClassModule#superclass= accepts a ClassModule as an argument (#1222)
It is necessary for ClassModule's instance variable @superclass to always be a String (or nil) so that the class can be saved with `#marshal_dump` and loaded with `#marshal_load`. However, there's no type checking being done, which allows a bug like the one reported in #1221 (which was introduced in #1217) that sets superclass to a ClassModule. That bug requires: - setting a superclass to a NormalClass - marshal_save - marshal_load (which raises an exception) With this change, passing a ClassModule to ClassModule#superclass= is explicitly allowed by saving the full name of the ClassModule in the @superclass instance variable.
Configuration menu - View commit details
-
Copy full SHA for 9ced6d5 - Browse repository at this point
Copy the full SHA 9ced6d5View commit details -
Prefer String#ord to #codepoints[0] (#1220)
Co-authored-by: Nobuyoshi Nakada <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 09d7f35 - Browse repository at this point
Copy the full SHA 09d7f35View commit details
Commits on Dec 5, 2024
-
Deprecate
mainandtitledirectives (#1218)* Deprecate :main: directive * Deprecate :title: direcive * Update documentation * Remove :main: directive's usage * Update test cases * Add '.rdoc_options' to suggested alternatives
Configuration menu - View commit details
-
Copy full SHA for e2d4ac9 - Browse repository at this point
Copy the full SHA e2d4ac9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f9897d - Browse repository at this point
Copy the full SHA 3f9897dView commit details
Commits on Dec 8, 2024
-
Use distinct styles for note lists and label lists (#1209)
* Use the original `label` description list style As a default for all description lists, the original "label" style is more readable. This is slightly different from the original `label` dl though: * slightly increased left margin for `dd` (to 1em) * removed right margin on `dd` * removed `dt` bottom margin and `dd` top margin, to reduce the gap between the term and its description (to only the standard line-height gap). * Add closing tags for description list terms Without the closing tags, the dt elements contain whitespace after the text. This normally isn't a big deal, but does mess some things up, e.g: using `::after` with `content: ", "` in stylesheets. * Restore float:left style for note lists Unlike the original note list styles, this version sets the line-height for all `dt` elements to be the same as the `p` elements contained inside the `dd`, so that the second line has the same indentation as all subsequent lines. * Add commas between note list terms
Configuration menu - View commit details
-
Copy full SHA for 9e69ea6 - Browse repository at this point
Copy the full SHA 9e69ea6View commit details -
lint: Remove unreachable code (#1137)
This is an attempt to utilize RuboCop further. RuboCop was added in 9262fdd but only a few rules have been enabled. I believe we can utilize RuboCop more for better code quality, especially with Lint cops. This is the first step to enable other Lint cops. This commit also exclude some auto generated files.
Configuration menu - View commit details
-
Copy full SHA for a53287f - Browse repository at this point
Copy the full SHA a53287fView commit details
Commits on Dec 9, 2024
-
Stop running CI against JRuby and some CI config cleanup (#1228)
* Stop testing against JRuby * Remove unneeded step * Extract linting CI config to another file * Remove previous jar-dependencies hack
Configuration menu - View commit details
-
Copy full SHA for 4004dff - Browse repository at this point
Copy the full SHA 4004dffView commit details -
Expand rdoc-ref targets at the end of ri output (#1141)
There have been several document refactors in ruby/ruby that extract individual methods/classes' documentation into separate files, like ruby/ruby#6567 Because RI is not capable of rendering those references, RI users are left with dramatically fewer documentation on those methods/classes. This commit adds a new option `--expand-ref` (default: true) to expand all the rdoc-ref targets at the end of the output.
Configuration menu - View commit details
-
Copy full SHA for 9e2b28c - Browse repository at this point
Copy the full SHA 9e2b28cView commit details
Commits on Dec 13, 2024
-
Make it loose coupling between RubyGems and RDoc (#1171)
* 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 70a144b. * 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]>
Configuration menu - View commit details
-
Copy full SHA for f4e10f4 - Browse repository at this point
Copy the full SHA f4e10f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cd5047 - Browse repository at this point
Copy the full SHA 4cd5047View commit details -
Configuration menu - View commit details
-
Copy full SHA for dba9474 - Browse repository at this point
Copy the full SHA dba9474View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 9a7ab17...dba9474