diff --git a/plugins/gitweb.rb b/plugins/gitweb.rb index 798dcb6..f7c9c24 100644 --- a/plugins/gitweb.rb +++ b/plugins/gitweb.rb @@ -2,6 +2,15 @@ class Gitweb < PluginBase + # Remove the "Git" constant and reload them + def before_reload + Object.class_eval do + remove_const "Git" + end + $".delete_if { |x| x =~ /^git/} + require 'git.rb' + end + def initialize(*args) $config.merge( 'plugins' => { diff --git a/test/gitweb/plugin.rb b/test/gitweb/plugin.rb index 1e4fe87..cab58a5 100644 --- a/test/gitweb/plugin.rb +++ b/test/gitweb/plugin.rb @@ -105,4 +105,16 @@ def test_accessible_local_repo assert(@irc.message) assert_equal("[tmptestgitdir HEAD]: -- First commit", @irc.message) end + + def test_reload_Git + class <