Created
May 20, 2016 15:41
-
-
Save willrax/7232be0bf3e4f660b519301e3acee1b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Site.Heroku do | |
use Status.Site | |
def handle_response(response) do | |
Poison.Parser.parse!(response.body) | |
|> determine_app_state | |
end | |
def determine_app_state(%{"status" => %{"Production" => "green", "Development" => "green"}}), do: :ok | |
def determine_app_state(_), do: :notok | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment