diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 3b9a9dd492..fc5cdfef0a 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -22,8 +22,15 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # class AbstractDownloadStrategy - def initialize url, name, version + def initialize url, name, version, specs @url=url + case specs + when Hash + @spec = specs.keys.first # only use first spec + @ref = specs.values.first + else + spec = nil + end @unique_token="#{name}-#{version}" unless name.to_s.empty? or name == '__UNKNOWN__' end end @@ -131,8 +138,17 @@ class GitDownloadStrategy