Skip to content

Instantly share code, notes, and snippets.

@sullust
Last active January 19, 2016 20:14

Revisions

  1. sullust renamed this gist Jan 19, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. sullust created this gist Jan 19, 2016.
    7 changes: 7 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    require "rubygems"
    require "json"

    parsed = JSON.parse(ENV["VCAP_APPLICATION"]) # returns a hash

    app_name = parsed.["application_name"]
    app_index = parsed.["instance_id"]