Skip to content

Instantly share code, notes, and snippets.

View jschoolcraft's full-sized avatar

Jeff Schoolcraft jschoolcraft

View GitHub Profile
#foo.rb
class Foo
end
# bork.rb
require 'rubygems'
require 'active_record'
def bork
5.times do
Feature: the homepage
# TODO: Add code for comments count
Scenario: A visitor should the latest published posts
Given the following posts
| title | body | published_at | created_at |
| Post #1 | This is post #1 | 14 July 2009 23:49:04 | 14 July 2009 23:49:04 |
| Post #2 | This is post #2 | | 15 July 2009 23:49:04 |
| Post #3 | This is post #3 | 16 July 2009 23:49:04 | 16 July 2009 23:49:04 |
| Post #4 | This is post #4 | | 17 July 2009 23:49:04 |
## Error:
undefined method `calculate_state_revenue' for #<Shop:0x105be6490>
#!/usr/bin/env ruby19
require 'net/http'
require 'uri'
require 'json'
# EDIT POST_RECEIVE_URL
POST_RECEIVE_URL = 'http://hostname:8910/repository-name/push'
old_head, new_head, ref = STDIN.gets.split
@jschoolcraft
jschoolcraft / .gitignore
Created December 22, 2009 13:42 — forked from mdp/.gitignore
mturk.yml
#!/usr/bin/env ruby
# Written by Kieran P
# http://github.com/KieranP
# http://twitter.com/k776
# http://k776.tumblr.com
#
# Feel free to fork and modify.
# If you do, send me a message on
# Github details changes and I'll
@jschoolcraft
jschoolcraft / Gemfile
Created January 27, 2010 14:22 — forked from rmanalan/.gems
gem 'rack-contrib', :git => 'git://github.com/rack/rack-contrib.git'
gem 'rack-rewrite'
gems:
autotest (4.2.9)
autotest-growl (0.2.4)
autotest-rails (4.1.0)
cucumber (0.7.0.beta.8)
cucumber-rails (0.3.0)
database_cleaner (0.5.2)
gherkin (1.0.22)
mongoid (2.0.0.beta4)
rspec (2.0.0.beta.8)
# These commands will help you setup the Rails test environment without problems
#
# MAKE SURE YOU HAVE VIRTUAL BOX INSTALLED http://www.virtualbox.org/wiki/Downloads
#
# Copy paste all of following commands in your normal terminal and the following things will happen:
# - rails_test_box dir is created
# - rails master branch is checkout in the dir rails
# - A Gemfile is created and all the gems to run the virtualbox are installed using bundler
# - The rails vagrant box is downloaded and added to your vagrant boxes
# - A Vagrantfile is created for vagrant
# Everything you need to do to get started with Rails 2.3.8
#
# As of June 14th, 2010 @ 2:30 p.m. MST
#
# This gist now features instructions to get Rails 3 up and running with:
# - Ruby 1.8.7-p174
# - Bundler 0.9.26
# - Cucumber 0.8.0
# - Rspec 1.3.0 + Rspec-Rails 1.3.2
# - RVM