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
4fd99e67
Commit
4fd99e67
authored
Aug 05, 2021
by
Piotr Skorupa
Committed by
Nikola Milojevic
Aug 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add converting definition data categories to lowercase
parent
63cbe267
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lib/gitlab/usage/metric_definition.rb
lib/gitlab/usage/metric_definition.rb
+5
-1
No files found.
lib/gitlab/usage/metric_definition.rb
View file @
4fd99e67
...
@@ -55,6 +55,10 @@ module Gitlab
...
@@ -55,6 +55,10 @@ module Gitlab
end
end
end
end
def
category_to_lowercase
attributes
[
:data_category
]
&
.
downcase!
end
alias_method
:to_dictionary
,
:to_h
alias_method
:to_dictionary
,
:to_h
class
<<
self
class
<<
self
...
@@ -96,7 +100,7 @@ module Gitlab
...
@@ -96,7 +100,7 @@ module Gitlab
definition
=
YAML
.
safe_load
(
definition
)
definition
=
YAML
.
safe_load
(
definition
)
definition
.
deep_symbolize_keys!
definition
.
deep_symbolize_keys!
self
.
new
(
path
,
definition
).
tap
(
&
:validate!
)
self
.
new
(
path
,
definition
).
tap
(
&
:validate!
)
.
tap
(
&
:category_to_lowercase
)
rescue
StandardError
=>
e
rescue
StandardError
=>
e
Gitlab
::
ErrorTracking
.
track_and_raise_for_dev_exception
(
InvalidError
.
new
(
e
.
message
))
Gitlab
::
ErrorTracking
.
track_and_raise_for_dev_exception
(
InvalidError
.
new
(
e
.
message
))
end
end
...
...
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