lib/proxy_tester/models/user.rb in proxy_tester-0.1.2 vs lib/proxy_tester/models/user.rb in proxy_tester-0.1.3

- old
+ new

@@ -8,10 +8,19 @@ def self.load_from(source) source.create_users(self) end - def to_string(options = {}) - sprintf '%s:%s', name, options.key?(:cleartext) ? password : '*' * 4 + def to_login(options = {}) + result = [] + result << name + + if options.key? :cleartext + result << password + else + result << '*' * 4 + end + + result.join(':').shellescape end end end