This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'hydra' | |
require 'hydra/tasks' | |
if ENV['RAILS_ENV'] == 'test' | |
Hydra::TestTask.new('hydra:spec') do |t| | |
t.add_files 'spec/**/*_spec.rb' | |
end | |
else | |
puts "No Hydra task unless you're running with RAILS_ENV=test" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -z $(which ruby | grep '.rvm') ]; then | |
echo "Switch to system ruby!" | |
exit 1 | |
fi | |
echo "Building latest MacVim..." | |
sudo port activate libiconv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ENV['COVERAGE'] | |
require 'cover_me' | |
class CoverMe::HtmlAndConsoleFormatter < CoverMe::HtmlFormatter | |
def format_index(index) | |
super | |
puts "\n\n[CoverMe] Current coverage: #{index.percent_tested}%" | |
end | |
end | |
CoverMe.config do |c| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# come here mr. ducky, i just want to punch you | |
module Capybara | |
class << self | |
def logger_target | |
@logger_target ||= StringIO.new | |
end | |
attr_writer :backtrace_clean_patterns | |
def backtrace_clean_patterns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// This fixes the most annoying thing I've ever seen on the ING DIRECT website. Sorry, ING DIRECT folks. | |
// @match https://secure.ingdirect.com/* | |
// ==/UserScript== | |
var waiter; | |
waiter = function() { | |
if (mask = document.getElementById('adWizardPopup_mask')) { | |
mask.parentNode.removeChild(mask); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Guardfile | |
require 'guard/guard' | |
class ::Guard::JohnIsAwesome < ::Guard::Guard | |
def start | |
puts "Whoa a guard." | |
end | |
def run_all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// npm install -g jsmeter | |
(function () { | |
var verbose = false; | |
var args = process.argv; | |
var fs = require("fs"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this writes out undefined step definitions, one per file, in the usual way that i do cucumber stuff. | |
# it saves a *lot* of copypaste from the terminal. still in progress as i refine the process. | |
# use it as a formatter: cucumber -f StepWriter --out features/step_definitions | |
# save it to support/env/step_writer.rb | |
require 'cucumber/formatter/io' | |
class StepWriter | |
include Cucumber::Formatter::Io |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run flay on your cucumber steps after a successful run. prevent bloat and | |
# promote reusability! | |
flay_exception = nil | |
flay_level = 32 # set me to a minimum sane level. don't go nuts refactoring! | |
# code should be cleaner when you're done, not become spaghetti. | |
After do |s| | |
flay_exception ||= s.exception | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For Debian Squeeze + Backports + OpenSSL 1.0.0 | |
# Part 1: Make a deb package of ruby: | |
# Get our deps | |
sudo su -c "echo deb http://backports.debian.org/debian-backports squeeze-backports main > /etc/apt/sources.list.d/squeeze-backports.list" | |
sudo apt-get update | |
sudo apt-get install -y python-setuptools python-dev build-essential dpkg-dev libopenssl-ruby ruby1.8-dev rubygems bison autoconf zlib1g zlib1g-dev libreadline6 libreadline6-dev libssl1.0.0 libssl-dev | |
# Get ruby | |
if [ ! -f ruby-1.9.3-p327.tar.gz ]; then |