Merge pull request #4789 from reitermarkus/avoid-network-call

Avoid network call in `#initialize`.
This commit is contained in:
Markus Reiter 2018-09-01 16:47:20 +02:00 committed by GitHub
commit 93430e6ae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,11 +188,8 @@ class VCSDownloadStrategy < AbstractDownloadStrategy
end
class AbstractFileDownloadStrategy < AbstractDownloadStrategy
attr_reader :temporary_path
def initialize(url, name, version, **meta)
super
@temporary_path = Pathname.new("#{cached_location}.incomplete")
def temporary_path
@temporary_path ||= Pathname.new("#{cached_location}.incomplete")
end
def symlink_location