lib/spaceship/client.rb in spaceship-0.3.3 vs lib/spaceship/client.rb in spaceship-0.3.4
- old
+ new
@@ -140,13 +140,13 @@
def login(user = nil, password = nil)
if user.to_s.empty? or password.to_s.empty?
require 'credentials_manager'
data = CredentialsManager::PasswordManager.shared_manager(user, false)
user ||= data.username
- password ||= data.password
+ password = data.password
end
- if user.to_s.strip.empty? or password.strip.to_s.empty?
+ if user.to_s.strip.empty? or password.to_s.strip.empty?
raise NoUserCredentialsError.new("No login data provided")
end
send_login_request(user, password) # different in subclasses
end