lib/access/request.rb in access-2.0.29 vs lib/access/request.rb in access-2.0.30

- old
+ new

@@ -3,11 +3,11 @@ include HTTParty attr_reader :url, :headers, :timeout, :return_json, :use_hasify def base_setup(path, api_type, options) - @url = set_base(api_type, path, options.delete(:api_environment)) + @url = set_base(path, api_type, options.delete(:api_environment)) @headers = set_headers options.delete(:access_token) @timeout = options.delete(:access_timeout) || Access.config.access_timeout @return_json = should_return_json?(options.delete(:return_json)) @use_hasify = hashify_results?(options.delete(:hashify)) end @@ -68,10 +68,10 @@ raise Access::Error::NoData end private - def set_base(api_type, path, environment) + def set_base(path, api_type, environment) if environment "https://#{ api_type }#{ Access::Config::DOMAINS[environment] }.adcrws.com/v1#{path}" else "https://#{ api_type }#{ Access::Config::DOMAINS[Access.config.api_environment] }.adcrws.com/v1#{path}" end