Created
December 23, 2010 17:12
-
-
Save DangerDawson/753254 to your computer and use it in GitHub Desktop.
A script which recreates the excon bug in ripple with key streaming
This file contains 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 '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