1 # -*- encoding: binary -*-
3 # MogileFS is a Ruby client for Danga Interactive's open source distributed
6 # To read more about Danga's MogileFS: http://danga.com/mogilefs/
13 # Raised when a socket remains unreadable for too long.
15 class Error < StandardError; end
16 class UnreadableSocketError < Error; end
17 class SizeMismatchError < Error; end
18 class ChecksumMismatchError < RuntimeError; end
19 class ReadOnlyError < Error
20 def message; 'readonly mogilefs'; end
22 class EmptyPathError < Error; end
23 class UnsupportedPathError < Error; end
24 class RequestTruncatedError < Error; end
25 class InvalidResponseError < Error; end
26 class UnreachableBackendError < Error; end
28 # IO.copy_stream was buggy in Ruby 1.9.2 and earlier
29 if RUBY_VERSION >= "1.9.3"
32 require "mogilefs/copy_stream"
33 X = MogileFS::CopyStream
36 # autoload rarely-used things:
37 autoload :Mysql, 'mogilefs/mysql'
38 autoload :Pool, 'mogilefs/pool'
39 autoload :Admin, 'mogilefs/admin'
42 require 'mogilefs/util'
43 require 'mogilefs/socket'
44 require 'mogilefs/backend'
45 require 'mogilefs/http_file'
46 require 'mogilefs/http_reader'
47 require 'mogilefs/client'
48 require 'mogilefs/bigfile'
49 require 'mogilefs/mogilefs'