Skip to content

Instantly share code, notes, and snippets.

@jamesgolick
Created July 10, 2012 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesgolick/3086559 to your computer and use it in GitHub Desktop.
Save jamesgolick/3086559 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "rubygems"
require "yajl"
require "open-uri"
output = Yajl::Parser.parse(open("#{ENV['ROLLOUT_API_URL']}/#{ARGV[0]}.json"))
percentage = output["percentage"].to_i
puts Yajl::Encoder.encode(output)
exit(percentage == 100 ? 0 : 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment