B double-E double-R U N: Beer Run!
B double-E double-R U N: Beer Run!
All we need is a ten and a fiver,
A car and a key and a sober driver.
B double-E double-R U N: Beer Run!
-- Todd Snider, "Beer Run"
Each user nominates a prioritized list of their five favorite beers. Beer Run then uses a Borda count with truncated ballots and multiple winners to generate a list of beers prioritized for maximum average happiness amongst voters. Enough jargon for you? The point is, it makes an awesome list of everyone's favorite beers and you can buy beer that will make the group happy.
Mostly because after RailsConf 2011, we were excited to try out some new libraries we'd heard about and some Rails 3.1 features, so we thought up a simple app to play around with them.
Totally:
- Fork the project.
- Branch off master.
- Write some tests.
- Make 'em pass.
- Send pull request.
- Have a beer.
Beer Run uses Ruby 1.9.2 and Postgresql. Install those from whichever source you love the most.
Install gems:
$ bundle install
Set up the database:
$ rake db:setup
Run specs:
# rake spec
If everything's green, you should be good to go.
Set environment variables:
$ export [email protected]
If you're running on Heroku
$ herkou config:add [email protected] HEROKU=1
$ heroku addons:add sendgrid:starter
$ heroku addons:add cron:daily
The HEROKU var tells ActionMailer to use Sendgrid. You should also be aware that the cron
task will run each day at the same time you add it to heroku. So if you want emails to be
sent a 9:00am, you should execute that last command at 9:00am.