File build_list.rb
has 621 lines of code (exceeds 250 allowed). Consider refactoring.
class BuildList < ActiveRecord::Base
include CommitAndVersion
include FileStoreClean
include AbfWorkerMethods
include Feed::BuildList
Class BuildList
has 45 methods (exceeds 20 allowed). Consider refactoring.
class BuildList < ActiveRecord::Base
include CommitAndVersion
include FileStoreClean
include AbfWorkerMethods
include Feed::BuildList
Method abf_worker_args
has 57 lines of code (exceeds 25 allowed). Consider refactoring.
def abf_worker_args
repos = include_repos
include_repos_hash = {}.tap do |h|
Repository.where(id: (repos | (extra_repositories || [])) ).each do |repo|
path, prefix = repo.platform.public_downloads_url(
Method abf_worker_args
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
def abf_worker_args
repos = include_repos
include_repos_hash = {}.tap do |h|
Repository.where(id: (repos | (extra_repositories || [])) ).each do |repo|
path, prefix = repo.platform.public_downloads_url(
Method has_new_packages?
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
def has_new_packages?
if last_bl = last_published.joins(:source_packages).where(build_list_packages: {actual: true}).last
source_packages.each do |nsp|
sp = last_bl.source_packages.find{ |sp| nsp.name == sp.name }
return true unless sp
Method prepare_extra_build_lists
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
def prepare_extra_build_lists
if mass_build && mass_build.extra_mass_builds.present?
extra_build_lists << BuildList.where(mass_build_id: mass_build.extra_mass_builds).pluck(:id)
extra_build_lists.flatten!
end
Avoid too many return
statements within this method.
return false
There are no issues that match your filters.