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
class Regexp | |
def self.from_glob(glob) | |
Regexp.new(['^',Regexp.escape(glob).gsub('\\*','(.*)').\ | |
gsub('\\\(.*)','\*').\ | |
gsub('\\[','([').\ | |
gsub('\\]','])').\ | |
gsub('\\?','(.)'),'$'].join) | |
end | |
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
env: | |
OSX v10.4.11 | |
Python 2.5 | |
mercurial v1.2.1 | |
git v1.6.3.1 | |
repos: | |
using python repository as of 2009-06-18 |
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
class Bitly | |
include HTTParty | |
base_uri 'api.bit.ly' | |
default_params :version=>'2.0.1' | |
format :json | |
def initialize(login, key) | |
@auth = {:login => login, :apiKey => key} |
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
require File.dirname(__FILE__) + '/models' | |
class ActiveWoningnet | |
def initialize | |
@address = "<address known>" | |
@b = Selenium::Client::Driver.new("localhost", 4444, "*firefox", @address, 10000); | |
@b.start_new_browser_session | |
end | |
def login |