Skip to content

Instantly share code, notes, and snippets.

@dugsmith
dugsmith / rails_serialize_411_bug.rb
Created June 9, 2014 22:21
Rails 4.1.x ActiveRecord serialize as JSON failing test
gem 'activerecord', '4.1.1'
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
# This connection will do for database-independent bug reports.
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
@dugsmith
dugsmith / common_production.rb
Created March 7, 2013 16:44
Capistrano Recipe to RSync from build server to app server
set :repository, '.'
set :scm, :none
set :deploy_via, :copy
set :user, 'your-user-name'
set :deploy_to, "your/application/dir"
namespace :deploy do
desc <<-DESC
@dugsmith
dugsmith / build.rb
Created March 7, 2013 16:08
Example Capistrano configuration to run RSpec tests on build instance
role :app, 'your-build-server-ip'
set :scm, :git
set :repository, "your-git-repo-url"
set :user, 'your-user-name'
set :deploy_to, "/Users/#{user}/deployments/build/#{application}"
set :deploy_via, :export
set :branch, 'master'
set :rails_env, 'build'