From 08b3099b90260e3f78a1a537312bbefee984832d Mon Sep 17 00:00:00 2001 From: Vladimir Sharshov Date: Thu, 8 Nov 2012 13:41:07 +0400 Subject: [PATCH] Send http(s) git url instead NFS path --- app/models/project.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 52b859b30..ecc30a4f0 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -116,10 +116,10 @@ class Project < ActiveRecord::Base end def git_project_address - #host ||= EventLog.current_controller.request.host_with_port rescue ::Rosa::Application.config.action_mailer.default_url_options[:host] - #protocol ||= EventLog.current_controller.request.protocol rescue "http" - #Rails.application.routes.url_helpers.project_url(self.owner.uname, self.name, :host => host, :protocol => protocol) + ".git" - path + host ||= EventLog.current_controller.request.host_with_port rescue ::Rosa::Application.config.action_mailer.default_url_options[:host] + protocol = APP_CONFIG['mailer_https_url'] ? "https" : "http" rescue "http" + Rails.application.routes.url_helpers.project_url(self.owner.uname, self.name, :host => host, :protocol => protocol) + ".git" + #path #share by NFS end def build_for(platform, repository_id, user, arch = 'i586', auto_publish = false, mass_build_id = nil, priority = 0)