Created
November 21, 2013 18:05
-
-
Save neovintage/7586530 to your computer and use it in GitHub Desktop.
Revisions
-
neovintage created this gist
Nov 21, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ # Background: # I followed the initial url and your message suggested that I try json instead. # Using that, I hit the initial page and tagged '.json' on to the url. You had # mentioned in your job description that you were using rails so I figured I could # do that in the URL instead of using the accept headers. # require 'rest-client' require 'json' result = RestClient.get('http://letsrevolutionizetesting.com/challenge', :accept => :json) JSON.parse(result) while !result['follow'].nil? do result = RestClient.get(result['follow'], :accept => :json) result = JSON.parse(result) puts result end