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
file 'Gemfile', %{ | |
# directory "vendor/rails", :glob => "{*/,}*.gemspec" | |
# git "git://github.com/rails/arel.git" | |
# git "git://github.com/rails/rack.git" | |
clear_sources | |
bundle_path "vendor/bundler_gems" | |
source 'http://gemcutter.org' | |
source 'http://gems.github.com' | |
disable_system_gems |
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 ARGV.empty? | |
puts 'usage: ruby setup_project.rb [project_name] [git_user]' | |
return | |
end | |
def cmd text | |
puts text | |
result = `#{text}` | |
puts result | |
result |
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 ARGV.empty? | |
puts 'usage: ruby setup_project.rb [project_name] [git_user]' | |
return | |
end | |
require 'fileutils' | |
project = ARGV[0] | |
git_user = ARGV.size > 1 ? ARGV[1] : 'default_user_name' | |
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 'rubygems'; require 'pottery'; require 'mechanize'; require 'hpricot'; require 'open-uri'; require 'active_support' | |
class SoulMate | |
include Pottery | |
class << self | |
def find age='29', postcode='N1' | |
ids = find_ids age.to_s, postcode | |
ids.collect do |id| | |
soul_mate = restore(id.to_s) | |
unless soul_mate | |
begin |
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 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
require 'activesupport' | |
require 'morph' | |
Hpricot.buffer_size = 2621444 | |
@@step_off = 1 | |
def open_doc url |
NewerOlder