lib/spandx/python/source.rb in spandx-0.11.0 vs lib/spandx/python/source.rb in spandx-0.12.0
- old
+ new
@@ -19,10 +19,14 @@
"https://#{host}/pypi/#{name}/#{version}/json"
end
def lookup(name, version, http: Spandx.http)
response = http.get(uri_for(name, version))
- response if http.ok?(response)
+ if http.ok?(response)
+ JSON.parse(response.body)
+ else
+ {}
+ end
end
class << self
def sources_from(json)
meta = json['_meta']