Skip to content

Instantly share code, notes, and snippets.

@elisehuard
elisehuard / lark_template.rb
Created August 21, 2009 13:58
removing states and metric-fu for rails rumble
# download, from_repo, and commit_state methods swiped from
# http://github.com/Sutto/rails-template/blob/07b044072f3fb0b40aea27b713ca61515250f5ec/rails_template.rb
require 'open-uri'
def download(from, to = from.split("/").last)
#run "curl -s -L #{from} > #{to}"
file to, open(from).read
rescue
puts "Can't get #{from} - Internet down?"