(rubocop) Fix Style/StringLiterals

This commit is contained in:
Tim Sharpe 2019-02-03 10:42:28 +11:00
parent cf2295ccfd
commit 1272343cdd
12 changed files with 181 additions and 181 deletions

View file

@ -7,11 +7,11 @@ class Auth
def self.get_token(verbose, url, user, password)
conn = Http.get_conn_with_auth(verbose, url, user, password)
resp = conn.post "token"
resp = conn.post 'token'
res_body = JSON.parse(resp.body)
if res_body["ok"]
return res_body["token"]
if res_body['ok']
return res_body['token']
else
raise TokenError, "HTTP #{resp.status}: There was a problem requesting a token:\n#{res_body}"
end
@ -26,7 +26,7 @@ class Auth
response = conn.delete "token/#{token}"
res_body = JSON.parse(response.body)
if res_body["ok"]
if res_body['ok']
return res_body
else
raise TokenError, "HTTP #{response.status}: There was a problem deleting a token:\n#{res_body}"
@ -43,7 +43,7 @@ class Auth
response = conn.get "token/#{token}"
res_body = JSON.parse(response.body)
if res_body["ok"]
if res_body['ok']
return res_body
else
raise TokenError, "HTTP #{response.status}: There was a problem getting the status of a token:\n#{res_body}"