Created
February 9, 2014 15:05
-
-
Save NakedMoleRatScientist/8900334 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get path | |
Net::HTTP::Get.new(path) | |
end | |
def info gem_name, http | |
request = get("/api/v1/gems/#{gem_name}.json") | |
response = http.request request | |
return response.body | |
end | |
def version gem_name, http | |
request = get("/api/v1/versions/#{gem_name}.json") | |
response = http.request request | |
return response.body | |
end | |
def dependencies gem_name, http | |
request = get("/api/v1/dependencies/#{gem_name}.json") | |
response = http.request request | |
return response.body | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment