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
ec0e2715
Commit
ec0e2715
authored
Apr 20, 2021
by
Luis Mejia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubocop errors
parent
7a70566a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
lib/generators/gitlab/usage_metric_definition_generator.rb
lib/generators/gitlab/usage_metric_definition_generator.rb
+1
-5
spec/lib/generators/gitlab/usage_metric_definition_generator_spec.rb
...nerators/gitlab/usage_metric_definition_generator_spec.rb
+1
-1
No files found.
lib/generators/gitlab/usage_metric_definition_generator.rb
View file @
ec0e2715
...
...
@@ -60,11 +60,7 @@ module Gitlab
end
def
tier
value
=
if
ee?
[
'#- premium'
]
else
[
'- free'
,
'- premium'
]
end
value
=
ee?
?
[
'#- premium'
]
:
[
'- free'
,
'- premium'
]
value
<<
'- ultimate'
value
.
join
(
"
\n
"
)
end
...
...
spec/lib/generators/gitlab/usage_metric_definition_generator_spec.rb
View file @
ec0e2715
...
...
@@ -33,7 +33,7 @@ RSpec.describe Gitlab::UsageMetricDefinitionGenerator do
let
(
:metric_definition_path
)
{
Dir
.
glob
(
File
.
join
(
temp_dir
,
'metrics/counts_7d/*_test_metric.yml'
)).
first
}
it
'creates a metric definition file using the template'
do
described_class
.
new
([
key_path
],
{
'dir'
=>
dir
}).
invoke_all
described_class
.
new
([
key_path
],
{
'dir'
=>
dir
}).
invoke_all
expect
(
YAML
.
safe_load
(
File
.
read
(
metric_definition_path
))).
to
eq
(
sample_metric
)
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