-
Notifications
You must be signed in to change notification settings - Fork 439
Make it loose coupling between RubyGems and RDoc #1171
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
Changes from all commits
f543188
2942f0d
80840fd
6957bae
ae5618a
f9a5cd3
7f023ee
0eeffde
22a8cbd
539d862
d490fd2
bf15f65
314e75b
638a71a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add comments to explain when and by what this file will be used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added comment. |
||
|
||
# If this file is exist, RDoc generates and removes documents by rubygems plugins. | ||
# | ||
# In follwing cases, | ||
# RubyGems directly exectute RDoc::RubygemsHook.generation_hook and RDoc::RubygemsHook#remove to generate and remove documents. | ||
# | ||
# - RDoc is used as a default gem. | ||
# - RDoc is a old version that doesn't have rubygems_plugin.rb. | ||
|
||
require_relative 'rdoc/rubygems_hook' | ||
|
||
# To install dependency libraries of RDoc, you need to run bundle install. | ||
# At that time, rdoc/markdown is not generated. | ||
# If generate and remove are executed at that time, an error will occur. | ||
# So, we can't register generate and remove to Gem at that time. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't quite understand what this comment intends to express. Do you mind elaborate it a bit more? |
||
begin | ||
require_relative 'rdoc/markdown' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right. We want to run This disables this |
||
rescue LoadError | ||
else | ||
Gem.done_installing(&RDoc::RubyGemsHook.method(:generate)) | ||
Gem.pre_uninstall(&RDoc::RubyGemsHook.method(:remove)) | ||
end |
Uh oh!
There was an error while loading. Please reload this page.