From 482b50bec11401a65fcc066e12818b8eea360dac Mon Sep 17 00:00:00 2001 From: hellekin Date: Fri, 22 Jan 2021 15:56:12 +0100 Subject: WIP: fix link to source code --- app/lib/incommon.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/lib') diff --git a/app/lib/incommon.rb b/app/lib/incommon.rb index c2f30b5..e03b0e9 100644 --- a/app/lib/incommon.rb +++ b/app/lib/incommon.rb @@ -6,10 +6,12 @@ module INCOMMON module_function def repo_url(version) case version - when /^(HEAD|v\d)/ + when /^HEAD/ query="h=#{version}" - else - query="h=HEAD&id=#{version}" + when /^incommon-map @(.*)/ + query="h=HEAD&id=#{$1}" + when /^incommon-map (v.*)/ + query="h=#{$1}" end URI.parse("https://code.cepheide.org/incommon-map.git/tree/?#{query}").to_s end -- cgit v1.2.3