lib/rmega/options.rb in rmega-0.1.7 vs lib/rmega/options.rb in rmega-0.2.0

- old
+ new

@@ -1,17 +1,34 @@ -require 'ostruct' - module Rmega def self.default_options { - upload_timeout: 120, + thread_pool_size: 4, max_retries: 10, - retry_interval: 1, - api_request_timeout: 20, + retry_interval: 3, + http_open_timeout: 180, + http_read_timeout: 180, + # http_proxy_address: '127.0.0.1', + # http_proxy_port: 8080, + show_progress: true, + file_integrity_check: true, api_url: 'https://eu.api.mega.co.nz/cs' } end def self.options @options ||= OpenStruct.new(default_options) + end + + module Options + extend ActiveSupport::Concern + + def options + Rmega.options + end + + module ClassMethods + def options + Rmega.options + end + end end end