Skip to content

Instantly share code, notes, and snippets.

View kevinmccaughey's full-sized avatar

Kevin McCaughey kevinmccaughey

View GitHub Profile
class TeamBuilder
attr_reader :domain, :params
def initialize(domain, params = {})
@domain = domain
@params = params
def build
kevinmccaughey / gist:5085720
Created March 4, 2013 21:12
Error from 'torquebox deploy'
kev@torquebox:~/torquebox_examples/rails_example$ torquebox deploy
Errno::ENOENT: No such file or directory - /jboss/standalone/deployments/rails_example-knob.yml
initialize at org/jruby/
open at org/jruby/
deploy_yaml at /home/kev/.rvm/gems/jruby-1.7.2@tb_rails_example/gems/torquebox-rake-support-2.1.2/lib/torquebox/deploy_utils.rb:244
deploy at /home/kev/.rvm/gems/jruby-1.7.2@tb_rails_example/gems/torquebox-2.1.2/bin/torquebox:97
__send__ at org/jruby/
run at /home/kev/.rvm/gems/jruby-1.7.2@tb_rails_example/gems/thor-0.17.0/lib/thor/task.rb:27
invoke_task at /home/kev/.rvm/gems/jruby-1.7.2@tb_rails_example/gems/thor-0.17.0/lib/thor/invocation.rb:120
dispatch at /home/kev/.rvm/gems/jruby-1.7.2@tb_rails_example/gems/thor-0.17.0/lib/thor.rb:344
kevinmccaughey / spec_watchr.rb
Created June 17, 2012 18:21 — forked from seven1m/spec_watchr.rb
watchr config for Rails + RSpec projects, uses Growl (Mac) or notify-send (Linux)
# put this in spec/watchr
# use with Spork
# run with `watchr spec/watchr`
# images are from Tango icon theme
# for added bonus:
# set keyboard shortcuts Ctrl-Alt-S to run "pkill -USR2 -f spork"
# ...and Ctrl-Alt-T to run "pkill -USR2 -f watchr"
kevinmccaughey / gist:2409551
Created April 17, 2012 22:39 — forked from hopsoft/gist:1122080
Rails Environment Based Behavior
# app/models/user.rb
class User < ActiveRecord::Base
# lib/user_logger.rb
module UserLogger
def self.included(mod)
mod.send :after_create, :log_creation