Fix with_ga. Refs #2136

This commit is contained in:
Pavel Chipiga 2011-10-27 21:25:22 +03:00
parent f7045179c5
commit 1277e81336
1 changed files with 6 additions and 4 deletions

View File

@ -1,8 +1,10 @@
APP_CONFIG = YAML.load_file("#{Rails.root}/config/application.yml")[Rails.env]
class Object
def with_ga(&block)
Gitolito::GitoliteAdmin.thread_safe(File.join(APP_CONFIG['root_path'], 'gitolite-admin'), {:wait_lock => true, :seconds => 5}) do |ga|
block.call(ga)
end
# ga = Gitolito::GitoliteAdmin.new File.join(APP_CONFIG['root_path'], 'gitolite-admin'); block.call(ga)
end
end