diff --git a/lib/cask.rb b/lib/cask.rb index d8bc127ef..1e5c3c063 100644 --- a/lib/cask.rb +++ b/lib/cask.rb @@ -18,8 +18,8 @@ class Cask HOMEBREW_PREFIX.join "Library", "Taps" end - def self.cellarpath - HOMEBREW_CELLAR + def self.caskroom + HOMEBREW_PREFIX.join "Caskroom" end def self.appdir @@ -32,6 +32,7 @@ class Cask def self.init HOMEBREW_CACHE.mkpath unless HOMEBREW_CACHE.exist? + caskroom.mkpath unless caskroom.exist? appdir.mkpath unless appdir.exist? end @@ -57,7 +58,7 @@ class Cask end def destination_path - HOMEBREW_CELLAR.join(self.title).join(self.version) + self.class.caskroom.join(self.title).join(self.version) end def installed? diff --git a/lib/cask/cli.rb b/lib/cask/cli.rb index c67d40cdc..b2c22a4d8 100644 --- a/lib/cask/cli.rb +++ b/lib/cask/cli.rb @@ -78,6 +78,10 @@ class Cask::CLI puts Cask::CLI.commands.map {|c| " - #{c.downcase}: #{_help_for(c)}"}.join("\n") end + def help + '' + end + def _help_for(command) Cask::CLI.lookup_command(command).help end diff --git a/test/cask/installer_test.rb b/test/cask/installer_test.rb index 5ef361e86..086025386 100644 --- a/test/cask/installer_test.rb +++ b/test/cask/installer_test.rb @@ -9,7 +9,7 @@ describe Cask::Installer do Cask::Installer.install(caffeine) end - dest_path = HOMEBREW_CELLAR/'local-caffeine'/caffeine.version + dest_path = Cask.caskroom/'local-caffeine'/caffeine.version dest_path.must_be :directory? application = dest_path/'Caffeine.app' application.must_be :directory? @@ -22,7 +22,7 @@ describe Cask::Installer do Cask::Installer.install(transmission) end - dest_path = HOMEBREW_CELLAR/'local-transmission'/transmission.version + dest_path = Cask.caskroom/'local-transmission'/transmission.version dest_path.must_be :directory? application = dest_path/'Transmission.app' application.must_be :directory?