class HoundListSync::Repositories::Gitlab::Repo
Public Class Methods
new(raw)
click to toggle source
# File lib/hound_list_sync/repositories/gitlab.rb, line 16 def initialize(raw) @raw = raw end
Public Instance Methods
anchor()
click to toggle source
# File lib/hound_list_sync/repositories/gitlab.rb, line 53 def anchor "#L{line}" end
base_url()
click to toggle source
# File lib/hound_list_sync/repositories/gitlab.rb, line 49 def base_url "#{@raw["web_url"]}/blob/#{branch}/{path}{anchor}" end
branch()
click to toggle source
# File lib/hound_list_sync/repositories/gitlab.rb, line 45 def branch @raw["default_branch"] || "master" end
indexable?()
click to toggle source
# File lib/hound_list_sync/repositories/gitlab.rb, line 20 def indexable? !@raw["archived"] && !@raw["empty_repo"] end
name()
click to toggle source
# File lib/hound_list_sync/repositories/gitlab.rb, line 24 def name @raw["path_with_namespace"] end
to_config()
click to toggle source
# File lib/hound_list_sync/repositories/gitlab.rb, line 28 def to_config { "url" => url, "url-pattern" => { "base-url" => base_url, "anchor" => anchor }, "vcs-config" => { "ref" => branch } } end
url()
click to toggle source
# File lib/hound_list_sync/repositories/gitlab.rb, line 41 def url @raw["ssh_url_to_repo"] end