Project

General

Profile

Bug #12925

Need to break up Repository model to smaller size

Added by Partha Aji over 3 years ago. Updated 12 months ago.

Status:
Ready For Testing
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Repository model is close to breaking the max class length rubo cop limit.

According to our rubocop metrics, max length per class is 500 lines. Repository.rb is very close to crossing that.
https://github.com/Katello/katello/blob/master/app/models/katello/repository.rb

One approach is to split functionality to different modules and include it in the main model.

History

#1 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5685 added

#2 Updated by Eric Helms over 3 years ago

  • Legacy Backlogs Release (now unused) set to 114

#3 Updated by Partha Aji over 3 years ago

So the suggestion for this is to use Single Table Inheritance.
Remove the rubocop class length directive.

Also available in: Atom PDF