Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am alex-tan on github.
  • I am alextan (https://keybase.io/alextan) on keybase.
  • I have a public key whose fingerprint is B431 FD54 A624 8099 16C6 0C1B F509 574C C092 05BB

To claim this, I am signing this object:

vagrant-test (master) [01:12:16] $ vagrant up --provision --debug
INFO global: Vagrant version: 1.9.1
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_OLD_ENV_PAGER="less"
INFO global: VAGRANT_OLD_ENV_SSH_AUTH_SOCK="/private/tmp/com.apple.launchd.L7XEQWRcjV/Listeners"
INFO global: VAGRANT_OLD_ENV_TMPDIR="/var/folders/x4/0nr28wjx1591t4hs6qycfm3r0000gn/T/"
INFO global: VAGRANT_OLD_ENV___CF_USER_TEXT_ENCODING="0x1F5:0x0:0x0"
INFO global: VAGRANT_OLD_ENV_NVM_RC_VERSION=""
INFO global: VAGRANT_OLD_ENV_TERM="xterm-256color"
@alex-tan
alex-tan / update_content_dispositions.rake
Created February 12, 2016 20:32
Rake Task to Update AWS Content Dispositions of All Files in a Bucket
namespace :aws do
desc 'Update Dispositions'
task :update_dispositions => :environment do
bucket_name = ENV['BUCKET']
s3 = Aws::S3::Resource.new
bucket = s3.bucket(bucket_name)
bucket.objects.each do |obj|
key = obj.key
require 'spec_helper'
describe Record do
describe "move_to_state_two" do
before(:each) do
@record = Record.new
end
it "should call state_two_event" do
class Record < ActiveRecord::Base
state_machine :state, initial: :state_one do
state :state_one,
:state_two
before_transition to: :state_two,
do: :state_two_event
end