resource: detect HEAD versions

This commit is contained in:
Vlad Shablinsky 2016-06-18 20:56:01 +03:00 committed by Xu Cheng
parent 9ac5836604
commit 8a968a0b60
No known key found for this signature in database
GPG Key ID: C2A3860FA0B459CE

View File

@ -159,7 +159,7 @@ class Resource
case val
when nil then Version.detect(url, specs)
when String then Version.new(val)
when String then Version.create(val)
when Version then val
else
raise TypeError, "version '#{val.inspect}' should be a string"