2016-07-28 08:35:02 -04:00
|
|
|
module Gitlab
|
|
|
|
module Badge
|
2016-08-10 08:12:31 -04:00
|
|
|
module Build
|
2016-07-28 08:35:02 -04:00
|
|
|
##
|
|
|
|
# Class that describes build badge metadata
|
|
|
|
#
|
2016-08-11 08:08:27 -04:00
|
|
|
class Metadata < Badge::Metadata
|
2016-08-11 05:16:14 -04:00
|
|
|
def initialize(badge)
|
|
|
|
@project = badge.project
|
|
|
|
@ref = badge.ref
|
2016-07-28 08:35:02 -04:00
|
|
|
end
|
|
|
|
|
2016-08-11 08:08:27 -04:00
|
|
|
def title
|
|
|
|
'build status'
|
2016-07-28 08:35:02 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def image_url
|
|
|
|
build_namespace_project_badges_url(@project.namespace,
|
|
|
|
@project, @ref, format: :svg)
|
|
|
|
end
|
|
|
|
|
|
|
|
def link_url
|
|
|
|
namespace_project_commits_url(@project.namespace, @project, id: @ref)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|