Skip to content

Instantly share code, notes, and snippets.

View jschoolcraft's full-sized avatar

Jeff Schoolcraft jschoolcraft

View GitHub Profile
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 |
set :stages, %w(staging production)
require 'capistrano/ext/multistage'
#!/bin/sh
trap "exit 2" 1 2 3 13 15
OPTS="--no-rdoc --no-ri"
if [ -f "/etc/lsb-release" ]; then
### bootstrap with git.
apt-get update -y && apt-get upgrade -y --force-yes && apt-get install -y git-core
We couldn’t find that file to show.
## Error:
undefined method `calculate_state_revenue' for #<Shop:0x105be6490>
@jschoolcraft
jschoolcraft / spec_helper.rb
Created September 10, 2009 12:27
This is how I spec AuthLogic be9-acl9 using rspec
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
# from the project root directory.
ENV["RAILS_ENV"] ||= 'test'
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
require 'spec/autorun'
require 'spec/rails'
require 'webrat'
require 'remarkable_rails'
require "email_spec/helpers"
require "email_spec/matchers"
##
# rSpec Hash additions.
#
# From
# * http://wincent.com/knowledge-base/Fixtures_considered_harmful%3F
# * Neil Rahilly
class Hash
#!/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
# for better logging put this at the bottom of your config/environment.rb
if "irb" == $0
ActiveRecord::Base.logger = Logger.new(STDOUT)
end
Last updated: Thu, 19 Nov 2009 02:30:08 GMT
Extensions (enabled: 38, disabled: 0):
* 1Password 2.11.1
* Adblock Plus 1.1.1
* Alexa Sparky 1.4.5
* App Tabs 0.5.1
* BugMeNot 2.2
* Clear Private Data... + 0.2.3
* CLEO 4.3