brew style --fix

This commit is contained in:
Douglas Eichelberger 2023-03-20 13:16:31 -07:00
parent 82dc57dfea
commit f38a672938
35 changed files with 7 additions and 73 deletions

View File

@ -11,8 +11,6 @@ module UnpackStrategy
include UnpackStrategy
include SystemCommand::Mixin
sig { override.params(unpack_dir: Pathname, basename: Pathname, verbose: T::Boolean).returns(T.untyped) }
def extract_to_dir(unpack_dir, basename:, verbose:)
with_env(TZ: "UTC") do

View File

@ -159,9 +159,9 @@ module UnpackStrategy
# Helper method for iterating over directory trees.
sig {
params(
pathname: Pathname,
_block: T.proc.params(path: Pathname).void,
).returns(T.nilable(Pathname))
pathname: Pathname,
_block: T.proc.params(path: Pathname).void,
).returns(T.nilable(Pathname))
}
def each_directory(pathname, &_block)
pathname.find do |path|

View File

@ -8,8 +8,6 @@ module UnpackStrategy
class Bazaar < Directory
extend T::Sig
def self.can_extract?(path)
super && (path/".bzr").directory?
end

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".bz2"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".cab"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
class Compress < Tar
extend T::Sig
sig { returns(T::Array[String]) }
def self.extensions
[".Z"]

View File

@ -6,8 +6,6 @@ require_relative "directory"
module UnpackStrategy
# Strategy for unpacking CVS repositories.
class Cvs < Directory
def self.can_extract?(path)
super && (path/"CVS").directory?
end

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[]

View File

@ -99,10 +99,10 @@ module UnpackStrategy
# For HFS, just use <mount-path>
# For APFS, find the <physical-store> corresponding to <mount-path>
eject_paths = disk_info.plist
.fetch("APFSPhysicalStores", [])
.map { |store| store["APFSPhysicalStore"] }
.compact
.presence || [path]
.fetch("APFSPhysicalStores", [])
.map { |store| store["APFSPhysicalStore"] }
.compact
.presence || [path]
eject_paths.each do |eject_path|
system_command! "diskutil",

View File

@ -8,8 +8,6 @@ module UnpackStrategy
class Executable < Uncompressed
extend T::Sig
sig { returns(T::Array[String]) }
def self.extensions
[".sh", ".bash"]

View File

@ -11,8 +11,6 @@ module UnpackStrategy
include UnpackStrategy
extend SystemCommand::Mixin
sig { returns(T::Array[String]) }
def self.extensions
[]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[]

View File

@ -6,8 +6,6 @@ require_relative "directory"
module UnpackStrategy
# Strategy for unpacking Git repositories.
class Git < Directory
def self.can_extract?(path)
super && (path/".git").directory?
end

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".gz"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
class Jar < Uncompressed
extend T::Sig
sig { returns(T::Array[String]) }
def self.extensions
[".apk", ".jar"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".lha", ".lzh"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
class LuaRock < Uncompressed
extend T::Sig
sig { returns(T::Array[String]) }
def self.extensions
[".rock"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".lz"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".lzma"]

View File

@ -6,8 +6,6 @@ require_relative "directory"
module UnpackStrategy
# Strategy for unpacking Mercurial repositories.
class Mercurial < Directory
def self.can_extract?(path)
super && (path/".hg").directory?
end

View File

@ -8,8 +8,6 @@ module UnpackStrategy
class MicrosoftOfficeXml < Uncompressed
extend T::Sig
sig { returns(T::Array[String]) }
def self.extensions
[

View File

@ -8,8 +8,6 @@ module UnpackStrategy
class Otf < Uncompressed
extend T::Sig
sig { returns(T::Array[String]) }
def self.extensions
[".otf"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".7z"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".pax"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
class Pkg < Uncompressed
extend T::Sig
sig { returns(T::Array[String]) }
def self.extensions
[".pkg", ".mkpg"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".rar"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
class SelfExtractingExecutable < GenericUnar
extend T::Sig
sig { returns(T::Array[String]) }
def self.extensions
[]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
class Sit < GenericUnar
extend T::Sig
sig { returns(T::Array[String]) }
def self.extensions
[".sit"]

View File

@ -6,8 +6,6 @@ require_relative "directory"
module UnpackStrategy
# Strategy for unpacking Subversion repositories.
class Subversion < Directory
def self.can_extract?(path)
super && (path/".svn").directory?
end

View File

@ -11,8 +11,6 @@ module UnpackStrategy
include UnpackStrategy
extend SystemCommand::Mixin
sig { returns(T::Array[String]) }
def self.extensions
[

View File

@ -8,8 +8,6 @@ module UnpackStrategy
class Ttf < Uncompressed
extend T::Sig
sig { returns(T::Array[String]) }
def self.extensions
[".ttc", ".ttf"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".xar"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".xz"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".zip"]

View File

@ -8,8 +8,6 @@ module UnpackStrategy
include UnpackStrategy
sig { returns(T::Array[String]) }
def self.extensions
[".zst"]