From fa6404e0f5fa85f9d7aad0a47b3f5f8405233c0c Mon Sep 17 00:00:00 2001 From: EricFromCanada Date: Mon, 8 Apr 2019 12:47:15 -0400 Subject: [PATCH] grammar fixes --- Library/Homebrew/cask/artifact/installer.rb | 2 +- Library/Homebrew/cask/cmd/automerge.rb | 2 +- Library/Homebrew/cask/dsl/caveats.rb | 16 ++++++------ Library/Homebrew/cask/exceptions.rb | 4 +-- Library/Homebrew/cask/installer.rb | 2 +- Library/Homebrew/cli_parser.rb | 6 ++--- Library/Homebrew/cmd/install.rb | 4 +-- Library/Homebrew/cmd/update.sh | 2 +- Library/Homebrew/dev-cmd/audit.rb | 2 +- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 4 +-- Library/Homebrew/dev-cmd/pull.rb | 4 +-- Library/Homebrew/dev-cmd/tests.rb | 2 +- Library/Homebrew/diagnostic.rb | 26 +++++++++---------- Library/Homebrew/exceptions.rb | 6 ++--- Library/Homebrew/extend/ENV/shared.rb | 4 +-- .../Homebrew/extend/os/linux/diagnostic.rb | 4 +-- .../extend/os/mac/development_tools.rb | 2 +- Library/Homebrew/extend/os/mac/diagnostic.rb | 4 +-- Library/Homebrew/formula_cellar_checks.rb | 4 +-- Library/Homebrew/formula_installer.rb | 6 ++--- Library/Homebrew/language/python.rb | 2 +- Library/Homebrew/migrator.rb | 4 +-- Library/Homebrew/resource.rb | 2 +- Library/Homebrew/rubocops/checksum.rb | 4 +-- Library/Homebrew/rubocops/extend/formula.rb | 2 +- Library/Homebrew/rubocops/formula_desc.rb | 2 +- .../test/cask/artifact/installer_spec.rb | 2 +- Library/Homebrew/test/cask/cmd/info_spec.rb | 2 +- Library/Homebrew/test/cask/installer_spec.rb | 2 +- .../test/rubocops/formula_desc_spec.rb | 2 +- Library/Homebrew/unpack_strategy/dmg.rb | 2 +- Library/Homebrew/utils/gems.rb | 2 +- Library/Homebrew/utils/github.rb | 2 +- 33 files changed, 68 insertions(+), 68 deletions(-) diff --git a/Library/Homebrew/cask/artifact/installer.rb b/Library/Homebrew/cask/artifact/installer.rb index 51733f9a92..a1da31d9bb 100644 --- a/Library/Homebrew/cask/artifact/installer.rb +++ b/Library/Homebrew/cask/artifact/installer.rb @@ -15,7 +15,7 @@ module Cask def install_phase(**) puts <<~EOS To complete the installation of Cask #{cask}, you must also - run the installer at + run the installer at: '#{cask.staged_path.join(path)}' EOS diff --git a/Library/Homebrew/cask/cmd/automerge.rb b/Library/Homebrew/cask/cmd/automerge.rb index c830744ff1..848a717d67 100755 --- a/Library/Homebrew/cask/cmd/automerge.rb +++ b/Library/Homebrew/cask/cmd/automerge.rb @@ -65,7 +65,7 @@ module Cask return if failed.empty? $stderr.puts - raise CaskError, "Failed merging the following PRs:\n#{failed.join("\n")}" + raise CaskError, "Failed to merge the following PRs:\n#{failed.join("\n")}" end def passed_ci(pr) diff --git a/Library/Homebrew/cask/dsl/caveats.rb b/Library/Homebrew/cask/dsl/caveats.rb index 210b3eafcc..2082419408 100644 --- a/Library/Homebrew/cask/dsl/caveats.rb +++ b/Library/Homebrew/cask/dsl/caveats.rb @@ -47,11 +47,11 @@ module Cask next if MacOS.version < :high_sierra <<~EOS - To install and/or use #{@cask} you may need to enable their kernel extension in + To install and/or use #{@cask} you may need to enable its kernel extension in: System Preferences → Security & Privacy → General - For more information refer to vendor documentation or the Apple Technical Note: + For more information refer to vendor documentation or this Apple Technical Note: #{Formatter.url("https://developer.apple.com/library/content/technotes/tn2459/_index.html")} EOS @@ -60,7 +60,7 @@ module Cask caveat :path_environment_variable do |path| <<~EOS To use #{@cask}, you may need to add the #{path} directory - to your PATH environment variable, eg (for bash shell): + to your PATH environment variable, e.g. (for bash shell): export PATH=#{path}:"$PATH" EOS @@ -89,19 +89,19 @@ module Cask caveat :depends_on_java do |java_version = :any| if java_version == :any <<~EOS - #{@cask} requires Java. You can install the latest version with + #{@cask} requires Java. You can install the latest version with: brew cask install java EOS elsif java_version.include?("11") || java_version.include?("+") <<~EOS - #{@cask} requires Java #{java_version}. You can install the latest version with + #{@cask} requires Java #{java_version}. You can install the latest version with: brew cask install java EOS else <<~EOS - #{@cask} requires Java #{java_version}. You can install it with + #{@cask} requires Java #{java_version}. You can install it with: brew cask install homebrew/cask-versions/java#{java_version} EOS @@ -130,14 +130,14 @@ module Cask caveat :license do |web_page| <<~EOS - Installing #{@cask} means you have AGREED to the license at + Installing #{@cask} means you have AGREED to the license at: #{web_page} EOS end caveat :free_license do |web_page| <<~EOS - The vendor offers a free license for #{@cask} at + The vendor offers a free license for #{@cask} at: #{web_page} EOS end diff --git a/Library/Homebrew/cask/exceptions.rb b/Library/Homebrew/cask/exceptions.rb index b3e8519743..431e1b6218 100644 --- a/Library/Homebrew/cask/exceptions.rb +++ b/Library/Homebrew/cask/exceptions.rb @@ -62,10 +62,10 @@ module Cask class CaskX11DependencyError < AbstractCaskErrorWithToken def to_s <<~EOS - Cask '#{token}' requires XQuartz/X11, which can be installed using Homebrew Cask by running + Cask '#{token}' requires XQuartz/X11, which can be installed using Homebrew Cask by running: #{Formatter.identifier("brew cask install xquartz")} - or manually, by downloading the package from + or manually, by downloading the package from: #{Formatter.url("https://www.xquartz.org/")} EOS end diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index 2d80d45ba8..98c1fc1042 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -438,7 +438,7 @@ module Cask end def uninstall_artifacts(clear: false) - odebug "Un-installing artifacts" + odebug "Uninstalling artifacts" artifacts = @cask.artifacts odebug "#{artifacts.length} artifact/s defined", artifacts diff --git a/Library/Homebrew/cli_parser.rb b/Library/Homebrew/cli_parser.rb index cf59aaa4c8..db44af6d6e 100644 --- a/Library/Homebrew/cli_parser.rb +++ b/Library/Homebrew/cli_parser.rb @@ -272,11 +272,11 @@ module Homebrew def initialize(arg1, arg2, missing: false) if !missing message = <<~EOS - `#{arg1}` and `#{arg2}` should be passed together + `#{arg1}` and `#{arg2}` should be passed together. EOS else message = <<~EOS - `#{arg2}` cannot be passed without `#{arg1}` + `#{arg2}` cannot be passed without `#{arg1}`. EOS end super message @@ -296,7 +296,7 @@ module Homebrew class InvalidConstraintError < RuntimeError def initialize(arg1, arg2) super <<~EOS - `#{arg1}` and `#{arg2}` cannot be mutually exclusive and mutually dependent simultaneously + `#{arg1}` and `#{arg2}` cannot be mutually exclusive and mutually dependent simultaneously. EOS end end diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 11452715aa..0a6b9717b1 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -231,8 +231,8 @@ module Homebrew # Check if the formula we try to install is the same as installed # but not migrated one. If --force passed then install anyway. opoo <<~EOS - #{f.oldname} already installed, it's just not migrated - You can migrate formula with `brew migrate #{f}` + #{f.oldname} is already installed, it's just not migrated + You can migrate this formula with `brew migrate #{f}` Or you can force install it with `brew install #{f} --force` EOS else diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index b2327a4c30..daa01c8e95 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -135,7 +135,7 @@ reset_on_interrupt() { exit 130 } -# Used for testing purposes, e.g., for testing formula migration after +# Used for testing purposes, e.g. for testing formula migration after # renaming it in the currently checked-out branch. To test run # "brew update --simulate-from-current-branch" simulate_from_current_branch() { diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 3e6798e5cf..a50ee754e0 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -815,7 +815,7 @@ module Homebrew bin_names.each do |name| ["system", "shell_output", "pipe_output"].each do |cmd| if text =~ /test do.*#{cmd}[\(\s]+['"]#{Regexp.escape(name)}[\s'"]/m - problem %Q(fully scope test #{cmd} calls e.g. #{cmd} "\#{bin}/#{name}") + problem %Q(fully scope test #{cmd} calls, e.g. #{cmd} "\#{bin}/#{name}") end end end diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index 94899916d5..4728d381ed 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -106,7 +106,7 @@ module Homebrew if guesses.count == 1 formula = guesses.shift elsif guesses.count > 1 - odie "Couldn't guess formula for sure: could be one of these:\n#{guesses}" + odie "Couldn't guess formula for sure; could be one of these:\n#{guesses}" end end raise FormulaUnspecifiedError unless formula @@ -308,8 +308,8 @@ module Homebrew ohai "git commit --no-edit --verbose --message='#{formula.name} " \ "#{new_formula_version}#{devel_message}' -- #{formula.path}" ohai "git push --set-upstream $HUB_REMOTE #{branch}:#{branch}" - ohai "create pull request with GitHub API" ohai "git checkout --quiet -" + ohai "create pull request with GitHub API" else begin diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb index daf95351a6..7961b1f5e7 100644 --- a/Library/Homebrew/dev-cmd/pull.rb +++ b/Library/Homebrew/dev-cmd/pull.rb @@ -147,7 +147,7 @@ module Homebrew if patch_changes[:formulae].length > 1 odie "Can only bump one changed formula; bumped #{patch_changes[:formulae]}" end - odie "Can not bump if non-formula files are changed" unless patch_changes[:others].empty? + odie "Cannot bump if non-formula files are changed" unless patch_changes[:others].empty? end old_versions = current_versions_from_info_external(patch_changes[:formulae].first) if is_bumpable patch_puller.apply_patch @@ -208,7 +208,7 @@ module Homebrew end if changed_formulae_names.empty? - odie "cannot bump: no changed formulae found after applying patch" if do_bump + odie "Cannot bump: no changed formulae found after applying patch" if do_bump is_bumpable = false end diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index 34b63ae73f..0f357588ed 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -55,7 +55,7 @@ module Homebrew ENV["USER"] ||= system_command!("id", args: ["-nu"]).stdout.chomp - # Avoid local configuration messing with tests e.g. git being configured + # Avoid local configuration messing with tests, e.g. git being configured # to use GPG to sign by default ENV["HOME"] = "#{HOMEBREW_LIBRARY_PATH}/test" diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index c67d25da5d..bb4c41991e 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -60,7 +60,7 @@ module Homebrew class Checks ############# HELPERS # Finds files in `HOMEBREW_PREFIX` *and* /usr/local. - # Specify paths relative to a prefix e.g. "include/foo.h". + # Specify paths relative to a prefix, e.g. "include/foo.h". # Sets @found for your convenience. def find_relative_paths(*relative_paths) @found = [HOMEBREW_PREFIX, "/usr/local"].uniq.reduce([]) do |found, prefix| @@ -158,7 +158,7 @@ module Homebrew <<~EOS Anaconda is known to frequently break Homebrew builds, including Vim and - MacVim, due to bundling many duplicates of system and Homebrew-available + MacVim, due to bundling many duplicates of system and Homebrew-provided tools. If you encounter a build failure please temporarily remove Anaconda @@ -414,7 +414,7 @@ module Homebrew <<~EOS Homebrew's bin was not found in your PATH. - Consider setting the PATH for example like so + Consider setting the PATH for example like so: #{Utils::Shell.prepend_path_in_profile("#{HOMEBREW_PREFIX}/bin")} EOS end @@ -429,7 +429,7 @@ module Homebrew <<~EOS Homebrew's sbin was not found in your PATH but you have installed formulae that put executables in #{HOMEBREW_PREFIX}/sbin. - Consider setting the PATH for example like so + Consider setting the PATH for example like so: #{Utils::Shell.prepend_path_in_profile("#{HOMEBREW_PREFIX}/sbin")} EOS end @@ -463,11 +463,11 @@ module Homebrew inject_file_list scripts, <<~EOS "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look for *-config scripts to determine if - software packages are installed, and what additional flags to use when + software packages are installed, and which additional flags to use when compiling and linking. Having additional scripts in your path can confuse software installed via - Homebrew if the config script overrides a system or Homebrew provided + Homebrew if the config script overrides a system or Homebrew-provided script of the same name. We found the following "config" scripts: EOS end @@ -508,7 +508,7 @@ module Homebrew (B) Symlink "bin/brew" into your prefix, but don't symlink "Cellar". Older installations of Homebrew may have created a symlinked Cellar, but this can - cause problems when two formula install to locations that are mapped on top of each + cause problems when two formulae install to locations that are mapped on top of each other during the linking step. EOS end @@ -580,7 +580,7 @@ module Homebrew return if branch.nil? || branch =~ /master/ <<~EOS - #{CoreTap.instance.full_name} is not on the master branch + #{CoreTap.instance.full_name} is not on the master branch. Check out the master branch by running: git -C "$(brew --repo homebrew/core)" checkout master @@ -625,7 +625,7 @@ module Homebrew return if frameworks_found.empty? inject_file_list frameworks_found, <<~EOS - Some frameworks can be picked up by CMake's build system and likely + Some frameworks can be picked up by CMake's build system and will likely cause the build to fail. To compile CMake, you may wish to move these out of the way: EOS @@ -666,7 +666,7 @@ module Homebrew end <<~EOS - You have uncommitted modifications to Homebrew + You have uncommitted modifications to Homebrew. If this is a surprise to you, then you should stash these modifications. Stashing returns Homebrew to a pristine state but can be undone should you later need to do so for some reason. @@ -749,7 +749,7 @@ module Homebrew return if unlinked.empty? inject_file_list unlinked, <<~EOS - You have unlinked kegs in your Cellar + You have unlinked kegs in your Cellar. Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: EOS @@ -775,7 +775,7 @@ module Homebrew message = "You have external commands with conflicting names.\n" cmd_map.each do |cmd_name, cmd_paths| message += inject_file_list cmd_paths, <<~EOS - Found command `#{cmd_name}` in following places: + Found command `#{cmd_name}` in the following places: EOS end @@ -801,7 +801,7 @@ module Homebrew bad_tap_files.keys.map do |tap| <<~EOS - Found Ruby file outside #{tap} tap formula directory + Found Ruby file outside #{tap} tap formula directory. (#{tap.formula_dir}): #{bad_tap_files[tap].join("\n ")} EOS diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 5a920bff7f..eb546b110a 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -189,7 +189,7 @@ class TapFormulaAmbiguityError < RuntimeError super <<~EOS Formulae found in multiple taps: #{formulae.map { |f| "\n * #{f}" }.join} - Please use the fully-qualified name e.g. #{formulae.first} to refer the formula. + Please use the fully-qualified name (e.g. #{formulae.first}) to refer to the formula. EOS end end @@ -209,7 +209,7 @@ class TapFormulaWithOldnameAmbiguityError < RuntimeError super <<~EOS Formulae with '#{name}' old name found in multiple taps: #{taps.map { |t| "\n * #{t}" }.join} - Please use the fully-qualified name e.g. #{taps.first}/#{name} to refer the formula or use its new name. + Please use the fully-qualified name (e.g. #{taps.first}/#{name}) to refer to the formula or use its new name. EOS end end @@ -333,7 +333,7 @@ class FormulaConflictError < RuntimeError Unlinking removes a formula's symlinks from #{HOMEBREW_PREFIX}. You can link the formula again after the install finishes. You can --force this - install, but the build may fail or cause obscure side-effects in the + install, but the build may fail or cause obscure side effects in the resulting software. EOS message.join("\n") diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index 36f932bc40..9198c19a63 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -251,9 +251,9 @@ module SharedEnvExtension else if (gfortran = which("gfortran", (HOMEBREW_PREFIX/"bin").to_s)) - ohai "Using Homebrew-provided fortran compiler." + ohai "Using Homebrew-provided Fortran compiler." elsif (gfortran = which("gfortran", PATH.new(ORIGINAL_PATHS))) - ohai "Using a fortran compiler found at #{gfortran}." + ohai "Using a Fortran compiler found at #{gfortran}." end if gfortran puts "This may be changed by setting the FC environment variable." diff --git a/Library/Homebrew/extend/os/linux/diagnostic.rb b/Library/Homebrew/extend/os/linux/diagnostic.rb index 68d90a9df4..7279e59fab 100644 --- a/Library/Homebrew/extend/os/linux/diagnostic.rb +++ b/Library/Homebrew/extend/os/linux/diagnostic.rb @@ -63,8 +63,8 @@ module Homebrew <<~EOS umask is currently set to 000. Directories created by Homebrew cannot - be world-writable. This issue can be resolved by adding umask 002 to - your #{shell_profile} + be world-writable. This issue can be resolved by adding "umask 002" to + your #{shell_profile}: echo 'umask 002' >> #{shell_profile} EOS end diff --git a/Library/Homebrew/extend/os/mac/development_tools.rb b/Library/Homebrew/extend/os/mac/development_tools.rb index 1d4f6fe435..0d175c0ece 100644 --- a/Library/Homebrew/extend/os/mac/development_tools.rb +++ b/Library/Homebrew/extend/os/mac/development_tools.rb @@ -50,7 +50,7 @@ class DevelopmentTools def custom_installation_instructions <<~EOS - Install GNU's GCC + Install GNU's GCC: brew install gcc EOS end diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 32ad1ffd54..0a0ba12ff5 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -202,7 +202,7 @@ module Homebrew <<~EOS Your XQuartz (#{MacOS::XQuartz.version}) is outdated. Please install XQuartz #{MacOS::XQuartz.latest_version} (or delete the current version). - XQuartz can be updated using Homebrew Cask by running + XQuartz can be updated using Homebrew Cask by running: brew cask reinstall xquartz EOS end @@ -338,7 +338,7 @@ module Homebrew macOS won't move relative symlinks across volumes unless the target file already exists. Brews known to be affected by this are Git and Narwhal. - You should set the "HOMEBREW_TEMP" environmental variable to a suitable + You should set the "HOMEBREW_TEMP" environment variable to a suitable directory on the same volume as your Cellar. EOS end diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb index 548575e12e..5665cfe61e 100644 --- a/Library/Homebrew/formula_cellar_checks.rb +++ b/Library/Homebrew/formula_cellar_checks.rb @@ -14,7 +14,7 @@ module FormulaCellarChecks <<~EOS #{prefix_bin} is not in your PATH - You can amend this by altering your #{Utils::Shell.profile} file + You can amend this by altering your #{Utils::Shell.profile} file. EOS end @@ -121,7 +121,7 @@ module FormulaCellarChecks easy-install.pth files were found These .pth files are likely to cause link conflicts. Please invoke setup.py using Language::Python.setup_install_args. - The offending files are + The offending files are: #{pth_found * "\n "} EOS end diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index fa7227f830..acd834f511 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -225,14 +225,14 @@ class FormulaInstaller EOS if formula.outdated? && !formula.head? message += <<~EOS - To upgrade to #{formula.pkg_version}, run `brew upgrade #{formula.name}` + To upgrade to #{formula.pkg_version}, run `brew upgrade #{formula.name}`. EOS elsif only_deps? message = nil else # some other version is already installed *and* linked message += <<~EOS - To install #{formula.pkg_version}, first run `brew unlink #{formula.name}` + To install #{formula.pkg_version}, first run `brew unlink #{formula.name}`. EOS end raise CannotInstallFormulaError, message if message @@ -875,7 +875,7 @@ class FormulaInstaller rescue Exception => e # rubocop:disable Lint/RescueException onoe "Failed to fix install linkage" puts "The formula built, but you may encounter issues using it or linking other" - puts "formula against it." + puts "formulae against it." ohai e, e.backtrace if debug? Homebrew.failed = true @show_summary_heading = true diff --git a/Library/Homebrew/language/python.rb b/Library/Homebrew/language/python.rb index 9f9d635ef3..f026e32a66 100644 --- a/Library/Homebrew/language/python.rb +++ b/Library/Homebrew/language/python.rb @@ -171,7 +171,7 @@ module Language # @param formula [Formula] the active Formula # @param venv_root [Pathname, String] the path to the root of the # virtualenv - # @param python [String] which interpreter to use; i.e. "python" or + # @param python [String] which interpreter to use, i.e. "python" or # "python2" def initialize(formula, venv_root, python) @formula = formula diff --git a/Library/Homebrew/migrator.rb b/Library/Homebrew/migrator.rb index b863e82371..43d3a132cb 100644 --- a/Library/Homebrew/migrator.rb +++ b/Library/Homebrew/migrator.rb @@ -27,9 +27,9 @@ class Migrator class MigratorDifferentTapsError < RuntimeError def initialize(formula, tap) msg = if tap.core_tap? - "Please try to use #{formula.oldname} to refer the formula.\n" + "Please try to use #{formula.oldname} to refer to the formula.\n" elsif tap - "Please try to use fully-qualified #{tap}/#{formula.oldname} to refer the formula.\n" + "Please try to use fully-qualified #{tap}/#{formula.oldname} to refer to the formula.\n" end super <<~EOS diff --git a/Library/Homebrew/resource.rb b/Library/Homebrew/resource.rb index c71ee2bcf2..1ca20ee2b3 100644 --- a/Library/Homebrew/resource.rb +++ b/Library/Homebrew/resource.rb @@ -132,7 +132,7 @@ class Resource rescue ChecksumMissingError opoo "Cannot verify integrity of #{fn.basename}" puts "A checksum was not provided for this resource" - puts "For your reference the SHA256 is: #{fn.sha256}" + puts "For your reference the SHA-256 is: #{fn.sha256}" end Checksum::TYPES.each do |type| diff --git a/Library/Homebrew/rubocops/checksum.rb b/Library/Homebrew/rubocops/checksum.rb index 3d48cad941..3eb213eba8 100644 --- a/Library/Homebrew/rubocops/checksum.rb +++ b/Library/Homebrew/rubocops/checksum.rb @@ -7,9 +7,9 @@ module RuboCop def audit_formula(_node, _class_node, _parent_class_node, body_node) return if body_node.nil? - problem "MD5 checksums are deprecated, please use SHA256" if method_called_ever?(body_node, :md5) + problem "MD5 checksums are deprecated, please use SHA-256" if method_called_ever?(body_node, :md5) - problem "SHA1 checksums are deprecated, please use SHA256" if method_called_ever?(body_node, :sha1) + problem "SHA1 checksums are deprecated, please use SHA-256" if method_called_ever?(body_node, :sha1) sha256_calls = find_every_method_call_by_name(body_node, :sha256) sha256_calls.each do |sha256_call| diff --git a/Library/Homebrew/rubocops/extend/formula.rb b/Library/Homebrew/rubocops/extend/formula.rb index 00d26ccf8f..f712aa1de7 100644 --- a/Library/Homebrew/rubocops/extend/formula.rb +++ b/Library/Homebrew/rubocops/extend/formula.rb @@ -542,7 +542,7 @@ module RuboCop def file_path_allowed? paths_to_exclude = [%r{/Library/Homebrew/compat/}, %r{/Library/Homebrew/test/}] - return true if @file_path.nil? # file_path is nil when source is directly passed to the cop eg., in specs + return true if @file_path.nil? # file_path is nil when source is directly passed to the cop, e.g. in specs @file_path !~ Regexp.union(paths_to_exclude) end diff --git a/Library/Homebrew/rubocops/formula_desc.rb b/Library/Homebrew/rubocops/formula_desc.rb index 9ff6c75049..ba5608cce4 100644 --- a/Library/Homebrew/rubocops/formula_desc.rb +++ b/Library/Homebrew/rubocops/formula_desc.rb @@ -78,7 +78,7 @@ module RuboCop # Check if a/an are used in a formula's desc if match = regex_match_group(desc, /^(an?)\s/i) - problem "Description shouldn't start with an indefinite article i.e. \"#{match.to_s.strip}\"" + problem "Description shouldn't start with an indefinite article, i.e. \"#{match.to_s.strip}\"" end # Check if invalid uppercase words are at the start of a diff --git a/Library/Homebrew/test/cask/artifact/installer_spec.rb b/Library/Homebrew/test/cask/artifact/installer_spec.rb index 8952fd6152..68b0e24ed8 100644 --- a/Library/Homebrew/test/cask/artifact/installer_spec.rb +++ b/Library/Homebrew/test/cask/artifact/installer_spec.rb @@ -15,7 +15,7 @@ describe Cask::Artifact::Installer, :cask do it "shows a message prompting to run the installer manually" do expect { installer.install_phase(command: command) - }.to output(%r{run the installer at\s+'#{staged_path}/installer'}).to_stdout + }.to output(%r{run the installer at:\s+'#{staged_path}/installer'}).to_stdout end end diff --git a/Library/Homebrew/test/cask/cmd/info_spec.rb b/Library/Homebrew/test/cask/cmd/info_spec.rb index ae5ad215ef..51a428b5ea 100644 --- a/Library/Homebrew/test/cask/cmd/info_spec.rb +++ b/Library/Homebrew/test/cask/cmd/info_spec.rb @@ -83,7 +83,7 @@ describe Cask::Cmd::Info, :cask do Custom text via puts followed by DSL-generated text: To use with-caveats, you may need to add the /custom/path/bin directory - to your PATH environment variable, eg (for bash shell): + to your PATH environment variable, e.g. (for bash shell): export PATH=/custom/path/bin:"$PATH" diff --git a/Library/Homebrew/test/cask/installer_spec.rb b/Library/Homebrew/test/cask/installer_spec.rb index b9fbbf9171..c51e21ed10 100644 --- a/Library/Homebrew/test/cask/installer_spec.rb +++ b/Library/Homebrew/test/cask/installer_spec.rb @@ -117,7 +117,7 @@ describe Cask::Installer, :cask do ==> Verifying SHA-256 checksum for Cask 'with-installer-manual'. ==> Installing Cask with-installer-manual To complete the installation of Cask with-installer-manual, you must also - run the installer at + run the installer at: '#{with_installer_manual.staged_path.join("Caffeine.app")}' 🍺 with-installer-manual was successfully installed! diff --git a/Library/Homebrew/test/rubocops/formula_desc_spec.rb b/Library/Homebrew/test/rubocops/formula_desc_spec.rb index fcc4095a20..ed52c60897 100644 --- a/Library/Homebrew/test/rubocops/formula_desc_spec.rb +++ b/Library/Homebrew/test/rubocops/formula_desc_spec.rb @@ -66,7 +66,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Desc do class Foo < Formula url 'https://brew.sh/foo-1.0.tgz' desc 'An aardvark' - ^^^ Description shouldn\'t start with an indefinite article i.e. \"An\" + ^^^ Description shouldn\'t start with an indefinite article, i.e. \"An\" end RUBY end diff --git a/Library/Homebrew/unpack_strategy/dmg.rb b/Library/Homebrew/unpack_strategy/dmg.rb index 9768981cb4..5b7c591ec8 100644 --- a/Library/Homebrew/unpack_strategy/dmg.rb +++ b/Library/Homebrew/unpack_strategy/dmg.rb @@ -115,7 +115,7 @@ module UnpackStrategy def extract_to_dir(unpack_dir, basename:, verbose:) mount(verbose: verbose) do |mounts| - raise "No mounts found in '#{path}'; perhaps it is a bad disk image?" if mounts.empty? + raise "No mounts found in '#{path}'; perhaps this is a bad disk image?" if mounts.empty? mounts.each do |mount| mount.extract(to: unpack_dir, verbose: verbose) diff --git a/Library/Homebrew/utils/gems.rb b/Library/Homebrew/utils/gems.rb index d8d4e4b2ec..12925a9ebb 100644 --- a/Library/Homebrew/utils/gems.rb +++ b/Library/Homebrew/utils/gems.rb @@ -54,7 +54,7 @@ module Homebrew setup_gem_environment! if setup_gem_environment return unless Gem::Specification.find_all_by_name(name, version).empty? - # Shell out to `gem` to avoid RubyGems requires e.g. loading JSON. + # Shell out to `gem` to avoid RubyGems requires for e.g. loading JSON. ohai_if_defined "Installing '#{name}' gem" install_args = %W[--no-document #{name}] install_args << "--version" << version if version diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index c613fc6acb..554c4910be 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -142,7 +142,7 @@ module GitHub when :environment onoe <<~EOS Your HOMEBREW_GITHUB_API_TOKEN does not have sufficient scope! - Scopes they need: #{needed_human_scopes} + Scopes it needs: #{needed_human_scopes} Scopes it has: #{credentials_scopes} Create a new personal access token: #{ALL_SCOPES_URL}