Repository navigation
Add attribute :force to RDoc::RubygemsHook just like RDoc::RubyGemsHook - #1244
Merged
Merged
Conversation
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.
tompng
force-pushed
the
rubygems_hook_accessors
branch
from
December 15, 2024 16:01
08aec15 to
6f50059
Compare
st0012
reviewed
Dec 15, 2024
| @@ -281,14 +281,17 @@ def initialize(spec, generate_rdoc = false, generate_ri = true) | |||
| @spec = spec | |||
| @generate_rdoc = generate_rdoc | |||
| @generate_ri = generate_ri | |||
Member
There was a problem hiding this comment.
I was thinking that we can initialize a RubyGemsHook here already, like
def initialize(spec, generate_rdoc = false, generate_ri = true)
@rubygems_hook = RubyGemsHook.new(spec, generate_rdoc, generate_ri)
endAnd then delegate methods to @rubygems_hook, which will handle more cases 🤔
Member
Author
There was a problem hiding this comment.
IMO, implementing minimal things to clarify what method/attribute are needed in the compatibility layer is not a bad idea. I think it is the intention of the current implementation of RubygemsHook. (I', not sure)
This way, the new RubyGemsHook can easily change its method as long as RubygemsHook's methods works.
st0012
approved these changes
Dec 16, 2024
matzbot
pushed a commit
to ruby/ruby
that referenced
this pull request
Dec 16, 2024
RDoc::RubyGemsHook (ruby/rdoc#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. ruby/rdoc@01bdbcdd4d
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rubygems creates an instance of RDoc::RubygemsHook, sets
doc.force = overwrite, then callsdoc.generatethe document. RDoc::RubygemsHook needs attribute:forcejust like RDoc::RubyGemsHook.Fixes #1243