We could also try to somehow modify the Gem.done_installing hooks and remove the RDoc hook and replace it with ours.
Building upon this idea, I am attaching an proof of concept. This
loads the original RubyGems RDoc hook, removes it an replaces by a
custom hook. In this custom hook (which is inherited from the
original code), the generator name can be modified from "darkfish"
to something completely different and hence load the custom
generator (which can inherit from Darkfish). The options could
also be potentially modified to change the #setup_generator
method.
Another option could be leave the generator as it is and have additional hook, which would run after the default generators and update the generated content. While tempting, I still think the generator/template should be extracted from RDoc and therefore this is less appealing option IMHO.
BTW we could also use the hook to remove the `--document=ri,rdoc` option from `%gem_install` macro [1]. But that would be probably too much magic.
Vít