Skip to content

Instantly share code, notes, and snippets.

@corny
corny / git.cap
Created November 14, 2013 01:31
Capistrano 3 with Git Submodules
# Save this file as lib/capistrano/tasks/git.cap
namespace :git do
desc 'Copy repo to releases'
task create_release: :'git:update' do
on roles(:all) do
with fetch(:git_environmental_variables) do
within repo_path do
execute :git, :clone, '-b', fetch(:branch), '--recursive', '.', release_path
end
module ActiveRecord
module Querying
delegate :group_date, :to => :scoped
end
module QueryMethods
def group_date(column_name = nil, group_by = nil)
return self if column_name.blank?
# Rails uses a non standard time zone naming.
class Etank < RTanque::Bot::Brain
NAME = 'etank'
include RTanque::Bot::BrainHelper
def tick!
self.switch_corners
self.fire
end
def fire