Module: Strava::Web::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/strava/web/config.rb

Overview

Configuration module for web client HTTP settings.

This module manages HTTP-related configuration settings shared across all Strava web clients (API, OAuth, Webhooks), including proxy settings, SSL certificate validation, timeouts, and logging.

Examples:

Configure web client settings

Strava::Web.configure do |config|
  config.user_agent = 'MyApp/1.0'
  config.timeout = 30
  config.logger = Logger.new(STDOUT)
end

Constant Summary collapse

ATTRIBUTES =

Returns List of configurable HTTP attributes.

Returns:

  • (Array<Symbol>)

    List of configurable HTTP attributes

%i[
  proxy
  user_agent
  ca_path
  ca_file
  logger
  timeout
  open_timeout
].freeze

Instance Method Summary collapse

Instance Method Details

#resetvoid

This method returns an undefined value.

Reset configuration to default values.

Sets the user agent to the default client identifier and clears all optional settings (proxy, SSL certificates, timeouts, logger).



43
44
45
46
47
48
49
50
51
# File 'lib/strava/web/config.rb', line 43

def reset
  self.user_agent = "Strava Ruby Client/#{Strava::VERSION}"
  self.ca_path = nil
  self.ca_file = nil
  self.proxy = nil
  self.logger = nil
  self.timeout = nil
  self.open_timeout = nil
end