mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
@@ -14,16 +14,6 @@ class Hbc::Cask
|
||||
@token = self.class.token
|
||||
end
|
||||
|
||||
def caskroom_path
|
||||
Hbc.caskroom.join(token)
|
||||
end
|
||||
|
||||
# todo: move to staged.rb ?
|
||||
def staged_path
|
||||
cask_version = version ? version : :unknown
|
||||
caskroom_path.join(cask_version.to_s)
|
||||
end
|
||||
|
||||
METADATA_SUBDIR = '.metadata'
|
||||
|
||||
def metadata_master_container_path
|
||||
|
||||
+4
-2
@@ -222,11 +222,13 @@ module Hbc::DSL
|
||||
end
|
||||
|
||||
def caskroom_path
|
||||
@caskroom_path ||= self.caskroom
|
||||
@caskroom_path ||= Hbc.caskroom.join(self.token)
|
||||
end
|
||||
|
||||
def staged_path
|
||||
@staged_path ||= self.caskroom.join(self.name, self.version)
|
||||
return @staged_path if @staged_path
|
||||
cask_version = self.version || :unknown
|
||||
@staged_path = self.caskroom_path.join(cask_version.to_s)
|
||||
end
|
||||
|
||||
def caveats(*string, &block)
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
class Hbc::WithoutSource < Hbc::Cask
|
||||
def staged_path
|
||||
caskroom_path.children.first
|
||||
end
|
||||
|
||||
def initialize(sourcefile_path=nil)
|
||||
@sourcefile_path = sourcefile_path
|
||||
@token = sourcefile_path
|
||||
end
|
||||
|
||||
# Override from `Hbc::DSL` because `@token` is set to the constructor argument
|
||||
# instead of `self.class.token` as in `Hbc::Cask`.
|
||||
def caskroom_path
|
||||
Hbc.caskroom.join(token)
|
||||
end
|
||||
|
||||
# Override from `Hbc::DSL` because we don't have a cask source file to work
|
||||
# with, so we don't know the cask's `version`.
|
||||
def staged_path
|
||||
caskroom_path.children.first
|
||||
end
|
||||
|
||||
def to_s
|
||||
"#{token} (!)"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user