require 'pathname' require Pathname(__FILE__).dirname.parent.expand_path + 'lib/rest_adapter' DataMapper.setup(:default, { :adapter => 'rest', :format => 'xml', :host => 'localhost', :port => '3001' }) class Book include DataMapper::Resource property :author, String property :created_at, DateTime property :id, Integer, :serial => true property :title, String end