Wrapping it up

This commit is contained in:
Douglas Eichelberger 2025-09-07 15:29:11 -07:00
parent 4cc7463e65
commit 5b8d21c8cd
No known key found for this signature in database
GPG Key ID: F90193CBD547EB81
4 changed files with 8 additions and 5 deletions

View File

@ -167,7 +167,7 @@ class SystemCommand
args: T::Array[T.any(String, Integer, Float, Pathname, URI::Generic)],
sudo: T::Boolean,
sudo_as_root: T::Boolean,
env: T::Hash[String, T.nilable(String)],
env: T::Hash[String, T.any(NilClass, String, T::Boolean)],
input: T.any(String, T::Array[String]),
must_succeed: T::Boolean,
print_stdout: T.any(T::Boolean, Symbol),
@ -376,7 +376,7 @@ class SystemCommand
sig {
params(
env: T::Hash[String, String],
env: T::Hash[String, T.nilable(String)],
executable: String,
args: String,
options: T.untyped,

View File

@ -440,7 +440,7 @@ RSpec.describe Homebrew::DevCmd::Bottle do
old_spec = BottleSpecification.new
old_spec.rebuild(1)
new_hash = { "rebuild" => 2 }
expect(homebrew.merge_bottle_spec(["rebuild"], old_spec, new_hash)).to eq [
expect(homebrew.merge_bottle_spec([:rebuild], old_spec, new_hash)).to eq [
['rebuild: old: "1", new: "2"'],
[],
]

View File

@ -191,7 +191,7 @@ RSpec.describe CurlDownloadStrategy do
hash_including(args: array_including_cons("#{artifact_domain}/#{resource_path}")),
)
.at_least(:once)
.and_return(SystemCommand::Result.new(["curl"], [""], status, secrets: []))
.and_return(SystemCommand::Result.new(["curl"], [[:stdout, ""]], status, secrets: []))
strategy.fetch
end

View File

@ -110,7 +110,10 @@ RSpec.describe Homebrew::Livecheck::Strategy::HeaderMatch do
it "errors on an invalid return type from a block" do
expect { header_match.versions_from_headers(headers) { 123 } }
.to raise_error(TypeError, Homebrew::Livecheck::Strategy::INVALID_BLOCK_RETURN_VALUE_MSG)
.to raise_error(
TypeError,
/#{Homebrew::Livecheck::Strategy::INVALID_BLOCK_RETURN_VALUE_MSG}|Expected type T::Hash\[String, String\]/o,
)
end
end
end