aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/download_strategy.rb
diff options
context:
space:
mode:
authorJack Nagel2013-10-11 00:11:58 -0500
committerJack Nagel2013-10-11 00:21:23 -0500
commit460ae7f5ab2e1ca3e8b37ee9c51f7fa338036a8a (patch)
treec439fc30e29427f049f2db2b79aaa6dcaa17978a /Library/Homebrew/download_strategy.rb
parentb8d4ab99839df47f5471216010e0eee5e15e5b86 (diff)
downloadhomebrew-460ae7f5ab2e1ca3e8b37ee9c51f7fa338036a8a.tar.bz2
VCSDownloadStrategy: rename checkout_name to cache_filename
Diffstat (limited to 'Library/Homebrew/download_strategy.rb')
-rw-r--r--Library/Homebrew/download_strategy.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index f637f42f8..203712af7 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -48,7 +48,7 @@ class VCSDownloadStrategy < AbstractDownloadStrategy
spec.each { |o| return o }
end
- def checkout_name(tag)
+ def cache_filename(tag)
if name.empty? || name == '__UNKNOWN__'
"#{ERB::Util.url_encode(@url)}--#{tag}"
else
@@ -321,9 +321,9 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
@@svn ||= 'svn'
if ARGV.build_head?
- @clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("svn-HEAD")}")
+ @clone = Pathname.new("#{HOMEBREW_CACHE}/#{cache_filename("svn-HEAD")}")
else
- @clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("svn")}")
+ @clone = Pathname.new("#{HOMEBREW_CACHE}/#{cache_filename("svn")}")
end
end
@@ -427,7 +427,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
def initialize name, resource
super
@@git ||= 'git'
- @clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("git")}")
+ @clone = Pathname.new("#{HOMEBREW_CACHE}/#{cache_filename("git")}")
end
def fetch
@@ -570,7 +570,7 @@ end
class CVSDownloadStrategy < VCSDownloadStrategy
def initialize name, resource
super
- @clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("cvs")}")
+ @clone = Pathname.new("#{HOMEBREW_CACHE}/#{cache_filename("cvs")}")
end
def fetch
@@ -585,7 +585,7 @@ class CVSDownloadStrategy < VCSDownloadStrategy
unless @clone.exist?
HOMEBREW_CACHE.cd do
safe_system '/usr/bin/cvs', '-d', url, 'login'
- safe_system '/usr/bin/cvs', '-d', url, 'checkout', '-d', checkout_name("cvs"), mod
+ safe_system '/usr/bin/cvs', '-d', url, 'checkout', '-d', cache_filename("cvs"), mod
end
else
puts "Updating #{@clone}"
@@ -618,7 +618,7 @@ end
class MercurialDownloadStrategy < VCSDownloadStrategy
def initialize name, resource
super
- @clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("hg")}")
+ @clone = Pathname.new("#{HOMEBREW_CACHE}/#{cache_filename("hg")}")
end
def hgpath
@@ -671,7 +671,7 @@ end
class BazaarDownloadStrategy < VCSDownloadStrategy
def initialize name, resource
super
- @clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("bzr")}")
+ @clone = Pathname.new("#{HOMEBREW_CACHE}/#{cache_filename("bzr")}")
end
def bzrpath
@@ -717,7 +717,7 @@ end
class FossilDownloadStrategy < VCSDownloadStrategy
def initialize name, resource
super
- @clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("fossil")}")
+ @clone = Pathname.new("#{HOMEBREW_CACHE}/#{cache_filename("fossil")}")
end
def fossilpath