require "active_model"
require "active_model/callbacks"
require "active_model/conversion"
require "active_model/errors"
require "active_model/naming"
require "active_model/serialization"
require "active_model/translation"
require "active_model/validator"
require "active_model/validations"
require "active_model/dirty"

require "active_support/core_ext"
require "active_support/json"

require "mime/types"
require "enumerator"
require "time"
require "digest/md5"
require "yaml"
require "hashdiff"

require "bigdecimal" # used in typecast
require "bigdecimal/util" # used in typecast

require "couchrest"

require "couchrest/model"
require "couchrest/model/errors"
require "couchrest/model/server_pool"
require "couchrest/model/connection_config"
require "couchrest/model/configuration"
require "couchrest/model/translation"
require "couchrest/model/persistence"
require "couchrest/model/typecast"
require "couchrest/model/casted_by"
require "couchrest/model/dirty"
require "couchrest/model/property"
require "couchrest/model/property_protection"
require "couchrest/model/properties"
require "couchrest/model/casted_array"
require "couchrest/model/validations"
require "couchrest/model/callbacks"
require "couchrest/model/document_queries"
require "couchrest/model/extended_attachments"
require "couchrest/model/proxyable"
require "couchrest/model/associations"
require "couchrest/model/connection"
require "couchrest/model/designs/migrations"
require "couchrest/model/designs/design_mapper"
require "couchrest/model/designs/view"
require "couchrest/model/design"
require "couchrest/model/designs"

# Monkey patches applied to couchrest
require "couchrest/model/support/couchrest_database"

# Core Extensions
require "couchrest/model/core_extensions/hash"
require "couchrest/model/core_extensions/time_parsing"

# Base libraries
require "couchrest/model/embeddable"
require "couchrest/model/base"

# Design Migration support
require "couchrest/model/utils/migrate.rb"

# Add rails support *after* everything has loaded
require "couchrest/railtie" if defined?(Rails)
