Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 737be4e5db378fbcf99b7278a44a2aa35039746d 1 parent 890e871
Dan Croak authored January 22, 2013
1  .gitignore
@@ -24,6 +24,7 @@ vendor/bundler_gems
24 24
 .env
25 25
 /public/assets
26 26
 bin/
  27
+!bin/setup
27 28
 coverage
28 29
 .tddium*
29 30
 vendor/cache
31  CONTRIBUTING.md
Source Rendered
@@ -38,7 +38,6 @@ taken straight from the Ruby on Rails guide:
38 38
 * Update the documentation, the surrounding one, examples elsewhere, guides,
39 39
   whatever is affected by your contribution
40 40
 
41  
-
42 41
 Requirements
43 42
 --------------
44 43
 
@@ -49,41 +48,25 @@ committing to the master branch.
49 48
 Please remember this is open-source, so don't commit any passwords or API keys.
50 49
 Those should go in config variables like `ENV['API_KEY']`.
51 50
 
52  
-
53 51
 Laptop setup
54 52
 ------------
55 53
 
56 54
 Fork the repo and clone the app:
57 55
 
58  
-    git clone git@github.com:[GIT_USERNAME]/sched.do.git
59  
-
60  
-
61  
-Install Bundler 1.2.0.pre or higher:
62  
-
63  
-    gem install bundler --pre
  56
+    git clone git@github.com:[GIT_USERNAME]/sched.do.git scheddo
64 57
 
65 58
 Set up the app:
66 59
 
67  
-    cd sched.do
68  
-    bundle --binstubs
69  
-    rake db:setup
70  
-
71  
-Edit your .env file to store the keys given to you by Yammer:
  60
+    cd scheddo
  61
+    ./bin/setup
72 62
 
73  
-    cp sample.env .env
74  
-    vi .env
  63
+Run the server:
75 64
 
76  
-Run the server using [foreman:](https://github.com/ddollar/foreman)
77  
-
78  
-    foreman start -p 3000
79  
-
80  
-We use foreman because it picks up the `.env` file. Also, it will use Thin as
81  
-the app server instead of Webrick, same as Heroku's Cedar stack.
  65
+    foreman start
82 66
 
83 67
 Check it out:
84 68
 
85  
-    http://localhost:3000
86  
-
  69
+    http://scheddo.dev
87 70
 
88 71
 Running tests
89 72
 -------------
@@ -103,7 +86,6 @@ working on. In that case, specify a line number:
103 86
 
104 87
     rspec spec/models/user_spec.rb:8
105 88
 
106  
-
107 89
 Syntax
108 90
 ------
109 91
 
@@ -116,7 +98,6 @@ Syntax
116 98
 
117 99
 And in case we didn't emphasize it enough: we love tests!
118 100
 
119  
-
120 101
 Development process
121 102
 -------------------
122 103
 
9  README.md
Source Rendered
@@ -9,24 +9,25 @@ everybody.
9 9
 This app showcases Yammer integration such as adding activity messages,
10 10
 messaging your friends, messaging groups, and open graph integration.
11 11
 
12  
-
13 12
 Contributing
14 13
 ------------
15 14
 
16 15
 To contribute to this project, see the [CONTRIBUTING.md](https://github.com/yammer/sched.do/blob/master/CONTRIBUTING.md) file.
17 16
 
18  
-
19 17
 Most importantly
20 18
 ----------------
  19
+
21 20
 Have fun!
22 21
 
23 22
 Selected Licenses
24  
--------------------------
  23
+-----------------
  24
+
25 25
 [jQuery UI](http://jqueryui.com/) is used under the [MIT License](http://jquery-ui.googlecode.com/svn/tags/latest/MIT-LICENSE.txt)
26 26
 
27 27
 [jQuery Waypoints](http://imakewebthings.com/jquery-waypoints/) is used under the [MIT License](https://github.com/imakewebthings/jquery-waypoints/blob/master/MIT-license.txt)
28 28
 
29 29
 License
30 30
 -------
31  
-sched.do is Copyright © 2012 Yammer, inc. It is free software and may be
  31
+
  32
+sched.do is Copyright © 2012-2013 Yammer, inc. It is free software and may be
32 33
 redistributed under the terms specified in the [LICENSE](https://github.com/yammer/sched.do/blob/master/LICENSE) file.
27  bin/setup
... ...
@@ -0,0 +1,27 @@
  1
+#!/usr/bin/env sh
  2
+
  3
+# Run this script immediately after cloning the codebase.
  4
+# https://github.com/thoughtbot/guides/tree/master/protocol
  5
+
  6
+# Set up Ruby dependencies
  7
+bundle install --binstubs=bin/stubs
  8
+
  9
+# Set up staging and production git remotes
  10
+git remote add staging git@heroku.com:scheddo-staging.git
  11
+git remote add production git@heroku.com:scheddo-prod.git
  12
+
  13
+# Set up database
  14
+bundle exec rake db:setup
  15
+
  16
+# Set up configurable environment variables
  17
+if [ ! -f .env ]; then
  18
+  cp .sample.env .env
  19
+fi
  20
+
  21
+# Set up DNS
  22
+if [ ! -f ~/.pow ]; then
  23
+  curl get.pow.cx | sh
  24
+fi
  25
+
  26
+echo "port: 3100" > .foreman
  27
+echo 3100 > ~/.pow/`basename $PWD`
2  sample.env
@@ -16,7 +16,7 @@ AIRBRAKE_API_KEY=florida_keys
16 16
 RACK_ENV=development
17 17
 
18 18
 # Set as appropriate for environment.
19  
-HOSTNAME=localhost:3000
  19
+HOSTNAME=scheddo.dev
20 20
 
21 21
 # Any long string works for the key.
22 22
 ACCESS_TOKEN_ENCRYPTION_KEY=key

0 notes on commit 737be4e

Please sign in to comment.
Something went wrong with that request. Please try again.