Skip to content

Instantly share code, notes, and snippets.

@DangerDawson
Created December 23, 2010 17:12
Show Gist options
  • Save DangerDawson/753254 to your computer and use it in GitHub Desktop.
Save DangerDawson/753254 to your computer and use it in GitHub Desktop.
A script which recreates the excon bug in ripple with key streaming
require 'ripple'
riak = Riak::Client.new( :http_backend => :Excon )
bucket_names = ["foobar"]
bucket_names.each do |bucket_name|
bucket = riak.bucket(bucket_name)
10.times do
new_one = Riak::RObject.new(bucket, "#{rand}")
new_one.content_type = "application/javascript" # You must set the content type.
new_one.data = "Hello, World!')"
new_one.store
end
bucket.keys do |keys|
keys.each do |key|
puts key
bucket.delete(key)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment