Skip to content

Commit

Permalink
Remove redundant logger method
Browse files Browse the repository at this point in the history
The `logger` method can be called in any model. There is no need to
redefine it in a model.

Add the `logger` method to minitests to prevent errors.
  • Loading branch information
eduardoj committed Jan 24, 2023
1 parent 206451b commit c347b19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/api/app/models/branch_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ def initialize(params)
@update_path_elements = true
end

def logger
Rails.logger
end

def branch
#
# 1) BaseProject <-- 2) UpdateProject <-- 3) DevelProject/Package
Expand Down
4 changes: 4 additions & 0 deletions src/api/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def inject_build_job(project, package, repo, arch, extrabinary = nil)
system("echo \"#{verifymd5} #{package}\" > #{jobfile}:dir/meta")
end

def logger
Rails.logger
end

module Minitest
def self.__run(reporter, options)
# there is no way to avoid the randomization of used suites, so we overload this method.
Expand Down

0 comments on commit c347b19

Please sign in to comment.