README.md in davber_couch_potato-0.3.0 vs README.md in davber_couch_potato-0.4.0

- old
+ new

@@ -20,10 +20,17 @@ * persisting objects by including the CouchPotato::Persistence module * declarative views with either custom or generated map/reduce functions * extensive spec suite +### Supported Environments + +* Ruby 1.8.7, 1.9.1, 1.9.2 +* CouchDB 1.0.1 + +(Supported means I run the specs against those before releasing a new gem.) + ### Installation Couch Potato is hosted as a gem which you can install like this: (sudo) gem install davber_couch_potato @@ -49,21 +56,43 @@ CouchPotato::Config.validation_framework = :validatable | :active_model #### Using with Rails -Add to your config/environment.rb: +Create a config/couchdb.yml: + default: &default + validation_framework: :active_model #optional + + development: + <<: *default + database: development_db_name + test: + <<: *default + database: test_db_name + production: + <<: *default + database: <%= ENV['DB_NAME'] %> + +#### Rails 2.x + +Add to your _config/environment.rb_: + config.gem 'davber_couch_potato', :source => 'http://gemcutter.org' config.frameworks -= [:active_record] # if you switch completely + +#### Rails 3.x -Then create a config/couchdb.yml: +Add to your _Gemfile_: - development: development_db_name - test: test_db_name - production: http://db.server/production_db_name + # gem 'rails' # we don't want to load activerecord so we can't require rails + gem 'railties' + gem 'actionpack' + gem 'actionmailer' + gem 'activemodel' + gem "couch_potato" -Alternatively you can also install Couch Potato directly as a plugin. +Note: please make sure that when you run `Date.today.as_json` in the Rails console it returns something like `2010/12/10` and not `2010-12-10` - if it does another gem has overwritten Couch Potato's Date patches - in this case move Couch Potato further down in your Gemfile or whereever you load it. ### Introduction This is a basic tutorial on how to use Couch Potato. If you want to know all the details feel free to read the specs and the [rdocs](http://rdoc.info/projects/langalex/couch_potato).