Revert "tap: add cask methods."
This reverts commit 05daa0574732a7884bd158b2c3e14bd0709367da.
This commit is contained in:
parent
05daa05747
commit
a6033529cf
@ -72,7 +72,6 @@ class Tap
|
|||||||
def clear_cache
|
def clear_cache
|
||||||
@remote = nil
|
@remote = nil
|
||||||
@formula_dir = nil
|
@formula_dir = nil
|
||||||
@cask_dir = nil
|
|
||||||
@formula_files = nil
|
@formula_files = nil
|
||||||
@alias_dir = nil
|
@alias_dir = nil
|
||||||
@alias_files = nil
|
@alias_files = nil
|
||||||
@ -305,11 +304,6 @@ class Tap
|
|||||||
@formula_dir ||= [path/"Formula", path/"HomebrewFormula", path].detect(&:directory?)
|
@formula_dir ||= [path/"Formula", path/"HomebrewFormula", path].detect(&:directory?)
|
||||||
end
|
end
|
||||||
|
|
||||||
# path to the directory of all casks for caskroom/cask {Tap}.
|
|
||||||
def cask_dir
|
|
||||||
@cask_dir ||= [path/"Casks", path].detect(&:directory?)
|
|
||||||
end
|
|
||||||
|
|
||||||
# an array of all {Formula} files of this {Tap}.
|
# an array of all {Formula} files of this {Tap}.
|
||||||
def formula_files
|
def formula_files
|
||||||
@formula_files ||= if formula_dir
|
@formula_files ||= if formula_dir
|
||||||
@ -325,7 +319,7 @@ class Tap
|
|||||||
def formula_file?(file)
|
def formula_file?(file)
|
||||||
file = Pathname.new(file) unless file.is_a? Pathname
|
file = Pathname.new(file) unless file.is_a? Pathname
|
||||||
file = file.expand_path(path)
|
file = file.expand_path(path)
|
||||||
file.extname == ".rb" && (file.parent == formula_dir || file.parent == cask_dir)
|
file.extname == ".rb" && file.parent == formula_dir
|
||||||
end
|
end
|
||||||
|
|
||||||
# an array of all {Formula} names of this {Tap}.
|
# an array of all {Formula} names of this {Tap}.
|
||||||
@ -568,14 +562,6 @@ class CoreTap < Tap
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# @private
|
|
||||||
def cask_dir
|
|
||||||
@cask_dir ||= begin
|
|
||||||
self.class.ensure_installed!
|
|
||||||
super
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# @private
|
# @private
|
||||||
def alias_dir
|
def alias_dir
|
||||||
@alias_dir ||= begin
|
@alias_dir ||= begin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user