danmayer / merb-simpledb-dm_example

an example merb app using SimpleDB with Merb-Auth

This URL has Read+Write access

commit  914a49e702ad8c203faaf7f94610815630123b19
tree    17a5cf62c0d8fabd404021440987e87283f9a9eb
parent  91984887244dd777cab98deede1a01025d337e2a
name age message
file .gitignore Thu Dec 18 20:07:01 -0800 2008 all the changes for foo and user admining [danmayer]
file README.textile Fri Jul 10 16:47:33 -0700 2009 updated the readme to point to the new head of ... [danmayer]
file Rakefile Thu Dec 18 18:38:04 -0800 2008 initial git commit [danmayer]
directory app/ Fri Jul 10 12:32:43 -0700 2009 updated to show ordering and limits and with th... [danmayer]
directory autotest/ Thu Dec 18 18:38:04 -0800 2008 initial git commit [danmayer]
directory config/ Fri Jul 10 12:33:59 -0700 2009 updated the database sample [danmayer]
directory doc/ Thu Dec 18 18:38:04 -0800 2008 initial git commit [danmayer]
directory lib/ Fri Jul 10 12:32:43 -0700 2009 updated to show ordering and limits and with th... [danmayer]
directory merb/ Thu Dec 18 18:38:04 -0800 2008 initial git commit [danmayer]
directory public/ Thu Dec 18 18:38:04 -0800 2008 initial git commit [danmayer]
directory spec/ Wed Jan 07 22:02:22 -0800 2009 fixed the tests and made a better readme [danmayer]
directory tasks/ Thu Dec 18 18:38:04 -0800 2008 initial git commit [danmayer]
README.textile

THE HEAD OF THIS WAS MOVED:
http://github.com/devver/merb-simpledb-dm_example/tree/master

Merb Simple DB example using MerbAuth / merb-auth-slice-password

author: Dan Mayer dan AT devver (.) net

What is it

This is an example merb application showing how to use merb with Amazon’s SimpleDB.The project uses the dm-adapter-simpledb, which can be found http://github.com/jeremyboles/dm-adapter-simpledb/tree/master the file is installed in the /lib

This example shows how to use merb-auth, merb-auth-slice-password, and how to create and protect resources which are stored on SimpleDB. If you don’t need authentication this is also just an easy to read simple app that serves as an example or a starting point for using Merb with SimpleDB.

Basic Setup

From Source


git clone git://github.com/danmayer/merb-simpledb-dm_example.git
cd merb-simpledb-dm_example
cp ./config/database.yml.example ./config/database.yml
edit database.yml and include your aws access_key and secret_key
rake db:automigrate
merb

Testing against SimpleDB from your dev box can be quite slow. I actually test against sqlite3, instead most of the time. I recommend running rake spec, once to make sure it all works against SimpleDB, but after that just edit your database.yml and change your test db like so:

test:
  <<:       *defaults   
  adapter:  sqlite3    
  database: sample_test.db

Then run ‘rake db:automigrate MERB_ENV=test’ to migrate the sqlite3 db. After that you can run your tests much faster.

Basic Merb-Auth instructions

This app setup follows the basic instructions for Merb-Auth but adds a few more examples to make things more clear.

http://github.com/wycats/merb/tree/master/merb-auth

some things have been slightly altered fromt he above tutorial but it should be fairly obvious and simple. If you have any problems please contact me.