More fixes
This commit is contained in:
parent
249c46226a
commit
77bdc5ede1
@ -54,7 +54,7 @@ module Cask
|
||||
revisions: T.nilable(T::Hash[T.any(Symbol, String), String]),
|
||||
revision: T.nilable(String),
|
||||
trust_cert: T.nilable(T::Boolean),
|
||||
cookies: T.nilable(T::Hash[String, String]),
|
||||
cookies: T.nilable(T::Hash[T.any(String, Symbol), String]),
|
||||
referer: T.nilable(T.any(URI::Generic, String)),
|
||||
header: T.nilable(T.any(String, T::Array[String])),
|
||||
user_agent: T.nilable(T.any(Symbol, String)),
|
||||
@ -80,7 +80,7 @@ module Cask
|
||||
specs[:revisions] = @revisions = T.let(revisions, T.nilable(T::Hash[T.any(Symbol, String), String]))
|
||||
specs[:revision] = @revision = T.let(revision, T.nilable(String))
|
||||
specs[:trust_cert] = @trust_cert = T.let(trust_cert, T.nilable(T::Boolean))
|
||||
specs[:cookies] = @cookies = T.let(cookies, T.nilable(T::Hash[String, String]))
|
||||
specs[:cookies] = @cookies = T.let(cookies, T.nilable(T::Hash[T.any(String, Symbol), String]))
|
||||
specs[:referer] = @referer = T.let(referer, T.nilable(T.any(URI::Generic, String)))
|
||||
specs[:headers] = @header = T.let(header, T.nilable(T.any(String, T::Array[String])))
|
||||
specs[:user_agent] = @user_agent = T.let(user_agent || :default, T.nilable(T.any(Symbol, String)))
|
||||
|
||||
@ -127,9 +127,7 @@ module Homebrew
|
||||
sig {
|
||||
params(
|
||||
formulae_or_casks: T::Array[T.any(Formula, Cask::Cask)],
|
||||
).returns(
|
||||
T::Array[T.any(T::Hash[String, T.untyped], T::Hash[String, T.untyped])],
|
||||
)
|
||||
).returns(T::Array[T::Hash[Symbol, T.untyped]])
|
||||
}
|
||||
def json_info(formulae_or_casks)
|
||||
formulae_or_casks.map do |formula_or_cask|
|
||||
|
||||
@ -1198,9 +1198,9 @@ module Homebrew
|
||||
|
||||
private
|
||||
|
||||
sig { returns(T::Array[Pathname]) }
|
||||
sig { returns(T::Array[String]) }
|
||||
def paths
|
||||
@paths ||= T.let(ORIGINAL_PATHS.uniq.map(&:to_s), T.nilable(T::Array[Pathname]))
|
||||
@paths ||= T.let(ORIGINAL_PATHS.uniq.map(&:to_s), T.nilable(T::Array[String]))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -185,7 +185,7 @@ RSpec.describe Formula do
|
||||
|
||||
build_values_with_no_installed_alias = [
|
||||
BuildOptions.new(Options.new, f.options),
|
||||
Tab.new(source: { "path" => f.path.to_s }),
|
||||
Tab.new("source" => { "path" => f.path.to_s }),
|
||||
]
|
||||
build_values_with_no_installed_alias.each do |build|
|
||||
f.build = build
|
||||
@ -201,7 +201,7 @@ RSpec.describe Formula do
|
||||
CoreTap.instance.alias_dir.mkpath
|
||||
FileUtils.ln_sf f.path, alias_path
|
||||
|
||||
f.build = Tab.new(source: { "path" => alias_path.to_s })
|
||||
f.build = Tab.new("source" => { "path" => alias_path.to_s })
|
||||
|
||||
expect(f.installed_alias_path).to eq(alias_path)
|
||||
expect(f.installed_alias_name).to eq(alias_name)
|
||||
@ -220,7 +220,7 @@ RSpec.describe Formula do
|
||||
|
||||
build_values_with_no_installed_alias = [
|
||||
BuildOptions.new(Options.new, f.options),
|
||||
Tab.new(source: { "path" => f.path.to_s }),
|
||||
Tab.new("source" => { "path" => f.path.to_s }),
|
||||
]
|
||||
build_values_with_no_installed_alias.each do |build|
|
||||
f.build = build
|
||||
@ -237,7 +237,7 @@ RSpec.describe Formula do
|
||||
tap.alias_dir.mkpath
|
||||
FileUtils.ln_sf f.path, alias_path
|
||||
|
||||
f.build = Tab.new(source: { "path" => alias_path.to_s })
|
||||
f.build = Tab.new("source" => { "path" => alias_path.to_s })
|
||||
|
||||
expect(f.installed_alias_path).to eq(alias_path)
|
||||
expect(f.installed_alias_name).to eq(alias_name)
|
||||
@ -440,7 +440,7 @@ RSpec.describe Formula do
|
||||
f = formula(alias_path:) do
|
||||
url "foo-1.0"
|
||||
end
|
||||
f.build = Tab.new(source: { "path" => source_path.to_s })
|
||||
f.build = Tab.new("source" => { "path" => source_path.to_s })
|
||||
|
||||
expect(f.alias_path).to eq(alias_path)
|
||||
expect(f.installed_alias_path).to be_nil
|
||||
@ -453,7 +453,7 @@ RSpec.describe Formula do
|
||||
f = formula(alias_path:) do
|
||||
url "foo-1.0"
|
||||
end
|
||||
f.build = Tab.new(source: { "path" => source_path.to_s })
|
||||
f.build = Tab.new("source" => { "path" => source_path.to_s })
|
||||
CoreTap.instance.alias_dir.mkpath
|
||||
FileUtils.ln_sf f.path, source_path
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user