aboutsummaryrefslogtreecommitdiff
path: root/app/lib/incommon.rb
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2021-01-22 15:56:12 +0100
committerhellekin <hellekin@cepheide.org>2021-01-22 15:56:12 +0100
commit482b50bec11401a65fcc066e12818b8eea360dac (patch)
tree8b5add9bc3f4c24e34888bfb1594f3b47ce25b5d /app/lib/incommon.rb
parent9d51444479cec02d0b250ae65a91d36beb5f6b1b (diff)
downloadincommon-map-482b50bec11401a65fcc066e12818b8eea360dac.tar.gz
WIP: fix link to source codev0.1.0
Diffstat (limited to 'app/lib/incommon.rb')
-rw-r--r--app/lib/incommon.rb8
1 files changed, 5 insertions, 3 deletions
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