debian-mirror-gitlab/lib/gitlab/ci/badge/coverage/metadata.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
594 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2021-03-11 19:13:27 +05:30
module Gitlab::Ci
2016-09-13 17:45:13 +05:30
module Badge
module Coverage
##
# Class that describes coverage badge metadata
#
class Metadata < Badge::Metadata
def initialize(badge)
@project = badge.project
@ref = badge.ref
@job = badge.job
end
def title
'coverage report'
end
def image_url
2017-09-10 17:25:29 +05:30
coverage_project_badges_url(@project, @ref, format: :svg)
2016-09-13 17:45:13 +05:30
end
def link_url
2017-09-10 17:25:29 +05:30
project_commits_url(@project, @ref)
2016-09-13 17:45:13 +05:30
end
end
end
end
end