Clean up remaining DownloadStrategy initializers
This commit is contained in:
parent
010a1461f7
commit
841c8bedca
@ -470,7 +470,8 @@ class CVSDownloadStrategy < AbstractDownloadStrategy
|
||||
if name.to_s.empty? || name == '__UNKNOWN__'
|
||||
raise NotImplementedError, "strategy requires a name parameter"
|
||||
else
|
||||
@co = HOMEBREW_CACHE + "#{name}--cvs"
|
||||
@unique_token = "#{name}--cvs"
|
||||
@co = Pathname.new("#{HOMEBREW_CACHE}/#{@unique_token}")
|
||||
end
|
||||
end
|
||||
|
||||
@ -521,8 +522,12 @@ end
|
||||
class MercurialDownloadStrategy < AbstractDownloadStrategy
|
||||
def initialize name, package
|
||||
super
|
||||
@unique_token="#{name}--hg" unless name.to_s.empty? or name == '__UNKNOWN__'
|
||||
@clone=HOMEBREW_CACHE+@unique_token
|
||||
|
||||
if name.to_s.empty? || name == '__UNKNOWN__'
|
||||
raise NotImplementedError, "strategy requires a name parameter"
|
||||
else
|
||||
@clone = Pathname.new("#{HOMEBREW_CACHE}/#{name}--hg")
|
||||
end
|
||||
end
|
||||
|
||||
def cached_location; @clone; end
|
||||
@ -568,8 +573,12 @@ end
|
||||
class BazaarDownloadStrategy < AbstractDownloadStrategy
|
||||
def initialize name, package
|
||||
super
|
||||
@unique_token="#{name}--bzr" unless name.to_s.empty? or name == '__UNKNOWN__'
|
||||
@clone=HOMEBREW_CACHE+@unique_token
|
||||
|
||||
if name.to_s.empty? || name == '__UNKNOWN__'
|
||||
raise NotImplementedError, "strategy requires a name parameter"
|
||||
else
|
||||
@clone = Pathname.new("#{HOMEBREW_CACHE}/#{name}--bzr")
|
||||
end
|
||||
end
|
||||
|
||||
def cached_location; @clone; end
|
||||
@ -618,8 +627,11 @@ end
|
||||
class FossilDownloadStrategy < AbstractDownloadStrategy
|
||||
def initialize name, package
|
||||
super
|
||||
@unique_token="#{name}--fossil" unless name.to_s.empty? or name == '__UNKNOWN__'
|
||||
@clone=HOMEBREW_CACHE+@unique_token
|
||||
if name.to_s.empty? || name == '__UNKNOWN__'
|
||||
raise NotImplementedError, "strategy requires a name parameter"
|
||||
else
|
||||
@clone = Pathname.new("#{HOMEBREW_CACHE}/#{name}--fossil")
|
||||
end
|
||||
end
|
||||
|
||||
def cached_location; @clone; end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user