Skip to content

Instantly share code, notes, and snippets.

@sullust
Last active January 19, 2016 20:14
Show Gist options
  • Save sullust/69ea56da4c14d2a695d0 to your computer and use it in GitHub Desktop.
Save sullust/69ea56da4c14d2a695d0 to your computer and use it in GitHub Desktop.
get VCAP into ruby object
require "rubygems"
require "json"
parsed = JSON.parse(ENV["VCAP_APPLICATION"]) # returns a hash
app_name = parsed.["application_name"]
app_index = parsed.["instance_id"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment