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
01891edd
Commit
01891edd
authored
Apr 21, 2021
by
Luis Mejia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add suggested changes
parent
ec0e2715
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 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
-4
spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_ee.yml
...age_metric_definition_generator/sample_metric_with_ee.yml
+0
-1
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 @
01891edd
...
@@ -53,10 +53,7 @@ module Gitlab
...
@@ -53,10 +53,7 @@ module Gitlab
end
end
def
distribution
def
distribution
value
=
[]
(
ee?
?
[
'- ee'
]
:
[
'- ce'
,
'- ee'
]).
join
(
"
\n
"
)
value
<<
'- ce'
unless
ee?
value
<<
'- ee'
value
.
join
(
"
\n
"
)
end
end
def
tier
def
tier
...
...
spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_ee.yml
View file @
01891edd
---
---
# See Usage Ping metrics dictionary docs https://docs.gitlab.com/ee/development/usage_ping/metrics_dictionary.html
key_path
:
counts_weekly.test_metric
key_path
:
counts_weekly.test_metric
name
:
test metric name
name
:
test metric name
description
:
description
:
...
...
spec/lib/generators/gitlab/usage_metric_definition_generator_spec.rb
View file @
01891edd
...
@@ -38,7 +38,7 @@ RSpec.describe Gitlab::UsageMetricDefinitionGenerator do
...
@@ -38,7 +38,7 @@ RSpec.describe Gitlab::UsageMetricDefinitionGenerator do
end
end
end
end
context
'with ee
is true
'
do
context
'with ee
option
'
do
let
(
:sample_filename
)
{
'sample_metric_with_ee.yml'
}
let
(
:sample_filename
)
{
'sample_metric_with_ee.yml'
}
let
(
:metric_definition_path
)
{
Dir
.
glob
(
File
.
join
(
temp_dir
,
'ee/config/metrics/counts_7d/*_test_metric.yml'
)).
first
}
let
(
:metric_definition_path
)
{
Dir
.
glob
(
File
.
join
(
temp_dir
,
'ee/config/metrics/counts_7d/*_test_metric.yml'
)).
first
}
...
...
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