Sha256: 43c9f69b4f452594d807aecf83b3bea1276234eacdfc7c6efdc70b08b1b68b3a

Contents?: true

Size: 482 Bytes

Versions: 1

Compression:

Stored size: 482 Bytes

Contents

require 'riak'

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
riak-client-0.9.5 pkg/lk.rb