Add the remaining ones
This commit is contained in:
parent
78bb0d7942
commit
556f71d7bb
@ -410,7 +410,7 @@ module Homebrew
|
|||||||
|
|
||||||
bottle_tag, rebuild = if local_bottle_json
|
bottle_tag, rebuild = if local_bottle_json
|
||||||
_, tag_string, rebuild_string = Utils::Bottles.extname_tag_rebuild(formula.local_bottle_path.to_s)
|
_, tag_string, rebuild_string = Utils::Bottles.extname_tag_rebuild(formula.local_bottle_path.to_s)
|
||||||
[T.must(tag_string).to_sym, rebuild_string.to_i]
|
[tag_string.to_sym, rebuild_string.to_i]
|
||||||
end
|
end
|
||||||
|
|
||||||
bottle_tag = if bottle_tag
|
bottle_tag = if bottle_tag
|
||||||
@ -506,7 +506,7 @@ module Homebrew
|
|||||||
tab.time = nil
|
tab.time = nil
|
||||||
tab.changed_files = changed_files.dup
|
tab.changed_files = changed_files.dup
|
||||||
if args.only_json_tab?
|
if args.only_json_tab?
|
||||||
tab.changed_files.delete(Pathname.new(AbstractTab::FILENAME))
|
tab.changed_files&.delete(Pathname.new(AbstractTab::FILENAME))
|
||||||
tab.tabfile.unlink
|
tab.tabfile.unlink
|
||||||
else
|
else
|
||||||
tab.write
|
tab.write
|
||||||
@ -861,7 +861,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
sig {
|
sig {
|
||||||
params(formula: Formula, formula_ast: Utils::AST::FormulaAST, bottle_hash: T::Hash[String, T.untyped])
|
params(formula: Formula, formula_ast: Utils::AST::FormulaAST,
|
||||||
|
bottle_hash: T::Hash[String, T.untyped])
|
||||||
.returns(T.nilable(T::Array[T::Hash[Symbol, T.any(String, Symbol)]]))
|
.returns(T.nilable(T::Array[T::Hash[Symbol, T.any(String, Symbol)]]))
|
||||||
}
|
}
|
||||||
def old_checksums(formula, formula_ast, bottle_hash)
|
def old_checksums(formula, formula_ast, bottle_hash)
|
||||||
|
@ -15,7 +15,7 @@ module OS
|
|||||||
appdir: "~/.config/apps",
|
appdir: "~/.config/apps",
|
||||||
}.freeze, T::Hash[Symbol, String])
|
}.freeze, T::Hash[Symbol, String])
|
||||||
|
|
||||||
sig { returns(T::Hash[Symbol, String]) }
|
sig { returns(T::Hash[Symbol, T.any(LazyObject, String)]) }
|
||||||
def defaults
|
def defaults
|
||||||
{
|
{
|
||||||
languages: LazyObject.new { Linux.languages },
|
languages: LazyObject.new { Linux.languages },
|
||||||
|
@ -1593,7 +1593,7 @@ on_request: installed_on_request?, options:)
|
|||||||
|
|
||||||
keg = Keg.new(formula.prefix)
|
keg = Keg.new(formula.prefix)
|
||||||
skip_linkage = formula.bottle_specification.skip_relocation?
|
skip_linkage = formula.bottle_specification.skip_relocation?
|
||||||
keg.replace_placeholders_with_locations(tab.changed_files, skip_linkage:)
|
keg.replace_placeholders_with_locations(tab.changed_files&.map { Pathname(_1) }, skip_linkage:)
|
||||||
|
|
||||||
cellar = formula.bottle_specification.tag_to_cellar(Utils::Bottles.tag)
|
cellar = formula.bottle_specification.tag_to_cellar(Utils::Bottles.tag)
|
||||||
return if [:any, :any_skip_relocation].include?(cellar)
|
return if [:any, :any_skip_relocation].include?(cellar)
|
||||||
|
@ -50,6 +50,24 @@ end
|
|||||||
|
|
||||||
module T
|
module T
|
||||||
module Types
|
module Types
|
||||||
|
class FixedArray < Base
|
||||||
|
def valid?(obj)
|
||||||
|
recursively_valid?(obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class FixedHash < Base
|
||||||
|
def valid?(obj)
|
||||||
|
recursively_valid?(obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Intersection < Base
|
||||||
|
def valid?(obj)
|
||||||
|
recursively_valid?(obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class TypedArray < TypedEnumerable
|
class TypedArray < TypedEnumerable
|
||||||
# overrides Base
|
# overrides Base
|
||||||
def valid?(obj)
|
def valid?(obj)
|
||||||
@ -57,11 +75,47 @@ module T
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class TypedEnumerable < Base
|
||||||
|
def valid?(obj)
|
||||||
|
recursively_valid?(obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class TypedEnumeratorChain < TypedEnumerable
|
||||||
|
def valid?(obj)
|
||||||
|
recursively_valid?(obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class TypedEnumeratorLazy < TypedEnumerable
|
||||||
|
def valid?(obj)
|
||||||
|
recursively_valid?(obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class TypedHash < TypedEnumerable
|
class TypedHash < TypedEnumerable
|
||||||
# overrides Base
|
# overrides Base
|
||||||
def valid?(obj)
|
def valid?(obj)
|
||||||
recursively_valid?(obj)
|
recursively_valid?(obj)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class TypedRange < TypedEnumerable
|
||||||
|
def valid?(obj)
|
||||||
|
recursively_valid?(obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class TypedSet < TypedEnumerable
|
||||||
|
def valid?(obj)
|
||||||
|
recursively_valid?(obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Union < Base
|
||||||
|
def valid?(obj)
|
||||||
|
recursively_valid?(obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -169,8 +169,7 @@ RSpec.describe Cask::Info, :cask do
|
|||||||
|
|
||||||
cask = Cask::CaskLoader.load("local-transmission")
|
cask = Cask::CaskLoader.load("local-transmission")
|
||||||
time = 1_720_189_863
|
time = 1_720_189_863
|
||||||
tab = Cask::Tab.new("loaded_from_api" => true, "tabfile" => TEST_FIXTURE_DIR/"cask_receipt.json",
|
tab = Cask::Tab.new(loaded_from_api: true, tabfile: TEST_FIXTURE_DIR/"cask_receipt.json", time:)
|
||||||
"time" => time)
|
|
||||||
expect(cask).to receive(:installed?).and_return(true)
|
expect(cask).to receive(:installed?).and_return(true)
|
||||||
expect(cask).to receive(:caskroom_path).and_return(caskroom)
|
expect(cask).to receive(:caskroom_path).and_return(caskroom)
|
||||||
expect(cask).to receive(:installed_version).and_return("2.61")
|
expect(cask).to receive(:installed_version).and_return("2.61")
|
||||||
|
@ -25,24 +25,6 @@ end
|
|||||||
require_relative "../standalone"
|
require_relative "../standalone"
|
||||||
require_relative "../warnings"
|
require_relative "../warnings"
|
||||||
|
|
||||||
module T
|
|
||||||
module Types
|
|
||||||
class TypedArray < TypedEnumerable
|
|
||||||
# overrides Base
|
|
||||||
def valid?(obj)
|
|
||||||
recursively_valid?(obj)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
class TypedHash < TypedEnumerable
|
|
||||||
# overrides Base
|
|
||||||
def valid?(obj)
|
|
||||||
recursively_valid?(obj)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Warnings.ignore :parser_syntax do
|
Warnings.ignore :parser_syntax do
|
||||||
require "rubocop"
|
require "rubocop"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user