Skip to content

Instantly share code, notes, and snippets.

View ericbeland's full-sized avatar

Eric Beland ericbeland

View GitHub Profile
@ericbeland
ericbeland / rspec_broken_link_check.rb
Created February 23, 2011 14:43
RSpec Matcher to Check All Links are Valid in a Rails View
@ericbeland
ericbeland / log_require_calls.rb
Created February 23, 2011 12:24
Log all calls to require in Ruby
# Logs calls to require so if a required file is blowing up, you can
# see the last require and diagnose. If your app stops booting, can be handy to
# find what borked things.
require 'logger'
class Object
def require(file_name)
log = Logger.new(File.join(File.dirname(__FILE__), 'required.log'))
log.debug("requiring: #{file_name}")