Skip to content

Instantly share code, notes, and snippets.

@ffaerber
Last active August 29, 2015 14:07
Show Gist options
  • Save ffaerber/5fbb58d477782f001d7d to your computer and use it in GitHub Desktop.
Save ffaerber/5fbb58d477782f001d7d to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'httparty'
require 'json'
environment_id = %x( echo "$RD_OPTION_ENVIRONMENT_ID" )
rails_auth_token = %x( echo "$RD_OPTION_RAILS_AUTH_TOKEN" )
user_email = %x( echo "$RD_OPTION_USER_EMAIL" )
url = "http://localhost:3000/environments/#{environment_id}.json?user_email=#{user_email}&user_token=#{rails_auth_token}"
response = HTTParty.get url.delete!("\n").to_s
json = JSON.parse(response.body)
puts json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment