diff --git a/Rakefile b/Rakefile index 58c107f..e50faf0 100644 --- a/Rakefile +++ b/Rakefile @@ -22,6 +22,7 @@ spec = Gem::Specification.new do |s| s.executables << 'couchapp' s.add_dependency("json", ">= 1.1.2") s.add_dependency("rest-client", ">= 0.5") + s.add_dependency("extlib", ">= 0.9.6") end namespace :github do # thanks merb! diff --git a/lib/couchrest/core/model.rb b/lib/couchrest/core/model.rb index 2af8d6f..45119e7 100644 --- a/lib/couchrest/core/model.rb +++ b/lib/couchrest/core/model.rb @@ -1,4 +1,7 @@ +# = CouchRest::Model - ORM, the CouchDB way module CouchRest + # = CouchRest::Model - ORM, the CouchDB way + # # CouchRest::Model provides an ORM-like interface for CouchDB documents. It avoids all usage of method_missing, and tries to strike a balance between usability and magic. See CouchRest::Model::MagicViews#view_by for documentation about the view-generation system. For the other class methods, inspiried by DataMapper and ActiveRecord, see CouchRest::Model::ClassMethods. The InstanceMethods are pretty basic. # # ==== Example @@ -223,6 +226,8 @@ module CouchRest # # Custom views can be queried with :reduce => true to return reduce results. The default for custom views is to query with :reduce => false. # + # Views are generated (on a per-model basis) lazily on first-access. This means that if you are deploying changes to a view, the views for that model won't be available until generation is complete. This can take some time with large databases. Strategies are in the works. + # # To understand the capabilities of this view system more compeletly, it is recommended that you read the RSpec file at spec/core/model.rb. def view_by *keys opts = keys.pop if keys.last.is_a?(Hash)