diff options
| author | Jack Nagel | 2014-12-06 12:29:15 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-12-06 15:02:48 -0500 | 
| commit | 05b42a5dcbf25eb2f268dd0ae9bd4de1cad14cfe (patch) | |
| tree | b35e9aff8c2ab4c9f619971dae8597fe4e7a9a8d /Library/Homebrew/download_strategy.rb | |
| parent | c3c4b115cd0177c94700e9cf54b2234e5922c1b6 (diff) | |
| download | homebrew-05b42a5dcbf25eb2f268dd0ae9bd4de1cad14cfe.tar.bz2 | |
Make cache_tag private
Diffstat (limited to 'Library/Homebrew/download_strategy.rb')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 46 | 
1 files changed, 32 insertions, 14 deletions
| diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 6132f08a7..188bd786b 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -352,10 +352,6 @@ class S3DownloadStrategy < CurlDownloadStrategy  end  class SubversionDownloadStrategy < VCSDownloadStrategy -  def cache_tag -    head? ? "svn-HEAD" : "svn" -  end -    def repo_valid?      @clone.join(".svn").directory?    end @@ -426,6 +422,12 @@ class SubversionDownloadStrategy < VCSDownloadStrategy      args << '--ignore-externals' if ignore_externals      quiet_safe_system(*args)    end + +  private + +  def cache_tag +    head? ? "svn-HEAD" : "svn" +  end  end  StrictSubversionDownloadStrategy = SubversionDownloadStrategy @@ -452,8 +454,6 @@ class GitDownloadStrategy < VCSDownloadStrategy      @shallow = resource.specs.fetch(:shallow) { true }    end -  def cache_tag; "git" end -    def fetch      ohai "Cloning #@url" @@ -487,6 +487,10 @@ class GitDownloadStrategy < VCSDownloadStrategy    private +  def cache_tag +    "git" +  end +    def shallow_clone?      @shallow && support_depth?    end @@ -584,8 +588,6 @@ class CVSDownloadStrategy < VCSDownloadStrategy        ].find { |p| File.executable? p }    end -  def cache_tag; "cvs" end -    def fetch      ohai "Checking out #{@url}" @@ -612,6 +614,10 @@ class CVSDownloadStrategy < VCSDownloadStrategy    private +  def cache_tag +    "cvs" +  end +    def split_url(in_url)      parts=in_url.sub(%r[^cvs://], '').split(/:/)      mod=parts.pop @@ -621,8 +627,6 @@ class CVSDownloadStrategy < VCSDownloadStrategy  end  class MercurialDownloadStrategy < VCSDownloadStrategy -  def cache_tag; "hg" end -    def hgpath      @path ||= %W[        #{which("hg")} @@ -666,11 +670,15 @@ class MercurialDownloadStrategy < VCSDownloadStrategy        end      end    end + +  private + +  def cache_tag +    "hg" +  end  end  class BazaarDownloadStrategy < VCSDownloadStrategy -  def cache_tag; "bzr" end -    def bzrpath      @path ||= %W[        #{which("bzr")} @@ -709,11 +717,15 @@ class BazaarDownloadStrategy < VCSDownloadStrategy      FileUtils.cp_r Dir[@clone+"{.}"], Dir.pwd      FileUtils.rm_r ".bzr"    end + +  private + +  def cache_tag +    "bzr" +  end  end  class FossilDownloadStrategy < VCSDownloadStrategy -  def cache_tag; "fossil" end -    def fossilpath      @path ||= %W[        #{which("fossil")} @@ -740,6 +752,12 @@ class FossilDownloadStrategy < VCSDownloadStrategy        safe_system fossilpath, 'checkout', @ref      end    end + +  private + +  def cache_tag +    "fossil" +  end  end  class DownloadStrategyDetector | 
