Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (19 sloc) 794 Bytes
require 'redmine'
require 'user'
require_dependency 'gitosis'
require_dependency 'gitosis/patches/repositories_controller_patch'
require_dependency 'gitosis/patches/repositories_helper_patch'
Redmine::Plugin.register :redmine_gitosis do
name 'Redmine Gitosis plugin'
author 'Jan Schulz-Hofen'
description 'Enables Redmine to update a gitosis server.'
version '0.0.1'
# initialize hook
class GitosisPublicKeyHook < Redmine::Hook::ViewListener
render_on :view_my_account_contextual, :inline => "| <%= link_to(l(:label_public_keys), public_keys_path) %>"
# initialize association from user -> public keys
User.send(:has_many, :gitosis_public_keys, :dependent => :destroy)
# initialize observer
ActiveRecord::Base.observers = ActiveRecord::Base.observers << GitosisObserver
Something went wrong with that request. Please try again.