Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| # JS files | |
| JS_FINAL = js/project-name-all.js | |
| JS_TARGETS = js/file1.js \ | |
| js/file2.js \ | |
| js/file3.js | |
| # CSS files | |
| CSS_FINAL = css/project-name-all.css | |
| STYLUS_TARGETS = css/file1.styl \ |
| # Update, upgrade and install development tools: | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get -y install build-essential | |
| apt-get -y install git-core | |
| # Install rbenv | |
| git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
| # Add rbenv to the path: |
| OS Setup | |
| - Install VMs (base OS = Ubuntu 11.04) | |
| - 6GB disk is not enough. Probably 20-40GB would be good. Mongo has a lot of compression and cleanup features coming. | |
| - Create user to run MongoDB as | |
| - Get DNS or Hosts file set up so all nodes in the cluster can talk to each other | |
| - Generate ssh-keygen -t rsa | |
| - Copy ssh public keys from each node to node01. Then cat all keys to authorized_keys. Then copy that file to each node. Each node will have ssh key trust now. You will also want to ssh from node01 to 02,03,04; from node02 to 01,03,04 etc to test it out. | |
| - Create an initial architecture: | |
| node01: master (replica set 1) | |
| node02: slave (replica set 1) |
| # %(mysite)s - run %(mysite)s instances (default is the main production instance) | |
| # | |
| # This runs gunicorn-django for %(mysite)s; to install: | |
| # * sudo ln -s <this file> /etc/init/%(mysite)s | |
| # * sudo initctl reload-configuration | |
| # | |
| # it expects the following directory layout: | |
| # | |
| # /home/%(mysite)s/public_html | |
| # \-env -> virtualenv |
| helpers do | |
| def protected! | |
| response = callcc do |cont| | |
| auth = Rack::Auth::Digest::MD5.new(cont, "Administrator only") do |username| | |
| "password" # username is ignored, or Password is always 'password' in this example. | |
| end | |
| auth.opaque = $$.to_s | |
| auth.call(request.env) | |
| end |
| require 'bcrypt' | |
| module EasyAuth | |
| # http://techspeak.plainlystated.com/2010/03/drop-dead-simple-authentication-for.html | |
| # To generate a crypted password (in irb): | |
| # require 'easy_auth' | |
| # EasyAuth.encrypt_password('my_password') # Put returned array in AUTHORIZED_USERS | |
| AUTHORIZED_USERS = { |