Commit 456da5be authored by Carlos Sanchez's avatar Carlos Sanchez

Merge pull request #154 from rodjek/undefined-path

Fix "undefined 'path' variable"
parents 45d165bd 4f137194
......@@ -151,8 +151,10 @@ module Librarian
def api_call(module_name)
debug { "Querying Forge API for module #{name}" }
base_url = source.uri
path = "api/v1/releases.json?module=#{module_name}"
begin
data = open("#{base_url}/api/v1/releases.json?module=#{module_name}") {|f| f.read}
data = open("#{base_url}/#{path}") {|f| f.read}
JSON.parse(data)
rescue OpenURI::HTTPError => e
case e.io.status[0].to_i
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment