From 2ea08f95a59e2acfabeb485f25ad85f3b7987b5a Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Tue, 15 Sep 2015 11:24:17 -0700 Subject: [PATCH] Fix res_body variable typo in Auth class --- lib/vmfloaty/auth.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/vmfloaty/auth.rb b/lib/vmfloaty/auth.rb index 4d6c70b..54224b3 100644 --- a/lib/vmfloaty/auth.rb +++ b/lib/vmfloaty/auth.rb @@ -8,12 +8,12 @@ class Auth resp = conn.post "/token" - resp_body = JSON.parse(resp.body) - if resp_body["ok"] - return resp_body["token"] + res_body = JSON.parse(resp.body) + if res_body["ok"] + return res_body["token"] else STDERR.puts "There was a problem with your request:" - puts resp_body + puts res_body exit 1 end end @@ -28,11 +28,11 @@ class Auth response = conn.delete "/token/#{token}" res_body = JSON.parse(response) - if resp_body["ok"] - puts resp_body + if res_body["ok"] + puts res_body else STDERR.puts "There was a problem with your request:" - puts resp_body + puts res_body exit 1 end end @@ -48,11 +48,11 @@ class Auth response = conn.get "/token/#{token}" res_body = JSON.parse(response.body) - if resp_body["ok"] - puts resp_body + if res_body["ok"] + puts res_body else STDERR.puts "There was a problem with your request:" - puts resp_body + puts res_body exit 1 end end