aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2011-03-28 19:53:43 -0700
committerAdam Vandenberg2011-03-28 19:53:43 -0700
commitc1bde07bc89fc2afc0557c482cd2270df1587095 (patch)
treefbdf84ddf95a38333f69ba84f27047df69801b8e /Library
parente4a7eeecd751a05a2632be2cbc081a2c7bb589de (diff)
downloadhomebrew-c1bde07bc89fc2afc0557c482cd2270df1587095.tar.bz2
Fix inheritance style in download strats.
Diffstat (limited to 'Library')
-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 e43337b27..e8306c839 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -28,7 +28,7 @@ class AbstractDownloadStrategy
end
end
-class CurlDownloadStrategy <AbstractDownloadStrategy
+class CurlDownloadStrategy < AbstractDownloadStrategy
attr_reader :tarball_path
def initialize url, name, version, specs
@@ -128,7 +128,7 @@ end
# Download via an HTTP POST.
# Query parameters on the URL are converted into POST parameters
-class CurlPostDownloadStrategy <CurlDownloadStrategy
+class CurlPostDownloadStrategy < CurlDownloadStrategy
def _fetch
base_url,data = @url.split('?')
curl base_url, '-d', data, '-o', @tarball_path
@@ -137,7 +137,7 @@ end
# Use this strategy to download but not unzip a file.
# Useful for installing jars.
-class NoUnzipCurlDownloadStrategy <CurlDownloadStrategy
+class NoUnzipCurlDownloadStrategy < CurlDownloadStrategy
def stage
FileUtils.cp @tarball_path, File.basename(@url)
end
@@ -146,7 +146,7 @@ end
# This Download Strategy is provided for use with sites that
# only provide HTTPS and also have a broken cert.
# Try not to need this, as we probably won't accept the formula.
-class CurlUnsafeDownloadStrategy <CurlDownloadStrategy
+class CurlUnsafeDownloadStrategy < CurlDownloadStrategy
def _fetch
curl @url, '--insecure', '-o', @tarball_path
end
@@ -223,7 +223,7 @@ class SubversionDownloadStrategy <AbstractDownloadStrategy
end
# Require a newer version of Subversion than 1.4.x (Leopard-provided version)
-class StrictSubversionDownloadStrategy <SubversionDownloadStrategy
+class StrictSubversionDownloadStrategy < SubversionDownloadStrategy
def svn
exe = super
`#{exe} --version` =~ /version (\d+\.\d+(\.\d+)*)/
@@ -240,7 +240,7 @@ class StrictSubversionDownloadStrategy <SubversionDownloadStrategy
end
end
-class GitDownloadStrategy <AbstractDownloadStrategy
+class GitDownloadStrategy < AbstractDownloadStrategy
def initialize url, name, version, specs
super
@unique_token="#{name}--git" unless name.to_s.empty? or name == '__UNKNOWN__'
@@ -313,7 +313,7 @@ class GitDownloadStrategy <AbstractDownloadStrategy
end
end
-class CVSDownloadStrategy <AbstractDownloadStrategy
+class CVSDownloadStrategy < AbstractDownloadStrategy
def initialize url, name, version, specs
super
@unique_token="#{name}--cvs" unless name.to_s.empty? or name == '__UNKNOWN__'
@@ -363,7 +363,7 @@ private
end
end
-class MercurialDownloadStrategy <AbstractDownloadStrategy
+class MercurialDownloadStrategy < AbstractDownloadStrategy
def initialize url, name, version, specs
super
@unique_token="#{name}--hg" unless name.to_s.empty? or name == '__UNKNOWN__'
@@ -404,7 +404,7 @@ class MercurialDownloadStrategy <AbstractDownloadStrategy
end
end
-class BazaarDownloadStrategy <AbstractDownloadStrategy
+class BazaarDownloadStrategy < AbstractDownloadStrategy
def initialize url, name, version, specs
super
@unique_token="#{name}--bzr" unless name.to_s.empty? or name == '__UNKNOWN__'