On 4/18/2011 5:30 AM, Loren Segal wrote:
On 4/12/2011 3:20 PM, Loren Segal wrote:
Again, I'd really opt for the extra docs package, I think it's the
way to go and solves more of the problems than post install hooks.
That said, I think your solution should be implemented as well, and
should be the fallback. ie. RubyGems should look for a static docs
packaged-- but if not present, we can use the great post install
hook idea with --document, etc.
I recommend implementing static documentation as a plugin to
rubygems. If it becomes a proven solution it can be merged in.
Thanks, I will look into using the new post install hooks then.
In this case, is there a way to disable another "post install hook"
from running? For instance, if a static documentation plugin ran, we
would want to disable RDoc/RI from generating. Is this feasible with
the APIs, or do we have to resort to unsupported monkeypatching again?
Is there any followup on this? It would be fairly important to have
this kind of functionality in order to add proper YARD support, and/or
generalized support for "skipping" the doc generation process and
downloading static doc tarballs via a plugin.
Perhaps RDoc/RI themselves should be installing post install hooks
like everybody else. That way, at least they could be unregistered by
other plugins.
I'm not sure if API is still being developed; if so, it would be nice
to have this scenario as a consideration (if it isn't already being
considered).
Here's my last attempt at getting a response to this. If not, I guess
we'll just have to go back to square one and monkey patch Rubygems to
work the way we need it to.
Given that the 1.8.0 release is impending, I trust that the API dust is
settling, which is either a good or bad thing, depending on if there's
support for cancelling the RDoc/RI hooks from running. So, again, is
this possible through RubyGems' new post install hook API?
To summarize the issue: implementing a static documentation downloader
RG plugin would require that no documentation be generated locally
regardless of the `--document` setting (only --no-rdoc setting would be
useful). The point would be to download the archive from a remote server
and bypass local doc tools. I currently don't see any way to easily do
this from a post install hook, since RDoc/RI aren't themselves post
install hooks. The only other thing I could think of (besides
monkeypatching) would be to forcibly add `--document mytool` to the
.gemrc upon post_install of the plugin, but that doesn't sound like an
easy or proper thing to do.
- Loren
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers