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
8b96d287
Commit
8b96d287
authored
Nov 22, 2021
by
Mark Florian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use tap to avoid Rubocop warning
parent
7518e491
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
app/helpers/badges_helper.rb
app/helpers/badges_helper.rb
+4
-8
No files found.
app/helpers/badges_helper.rb
View file @
8b96d287
# frozen_string_literal: true
module
BadgesHelper
VARIANT_CLASSES
=
{
# rubocop:disable Style/MutableConstant
VARIANT_CLASSES
=
{
muted:
"badge-muted"
,
neutral:
"badge-neutral"
,
info:
"badge-info"
,
success:
"badge-success"
,
warning:
"badge-warning"
,
danger:
"badge-danger"
}
VARIANT_CLASSES
.
default
=
VARIANT_CLASSES
.
fetch
(
:muted
)
VARIANT_CLASSES
.
freeze
}.
tap
{
|
hash
|
hash
.
default
=
hash
.
fetch
(
:muted
)
}
.
freeze
SIZE_CLASSES
=
{
# rubocop:disable Style/MutableConstant
SIZE_CLASSES
=
{
sm:
"sm"
,
md:
"md"
,
lg:
"lg"
}
SIZE_CLASSES
.
default
=
SIZE_CLASSES
.
fetch
(
:md
)
SIZE_CLASSES
.
freeze
}.
tap
{
|
hash
|
hash
.
default
=
hash
.
fetch
(
:md
)
}
.
freeze
GL_BADGE_CLASSES
=
%w[gl-badge badge badge-pill]
.
freeze
...
...
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