Instantly share code, notes, and snippets.

Embed
What would you like to do?
# gem install dm-fluiddb-adapter
require 'dm-core'
require 'memcached'
CACHE = Memcached.new 'localhost:11211', :prefix_key => 'fluiddb-test:'
DataMapper.setup(:default, "fluiddb://test:test@sandbox.fluidinfo.com/test")
class MyModel
include DataMapper::Resource
property :id, String, :key => true
property :name, String
end
# Ignore the 404 errors logged during the migration, it's just the adapter
# testing to see if the fluiddb tags/namespaces exist.
MyModel.auto_migrate!
MyModel.create(:name => 'Hello World')
puts MyModel.first.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment