Sha256: 0ad6a3fc26b3c39b0eac39d01b7c10ef7b32356cfccad2b24aa74f6ddf5f0d4b

Contents?: true

Size: 361 Bytes

Versions: 8

Compression:

Stored size: 361 Bytes

Contents

module Typhoeus
  module EasyFu
    module Auth
      def auth=(authinfo)
        set_option(:userpwd, auth_credentials(authinfo))
        set_option(:httpauth, Typhoeus::Easy::AUTH_TYPES[authinfo[:method]]) if authinfo[:method]
      end

      def auth_credentials(authinfo)
        "#{authinfo[:username]}:#{authinfo[:password]}"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
dcu-typhoeus-0.4.3 lib/typhoeus/easy/auth.rb
dcu-typhoeus-0.4.2 lib/typhoeus/easy/auth.rb
hhry-typhoeus-0.4.0 lib/typhoeus/easy/auth.rb
typhoeus-0.4.2 lib/typhoeus/easy/auth.rb
typhoeus-0.4.1 lib/typhoeus/easy/auth.rb
typhoeus-0.4.0 lib/typhoeus/easy/auth.rb
dcu-typhoeus-0.4.1 lib/typhoeus/easy/auth.rb
dcu-typhoeus-0.4.0 lib/typhoeus/easy/auth.rb