diff --git a/Library/Homebrew/cask/cmd/install.rb b/Library/Homebrew/cask/cmd/install.rb index acaa525997..efd84d9365 100644 --- a/Library/Homebrew/cask/cmd/install.rb +++ b/Library/Homebrew/cask/cmd/install.rb @@ -85,7 +85,7 @@ module Cask if dry_run if (casks_to_install = casks.reject(&:installed?).presence) - plural = ::Utils::Inflection.pluralize("cask", casks_to_install.count) + plural = ::Utils.pluralize("cask", casks_to_install.count) ohai "Would install #{casks_to_install.count} #{plural}:" puts casks_to_install.map(&:full_name).join(" ") end @@ -97,7 +97,7 @@ module Cask .map(&:name) next if dep_names.blank? - plural = ::Utils::Inflection.pluralize("dependenc", dep_names.count, plural: "ies", singular: "y") + plural = ::Utils.pluralize("dependenc", dep_names.count, plural: "ies", singular: "y") ohai "Would install #{dep_names.count} #{plural} for #{cask.full_name}:" puts dep_names.join(" ") end diff --git a/Library/Homebrew/cask/cmd/uninstall.rb b/Library/Homebrew/cask/cmd/uninstall.rb index e19739b8fd..f121cbb98c 100644 --- a/Library/Homebrew/cask/cmd/uninstall.rb +++ b/Library/Homebrew/cask/cmd/uninstall.rb @@ -46,7 +46,7 @@ module Cask next if (versions = cask.versions).empty? puts <<~EOS - #{cask} #{versions.to_sentence} #{::Utils::Inflection.pluralize("", versions.count, plural: "are", singular: "is")} still installed. + #{cask} #{versions.to_sentence} #{::Utils.pluralize("", versions.count, plural: "are", singular: "is")} still installed. Remove #{(versions.count == 1) ? "it" : "them all"} with `brew uninstall --cask --force #{cask}`. EOS end diff --git a/Library/Homebrew/cask/cmd/upgrade.rb b/Library/Homebrew/cask/cmd/upgrade.rb index 1dc312d08b..2c4b98691d 100644 --- a/Library/Homebrew/cask/cmd/upgrade.rb +++ b/Library/Homebrew/cask/cmd/upgrade.rb @@ -121,7 +121,7 @@ module Cask if manual_installer_casks.present? count = manual_installer_casks.count - ofail "Not upgrading #{count} `installer manual` #{::Utils::Inflection.pluralize("cask", versions.count)}." + ofail "Not upgrading #{count} `installer manual` #{::Utils.pluralize("cask", versions.count)}." puts manual_installer_casks.map(&:to_s) outdated_casks -= manual_installer_casks end @@ -142,7 +142,7 @@ module Cask end verb = dry_run ? "Would upgrade" : "Upgrading" - oh1 "#{verb} #{outdated_casks.count} outdated #{::Utils::Inflection.pluralize("package", + oh1 "#{verb} #{outdated_casks.count} outdated #{::Utils.pluralize("package", outdated_casks.count)}:" caught_exceptions = [] diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index 64fa081e59..91f6fc1401 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -231,7 +231,7 @@ module Cask already_installed_artifacts = [] odebug "Installing artifacts" - odebug "#{artifacts.length} #{::Utils::Inflection.pluralize("artifact", artifacts.length)} defined", artifacts + odebug "#{artifacts.length} #{::Utils.pluralize("artifact", artifacts.length)} defined", artifacts artifacts.each do |artifact| next unless artifact.respond_to?(:install_phase) @@ -460,7 +460,7 @@ module Cask artifacts = @cask.artifacts odebug "Uninstalling artifacts" - odebug "#{artifacts.length} #{::Utils::Inflection.pluralize("artifact", artifacts.length)} defined", artifacts + odebug "#{artifacts.length} #{::Utils.pluralize("artifact", artifacts.length)} defined", artifacts artifacts.each do |artifact| if artifact.respond_to?(:uninstall_phase) diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index 57e5d3ef27..6c6e73f687 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -584,7 +584,7 @@ module Homebrew formulae_names = removable_formulae.map(&:full_name).sort verb = dry_run ? "Would autoremove" : "Autoremoving" - oh1 "#{verb} #{formulae_names.count} unneeded #{Utils::Inflection.pluralize("formula", formulae_names.count, + oh1 "#{verb} #{formulae_names.count} unneeded #{Utils.pluralize("formula", formulae_names.count, plural: "e")}:" puts formulae_names.join("\n") return if dry_run diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index f3ec536c0c..fc6f15bd8f 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -684,7 +684,7 @@ module Homebrew arg_types = types.map { |type| type.to_s.tr("_", " ") } .to_sentence two_words_connector: " or ", last_word_connector: " or " - "This command does not take more than #{maximum} #{arg_types} #{Utils::Inflection.pluralize("argument", + "This command does not take more than #{maximum} #{arg_types} #{Utils.pluralize("argument", maximum)}." end end @@ -699,7 +699,7 @@ module Homebrew arg_types = types.map { |type| type.to_s.tr("_", " ") } .to_sentence two_words_connector: " or ", last_word_connector: " or " - super "This command requires at least #{minimum} #{arg_types} #{Utils::Inflection.pluralize("argument", + super "This command requires at least #{minimum} #{arg_types} #{Utils.pluralize("argument", minimum)}." end end @@ -713,7 +713,7 @@ module Homebrew arg_types = types.map { |type| type.to_s.tr("_", " ") } .to_sentence two_words_connector: " or ", last_word_connector: " or " - super "This command requires exactly #{minimum} #{arg_types} #{Utils::Inflection.pluralize("argument", + super "This command requires exactly #{minimum} #{arg_types} #{Utils.pluralize("argument", minimum)}." end end diff --git a/Library/Homebrew/cmd/developer.rb b/Library/Homebrew/cmd/developer.rb index a142a77f7d..aebe05654e 100755 --- a/Library/Homebrew/cmd/developer.rb +++ b/Library/Homebrew/cmd/developer.rb @@ -40,7 +40,7 @@ module Homebrew case args.named.first when nil, "state" if env_vars.any? - puts "Developer mode is enabled because #{env_vars.to_sentence} #{Utils::Inflection.pluralize("", + puts "Developer mode is enabled because #{env_vars.to_sentence} #{Utils.pluralize("", env_vars.count, plural: "are", singular: "is")} set." elsif Homebrew::Settings.read("devcmdrun") == "true" puts "Developer mode is enabled." diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 80af3a5200..d348b69bf2 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -166,7 +166,7 @@ module Homebrew if args.retry? && (@fetch_tries[f] < FETCH_MAX_TRIES) wait = 2 ** @fetch_tries[f] remaining = FETCH_MAX_TRIES - @fetch_tries[f] - what = Utils::Inflection.pluralize("tr", remaining, plural: "ies", singular: "y") + what = Utils.pluralize("tr", remaining, plural: "ies", singular: "y") ohai "Retrying download in #{wait}s... (#{remaining} #{what} left)" sleep wait diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 68982834d8..52cc426717 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -124,7 +124,7 @@ module Homebrew return unless HOMEBREW_CELLAR.exist? count = Formula.racks.length - puts "#{count} #{Utils::Inflection.pluralize("keg", count)}, #{HOMEBREW_CELLAR.dup.abv}" + puts "#{count} #{Utils.pluralize("keg", count)}, #{HOMEBREW_CELLAR.dup.abv}" end sig { params(args: CLI::Args).void } diff --git a/Library/Homebrew/cmd/tap-info.rb b/Library/Homebrew/cmd/tap-info.rb index 270892c7ec..4a471a8e01 100644 --- a/Library/Homebrew/cmd/tap-info.rb +++ b/Library/Homebrew/cmd/tap-info.rb @@ -57,10 +57,10 @@ module Homebrew command_count += tap.command_files.size private_count += 1 if tap.private? end - info = "#{tap_count} #{Utils::Inflection.pluralize("tap", tap_count)}" + info = "#{tap_count} #{Utils.pluralize("tap", tap_count)}" info += ", #{private_count} private" - info += ", #{formula_count} #{Utils::Inflection.pluralize("formula", formula_count, plural: "e")}" - info += ", #{command_count} #{Utils::Inflection.pluralize("command", command_count)}" + info += ", #{formula_count} #{Utils.pluralize("formula", formula_count, plural: "e")}" + info += ", #{command_count} #{Utils.pluralize("command", command_count)}" info += ", #{Tap::TAP_DIRECTORY.dup.abv}" if Tap::TAP_DIRECTORY.directory? puts info else diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index d4a8f4cbec..fceb705f08 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -199,7 +199,7 @@ module Homebrew unless updated_taps.empty? auto_update_header args: args - puts "Updated #{updated_taps.count} #{Utils::Inflection.pluralize("tap", + puts "Updated #{updated_taps.count} #{Utils.pluralize("tap", updated_taps.count)} (#{updated_taps.to_sentence})." updated = true end @@ -586,11 +586,11 @@ class ReporterHub elsif report_all if (changed_formulae = select_formula_or_cask(:M).count) && changed_formulae.positive? ohai "Modified Formulae", - "Modified #{changed_formulae} #{Utils::Inflection.pluralize("formula", changed_formulae, plural: "e")}." + "Modified #{changed_formulae} #{Utils.pluralize("formula", changed_formulae, plural: "e")}." end if (changed_casks = select_formula_or_cask(:MC).count) && changed_casks.positive? - ohai "Modified Casks", "Modified #{changed_casks} #{Utils::Inflection.pluralize("cask", changed_casks)}." + ohai "Modified Casks", "Modified #{changed_casks} #{Utils.pluralize("cask", changed_casks)}." end else outdated_formulae = Formula.installed.select(&:outdated?).map(&:name) @@ -611,13 +611,13 @@ class ReporterHub msg = "" if outdated_formulae.positive? - msg += "#{Tty.bold}#{outdated_formulae}#{Tty.reset} outdated #{Utils::Inflection.pluralize("formula", + msg += "#{Tty.bold}#{outdated_formulae}#{Tty.reset} outdated #{Utils.pluralize("formula", outdated_formulae, plural: "e")}" end if outdated_casks.positive? msg += " and " if msg.present? - msg += "#{Tty.bold}#{outdated_casks}#{Tty.reset} outdated #{Utils::Inflection.pluralize("cask", + msg += "#{Tty.bold}#{outdated_casks}#{Tty.reset} outdated #{Utils.pluralize("cask", outdated_casks)}" end diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 5463636deb..9927c5ffcf 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -172,7 +172,7 @@ module Homebrew end if !pinned.empty? && !args.ignore_pinned? - ofail "Not upgrading #{pinned.count} pinned #{Utils::Inflection.pluralize("package", pinned.count)}:" + ofail "Not upgrading #{pinned.count} pinned #{Utils.pluralize("package", pinned.count)}:" puts pinned.map { |f| "#{f.full_specified_name} #{f.pkg_version}" } * ", " end @@ -180,7 +180,7 @@ module Homebrew oh1 "No packages to upgrade" else verb = args.dry_run? ? "Would upgrade" : "Upgrading" - oh1 "#{verb} #{formulae_to_install.count} outdated #{Utils::Inflection.pluralize("package", + oh1 "#{verb} #{formulae_to_install.count} outdated #{Utils.pluralize("package", formulae_to_install.count)}:" formulae_upgrades = formulae_to_install.map do |f| if f.optlinked? diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 8feb3a6ad9..356b8f13b1 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -277,22 +277,22 @@ module Homebrew if total_problems_count.positive? puts new_formula_problem_lines.map { |s| " #{s}" } - errors_summary = "#{total_problems_count} #{Utils::Inflection.pluralize("problem", total_problems_count)}" + errors_summary = "#{total_problems_count} #{Utils.pluralize("problem", total_problems_count)}" error_sources = [] if formula_count.positive? - error_sources << "#{formula_count} #{Utils::Inflection.pluralize("formula", formula_count, + error_sources << "#{formula_count} #{Utils.pluralize("formula", formula_count, plural: "e")}" end - error_sources << "#{cask_count} #{Utils::Inflection.pluralize("cask", cask_count)}" if cask_count.positive? - error_sources << "#{tap_count} #{Utils::Inflection.pluralize("tap", tap_count)}" if tap_count.positive? + error_sources << "#{cask_count} #{Utils.pluralize("cask", cask_count)}" if cask_count.positive? + error_sources << "#{tap_count} #{Utils.pluralize("tap", tap_count)}" if tap_count.positive? errors_summary += " in #{error_sources.to_sentence}" if error_sources.any? errors_summary += " detected" if corrected_problem_count.positive? - errors_summary += ", #{corrected_problem_count} #{Utils::Inflection.pluralize("problem", + errors_summary += ", #{corrected_problem_count} #{Utils.pluralize("problem", corrected_problem_count)} corrected" end diff --git a/Library/Homebrew/dev-cmd/pr-automerge.rb b/Library/Homebrew/dev-cmd/pr-automerge.rb index cec12b550d..e2e302b6c9 100644 --- a/Library/Homebrew/dev-cmd/pr-automerge.rb +++ b/Library/Homebrew/dev-cmd/pr-automerge.rb @@ -61,7 +61,7 @@ module Homebrew return end - ohai "#{prs.count} matching pull #{Utils::Inflection.pluralize("request", prs.count)}:" + ohai "#{prs.count} matching pull #{Utils.pluralize("request", prs.count)}:" pr_urls = [] prs.each do |pr| puts "#{tap.full_name unless tap.core_tap?}##{pr["number"]}: #{pr["title"]}" diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index 4ce24c7376..3d1c512a22 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -906,11 +906,11 @@ module Homebrew 0 end - "#{tap.path} (#{cask_count} #{Utils::Inflection.pluralize("cask", cask_count)})" + "#{tap.path} (#{cask_count} #{Utils.pluralize("cask", cask_count)})" end end) - taps = Utils::Inflection.pluralize("tap", error_tap_paths.count) + taps = Utils.pluralize("tap", error_tap_paths.count) "Unable to read from cask #{taps}: #{error_tap_paths.to_sentence}" if error_tap_paths.present? end diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 0237024ca2..c0b525e1cb 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -568,7 +568,7 @@ end class UnbottledError < RuntimeError def initialize(formulae) msg = +<<~EOS - The following #{Utils::Inflection.pluralize("formula", formulae.count, plural: "e")} cannot be installed from #{Utils::Inflection.pluralize("bottle", formulae.count)} and must be + The following #{Utils.pluralize("formula", formulae.count, plural: "e")} cannot be installed from #{Utils.pluralize("bottle", formulae.count)} and must be built from source. #{formulae.to_sentence} EOS diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index b39ad638e2..aa179fbcfa 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -52,10 +52,10 @@ module Formulary next if type == :formulary_factory cached_objects.each_value do |klass| - namespace = Utils::Inflection.deconstantize(klass.name) - next if Utils::Inflection.deconstantize(namespace) != name + namespace = Utils.deconstantize(klass.name) + next if Utils.deconstantize(namespace) != name - remove_const(Utils::Inflection.demodulize(namespace)) + remove_const(Utils.demodulize(namespace)) end end diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb index 8d989fbf30..aedd572393 100644 --- a/Library/Homebrew/install.rb +++ b/Library/Homebrew/install.rb @@ -324,7 +324,7 @@ module Homebrew if dry_run if (formulae_name_to_install = formulae_to_install.map(&:name)) - plural = Utils::Inflection.pluralize("formula", formulae_name_to_install.count, plural: "e") + plural = Utils.pluralize("formula", formulae_name_to_install.count, plural: "e") ohai "Would install #{formulae_name_to_install.count} #{plural}:" puts formulae_name_to_install.join(" ") @@ -354,7 +354,7 @@ module Homebrew def print_dry_run_dependencies(formula, dependencies, &block) return if dependencies.empty? - plural = Utils::Inflection.pluralize("dependenc", dependencies.count, plural: "ies", singular: "y") + plural = Utils.pluralize("dependenc", dependencies.count, plural: "ies", singular: "y") ohai "Would install #{dependencies.count} #{plural} for #{formula.name}:" formula_names = dependencies.map(&:first).map(&:to_formula).map(&block) puts formula_names.join(" ") diff --git a/Library/Homebrew/livecheck/livecheck.rb b/Library/Homebrew/livecheck/livecheck.rb index cef2357f69..07c436f3a5 100644 --- a/Library/Homebrew/livecheck/livecheck.rb +++ b/Library/Homebrew/livecheck/livecheck.rb @@ -61,7 +61,7 @@ module Homebrew constant = Strategy.const_get(const_symbol) next unless constant.is_a?(Class) - @livecheck_strategy_names[constant] = Utils::Inflection.demodulize(T.must(constant.name)) + @livecheck_strategy_names[constant] = Utils.demodulize(T.must(constant.name)) end @livecheck_strategy_names.freeze end diff --git a/Library/Homebrew/livecheck/strategy/electron_builder.rb b/Library/Homebrew/livecheck/strategy/electron_builder.rb index 542c00742d..4be6c35f3e 100644 --- a/Library/Homebrew/livecheck/strategy/electron_builder.rb +++ b/Library/Homebrew/livecheck/strategy/electron_builder.rb @@ -74,7 +74,7 @@ module Homebrew def self.find_versions(url:, regex: nil, **_unused, &block) if regex.present? && block.blank? raise ArgumentError, - "#{Utils::Inflection.demodulize(T.must(name))} only supports a regex when using a `strategy` block" + "#{Utils.demodulize(T.must(name))} only supports a regex when using a `strategy` block" end match_data = { matches: {}, regex: regex, url: url } diff --git a/Library/Homebrew/livecheck/strategy/extract_plist.rb b/Library/Homebrew/livecheck/strategy/extract_plist.rb index db7565dca6..b9025dfbe7 100644 --- a/Library/Homebrew/livecheck/strategy/extract_plist.rb +++ b/Library/Homebrew/livecheck/strategy/extract_plist.rb @@ -98,11 +98,11 @@ module Homebrew def self.find_versions(cask:, url: nil, regex: nil, **_unused, &block) if regex.present? && block.blank? raise ArgumentError, - "#{Utils::Inflection.demodulize(T.must(name))} only supports a regex when using a `strategy` block" + "#{Utils.demodulize(T.must(name))} only supports a regex when using a `strategy` block" end unless T.unsafe(cask) raise ArgumentError, - "The #{Utils::Inflection.demodulize(T.must(name))} strategy only supports casks." + "The #{Utils.demodulize(T.must(name))} strategy only supports casks." end match_data = { matches: {}, regex: regex, url: url } diff --git a/Library/Homebrew/livecheck/strategy/page_match.rb b/Library/Homebrew/livecheck/strategy/page_match.rb index fc86e00654..a024bdb552 100644 --- a/Library/Homebrew/livecheck/strategy/page_match.rb +++ b/Library/Homebrew/livecheck/strategy/page_match.rb @@ -93,7 +93,7 @@ module Homebrew } def self.find_versions(url:, regex: nil, provided_content: nil, homebrew_curl: false, **_unused, &block) if regex.blank? && block.blank? - raise ArgumentError, "#{Utils::Inflection.demodulize(T.must(name))} requires a regex or `strategy` block" + raise ArgumentError, "#{Utils.demodulize(T.must(name))} requires a regex or `strategy` block" end match_data = { matches: {}, regex: regex, url: url } diff --git a/Library/Homebrew/livecheck/strategy/sparkle.rb b/Library/Homebrew/livecheck/strategy/sparkle.rb index 36685c15d4..5fbb74842b 100644 --- a/Library/Homebrew/livecheck/strategy/sparkle.rb +++ b/Library/Homebrew/livecheck/strategy/sparkle.rb @@ -204,7 +204,7 @@ module Homebrew def self.find_versions(url:, regex: nil, **_unused, &block) if regex.present? && block.blank? raise ArgumentError, - "#{Utils::Inflection.demodulize(T.must(name))} only supports a regex when using a `strategy` block" + "#{Utils.demodulize(T.must(name))} only supports a regex when using a `strategy` block" end match_data = { matches: {}, regex: regex, url: url } diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 7abd5ed535..457fe67726 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -475,15 +475,15 @@ class Tap contents = [] if (command_count = command_files.count).positive? - contents << "#{command_count} #{Utils::Inflection.pluralize("command", command_count)}" + contents << "#{command_count} #{Utils.pluralize("command", command_count)}" end if (cask_count = cask_files.count).positive? - contents << "#{cask_count} #{Utils::Inflection.pluralize("cask", cask_count)}" + contents << "#{cask_count} #{Utils.pluralize("cask", cask_count)}" end if (formula_count = formula_files.count).positive? - contents << "#{formula_count} #{Utils::Inflection.pluralize("formula", formula_count, plural: "e")}" + contents << "#{formula_count} #{Utils.pluralize("formula", formula_count, plural: "e")}" end contents diff --git a/Library/Homebrew/uninstall.rb b/Library/Homebrew/uninstall.rb index 42136bc14b..2a7fcafbf9 100644 --- a/Library/Homebrew/uninstall.rb +++ b/Library/Homebrew/uninstall.rb @@ -52,7 +52,7 @@ module Homebrew if rack.directory? versions = rack.subdirs.map(&:basename) puts <<~EOS - #{keg.name} #{versions.to_sentence} #{Utils::Inflection.pluralize("", versions.count, plural: "are", singular: "is")} still installed. + #{keg.name} #{versions.to_sentence} #{Utils.pluralize("", versions.count, plural: "are", singular: "is")} still installed. To remove all versions, run: brew uninstall --force #{keg.name} EOS @@ -136,9 +136,9 @@ module Homebrew end def are_required_by_deps - "#{Utils::Inflection.pluralize("", reqs.count, plural: "are", + "#{Utils.pluralize("", reqs.count, plural: "are", singular: "is")} required by #{deps.to_sentence}, " \ - "which #{Utils::Inflection.pluralize("", deps.count, plural: "are", singular: "is")} currently installed" + "which #{Utils.pluralize("", deps.count, plural: "are", singular: "is")} currently installed" end end @@ -158,7 +158,7 @@ module Homebrew def output ofail <<~EOS Refusing to uninstall #{reqs.to_sentence} - because #{Utils::Inflection.pluralize("", reqs.count, plural: "they", singular: "it")} #{are_required_by_deps}. + because #{Utils.pluralize("", reqs.count, plural: "they", singular: "it")} #{are_required_by_deps}. You can override this and force removal with: #{sample_command} EOS diff --git a/Library/Homebrew/upgrade.rb b/Library/Homebrew/upgrade.rb index 1e65181932..9875779275 100644 --- a/Library/Homebrew/upgrade.rb +++ b/Library/Homebrew/upgrade.rb @@ -299,7 +299,7 @@ module Homebrew .sort { |a, b| depends_on(a, b) } if pinned_dependents.present? - plural = Utils::Inflection.pluralize("dependent", pinned_dependents.count) + plural = Utils.pluralize("dependent", pinned_dependents.count) ohai "Not upgrading #{pinned_dependents.count} pinned #{plural}:" puts(pinned_dependents.map do |f| "#{f.full_specified_name} #{f.pkg_version}" @@ -310,8 +310,8 @@ module Homebrew if upgradeable_dependents.blank? ohai "No outdated dependents to upgrade!" unless dry_run else - dependent_plural = Utils::Inflection.pluralize("dependent", upgradeable_dependents.count) - formula_plural = Utils::Inflection.pluralize("formula", installed_formulae.count, plural: "e") + dependent_plural = Utils.pluralize("dependent", upgradeable_dependents.count) + formula_plural = Utils.pluralize("formula", installed_formulae.count, plural: "e") upgrade_verb = dry_run ? "Would upgrade" : "Upgrading" ohai "#{upgrade_verb} #{upgradeable_dependents.count} #{dependent_plural} of upgraded #{formula_plural}:" Upgrade.puts_no_installed_dependents_check_disable_message_if_not_already! @@ -375,7 +375,7 @@ module Homebrew # Print the pinned dependents. if outdated_pinned_broken_dependents.present? count = outdated_pinned_broken_dependents.count - plural = Utils::Inflection.pluralize("dependent", outdated_pinned_broken_dependents.count) + plural = Utils.pluralize("dependent", outdated_pinned_broken_dependents.count) onoe "Not reinstalling #{count} broken and outdated, but pinned #{plural}:" $stderr.puts(outdated_pinned_broken_dependents.map do |f| "#{f.full_specified_name} #{f.pkg_version}" @@ -387,7 +387,7 @@ module Homebrew ohai "No broken dependents to reinstall!" else count = reinstallable_broken_dependents.count - plural = Utils::Inflection.pluralize("dependent", reinstallable_broken_dependents.count) + plural = Utils.pluralize("dependent", reinstallable_broken_dependents.count) ohai "Reinstalling #{count} #{plural} with broken linkage from source:" Upgrade.puts_no_installed_dependents_check_disable_message_if_not_already! puts reinstallable_broken_dependents.map(&:full_specified_name)