aboutsummaryrefslogtreecommitdiff
path: root/app/lib/incommon.rb
blob: 78ba8942140d0a8c7d6ae53c2a98d0de9fdec609 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# SPDX-FileCopyrightText: 2020 IN COMMON Collective <collective@incommon.cc>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

module INCOMMON
  module_function
  def repo_url(version)
    case version
    when /^incommon-map (.*)@(.*)/
      query="h=#{$1}&id=#{$2}"
    else
      query="h=HEAD"
    end
    URI.parse("https://code.cepheide.org/incommon-map.git/tree/?#{query}").to_s
  end
end