diff --git a/lib/vmfloaty.rb b/lib/vmfloaty.rb index deab8ec..adb4e49 100644 --- a/lib/vmfloaty.rb +++ b/lib/vmfloaty.rb @@ -4,7 +4,6 @@ require 'rubygems' require 'commander' require 'yaml' require 'vmfloaty/auth' -require 'vmfloaty/http' require 'vmfloaty/pooler' class Vmfloaty diff --git a/lib/vmfloaty/auth.rb b/lib/vmfloaty/auth.rb index ac262e5..fef56b6 100644 --- a/lib/vmfloaty/auth.rb +++ b/lib/vmfloaty/auth.rb @@ -4,7 +4,7 @@ require 'vmfloaty/http' class Auth def self.get_token(verbose, url, user, password) - conn = Http.get_conn(verbose, url, user, password) + conn = Http.get_conn_with_auth(verbose, url, user, password) resp = conn.post do |req| req.url '/token' @@ -27,7 +27,7 @@ class Auth exit 1 end - conn = Http.get_conn(verbose, url, user, password) + conn = Http.get_conn_with_auth(verbose, url, user, password) response = conn.delete "/token/#{token}" res_body = JSON.parse(response) @@ -46,7 +46,7 @@ class Auth exit 1 end - conn = Http.get_conn(verbose, url, user, password) + conn = Http.get_conn_with_auth(verbose, url, user, password) response = conn.get "/token/#{token}" res_body = JSON.parse(response.body) diff --git a/lib/vmfloaty/http.rb b/lib/vmfloaty/http.rb index 336097f..fc352bd 100644 --- a/lib/vmfloaty/http.rb +++ b/lib/vmfloaty/http.rb @@ -16,7 +16,7 @@ class Http return conn end - def self.get_conn(verbose, url, user, password) + def self.get_conn_with_auth(verbose, url, user, password) if url.nil? STDERR.puts "The url you provided was empty" exit 1