diff --git a/init.rb b/init.rb index b56cfdd..a07e6f8 100644 --- a/init.rb +++ b/init.rb @@ -10,6 +10,8 @@ end end +$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib" + require_dependency 'redmine_git_server/hooks' app = Rails.application diff --git a/lib/redmine_git_server/patches/repositories_controller_patch.rb b/lib/redmine_git_server/patches/repositories_controller_patch.rb index 84dd740..de338da 100644 --- a/lib/redmine_git_server/patches/repositories_controller_patch.rb +++ b/lib/redmine_git_server/patches/repositories_controller_patch.rb @@ -1,12 +1,12 @@ require_dependency 'repositories_controller' -module RepositoriesControllerWithGitServerSupport - - def show_error_not_found - return super if params[:action] != 'show' - render action: 'empty' +module RedmineGitServer::Patches + module RepositoriesControllerPatch + def show_error_not_found + return super if params[:action] != 'show' + render action: 'empty' + end end - end -RepositoriesController.send(:prepend, RepositoriesControllerWithGitServerSupport) +RepositoriesController.send(:prepend, RedmineGitServer::Patches::RepositoriesControllerPatch)