Skip to content

Instantly share code, notes, and snippets.

@bmizerany
Created April 21, 2011 23:39
Show Gist options
  • Save bmizerany/935724 to your computer and use it in GitHub Desktop.
Save bmizerany/935724 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'eventmachine'
require 'fraggle'
EM.run do
c = Fraggle.connect
paths = []
req = c.walk("/**", 1)
valid = Proc.new do |e|
paths << e.path+"="+e.value
end
done = Proc.new do
puts "rev #{req.rev} " + ("-"*25)
puts *paths
paths.clear
req = c.walk("/**", req.rev+1)
req.valid(&valid)
req.done(&done)
end
req.valid(&valid)
req.done(&done)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment