lib/vkontakte_api/configuration.rb in vkontakte_api-1.1 vs lib/vkontakte_api/configuration.rb in vkontakte_api-1.2

- old
+ new

@@ -11,10 +11,11 @@ :app_secret, :redirect_uri, :adapter, :http_verb, :faraday_options, + :max_retries, :logger, :log_requests, :log_errors, :log_responses ] @@ -29,15 +30,18 @@ DEFAULT_ADAPTER = Faraday.default_adapter # Default HTTP verb for API methods. DEFAULT_HTTP_VERB = :post + # Default max retries count. + DEFAULT_MAX_RETRIES = 2 + # Logger default options. DEFAULT_LOGGER_OPTIONS = { - :requests => true, - :errors => true, - :responses => false + requests: true, + errors: true, + responses: false } # A global configuration set via the block. # @example # VkontakteApi.configure do |config| @@ -52,9 +56,10 @@ # Reset all configuration options to defaults. def reset @adapter = DEFAULT_ADAPTER @http_verb = DEFAULT_HTTP_VERB @faraday_options = {} + @max_retries = DEFAULT_MAX_RETRIES @logger = ::Logger.new(STDOUT) @log_requests = DEFAULT_LOGGER_OPTIONS[:requests] @log_errors = DEFAULT_LOGGER_OPTIONS[:errors] @log_responses = DEFAULT_LOGGER_OPTIONS[:responses] end