lib/git/lint/reporters/branch.rb in git-lint-6.2.1 vs lib/git/lint/reporters/branch.rb in git-lint-7.0.0
- old
+ new
@@ -4,11 +4,11 @@
module Lint
module Reporters
# Reports issues related to a single branch.
class Branch
include Import[:color]
- using ::Refinements::Strings
+ using Refinements::String
def initialize(collector: Collector.new, **)
super(**)
@collector = collector
end
@@ -36,11 +36,11 @@
end
end
def commit_total
total = collector.total_commits
- %(#{total} #{"commit".pluralize "s", count: total} inspected)
+ %(#{total} #{"commit".pluralize "s", total} inspected)
end
def issue_totals
if collector.issues?
"#{issue_total} detected (#{warning_total}, #{error_total})"
@@ -50,22 +50,22 @@
end
def issue_total
style = collector.errors? ? :red : :yellow
total = collector.total_issues
- color["#{total} issue".pluralize("s", count: total), style]
+ color["#{total} issue".pluralize("s", total), style]
end
def warning_total
style = collector.warnings? ? :yellow : :green
total = collector.total_warnings
- color["#{total} warning".pluralize("s", count: total), style]
+ color["#{total} warning".pluralize("s", total), style]
end
def error_total
style = collector.errors? ? :red : :green
total = collector.total_errors
- color["#{total} error".pluralize("s", count: total), style]
+ color["#{total} error".pluralize("s", total), style]
end
end
end
end
end