Wrapping it up
This commit is contained in:
parent
4cc7463e65
commit
5b8d21c8cd
@ -167,7 +167,7 @@ class SystemCommand
|
|||||||
args: T::Array[T.any(String, Integer, Float, Pathname, URI::Generic)],
|
args: T::Array[T.any(String, Integer, Float, Pathname, URI::Generic)],
|
||||||
sudo: T::Boolean,
|
sudo: T::Boolean,
|
||||||
sudo_as_root: 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]),
|
input: T.any(String, T::Array[String]),
|
||||||
must_succeed: T::Boolean,
|
must_succeed: T::Boolean,
|
||||||
print_stdout: T.any(T::Boolean, Symbol),
|
print_stdout: T.any(T::Boolean, Symbol),
|
||||||
@ -376,7 +376,7 @@ class SystemCommand
|
|||||||
|
|
||||||
sig {
|
sig {
|
||||||
params(
|
params(
|
||||||
env: T::Hash[String, String],
|
env: T::Hash[String, T.nilable(String)],
|
||||||
executable: String,
|
executable: String,
|
||||||
args: String,
|
args: String,
|
||||||
options: T.untyped,
|
options: T.untyped,
|
||||||
|
@ -440,7 +440,7 @@ RSpec.describe Homebrew::DevCmd::Bottle do
|
|||||||
old_spec = BottleSpecification.new
|
old_spec = BottleSpecification.new
|
||||||
old_spec.rebuild(1)
|
old_spec.rebuild(1)
|
||||||
new_hash = { "rebuild" => 2 }
|
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"'],
|
['rebuild: old: "1", new: "2"'],
|
||||||
[],
|
[],
|
||||||
]
|
]
|
||||||
|
@ -191,7 +191,7 @@ RSpec.describe CurlDownloadStrategy do
|
|||||||
hash_including(args: array_including_cons("#{artifact_domain}/#{resource_path}")),
|
hash_including(args: array_including_cons("#{artifact_domain}/#{resource_path}")),
|
||||||
)
|
)
|
||||||
.at_least(:once)
|
.at_least(:once)
|
||||||
.and_return(SystemCommand::Result.new(["curl"], [""], status, secrets: []))
|
.and_return(SystemCommand::Result.new(["curl"], [[:stdout, ""]], status, secrets: []))
|
||||||
|
|
||||||
strategy.fetch
|
strategy.fetch
|
||||||
end
|
end
|
||||||
|
@ -110,7 +110,10 @@ RSpec.describe Homebrew::Livecheck::Strategy::HeaderMatch do
|
|||||||
|
|
||||||
it "errors on an invalid return type from a block" do
|
it "errors on an invalid return type from a block" do
|
||||||
expect { header_match.versions_from_headers(headers) { 123 } }
|
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
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user