brew style --fix
This commit is contained in:
parent
82dc57dfea
commit
f38a672938
@ -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
|
||||
|
||||
@ -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|
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
class Bazaar < Directory
|
||||
extend T::Sig
|
||||
|
||||
|
||||
|
||||
def self.can_extract?(path)
|
||||
super && (path/".bzr").directory?
|
||||
end
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".bz2"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".cab"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
class Compress < Tar
|
||||
extend T::Sig
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".Z"]
|
||||
|
||||
@ -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
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[]
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
class Executable < Uncompressed
|
||||
extend T::Sig
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".sh", ".bash"]
|
||||
|
||||
@ -11,8 +11,6 @@ module UnpackStrategy
|
||||
include UnpackStrategy
|
||||
extend SystemCommand::Mixin
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[]
|
||||
|
||||
@ -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
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".gz"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
class Jar < Uncompressed
|
||||
extend T::Sig
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".apk", ".jar"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".lha", ".lzh"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
class LuaRock < Uncompressed
|
||||
extend T::Sig
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".rock"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".lz"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".lzma"]
|
||||
|
||||
@ -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
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
class MicrosoftOfficeXml < Uncompressed
|
||||
extend T::Sig
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
class Otf < Uncompressed
|
||||
extend T::Sig
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".otf"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".7z"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".pax"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
class Pkg < Uncompressed
|
||||
extend T::Sig
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".pkg", ".mkpg"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".rar"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
class SelfExtractingExecutable < GenericUnar
|
||||
extend T::Sig
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
class Sit < GenericUnar
|
||||
extend T::Sig
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".sit"]
|
||||
|
||||
@ -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
|
||||
|
||||
@ -11,8 +11,6 @@ module UnpackStrategy
|
||||
include UnpackStrategy
|
||||
extend SystemCommand::Mixin
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
class Ttf < Uncompressed
|
||||
extend T::Sig
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".ttc", ".ttf"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".xar"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".xz"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".zip"]
|
||||
|
||||
@ -8,8 +8,6 @@ module UnpackStrategy
|
||||
|
||||
include UnpackStrategy
|
||||
|
||||
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def self.extensions
|
||||
[".zst"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user