diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-07-19 13:08:47 +0200 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-07-21 10:22:09 +0200 |
commit | 2086483b24e719ec8d82b3e7a52476626952885a (patch) | |
tree | a7d8fe979a0e2309b7517804e452d7162ccd422b /lib/gitlab/badge | |
parent | eaceee0fb9e23982571c9c2a878d662ba241240e (diff) | |
download | gitlab-ce-2086483b24e719ec8d82b3e7a52476626952885a.tar.gz |
Rename build to pipeline for status badges
First commit in probably 2, for resolve gitlab-org/gitlab-ce#15582. This
commit is renaming files and classes from build to pipeline. Also
wording is editted to pipeline. Given `pipeline` had more characters
than `build`, I've made the field a bit wider. The width now matchers
the one for the coverage badge, so they look nice when in a table
format, or in a list.
As soon as this commit is merged to master, and released, the build.svg
is deprecated, meaning that all users which already placed a badge
should update it. However, to make sure it keeps working tests are added
for this case.
Diffstat (limited to 'lib/gitlab/badge')
-rw-r--r-- | lib/gitlab/badge/pipeline/metadata.rb (renamed from lib/gitlab/badge/build/metadata.rb) | 8 | ||||
-rw-r--r-- | lib/gitlab/badge/pipeline/status.rb (renamed from lib/gitlab/badge/build/status.rb) | 10 | ||||
-rw-r--r-- | lib/gitlab/badge/pipeline/template.rb (renamed from lib/gitlab/badge/build/template.rb) | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/gitlab/badge/build/metadata.rb b/lib/gitlab/badge/pipeline/metadata.rb index 2ee35a0d4c1..db1e9f8cfb8 100644 --- a/lib/gitlab/badge/build/metadata.rb +++ b/lib/gitlab/badge/pipeline/metadata.rb @@ -1,8 +1,8 @@ module Gitlab module Badge - module Build + module Pipeline ## - # Class that describes build badge metadata + # Class that describes pipeline badge metadata # class Metadata < Badge::Metadata def initialize(badge) @@ -11,11 +11,11 @@ module Gitlab end def title - 'build status' + 'pipeline status' end def image_url - build_project_badges_url(@project, @ref, format: :svg) + pipeline_project_badges_url(@project, @ref, format: :svg) end def link_url diff --git a/lib/gitlab/badge/build/status.rb b/lib/gitlab/badge/pipeline/status.rb index b762d85b6e5..5fee7a93475 100644 --- a/lib/gitlab/badge/build/status.rb +++ b/lib/gitlab/badge/pipeline/status.rb @@ -1,8 +1,8 @@ module Gitlab module Badge - module Build + module Pipeline ## - # Build status badge + # Pipeline status badge # class Status < Badge::Base attr_reader :project, :ref @@ -15,7 +15,7 @@ module Gitlab end def entity - 'build' + 'pipeline' end def status @@ -25,11 +25,11 @@ module Gitlab end def metadata - @metadata ||= Build::Metadata.new(self) + @metadata ||= Pipeline::Metadata.new(self) end def template - @template ||= Build::Template.new(self) + @template ||= Pipeline::Template.new(self) end end end diff --git a/lib/gitlab/badge/build/template.rb b/lib/gitlab/badge/pipeline/template.rb index bc0e0cd441d..9618a3cf7eb 100644 --- a/lib/gitlab/badge/build/template.rb +++ b/lib/gitlab/badge/pipeline/template.rb @@ -1,8 +1,8 @@ module Gitlab module Badge - module Build + module Pipeline ## - # Class that represents a build badge template. + # Class that represents a pipeline badge template. # # Template object will be passed to badge.svg.erb template. # @@ -31,7 +31,7 @@ module Gitlab end def key_width - 38 + 62 end def value_width |