Sha256: 3cfd484f3ac43316fac36d88a22a00e66ff9536f901d84c7f5410f3de05b324e
Contents?: true
Size: 791 Bytes
Versions: 1
Compression:
Stored size: 791 Bytes
Contents
# frozen_string_literal: true module PriceHubble # The configuration for the pricehubble gem. class Configuration include ActiveSupport::Configurable # Configure the API authentication credentials config_accessor(:username) { ENV.fetch('PRICEHUBBLE_USERNAME', nil) } config_accessor(:password) { ENV.fetch('PRICEHUBBLE_PASSWORD', nil) } # The base URL of the API (there is no staging/canary # endpoint we know about) config_accessor(:base_url) do val = ENV.fetch('PRICEHUBBLE_BASE_URL', 'https://api.pricehubble.com') val.strip.chomp('/') end # The logger instance to use (when available we use the +Rails.logger+) config_accessor(:logger) do next(Rails.logger) if defined? Rails Logger.new($stdout) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pricehubble-0.1.0 | lib/pricehubble/configuration.rb |