Permalink
Browse files

Improve Project Setup and Development sections

  • Loading branch information...
1 parent e2f855e commit db3ce1a9a3f3337cde6ab14a144142fe0408c21e @croaky croaky committed Jul 27, 2012
Showing with 45 additions and 50 deletions.
  1. +45 −50 README.md
View
@@ -9,24 +9,27 @@ Laptop setup
Set up your laptop with [this script](https://github.com/thoughtbot/laptop)
and [these dotfiles](https://github.com/thoughtbot/dotfiles).
-Getting the code:
+Project setup
+-------------
+
+Get the code.
git clone git@github.com:organization/project.git
-Set up the project's dependencies:
+Set up the project's dependencies.
cd project
bundle --binstubs
rake db:create
rake db:schema:load
-Add Heroku remotes for staging and production environments:
+Add Heroku remotes for staging and production environments.
git remote add staging git@heroku.com:<app>-staging.git
git remote add production git@heroku.com:<app>-production.git
Use [Heroku config](https://github.com/ddollar/heroku-config) to get `ENV`
-variables:
+variables.
heroku config:pull --app <app>-staging
@@ -38,51 +41,51 @@ You'll see credentials as config vars. Delete lines that don't apply.
S3_KEY
S3_SECRET
-Use foreman to run the app locally:
+User stories
+------------
+
+* Add stories as a team to [Trajectory](https://www.apptrajectory.com).
+* The client is responsible for prioritizing stories.
+* The designers and developers are responsible for estimating stories.
+* Write stories in the form `As a [user role], I want to [goal], so that
+ [reason].`
+
+Development
+-----------
+
+Start a user story.
+
+Create a local feature branch based off master.
+
+ git checkout master
+ git pull
+ git checkout -b feature-xyz
+
+Use foreman to run the app locally.
foreman start
It will pick up your `.env` file, and run declared processes from `Procfile`,
just like Heroku's [Cedar](https://devcenter.heroku.com/articles/cedar/) stack.
-Run the whole test suite with:
+Run the whole test suite with.
rake
-Run individual features:
+Run individual features.
cucumber features/visitor/signs_in.feature
-Run individual specs:
+Run individual specs.
rspec spec/models/user_spec.rb
-Run individual tests by line number:
+Run individual tests by line number.
rspec spec/models/user_spec.rb:8
cucumber features/visitor/signs_in.feature:50
-User stories
-------------
-
-* Add stories as a team to [Trajectory](https://www.apptrajectory.com).
-* The client is responsible for prioritizing stories.
-* The designers and developers are responsible for estimating stories.
-* Write stories in the form `As a [user role], I want to [goal], so that
- [reason].`
-
-Git-based development
----------------------
-
-Start a user story.
-
-Create a local feature branch based off master.
-
- git checkout master
- git pull
- git checkout -b feature-xyz
-
-Do work in your branch. Make sure tests pass and commit the changes.
+When feature is complete and tests pass, commit the changes.
rake
git add -A
@@ -109,17 +112,13 @@ Code review
A team member other than the author should review the code before it is merged.
-When you review a teammate's code, you can read it in the Github web interface
-and make comments on each line.
+Read the pull request on Github. Comment directly on lines of code.
-You might also want to check out the branch to run tests:
+For larger features, check out the branch.
git checkout <branch>
rake db:migrate
rake
-
-Read the code:
-
git diff origin/master..HEAD
If you see any style guide violations, opportunities for better names, or other
@@ -129,9 +128,7 @@ View the feature in the browser. Click around.
Ask questions of your teammate in a comment on the pull request or in Campfire.
-When the feature is ready to be merged, comment on the pull request:
-
- Ready to squash and merge.
+Comment on the pull request `Ready to squash and merge.`
Deploy
------
@@ -164,31 +161,29 @@ Delete your local feature branch.
git branch -d [branch]
-Close pull request and leave a comment:
-
- Merged.
+Close pull request and comment `Merged.`
-Merge master into the staging branch:
+Merge master into the staging branch.
git checkout staging
git reset --hard staging/master
git log staging..master (view list of new commits)
git diff --stat origin/master (view changed files)
git merge master
-Deploy to [Heroku](https://devcenter.heroku.com/articles/quickstart):
+Deploy to [Heroku](https://devcenter.heroku.com/articles/quickstart).
- git push
+ git push staging
-Run migrations (if necessary):
+Run migrations (if necessary).
heroku rake db:migrate --app <app>
-Restart the dynos if migrations were run:
+Restart the dynos if migrations were run.
heroku restart --app <app>
-[Introspect](http://goo.gl/tTgVF) to make sure everything's ok:
+[Introspect](http://goo.gl/tTgVF) to make sure everything's ok.
watch heroku ps --app <app>
@@ -199,14 +194,14 @@ Write acceptance criteria on the story and "deliver" the story.
A team member other than the author should review the feature on staging based
on acceptance criteria.
-Deploy to production:
+Deploy to production.
git checkout production
git reset --hard production/master
git log production..staging (view list of new commits)
git diff --stat staging/master (view changed files)
git merge staging
- git push
+ git push production
heroku rake db:migrate --app <app>
heroku restart --app <app>
watch heroku ps --app <app>

0 comments on commit db3ce1a

Please sign in to comment.