Skip to content

Instantly share code, notes, and snippets.

@rottmanj
Created December 17, 2013 23:23
Show Gist options
  • Save rottmanj/8014603 to your computer and use it in GitHub Desktop.
Save rottmanj/8014603 to your computer and use it in GitHub Desktop.
letsrevolutionizetesting.com challenge script
require 'open-uri'
require 'JSON'
url = "http://www.letsrevolutionizetesting.com/challenge"
i_am_the_winner = false
until i_am_the_winner do
json = JSON.parse(open(url, "Accept" => "application/json").read)
if json.has_key?("follow")
url = json["follow"]
puts "Not a winner yet. Trying URL: #{url}"
else
puts "You won!!! \n\n #{json}"
i_am_the_winner = true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment