Remove the direct url writer from Resource
This commit is contained in:
parent
ba8926ea11
commit
0f01e9ff43
@ -161,7 +161,7 @@ end
|
|||||||
class LegacyPatch < ExternalPatch
|
class LegacyPatch < ExternalPatch
|
||||||
def initialize(strip, url)
|
def initialize(strip, url)
|
||||||
super(strip)
|
super(strip)
|
||||||
resource.url = url
|
resource.url(url)
|
||||||
resource.download_strategy = CurlDownloadStrategy
|
resource.download_strategy = CurlDownloadStrategy
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ class Resource
|
|||||||
include FileUtils
|
include FileUtils
|
||||||
|
|
||||||
attr_reader :checksum, :mirrors, :specs, :using
|
attr_reader :checksum, :mirrors, :specs, :using
|
||||||
attr_writer :url, :checksum, :version
|
attr_writer :checksum, :version
|
||||||
attr_accessor :download_strategy
|
attr_accessor :download_strategy
|
||||||
|
|
||||||
# Formula name must be set after the DSL, as we have no access to the
|
# Formula name must be set after the DSL, as we have no access to the
|
||||||
|
@ -224,7 +224,7 @@ class Bottle
|
|||||||
checksum, tag = spec.checksum_for(bottle_tag)
|
checksum, tag = spec.checksum_for(bottle_tag)
|
||||||
|
|
||||||
filename = Filename.create(formula, tag, spec.revision)
|
filename = Filename.create(formula, tag, spec.revision)
|
||||||
@resource.url = build_url(spec.root_url, filename)
|
@resource.url(build_url(spec.root_url, filename))
|
||||||
@resource.download_strategy = CurlBottleDownloadStrategy
|
@resource.download_strategy = CurlBottleDownloadStrategy
|
||||||
@resource.version = formula.pkg_version
|
@resource.version = formula.pkg_version
|
||||||
@resource.checksum = checksum
|
@resource.checksum = checksum
|
||||||
|
Loading…
x
Reference in New Issue
Block a user