8000 Fix remaining problems with Redmine 2.2.1 by ebastien · Pull Request #52 · ivyl/redmine-gitolite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 20, 2020. It is now read-only.

Fix remaining problems with Redmine 2.2.1 #52

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/models/gitolite_public_key.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'open3'

class GitolitePublicKey < ActiveRecord::Base
unloadable
STATUS_ACTIVE = 1
Expand Down
16 changes: 10 additions & 6 deletions init.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'redmine'
require_dependency 'project'
require_dependency 'principal'
require_dependency 'user'

Expand All @@ -16,12 +17,15 @@
url 'https://github.com/ivyl/redmine-gitolite/'
author_url 'http://ivyl.0xcafe.eu/'

settings :default => {
'gitoliteUrl' => 'gitolite@localhost:gitolite-admin.git',
'developerBaseUrls' => "git@example.com:%{name}.git",
'readOnlyBaseUrls' => 'http://example.com/git/%{name}',
'basePath' => '/home/redmine/repositories/',
}
settings({
:partial => 'settings/redmine_gitolite',
:default => {
'gitoliteUrl' => 'gitolite@localhost:gitolite-admin.git',
'developerBaseUrls' => "git@example.com:%{name}.git",
'readOnlyBaseUrls' => 'http://example.com/git/%{name}',
'basePath' => '/home/redmine/repositories/',
}
})
end

# initialize hook
Expand Down
2 changes: 1 addition & 1 deletion lib/gitolite_redmine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def clone(origin, local_dir)
end

def lock
lockfile_path = File.join(RAILS_ROOT,"tmp",'redmine_gitolite_lock')
lockfile_path = File.join(::Rails.root,"tmp",'redmine_gitolite_lock')
@lockfile = File.new(lockfile_path, File::CREAT|File::RDONLY)
retries = 5
while (retries -= 1) > 0
Expand Down
0