Permalink
Browse files

Use ./bin/setup to improve new teammate onboarding

* Update documentation.
* Add Heroku remotes.
* Update copyright years.
* Don't ignore bin/setup.
* Use Pow-generated hostname in sample.env.

https://trello.com/c/DfNtu3Pv
1 parent 890e871 commit 737be4e5db378fbcf99b7278a44a2aa35039746d @croaky croaky committed Jan 23, 2013
Showing with 40 additions and 30 deletions.
  1. +1 −0 .gitignore
  2. +6 −25 CONTRIBUTING.md
  3. +5 −4 README.md
  4. +27 −0 bin/setup
  5. +1 −1 sample.env
View
@@ -24,6 +24,7 @@ vendor/bundler_gems
.env
/public/assets
bin/
+!bin/setup
coverage
.tddium*
vendor/cache
View
@@ -38,7 +38,6 @@ taken straight from the Ruby on Rails guide:
* Update the documentation, the surrounding one, examples elsewhere, guides,
whatever is affected by your contribution
-
Requirements
--------------
@@ -49,41 +48,25 @@ committing to the master branch.
Please remember this is open-source, so don't commit any passwords or API keys.
Those should go in config variables like `ENV['API_KEY']`.
-
Laptop setup
------------
Fork the repo and clone the app:
- git clone git@github.com:[GIT_USERNAME]/sched.do.git
-
-
-Install Bundler 1.2.0.pre or higher:
-
- gem install bundler --pre
+ git clone git@github.com:[GIT_USERNAME]/sched.do.git scheddo
Set up the app:
- cd sched.do
- bundle --binstubs
- rake db:setup
-
-Edit your .env file to store the keys given to you by Yammer:
+ cd scheddo
+ ./bin/setup
- cp sample.env .env
- vi .env
+Run the server:
-Run the server using [foreman:](https://github.com/ddollar/foreman)
-
- foreman start -p 3000
-
-We use foreman because it picks up the `.env` file. Also, it will use Thin as
-the app server instead of Webrick, same as Heroku's Cedar stack.
+ foreman start
Check it out:
- http://localhost:3000
-
+ http://scheddo.dev
Running tests
-------------
@@ -103,7 +86,6 @@ working on. In that case, specify a line number:
rspec spec/models/user_spec.rb:8
-
Syntax
------
@@ -116,7 +98,6 @@ Syntax
And in case we didn't emphasize it enough: we love tests!
-
Development process
-------------------
View
@@ -9,24 +9,25 @@ everybody.
This app showcases Yammer integration such as adding activity messages,
messaging your friends, messaging groups, and open graph integration.
-
Contributing
------------
To contribute to this project, see the [CONTRIBUTING.md](https://github.com/yammer/sched.do/blob/master/CONTRIBUTING.md) file.
-
Most importantly
----------------
+
Have fun!
Selected Licenses
--------------------------
+-----------------
+
[jQuery UI](http://jqueryui.com/) is used under the [MIT License](http://jquery-ui.googlecode.com/svn/tags/latest/MIT-LICENSE.txt)
[jQuery Waypoints](http://imakewebthings.com/jquery-waypoints/) is used under the [MIT License](https://github.com/imakewebthings/jquery-waypoints/blob/master/MIT-license.txt)
License
-------
-sched.do is Copyright © 2012 Yammer, inc. It is free software and may be
+
+sched.do is Copyright © 2012-2013 Yammer, inc. It is free software and may be
redistributed under the terms specified in the [LICENSE](https://github.com/yammer/sched.do/blob/master/LICENSE) file.
View
@@ -0,0 +1,27 @@
+#!/usr/bin/env sh
+
+# Run this script immediately after cloning the codebase.
+# https://github.com/thoughtbot/guides/tree/master/protocol
+
+# Set up Ruby dependencies
+bundle install --binstubs=bin/stubs
+
+# Set up staging and production git remotes
+git remote add staging git@heroku.com:scheddo-staging.git
+git remote add production git@heroku.com:scheddo-prod.git
+
+# Set up database
+bundle exec rake db:setup
+
+# Set up configurable environment variables
+if [ ! -f .env ]; then
+ cp .sample.env .env
+fi
+
+# Set up DNS
+if [ ! -f ~/.pow ]; then
+ curl get.pow.cx | sh
+fi
+
+echo "port: 3100" > .foreman
+echo 3100 > ~/.pow/`basename $PWD`
View
@@ -16,7 +16,7 @@ AIRBRAKE_API_KEY=florida_keys
RACK_ENV=development
# Set as appropriate for environment.
-HOSTNAME=localhost:3000
+HOSTNAME=scheddo.dev
# Any long string works for the key.
ACCESS_TOKEN_ENCRYPTION_KEY=key

0 comments on commit 737be4e

Please sign in to comment.