Sha256: deb2dcc29f61f3fd1008e7daa95b56b5767fcb02916cf965b6333f806b32d497
Contents?: true
Size: 1.11 KB
Versions: 17
Compression:
Stored size: 1.11 KB
Contents
require "rails" require "browse_everything/version" require "browse_everything/engine" module BrowseEverything class InitializationError < RuntimeError; end autoload :Browser, 'browse_everything/browser' autoload :FileEntry, 'browse_everything/file_entry' module Driver autoload :Base, 'browse_everything/driver/base' autoload :FileSystem, 'browse_everything/driver/file_system' autoload :DropBox, 'browse_everything/driver/drop_box' autoload :SkyDrive, 'browse_everything/driver/sky_drive' autoload :Box, 'browse_everything/driver/box' autoload :GoogleDrive, 'browse_everything/driver/google_drive' end class << self def configure(value) if value.nil? or value.kind_of?(Hash) @config = value elsif value.kind_of?(String) @config = YAML.load(File.read(value)) else raise InitializationError, "Unrecognized configuration: #{value.inspect}" end end def config if @config.nil? configure(File.join(Rails.root.to_s,'config','browse_everything_providers.yml')) end @config end end end
Version data entries
17 entries across 17 versions & 1 rubygems