Permalink
Browse files

Merge remote-tracking branch 'tgraham/automate_mac_setup'

Conflicts:
	Gemfile
	Gemfile.lock
  • Loading branch information...
2 parents 19a03cf + 8aae37e commit d1692b29965a7cc5397108fd4c5dc9ba71fedad6 @carols10cents carols10cents committed Oct 13, 2012
Showing with 128 additions and 33 deletions.
  1. +2 −0 Gemfile
  2. +39 −33 Gemfile.lock
  3. +17 −0 README.md
  4. +70 −0 script/setup_mac
View
@@ -24,6 +24,8 @@ group :production do
gem 'unicorn', "~> 4.0.1"
end
+gem 'thin', "~> 1.5.0"
+
gem 'omniauth', "~> 1.1.0"
gem "omniauth-twitter", "~> 0.0.12"
View
@@ -69,7 +69,7 @@ GEM
activesupport
builder
arel (3.0.2)
- bcrypt-ruby (3.0.0)
+ bcrypt-ruby (3.0.1)
bson (1.6.2)
bson_ext (1.6.2)
bson (~> 1.6.2)
@@ -81,9 +81,9 @@ GEM
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
- childprocess (0.3.4)
+ childprocess (0.3.5)
ffi (~> 1.0, >= 1.0.6)
- chunky_png (1.2.5)
+ chunky_png (1.2.6)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
@@ -97,44 +97,45 @@ GEM
sass (~> 3.1)
compass-rails (1.0.3)
compass (>= 0.12.2, < 0.14)
- crack (0.1.8)
+ crack (0.3.1)
daemons (1.1.9)
database_cleaner (0.6.7)
draper (0.11.1)
activesupport (>= 2.3.10)
erubis (2.7.0)
+ eventmachine (1.0.0)
exceptional (2.0.32)
rack
- execjs (1.2.4)
+ execjs (1.4.0)
multi_json (~> 1.0)
fabrication (1.2.0)
- faraday (0.8.2)
+ faraday (0.8.4)
multipart-post (~> 1.1)
- ffi (1.1.0)
+ ffi (1.1.5)
fssm (0.2.9)
haml (3.1.7)
- haml-rails (0.3.4)
- actionpack (~> 3.0)
- activesupport (~> 3.0)
- haml (~> 3.0)
- railties (~> 3.0)
+ haml-rails (0.3.5)
+ actionpack (>= 3.1, < 4.1)
+ activesupport (>= 3.1, < 4.1)
+ haml (~> 3.1)
+ railties (>= 3.1, < 4.1)
hashie (1.2.0)
hashr (0.0.22)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
- jquery-rails (1.0.12)
+ jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
- jquery-ui-rails (2.0.0)
+ jquery-ui-rails (2.0.1)
jquery-rails
railties (>= 3.1.0)
- json (1.7.4)
- kgio (2.6.0)
+ json (1.7.5)
+ kgio (2.7.4)
launchy (2.0.5)
addressable (~> 2.2.6)
libv8 (3.3.10.4)
- libwebsocket (0.1.4)
+ libwebsocket (0.1.5)
addressable
libxml-ruby (2.3.3)
mail (2.4.4)
@@ -144,7 +145,7 @@ GEM
metaclass (0.0.1)
mime-types (1.19)
minitest (2.12.1)
- mocha (0.11.1)
+ mocha (0.11.4)
metaclass (~> 0.0.1)
mongo (1.6.2)
bson (~> 1.6.2)
@@ -155,38 +156,38 @@ GEM
multi_json (1.3.6)
multipart-post (1.1.5)
mustache (0.99.4)
- newrelic_rpm (3.3.1)
+ newrelic_rpm (3.3.5)
nokogiri (1.5.5)
- oauth (0.4.6)
- omniauth (1.1.0)
+ oauth (0.4.7)
+ omniauth (1.1.1)
hashie (~> 1.2)
rack
omniauth-oauth (1.0.1)
oauth
omniauth (~> 1.0)
- omniauth-twitter (0.0.12)
+ omniauth-twitter (0.0.13)
multi_json (~> 1.3)
omniauth-oauth (~> 1.0)
opub (0.0.1)
- ostatus (0.0.11)
+ ostatus (0.0.12)
ratom (~> 0.7.0)
osub (0.0.7)
ostatus
ruby-hmac
- plucky (0.5.1)
+ plucky (0.5.2)
mongo (~> 1.5)
polyglot (0.3.3)
- pony (1.3)
+ pony (1.4)
mail (> 2.0)
pygmentize (0.0.3)
- quiet_assets (1.0.0)
- rails (~> 3.1)
+ quiet_assets (1.0.1)
+ railties (~> 3.1)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
- rack-test (0.6.1)
+ rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.8)
actionmailer (= 3.2.8)
@@ -203,7 +204,7 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
- raindrops (0.7.0)
+ raindrops (0.10.0)
rake (0.9.2.2)
ratom (0.7.2)
libxml-ruby (~> 2.3.2)
@@ -226,7 +227,7 @@ GEM
libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
- show_me_the_cookies (1.1.0)
+ show_me_the_cookies (1.1.3)
capybara (~> 1.0)
simple_oauth (0.1.9)
simplecov (0.4.2)
@@ -236,9 +237,13 @@ GEM
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- therubyracer (0.9.9)
+ therubyracer (0.9.10)
libv8 (~> 3.3.10)
- thor (0.15.4)
+ thin (1.5.0)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ thor (0.16.0)
tilt (1.3.3)
tire (0.4.3)
activemodel (>= 3.0)
@@ -254,7 +259,7 @@ GEM
multi_json (~> 1.3)
simple_oauth (~> 0.1.6)
tzinfo (0.3.33)
- uglifier (1.0.0)
+ uglifier (1.0.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
unicorn (4.0.1)
@@ -319,6 +324,7 @@ DEPENDENCIES
show_me_the_cookies (~> 1.1.0)
simplecov (~> 0.4.0)
therubyracer (~> 0.9.9)
+ thin (~> 1.5.0)
tire (~> 0.4.1)
twitter (~> 3.5.0)
tzinfo (~> 0.3.29)
View
@@ -67,6 +67,23 @@ with Ruby as of 1.9.2), and [bundler](http://gembundler.com/) on your machine.
If not, each of those links has instructions, and we're willing to help via
one of the contact methods above if you have issues.
+### Automation
+
+There is an automated script to get your dev environment setup on Mac OS X.
+From the app root directory, run ./script/setup_mac and enjoy the ride.
+If everything installs correctly and no errors are reported that you need to fix,
+you'll see the site loaded in your favorite browser.
+
+- mongodb
+ - Homebrew preferred for installing mongodb
+ - MacPorts should also work
+ - Take a look at the [mongodb-prefpane](https://github.com/ivanvc/mongodb-prefpane)
+
+
+If there are any errors reported, fix what you can and let us know what you can't.
+
+### Manual Setup
+
If you have any problems with the following rstat.us specific steps, _it is a
bug_. For example, [this is an issue with running a development environment on
windows](https://github.com/hotsh/rstat.us/issues/547) that we need to fix.
View
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+# Make sure we're on a Mac
+echo "### Checking we're on a Mac before moving on. ###"
+echo
+if [ "`uname -a | awk '{print $1}'`" != Darwin ] ; then
+ echo "### This is the automated setup script for Mac OS X only. ###"
+ exit 0
+else
+ echo "### We're good, checking for mongodb next. ###"
+ echo
+fi
+
+# Check for mongodb and installing it if missing
+if ! which mongod >/dev/null 2>&1 ; then
+ if which brew >/dev/null 2>&1 ; then
+ echo "### Installing mongodb. ###"
+ echo
+ brew update # potential for errors
+ brew install mongodb
+ elif which port >/dev/null 2>&1 ; then
+ echo "### Installing mongodb. ###"
+ echo
+ port install mongodb
+ else
+ echo "### You'll need to install from source since you don't have Homebrew or MacPorts installed. ###"
+ echo
+ open http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/#installing-from-10gen-builds
+ exit 1
+ fi
+else
+ # Make sure mongod is running
+ if ! ps aux | grep [m]ongod ; then
+ echo "### Starting mongodb. ###"
+ echo
+ mongod >/dev/null 2>&1 &
+ fi
+ echo "### mongodb is ready. Next up, Gems. ###"
+ echo
+fi
+
+# If rvm exists, lets copy the .rvmrc.example to .rvmrc before we do gem and bundle things
+echo "### Checking for rvm and getting our .rvmrc in place. ###"
+echo
+if which rvm >/dev/null 2>&1 ; then
+ $( cd "$( dirname "$0" )" && cd .. && cp .rvmrc.example .rvmrc )
+else
+ echo "### Didn't find rvm, moving right along. ###"
+ echo
+fi
+
+# Let's do the Gem dance
+echo "### Installing the 'bundler' gem if it's missing, then bundling our gems. ###"
+echo
+if ! which bundle >/dev/null 2>&1 ; then
+ gem install bundler
+fi
+# And now we bundle
+bundle install | grep -v 'Using'
+echo
+
+# Start the server and open the site
+echo "### Setup complete, starting the sever and opening localhost ###"
+echo
+thin start -d
+open http://localhost:3000
+
+PID=$(ps aux | grep "thin server" | grep -v grep | awk '{print $2}')
+echo "### To stop the server, run kill -9 $PID ###"
+echo

0 comments on commit d1692b2

Please sign in to comment.