This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List of environments and their heroku git remotes (id: 'remote_name') | |
HEROKU_ENVIRONMENTS = { | |
staging: 'staging-remote-name', | |
production: 'production-remote-name' | |
} | |
namespace :deploy do | |
# Create rake tasks to deploy on Heroku environments | |
# $ rake -T deploy | |
# rake deploy:production # Deploy to production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'goliath' | |
require 'yajl' | |
# adapted from goliath/examples/async_upload.rb | |
class AsyncUpload < Goliath::API | |
use Goliath::Rack::Params # parse & merge query and body parameters | |
use Goliath::Rack::DefaultMimeType # cleanup accepted media types | |
use Goliath::Rack::Render, 'json' # auto-negotiate response format | |
def on_headers(env, headers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :gemcutter | |
gem 'goliath', :git => 'git://github.com/postrank-labs/goliath.git' | |
gem 'em-synchrony', :git => 'git://github.com/igrigorik/em-synchrony.git' |