Added base file for better automated library loading support
This commit is contained in:
parent
bd481151d9
commit
d239d037fb
4 changed files with 19 additions and 1 deletions
12
README.md
12
README.md
|
@ -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
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
|
||||
gem 'samlown-couchrest'
|
||||
require 'couchrest'
|
||||
|
||||
require 'active_support'
|
||||
require 'mime/types'
|
||||
require "enumerator"
|
||||
|
|
4
lib/couchrest_extended_document.rb
Normal file
4
lib/couchrest_extended_document.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
|
||||
require File.join(File.dirname(__FILE__), "couchrest", "extended_document")
|
||||
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue