diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index 7a1c601100..0b4d91b984 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -317,7 +317,7 @@ module Homebrew next end - # If we've specifed --prune don't do the (expensive) .stale? check. + # If we've specified --prune don't do the (expensive) .stale? check. cleanup_path(path) { path.unlink } if !prune? && path.stale?(scrub: scrub?) end diff --git a/Library/Homebrew/cmd/--prefix.rb b/Library/Homebrew/cmd/--prefix.rb index b68571c442..19ead9ce40 100644 --- a/Library/Homebrew/cmd/--prefix.rb +++ b/Library/Homebrew/cmd/--prefix.rb @@ -46,7 +46,7 @@ module Homebrew prefixes = formulae.map do |f| next nil if args.installed? && !f.opt_prefix.exist? - # this case wil be short-circuited by brew.sh logic for a single formula + # this case will be short-circuited by brew.sh logic for a single formula f.opt_prefix end.compact puts prefixes diff --git a/Library/Homebrew/completions.rb b/Library/Homebrew/completions.rb index 85946231e4..232b1cd22b 100644 --- a/Library/Homebrew/completions.rb +++ b/Library/Homebrew/completions.rb @@ -108,7 +108,7 @@ module Homebrew ohai "Homebrew completions for external commands are unlinked by default!" puts <<~EOS - To opt-in to automatically linking external tap shell competion files, run: + To opt-in to automatically linking external tap shell completion files, run: brew completions link Then, follow the directions at #{Formatter.url("https://docs.brew.sh/Shell-Completion")} EOS diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index d6253593bc..53c39bc90f 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -118,7 +118,7 @@ module OS def sdk_for_formula(f, v = nil, check_only_runtime_requirements: false) # If the formula requires Xcode, don't return the CLT SDK # If check_only_runtime_requirements is true, don't necessarily return the - # Xcode SDK if the XcodeRequirement is only a build or test requirment. + # Xcode SDK if the XcodeRequirement is only a build or test requirement. return Xcode.sdk if f.requirements.any? do |req| next false unless req.is_a? XcodeRequirement next false if check_only_runtime_requirements && req.build? && !req.test? diff --git a/Library/Homebrew/test/cli/parser_spec.rb b/Library/Homebrew/test/cli/parser_spec.rb index 0310e3e469..00861fba47 100644 --- a/Library/Homebrew/test/cli/parser_spec.rb +++ b/Library/Homebrew/test/cli/parser_spec.rb @@ -375,14 +375,14 @@ describe Homebrew::CLI::Parser do expect(parser.generate_help_text).to match(/This command does something/) end - it "allows the usage banner to be overriden" do + it "allows the usage banner to be overridden" do parser = described_class.new do usage_banner "`test` [foo] " end expect(parser.generate_help_text).to match(/test \[foo\] bar/) end - it "allows a usage banner and a description to be overriden" do + it "allows a usage banner and a description to be overridden" do parser = described_class.new do usage_banner "`test` [foo] " description <<~EOS diff --git a/Library/Homebrew/test/utils/github_spec.rb b/Library/Homebrew/test/utils/github_spec.rb index c33bb0d28b..fbc81e11df 100644 --- a/Library/Homebrew/test/utils/github_spec.rb +++ b/Library/Homebrew/test/utils/github_spec.rb @@ -66,7 +66,7 @@ describe GitHub do end describe "::get_artifact_url", :needs_network do - it "fails to find a nonexistant workflow" do + it "fails to find a nonexistent workflow" do expect { described_class.get_artifact_url( described_class.get_workflow_run("Homebrew", "homebrew-core", 1), diff --git a/Library/Homebrew/test/utils/pypi_spec.rb b/Library/Homebrew/test/utils/pypi_spec.rb index 25e733c192..348f9dd10d 100644 --- a/Library/Homebrew/test/utils/pypi_spec.rb +++ b/Library/Homebrew/test/utils/pypi_spec.rb @@ -93,7 +93,7 @@ describe PyPI do expect(package_with_version.pypi_info).to eq ["snakemake", old_package_url, old_package_checksum, "5.28.0"] end - it "gets pypi info from a package name with overriden version" do + it "gets pypi info from a package name with overridden version" do expected_result = ["snakemake", package_url, package_checksum, "5.29.0"] expect(package_with_version.pypi_info(version: "5.29.0")).to eq expected_result end @@ -107,7 +107,7 @@ describe PyPI do expect(package_from_url.pypi_info).to eq ["snakemake", package_url, package_checksum, "5.29.0"] end - it "gets pypi info from a url with overriden version" do + it "gets pypi info from a url with overridden version" do expected_result = ["snakemake", old_package_url, old_package_checksum, "5.28.0"] expect(package_from_url.pypi_info(version: "5.28.0")).to eq expected_result end diff --git a/Library/Homebrew/test/utils/spdx_spec.rb b/Library/Homebrew/test/utils/spdx_spec.rb index c4852de199..cddc6b434c 100644 --- a/Library/Homebrew/test/utils/spdx_spec.rb +++ b/Library/Homebrew/test/utils/spdx_spec.rb @@ -77,7 +77,7 @@ describe SPDX do expect(described_class.parse_license_expression(license_expression)).to eq [["MIT"], ["LLVM-exception"]] end - it "returns licenses and exceptions for compex license expressions" do + it "returns licenses and exceptions for complex license expressions" do license_expression = { any_of: [ "MIT", :public_domain, @@ -197,7 +197,7 @@ describe SPDX do expect(described_class.license_expression_to_string(license_expression)).to eq "MIT with LLVM-exception" end - it "returns licenses and exceptions for compex license expressions" do + it "returns licenses and exceptions for complex license expressions" do license_expression = { any_of: [ "MIT", :public_domain, diff --git a/docs/Formula-Cookbook.md b/docs/Formula-Cookbook.md index 22fc18f731..41882f6836 100644 --- a/docs/Formula-Cookbook.md +++ b/docs/Formula-Cookbook.md @@ -289,7 +289,7 @@ Some advice for specific cases: * If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples. A good example is [`tinyxml2`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/tinyxml2.rb), which writes a small C++ source file into the test directory, compiles and links it against the tinyxml2 library and finally checks that the resulting program runs successfully. * If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc. -* If the software cannot function without credentials or requires a virtual machine, docker instance, etc. to run, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected. This is prefered over mocking a dependency. +* If the software cannot function without credentials or requires a virtual machine, docker instance, etc. to run, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected. This is preferred over mocking a dependency. * Homebrew comes with a number of [standard test fixtures](https://github.com/Homebrew/brew/tree/master/Library/Homebrew/test/support/fixtures), including numerous sample images, sounds, and documents in various formats. You can get the file path to a test fixture with `test_fixtures("test.svg")`. * If your test requires a test file that isn't a standard test fixture, you can install it from a source repository during the `test` phase with a resource block, like this: @@ -631,7 +631,7 @@ If you need more control over the way files are downloaded and staged, you can c class MyDownloadStrategy < SomeHomebrewDownloadStrategy def fetch(timeout: nil, **options) opoo "Unhandled options in #{self.class}#fetch: #{options.keys.join(", ")}" unless options.empty? - + # downloads output to `temporary_path` end end