README.md in couchbase-orm-1.0.0 vs README.md in couchbase-orm-1.1.0

- old
+ new

@@ -1,36 +1,45 @@ # Couchbase ORM for Rails +[![Build Status](https://secure.travis-ci.org/acaprojects/couchbase-orm.svg)](http://travis-ci.org/acaprojects/couchbase-orm) + ## Rails integration To generate config you can use `rails generate couchbase_orm:config`: - $ rails generate couchbase_orm:config - create config/couchbase.yml + $ rails generate couchbase_orm:config dev_bucket dev_user dev_password + => create config/couchbase.yml It will generate this `config/couchbase.yml` for you: common: &common hosts: localhost - password: + username: dev_user + password: dev_password development: <<: *common - bucket: default + bucket: dev_bucket test: <<: *common - bucket: app_name_test - password: for_test_bucket + bucket: dev_bucket_test # set these environment variables on your production server production: - hosts: <%= ENV['COUCHBASE_HOST'] || ENV['COUCHBASE_HOSTS'] %> - bucket: <%= ENV['COUCHBASE_BUCKET'] %> - password: <%= ENV['COUCHBASE_PASSWORD'] %> + hosts: <%= ENV['COUCHBASE_HOST'] || ENV['COUCHBASE_HOSTS'] %> + bucket: <%= ENV['COUCHBASE_BUCKET'] %> + username: <%= ENV['COUCHBASE_USER'] %> + password: <%= ENV['COUCHBASE_PASSWORD'] %> +Views are generated on application load if they don't exist or mismatch. +This works fine in production however by default in development models are lazy loaded. + # config/environments/development.rb + config.eager_load = true + + ## Examples ```ruby require 'couchbase-orm' @@ -165,9 +174,9 @@ The request above pulls the same database document each time and returns it. A simple O(1) operation. | Stat | Couchbase Ruby Model | Couchbase-ORM | | :--- | :--- | :--- | |Transactions|2500 hits|2500 hits| -|Elapsed time|12.24 secs|8.20 secs| -|Response time|0.88 secs|0.47 secs| -|Transaction rate|204.25 trans/sec|304.88 trans/sec| +|Elapsed time|12.24 secs|6.82 secs| +|Response time|0.88 secs|0.34 secs| +|Transaction rate|204.25 trans/sec|366.57 trans/sec| |Request Code|[ruby-model-app](https://github.com/QuayPay/coauth/blob/95bbf5e5c3b3340e5af2da494b90c91c5e3d6eaa/app/controllers/auth/authorities_controller.rb#L6)|[couch-orm-app](https://github.com/QuayPay/coauth/blob/87f6fdeaab784ba252a5d38bbcf9e6b0477bb504/app/controllers/auth/authorities_controller.rb#L8)|