From 1277e813360a5bb4860a09957391335d7d8da3d6 Mon Sep 17 00:00:00 2001 From: Pavel Chipiga Date: Thu, 27 Oct 2011 21:25:22 +0300 Subject: [PATCH] Fix with_ga. Refs #2136 --- config/initializers/load_config.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/initializers/load_config.rb b/config/initializers/load_config.rb index d66f2b9b4..b264caecf 100644 --- a/config/initializers/load_config.rb +++ b/config/initializers/load_config.rb @@ -1,8 +1,10 @@ APP_CONFIG = YAML.load_file("#{Rails.root}/config/application.yml")[Rails.env] -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) +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 - # ga = Gitolito::GitoliteAdmin.new File.join(APP_CONFIG['root_path'], 'gitolite-admin'); block.call(ga) end