Class: Tessa::Config
- Inherits:
-
Object
- Object
- Tessa::Config
- Defined in:
- lib/tessa/config.rb
Constant Summary collapse
- DEFAULT_STRATEGY =
"default"
Instance Method Summary collapse
Instance Method Details
#connection ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/tessa/config.rb', line 12 def connection @connection ||= Faraday.new(url: url) do |conn| if conn.respond_to?(:basic_auth) conn.basic_auth username, password else # Faraday >= 1.0 conn.request :authorization, :basic, username, password end conn.request :url_encoded conn.adapter Faraday.default_adapter end end |