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
35980e13
Commit
35980e13
authored
Jun 08, 2020
by
Ryan Cobb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build Project metrics_setting if not present
parent
7d270d47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
app/models/project.rb
app/models/project.rb
+4
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+8
-0
No files found.
app/models/project.rb
View file @
35980e13
...
...
@@ -2410,6 +2410,10 @@ class Project < ApplicationRecord
touch
(
:last_activity_at
,
:last_repository_updated_at
)
end
def
metrics_setting
super
||
build_metrics_setting
end
private
def
find_service
(
services
,
name
)
...
...
spec/models/project_spec.rb
View file @
35980e13
...
...
@@ -6064,6 +6064,14 @@ describe Project do
it
{
is_expected
.
not_to
include
(
user
)
}
end
describe
"#metrics_setting"
do
let
(
:project
)
{
build
(
:project
)
}
it
'creates setting if it does not exist'
do
expect
(
project
.
metrics_setting
).
to
be_an_instance_of
(
ProjectMetricsSetting
)
end
end
def
finish_job
(
export_job
)
export_job
.
start
export_job
.
finish
...
...
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