(from a scratch install). Kinda, I imported my user home (~) from a Time Machine backup.
sudo mkdir /usr/local
sudo chown -R `whoami` /usr/local
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local
| source :rubygems | |
| gem 'sinatra', '1.0' | |
| gem 'gowalla', '~> 0.2.0' | |
| group :development do | |
| gem 'shotgun' | |
| end |
| SELECT "drawings".* FROM "drawings" | |
| INNER JOIN "assignment_tag_drawings" ON ("drawings"."id" = "assignment_tag_drawings"."drawing_id") | |
| INNER JOIN "assignment_tags" ON ("assignment_tags"."id" = "assignment_tag_drawings"."assignment_tag_id") | |
| WHERE (drawings.assignment_id = 12 | |
| AND assignment_tags.umbrella_category_id in ('29')) | |
| GROUP BY drawings.id | |
| HAVING count(DISTINCT umbrella_category_id) = 1 |
| # see http://github.com/intridea/oauth2 | |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'oauth2' | |
| require 'json' | |
| class ConnectionLogger < Faraday::Middleware | |
| def call(env) | |
| env[:response].on_complete do |env| | |
| puts "RESULT: #{env[:status]}\n#{env[:body]}" |
| # with homebrew | |
| mysql_install_db # set it up | |
| cd /usr/local/Cellar/mysql/5.1.41 ; /usr/local/Cellar/mysql/5.1.41/bin/mysqld_safe & # start it | |
| sudo gem uninstall mysql | |
| # specify ARCHFLAGS and homebrew mysql_config location | |
| sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/Cellar/mysql/5.1.41/bin/mysql_config |
| run "rm public/index.html" | |
| generate(:rspec) | |
| generate(:cucumber) | |
| plugin 'resource_controller', :git => 'git://github.com/jamesgolick/resource_controller.git' | |
| plugin 'flash-message-conductor', :git => 'git://github.com/planetargon/flash-message-conductor.git' | |
| gem "formtastic" | |
| gem "pickle" | |
| gem "machinist" |
| # Set up .gitignore | |
| file '.gitignore', <<-GITIGNORE | |
| config/database.yml | |
| log/*.log | |
| tmp/**/* | |
| .DS\_Store | |
| .DS_Store | |
| db/test.sqlite3 | |
| db/development.sqlite3 | |
| /log/*.pid |
| # include this in application controller | |
| module Authentication | |
| protected | |
| # Inclusion hook to make #current_user and #signed_in? | |
| # available as ActionView helper methods. | |
| def self.included(base) | |
| base.send :helper_method, :current_user, :signed_in?, :authorized? if base.respond_to? :helper_method | |
| end | |
| # Returns true or false if the user is signed in. |