mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 21:38:41 -05:00
(rubocop) Fix Style/StringLiterals
This commit is contained in:
parent
cf2295ccfd
commit
1272343cdd
12 changed files with 181 additions and 181 deletions
|
|
@ -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}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue