lib/dropbox.rb in dropbox-1.0.0 vs lib/dropbox.rb in dropbox-1.1.0

- old
+ new

@@ -6,25 +6,44 @@ require 'thread' require 'set' require 'time' require 'tempfile' -Dir.glob("#{File.expand_path File.dirname(__FILE__)}/extensions/*.rb") { |file| require file } -Dir.glob("#{File.expand_path File.dirname(__FILE__)}/dropbox/*.rb") { |file| require file } +require 'extensions/array' +require 'extensions/hash' +require 'extensions/module' +require 'extensions/object' +require 'extensions/string' +require 'extensions/to_bool' +require 'dropbox/memoization' +require 'dropbox/api' +require 'dropbox/entry' +require 'dropbox/event' +require 'dropbox/revision' +require 'dropbox/session' + # Container module for the all Dropbox API classes. module Dropbox # The API version this client works with. VERSION = "0" # The host serving API requests. HOST = "http://api.dropbox.com" # The SSL host serving API requests. SSL_HOST = "https://api.dropbox.com" # Alternate hosts for other API requests. - ALTERNATE_HOSTS = { 'event_content' => 'http://api-content.dropbox.com', 'files' => "http://api-content.dropbox.com" } + ALTERNATE_HOSTS = { + 'event_content' => 'http://api-content.dropbox.com', + 'files' => 'http://api-content.dropbox.com', + 'thumbnails' => 'http://api-content.dropbox.com' + } # Alternate SSL hosts for other API requests. - ALTERNATE_SSL_HOSTS = { 'event_content' => 'https://api-content.dropbox.com', 'files' => "https://api-content.dropbox.com" } + ALTERNATE_SSL_HOSTS = { + 'event_content' => 'https://api-content.dropbox.com', + 'files' => 'https://api-content.dropbox.com', + 'thumbnails' => 'https://api-content.dropbox.com' + } def self.api_url(*paths_and_options) # :nodoc: params = paths_and_options.extract_options! ssl = params.delete(:ssl) host = (ssl ? ALTERNATE_SSL_HOSTS[paths_and_options.first] : ALTERNATE_HOSTS[paths_and_options.first]) || (ssl ? SSL_HOST : HOST)