Free Objectivist Books
This is the code for http://freeobjectivistbooks.org.
The purpose of this site is to match up students who want to read Objectivist books with donors who are willing to send them. The goal is to get more students reading Ayn Rand.
Free Objectivist Books is a community project. It lives at: https://github.com/jasoncrawford/freeobjectivistbooks
This README is a guide for developers who want to help out.
How to help
- Read this README
- Fork the repo
- Browse issues and milestones; find an issue to tackle, or add one of your own
- Assign the issue to yourself
- Code it up, including tests
- Send me a pull request
- I'll review it, pull it, and deploy
- Go to step 3
Here's how to get yourself set up to develop the app:
- Make sure you have Ruby 1.9.2 installed (on a Mac, you may have 1.8 by default). Check with
ruby -v. If you need to install or upgrade Ruby, I recommend RVM: https://rvm.io/
- Make sure you have Bundler installed: Try
bundle -vand do
gem install bundlerif needed.
- Fork the repo at https://github.com/jasoncrawford/freeobjectivistbooks, then clone it with
- Once you have the repo locally, you should be able to run
bundlein the project directory, and it will install all the dependencies (including Rails 3.1.3 if you don't already have it).
- Install Foreman if needed:
gem install foreman. Then you can run the app using
foreman start. That runs both the server and a delayed_jobs worker thread. (This will run the app at port 5000, not 3000 as is the default when you run
rails server.) Go to http://localhost:5000 to see the app.
- To make sure everything is working, run
rake testto run all the tests.
Let me know if you have any trouble at all getting set up; I'm happy to help, and I'll update these instructions for the next developer, as well.
- Use GitHub to manage workflow: issues, pull requests, etc.
- Follow Ruby & Rails conventions.
- Develop for Ruby 1.9.2 (it's what we use in production on Heroku).
- Write fat models and skinny controllers.
- Write tests for everything. We should be able to deploy with confidence without manual regression testing. Run the tests (with
rake test) and make sure they're all green before submitting a pull request.
- Write brief class-level and (where appropriate) method-level comments suitable for RDoc.
- Create custom Rake tasks for any management commands, including any scheduled tasks.
- Use delayed jobs for any long-running task that can be done in the background.
- Long-running scheduled tasks should also be put in the delayed job queue.
A few practical tips
- Documentation is available (via RDoc); find it in doc/app/index.html and regenerate it with
- We use Delayed::Jobs for long-running tasks. Worth reading up on if you're touching notifications/reminders.
- We're using the 960 Grid System: http://960.gs/. You may want to familiarize yourself with it if you're touching views.
- Do your best work, and have fun!