Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
118f63ba
Commit
118f63ba
authored
Jan 26, 2021
by
Allison Browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Badge under Ci namespace
Gitlab::Badge => Gitlab::Ci::Badge
parent
1252d865
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
21 additions
and
21 deletions
+21
-21
app/controllers/projects/badges_controller.rb
app/controllers/projects/badges_controller.rb
+2
-2
app/controllers/projects/settings/ci_cd_controller.rb
app/controllers/projects/settings/ci_cd_controller.rb
+2
-2
lib/gitlab/ci/badge/base.rb
lib/gitlab/ci/badge/base.rb
+1
-1
lib/gitlab/ci/badge/coverage/metadata.rb
lib/gitlab/ci/badge/coverage/metadata.rb
+1
-1
lib/gitlab/ci/badge/coverage/report.rb
lib/gitlab/ci/badge/coverage/report.rb
+1
-1
lib/gitlab/ci/badge/coverage/template.rb
lib/gitlab/ci/badge/coverage/template.rb
+1
-1
lib/gitlab/ci/badge/metadata.rb
lib/gitlab/ci/badge/metadata.rb
+1
-1
lib/gitlab/ci/badge/pipeline/metadata.rb
lib/gitlab/ci/badge/pipeline/metadata.rb
+1
-1
lib/gitlab/ci/badge/pipeline/status.rb
lib/gitlab/ci/badge/pipeline/status.rb
+1
-1
lib/gitlab/ci/badge/pipeline/template.rb
lib/gitlab/ci/badge/pipeline/template.rb
+1
-1
lib/gitlab/ci/badge/template.rb
lib/gitlab/ci/badge/template.rb
+1
-1
spec/lib/gitlab/ci/badge/coverage/metadata_spec.rb
spec/lib/gitlab/ci/badge/coverage/metadata_spec.rb
+2
-2
spec/lib/gitlab/ci/badge/coverage/report_spec.rb
spec/lib/gitlab/ci/badge/coverage/report_spec.rb
+1
-1
spec/lib/gitlab/ci/badge/coverage/template_spec.rb
spec/lib/gitlab/ci/badge/coverage/template_spec.rb
+1
-1
spec/lib/gitlab/ci/badge/pipeline/metadata_spec.rb
spec/lib/gitlab/ci/badge/pipeline/metadata_spec.rb
+2
-2
spec/lib/gitlab/ci/badge/pipeline/status_spec.rb
spec/lib/gitlab/ci/badge/pipeline/status_spec.rb
+1
-1
spec/lib/gitlab/ci/badge/pipeline/template_spec.rb
spec/lib/gitlab/ci/badge/pipeline/template_spec.rb
+1
-1
spec/lib/gitlab/ci/badge/shared/metadata.rb
spec/lib/gitlab/ci/badge/shared/metadata.rb
+0
-0
No files found.
app/controllers/projects/badges_controller.rb
View file @
118f63ba
...
...
@@ -9,7 +9,7 @@ class Projects::BadgesController < Projects::ApplicationController
feature_category
:continuous_integration
def
pipeline
pipeline_status
=
Gitlab
::
Badge
::
Pipeline
::
Status
pipeline_status
=
Gitlab
::
Ci
::
Badge
::
Pipeline
::
Status
.
new
(
project
,
params
[
:ref
],
opts:
{
ignore_skipped:
params
[
:ignore_skipped
],
key_text:
params
[
:key_text
],
...
...
@@ -20,7 +20,7 @@ class Projects::BadgesController < Projects::ApplicationController
end
def
coverage
coverage_report
=
Gitlab
::
Badge
::
Coverage
::
Report
coverage_report
=
Gitlab
::
Ci
::
Badge
::
Coverage
::
Report
.
new
(
project
,
params
[
:ref
],
opts:
{
job:
params
[
:job
],
key_text:
params
[
:key_text
],
...
...
app/controllers/projects/settings/ci_cd_controller.rb
View file @
118f63ba
...
...
@@ -145,8 +145,8 @@ module Projects
def
define_badges_variables
@ref
=
params
[
:ref
]
||
@project
.
default_branch
||
'master'
@badges
=
[
Gitlab
::
Badge
::
Pipeline
::
Status
,
Gitlab
::
Badge
::
Coverage
::
Report
]
@badges
=
[
Gitlab
::
Ci
::
Badge
::
Pipeline
::
Status
,
Gitlab
::
Ci
::
Badge
::
Coverage
::
Report
]
@badges
.
map!
do
|
badge
|
badge
.
new
(
@project
,
@ref
).
metadata
...
...
lib/gitlab/badge/base.rb
→
lib/gitlab/
ci/
badge/base.rb
View file @
118f63ba
# frozen_string_literal: true
module
Gitlab
module
Gitlab
::Ci
module
Badge
class
Base
def
entity
...
...
lib/gitlab/badge/coverage/metadata.rb
→
lib/gitlab/
ci/
badge/coverage/metadata.rb
View file @
118f63ba
# frozen_string_literal: true
module
Gitlab
module
Gitlab
::Ci
module
Badge
module
Coverage
##
...
...
lib/gitlab/badge/coverage/report.rb
→
lib/gitlab/
ci/
badge/coverage/report.rb
View file @
118f63ba
# frozen_string_literal: true
module
Gitlab
module
Gitlab
::Ci
module
Badge
module
Coverage
##
...
...
lib/gitlab/badge/coverage/template.rb
→
lib/gitlab/
ci/
badge/coverage/template.rb
View file @
118f63ba
# frozen_string_literal: true
module
Gitlab
module
Gitlab
::Ci
module
Badge
module
Coverage
##
...
...
lib/gitlab/badge/metadata.rb
→
lib/gitlab/
ci/
badge/metadata.rb
View file @
118f63ba
# frozen_string_literal: true
module
Gitlab
module
Gitlab
::Ci
module
Badge
##
# Abstract class for badge metadata
...
...
lib/gitlab/badge/pipeline/metadata.rb
→
lib/gitlab/
ci/
badge/pipeline/metadata.rb
View file @
118f63ba
# frozen_string_literal: true
module
Gitlab
module
Gitlab
::Ci
module
Badge
module
Pipeline
##
...
...
lib/gitlab/badge/pipeline/status.rb
→
lib/gitlab/
ci/
badge/pipeline/status.rb
View file @
118f63ba
# frozen_string_literal: true
module
Gitlab
module
Gitlab
::Ci
module
Badge
module
Pipeline
##
...
...
lib/gitlab/badge/pipeline/template.rb
→
lib/gitlab/
ci/
badge/pipeline/template.rb
View file @
118f63ba
# frozen_string_literal: true
module
Gitlab
module
Gitlab
::Ci
module
Badge
module
Pipeline
##
...
...
lib/gitlab/badge/template.rb
→
lib/gitlab/
ci/
badge/template.rb
View file @
118f63ba
# frozen_string_literal: true
module
Gitlab
module
Gitlab
::Ci
module
Badge
##
# Abstract template class for badges
...
...
spec/lib/gitlab/badge/coverage/metadata_spec.rb
→
spec/lib/gitlab/
ci/
badge/coverage/metadata_spec.rb
View file @
118f63ba
# frozen_string_literal: true
require
'spec_helper'
require
'lib/gitlab/badge/shared/metadata'
require
'lib/gitlab/
ci/
badge/shared/metadata'
RSpec
.
describe
Gitlab
::
Badge
::
Coverage
::
Metadata
do
RSpec
.
describe
Gitlab
::
Ci
::
Badge
::
Coverage
::
Metadata
do
let
(
:badge
)
do
double
(
project:
create
(
:project
),
ref:
'feature'
,
job:
'test'
)
end
...
...
spec/lib/gitlab/badge/coverage/report_spec.rb
→
spec/lib/gitlab/
ci/
badge/coverage/report_spec.rb
View file @
118f63ba
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Badge
::
Coverage
::
Report
do
RSpec
.
describe
Gitlab
::
Ci
::
Badge
::
Coverage
::
Report
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:success_pipeline
)
{
create
(
:ci_pipeline
,
:success
,
project:
project
)
}
let_it_be
(
:running_pipeline
)
{
create
(
:ci_pipeline
,
:running
,
project:
project
)
}
...
...
spec/lib/gitlab/badge/coverage/template_spec.rb
→
spec/lib/gitlab/
ci/
badge/coverage/template_spec.rb
View file @
118f63ba
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Badge
::
Coverage
::
Template
do
RSpec
.
describe
Gitlab
::
Ci
::
Badge
::
Coverage
::
Template
do
let
(
:badge
)
{
double
(
entity:
'coverage'
,
status:
90.00
,
customization:
{})
}
let
(
:template
)
{
described_class
.
new
(
badge
)
}
...
...
spec/lib/gitlab/badge/pipeline/metadata_spec.rb
→
spec/lib/gitlab/
ci/
badge/pipeline/metadata_spec.rb
View file @
118f63ba
# frozen_string_literal: true
require
'spec_helper'
require
'lib/gitlab/badge/shared/metadata'
require
'lib/gitlab/
ci/
badge/shared/metadata'
RSpec
.
describe
Gitlab
::
Badge
::
Pipeline
::
Metadata
do
RSpec
.
describe
Gitlab
::
Ci
::
Badge
::
Pipeline
::
Metadata
do
let
(
:badge
)
{
double
(
project:
create
(
:project
),
ref:
'feature'
)
}
let
(
:metadata
)
{
described_class
.
new
(
badge
)
}
...
...
spec/lib/gitlab/badge/pipeline/status_spec.rb
→
spec/lib/gitlab/
ci/
badge/pipeline/status_spec.rb
View file @
118f63ba
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Badge
::
Pipeline
::
Status
do
RSpec
.
describe
Gitlab
::
Ci
::
Badge
::
Pipeline
::
Status
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:sha
)
{
project
.
commit
.
sha
}
let
(
:branch
)
{
'master'
}
...
...
spec/lib/gitlab/badge/pipeline/template_spec.rb
→
spec/lib/gitlab/
ci/
badge/pipeline/template_spec.rb
View file @
118f63ba
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Badge
::
Pipeline
::
Template
do
RSpec
.
describe
Gitlab
::
Ci
::
Badge
::
Pipeline
::
Template
do
let
(
:badge
)
{
double
(
entity:
'pipeline'
,
status:
'success'
,
customization:
{})
}
let
(
:template
)
{
described_class
.
new
(
badge
)
}
...
...
spec/lib/gitlab/badge/shared/metadata.rb
→
spec/lib/gitlab/
ci/
badge/shared/metadata.rb
View file @
118f63ba
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment