This file contains 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
/* | |
* twitter-entities.js | |
* This function converts a tweet with "entity" metadata | |
* from plain text to linkified HTML. | |
* | |
* See the documentation here: http://dev.twitter.com/pages/tweet_entities | |
* Basically, add ?include_entities=true to your timeline call | |
* | |
* Copyright 2010, Wade Simmons | |
* Licensed under the MIT license |
This file contains 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
def patiently(&block) | |
cycles = 0 | |
begin | |
yield | |
rescue => e | |
cycles += 1 | |
sleep 0.1 | |
if cycles < 10 | |
retry | |
else |
This file contains 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
# rubygems DNS is temporarily down, put this into your /etc/hosts to install gems, | |
# but don't forget to remove the entries once their DNS is back up again | |
72.4.120.124 rubygems.org | |
207.171.181.231 production.s3.rubygems.org | |
216.137.45.24 production.cf.rubygems.org |
This file contains 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
Given /^I visit subdomain "(.+)"$/ do |sub| | |
#host! "#{sub}.example.com" #for webrat | |
Capybara.default_host = "#{sub}.example.com" #for Rack::Test | |
Capybara.app_host = "http://#{sub}.example.com:9887" if Capybara.current_driver == :culerity | |
################################################################################ | |
# As far as I know, you have to put all the {sub}.example.com entries that you're | |
# using in your /etc/hosts file for the Culerity tests. This didn't seem to be | |
# required for Rack::Test | |
################################################################################ |