# File rubilicious.rb, line 709 def initialize(user, pass, opt = {}) @user, @use_proxy = user, true # set use proxy @use_proxy = opt['use_proxy'] if opt.key?('use_proxy') # set API URL (note that this can be changed by the user later) @base_uri = opt['base_uri'] || ENV['RUBILICIOUS_BASE_URI'] || 'https://api.del.icio.us/v1' # if we have SSL support, then set the SSL verify mode # (defaults to VERIFY_NONE, which is horribly insecure) if HAVE_SSL init_ssl(opt) end # set user agent string user_agent = opt['user_agent'] || "Rubilicious/#{Rubilicious::VERSION} Ruby/#{RUBY_VERSION}" # build default HTTP headers @headers = { 'Authorization' => 'Basic ' << ["#{user}:#{pass}"].pack('m').strip, 'User-Agent' => user_agent, } end