diff options
author | Vít Ondruch <vondruch@redhat.com> | 2023-03-08 18:32:53 +0100 |
---|---|---|
committer | Vít Ondruch <vondruch@redhat.com> | 2023-03-08 18:32:53 +0100 |
commit | 6709bc25e1459cb60f78902d12afdef88645d810 (patch) | |
tree | b816abbb950757c868a188d7fc660e49afa52500 /fedora_darkfish.rb | |
parent | b872a2d28a404289167868cd07cc3d44f75ac802 (diff) | |
download | darkfish-rawhide.tar.gz darkfish-rawhide.tar.xz darkfish-rawhide.zip |
Fix `RuntimeError` having multiple plugins installedrawhide
Having multiple RubyGems plugins installed (e.g. rubygems-server) in
addition to RDoc, the original code was too conservative and causing
errors such as:
~~~
$ gem server
Error loading RubyGems plugin "/usr/share/gems/plugins/rdoc-generator-fedora-darkfish_plugin.rb": (RuntimeError)
Server started at http://0.0.0.0:8808
Server started at http://[::]:8808
... snip ..
~~~
or
~~~
$ gem list
Error loading RubyGems plugin "/usr/share/gems/plugins/rdoc-generator-fedora-darkfish_plugin.rb": (RuntimeError)
*** LOCAL GEMS ***
abbrev (default: 0.1.1)
... snip ...
~~~
Newly try to load the RDoc hooks and check if we have only one
hook afterwards and assume that is the right one.
It would be nice to be able to compare if the hook really is the
expected `Gem::RDoc.method(:generation_hook)`, but there is no way to do
it easily to my knowledge.
Diffstat (limited to 'fedora_darkfish.rb')
0 files changed, 0 insertions, 0 deletions