Skip to content

Instantly share code, notes, and snippets.

@greatseth
Created October 16, 2008 02:56
Show Gist options
  • Select an option

  • Save greatseth/17066 to your computer and use it in GitHub Desktop.

Select an option

Save greatseth/17066 to your computer and use it in GitHub Desktop.
@cred.each do |c|
error = proc { |d,e| error e.inspect }
start = proc { |d| info "Fetching feed for #{c['name']}" }
finish = proc { |d| info "Fetch of #{c['name']} complete" }
# procs = { :error => error, :start => start, :progress => progress, :finish => finish }
dl = download "https://#{c['username']}:#{c['password']}@mail.google.com/mail/feed/atom" do |d|
flow do
info d.response.body.inspect
para c["name"], " (", Hpricot(d.response.body).at("fullcount").inner_html, ")"
end
end
dl.error &error
dl.start &start
dl.finish &finish
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment