From fc4ad9ac0a28aea436310c9b33d3576c1705cbf1 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Wed, 26 Mar 2014 01:18:00 +0600 Subject: [PATCH] [#345] owner_and_name -> name_with_owner --- lib/ext/rosa/constraints.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ext/rosa/constraints.rb b/lib/ext/rosa/constraints.rb index 5220c8f02..8d4aa4340 100644 --- a/lib/ext/rosa/constraints.rb +++ b/lib/ext/rosa/constraints.rb @@ -22,7 +22,7 @@ module Rosa def self.matches?(request) if (params = request.path_parameters) && params[:treeish] # parse existing branch (tag) and path branch_or_tag = begin - (p = Project.find_by_owner_and_name params[:owner_and_name]) && + (p = Project.find_by_owner_and_name params[:name_with_owner]) && p.repo.branches_and_tags.map(&:name).sort{|a,b| b.length <=> a.length}.detect{|b| params[:treeish].start_with?(b)} || params[:treeish].split('/').first end