Sha256: 7b0ab67da844dabb386e2f0ccba3dd573c957a49a06637a38df48cbefb057df8

Contents?: true

Size: 746 Bytes

Versions: 1

Compression:

Stored size: 746 Bytes

Contents

require 'faraday'
require 'json'
require 'ostruct'

require 'uploadcare/api'
require 'uploadcare/version'

module Uploadcare
  DEFAULT_SETTINGS = {
      public_key: 'demopublickey',
      private_key: 'demoprivatekey',
      upload_url_base: 'https://upload.uploadcare.com',
      api_url_base: 'https://api.uploadcare.com',
      static_url_base: 'https://ucarecdn.com',
      api_version: '0.3',
      cache_files: true,
      auth_scheme: :secure
    }

  USER_AGENT = "uploadcare-ruby/#{Gem.ruby_version}/#{Uploadcare::VERSION}"


  def self.default_settings
    DEFAULT_SETTINGS
  end

  def self.user_agent(options={})
    return options[:user_agent].to_s if options[:user_agent]
    [USER_AGENT, options[:public_key]].join('/')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
uploadcare-ruby-1.1.0 lib/uploadcare.rb