Fix spelling

This commit is contained in:
John Bampton 2021-05-08 11:20:01 +10:00
parent fac7ff41d8
commit 1691e615fe
9 changed files with 13 additions and 13 deletions

View File

@ -317,7 +317,7 @@ module Homebrew
next next
end 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?) cleanup_path(path) { path.unlink } if !prune? && path.stale?(scrub: scrub?)
end end

View File

@ -46,7 +46,7 @@ module Homebrew
prefixes = formulae.map do |f| prefixes = formulae.map do |f|
next nil if args.installed? && !f.opt_prefix.exist? 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 f.opt_prefix
end.compact end.compact
puts prefixes puts prefixes

View File

@ -108,7 +108,7 @@ module Homebrew
ohai "Homebrew completions for external commands are unlinked by default!" ohai "Homebrew completions for external commands are unlinked by default!"
puts <<~EOS 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 brew completions link
Then, follow the directions at #{Formatter.url("https://docs.brew.sh/Shell-Completion")} Then, follow the directions at #{Formatter.url("https://docs.brew.sh/Shell-Completion")}
EOS EOS

View File

@ -118,7 +118,7 @@ module OS
def sdk_for_formula(f, v = nil, check_only_runtime_requirements: false) def sdk_for_formula(f, v = nil, check_only_runtime_requirements: false)
# If the formula requires Xcode, don't return the CLT SDK # If the formula requires Xcode, don't return the CLT SDK
# If check_only_runtime_requirements is true, don't necessarily return the # 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| return Xcode.sdk if f.requirements.any? do |req|
next false unless req.is_a? XcodeRequirement next false unless req.is_a? XcodeRequirement
next false if check_only_runtime_requirements && req.build? && !req.test? next false if check_only_runtime_requirements && req.build? && !req.test?

View File

@ -375,14 +375,14 @@ describe Homebrew::CLI::Parser do
expect(parser.generate_help_text).to match(/This command does something/) expect(parser.generate_help_text).to match(/This command does something/)
end end
it "allows the usage banner to be overriden" do it "allows the usage banner to be overridden" do
parser = described_class.new do parser = described_class.new do
usage_banner "`test` [foo] <bar>" usage_banner "`test` [foo] <bar>"
end end
expect(parser.generate_help_text).to match(/test \[foo\] bar/) expect(parser.generate_help_text).to match(/test \[foo\] bar/)
end 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 parser = described_class.new do
usage_banner "`test` [foo] <bar>" usage_banner "`test` [foo] <bar>"
description <<~EOS description <<~EOS

View File

@ -66,7 +66,7 @@ describe GitHub do
end end
describe "::get_artifact_url", :needs_network do describe "::get_artifact_url", :needs_network do
it "fails to find a nonexistant workflow" do it "fails to find a nonexistent workflow" do
expect { expect {
described_class.get_artifact_url( described_class.get_artifact_url(
described_class.get_workflow_run("Homebrew", "homebrew-core", 1), described_class.get_workflow_run("Homebrew", "homebrew-core", 1),

View File

@ -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"] expect(package_with_version.pypi_info).to eq ["snakemake", old_package_url, old_package_checksum, "5.28.0"]
end 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"] expected_result = ["snakemake", package_url, package_checksum, "5.29.0"]
expect(package_with_version.pypi_info(version: "5.29.0")).to eq expected_result expect(package_with_version.pypi_info(version: "5.29.0")).to eq expected_result
end end
@ -107,7 +107,7 @@ describe PyPI do
expect(package_from_url.pypi_info).to eq ["snakemake", package_url, package_checksum, "5.29.0"] expect(package_from_url.pypi_info).to eq ["snakemake", package_url, package_checksum, "5.29.0"]
end 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"] 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 expect(package_from_url.pypi_info(version: "5.28.0")).to eq expected_result
end end

View File

@ -77,7 +77,7 @@ describe SPDX do
expect(described_class.parse_license_expression(license_expression)).to eq [["MIT"], ["LLVM-exception"]] expect(described_class.parse_license_expression(license_expression)).to eq [["MIT"], ["LLVM-exception"]]
end 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: [ license_expression = { any_of: [
"MIT", "MIT",
:public_domain, :public_domain,
@ -197,7 +197,7 @@ describe SPDX do
expect(described_class.license_expression_to_string(license_expression)).to eq "MIT with LLVM-exception" expect(described_class.license_expression_to_string(license_expression)).to eq "MIT with LLVM-exception"
end 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: [ license_expression = { any_of: [
"MIT", "MIT",
:public_domain, :public_domain,

View File

@ -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. * 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. 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 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")`. * 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: * 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 class MyDownloadStrategy < SomeHomebrewDownloadStrategy
def fetch(timeout: nil, **options) def fetch(timeout: nil, **options)
opoo "Unhandled options in #{self.class}#fetch: #{options.keys.join(", ")}" unless options.empty? opoo "Unhandled options in #{self.class}#fetch: #{options.keys.join(", ")}" unless options.empty?
# downloads output to `temporary_path` # downloads output to `temporary_path`
end end
end end