Added base file for better automated library loading support

This commit is contained in:
Sam Lown 2010-05-11 00:15:40 +02:00
parent bd481151d9
commit d239d037fb
4 changed files with 19 additions and 1 deletions

View file

@ -11,6 +11,8 @@ Note: CouchRest only supports CouchDB 0.9.0 or newer.
## Usage
### General
require 'couchrest/extended_document'
class Cat < CouchRest::ExtendedDocument
@ -19,6 +21,16 @@ Note: CouchRest only supports CouchDB 0.9.0 or newer.
end
### Rails
In your environment.rb file require the gem as follows:
Rails::Initializer.run do |config|
....
config.gem "couchrest_extended_document"
....
end
## Testing
The most complete documentation is the spec/ directory. To validate your

View file

@ -1,5 +1,7 @@
gem 'samlown-couchrest'
require 'couchrest'
require 'active_support'
require 'mime/types'
require "enumerator"

View file

@ -0,0 +1,4 @@
require File.join(File.dirname(__FILE__), "couchrest", "extended_document")

View file

@ -1,7 +1,7 @@
require "rubygems"
require "spec" # Satisfies Autotest and anyone else not using the Rake tasks
require File.join(File.dirname(__FILE__), '..','lib','couchrest','extended_document')
require File.join(File.dirname(__FILE__), '..','lib','couchrest_extended_document')
# check the following file to see how to use the spec'd features.
unless defined?(FIXTURE_PATH)