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
174f4598
Commit
174f4598
authored
Apr 15, 2019
by
Alessio Caiazza
Committed by
Stan Hu
May 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track package_file size
parent
cb72d9ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
ee/app/models/packages/package_file.rb
ee/app/models/packages/package_file.rb
+5
-0
ee/changelogs/unreleased/ac-package-storage-stats-ee.yml
ee/changelogs/unreleased/ac-package-storage-stats-ee.yml
+5
-0
ee/spec/models/packages/package_file_spec.rb
ee/spec/models/packages/package_file_spec.rb
+4
-0
No files found.
ee/app/models/packages/package_file.rb
View file @
174f4598
# frozen_string_literal: true
class
Packages::PackageFile
<
ApplicationRecord
include
UpdateProjectStatistics
delegate
:project
,
:project_id
,
to: :package
update_project_statistics
stat: :packages_size
belongs_to
:package
validates
:package
,
presence:
true
...
...
ee/changelogs/unreleased/ac-package-storage-stats-ee.yml
0 → 100644
View file @
174f4598
---
title
:
Keep track of packages_file in ProjectStatistics
merge_request
:
11020
author
:
type
:
added
ee/spec/models/packages/package_file_spec.rb
View file @
174f4598
...
...
@@ -9,4 +9,8 @@ RSpec.describe Packages::PackageFile, type: :model do
describe
'validations'
do
it
{
is_expected
.
to
validate_presence_of
(
:package
)
}
end
it_behaves_like
'UpdateProjectStatistics'
do
subject
{
build
(
:package_file
,
:jar
,
size:
42
)
}
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