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
#This will the fixup command to git | |
#git fixup $commit will use your current index to fixup the specified commit | |
#This is done by doing git commit --fixup $commit and then using rebase with autosquash | |
#Based upon http://stackoverflow.com/a/21148981/460564 | |
[alias] | |
fixup = "!sh -c '(git diff-files --quiet || (echo Unstaged changes, please commit or stash with --keep-index; exit 1)) && COMMIT=$(git rev-parse $1) && git commit --fixup=$COMMIT && git rebase -i --autosquash $COMMIT~1' -" |
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 'mina/git' | |
require 'json' | |
set :domain, '0.0.0.0' | |
set :user, 'nodejs' | |
set :deploy_to, '/home/nodejs/api' | |
set :repository, 'git@.../api.git' | |
set :branch, 'master' | |
set :shared_paths, [ 'tmp' ] | |
set :term_mode, :pretty |
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
# config/locales/en.yml | |
en: | |
exception: | |
show: | |
not_found: | |
title: "Not Found" | |
description: "The page you were looking for does not exists." | |
internal_server_error: | |
title: "Internal Server Error" |
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
#Deploy and rollback on Heroku in staging and production | |
class RakeHerokuDeployer | |
def initialize app_env | |
@app = ENV["#{app_env.to_s.upcase}_APP"] | |
end | |
def run_migrations | |
push; turn_app_off; migrate; restart; turn_app_on; tag; | |
end |