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/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant EmailSpec::BackgroundProcesses (NameError) | |
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing' | |
from /usr/local/lib/ruby/gems/1.8/gems/email_spec-0.3.8/lib/email_spec/deliveries.rb:71 | |
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require' | |
from /usr/local/lib/ruby/gems/1.8/gems/email_spec-0.3.8/lib/email_spec/helpers.rb:2 | |
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_suppo |
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
# Usage: | |
# | |
# class Comment < ActiveRecord::Base | |
# when_assigning :subject do |value| | |
# value.strip! | |
# super value | |
# end | |
# end | |
# | |
module ActiveRecord::WhenAssigning |
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
sed -i 's/git:\/\/\(git.justlanded.biz\)\//git@\1:/' .git/config |
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
module Webrat | |
module Matchers | |
class HaveXpath #:nodoc: | |
def initialize(expected, options = {}, &block) | |
@expected = expected | |
@options = options | |
@handler = options.delete(:handler) | |
@block = block | |
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
Then /^I should( not)? see a link to (.+)(?: with text "([^\"]*)")?$/ do |do_not, page_name, text| | |
url = path_to(page_name) | |
selector = "a:match_href('#{url}')" | |
if do_not | |
response_body.should_not have_selector(selector, :handler => CustomHandler::MatchHref.new) | |
else | |
response_body.should have_selector(selector, :handler => CustomHandler::MatchHref.new) do |element| | |
if text | |
element.should contain(text) |
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
;; jekyll support and config | |
;; http://github.com/metajack/jekyll/blob/master/emacs/jekyll.el | |
(require 'jekyll) | |
(setq jekyll-directory "/home/boston/development/mrdias.com/") | |
(setq jekyll-post-template "---\nlayout: post\ntitle: %s\n---\n\n") | |
(global-set-key (kbd "C-c j n") 'jekyll-draft-post) | |
(global-set-key (kbd "C-c j P") 'jekyll-publish-post) | |
(global-set-key (kbd "C-c j e") 'jekyll-insert-preview-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
module SaveAndOpenEmail | |
include Webrat::SaveAndOpenPage | |
def save_and_open_email(email) | |
return unless File.exist?(saved_page_dir) | |
filename = "#{saved_page_dir}/email-#{Time.now.to_i}.html" | |
File.open(filename, "w") do |f| | |
f.write rewrite_css_and_image_references(email.to_s) | |
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
# Code based on http://mikewest.org/2009/11/my-jekyll-fork | |
module Jekyll | |
module Filters | |
def to_month(input) | |
return Date::MONTHNAMES[input.to_i] | |
end | |
def to_month_abbr(input) |
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
;; jekyll support and config | |
;; http://github.com/metajack/jekyll/blob/master/emacs/jekyll.el | |
(require 'jekyll) | |
(setq jekyll-directory "/home/boston/development/mrdias.com/") | |
(setq jekyll-post-template "---\nlayout: post\ntitle: %s\n---\n\n") | |
(global-set-key (kbd "C-c j n") 'jekyll-draft-post) | |
(global-set-key (kbd "C-c j P") 'jekyll-publish-post) | |
(global-set-key (kbd "C-c j e") 'jekyll-insert-preview-end) | |
(defun jekyll-insert-preview-end () | |
"Insert the comment to mark the end of the post preview" |
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
# Original Source: http://www.natontesting.com/2010/01/11/updated-script-to-list-all-cucumber-step-definitions/ | |
namespace :cucumber do | |
desc "Generate all step definitions report, opens file in a new browser if you have launchy gem" | |
task :step_definitions do | |
step_definition_dir = "./features/step_definitions" | |
output_file = "step_definitions.html" | |
f = File.new(output_file, "w") |