Skip to content

Instantly share code, notes, and snippets.

@shanesveller
Created December 9, 2008 18:55
Show Gist options
  • Save shanesveller/34031 to your computer and use it in GitHub Desktop.
Save shanesveller/34031 to your computer and use it in GitHub Desktop.
require 'rubygems'
require "extlib"
require "merb-core"
require "dm-core"
require "dm-timestamps"
require "dm-types"
require "dm-validations"
class Toon
include DataMapper::Resource
property :id, Serial
property :name, String
property :realm, String
property :guild, String
property :level, Integer
property :race, String
property :klass, String
timestamps :at
validates_present :name, :realm
end
DataMapper.setup(:default, 'sqlite3::memory:')
Toon.auto_migrate!
@toon = Toon.create(:name => "Kahk", :realm => "Stormscale")
p Toon.first
abstract (1.0.0)
addressable (2.0.1)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
data_objects (0.9.9)
defunkt-github (0.3.4)
diff-lcs (1.1.2)
dm-aggregates (0.9.8, 0.9.7)
dm-core (0.9.8, 0.9.7)
dm-migrations (0.9.8, 0.9.7)
dm-sweatshop (0.9.8, 0.9.7)
dm-timestamps (0.9.8, 0.9.7)
dm-types (0.9.8, 0.9.7)
dm-validations (0.9.8, 0.9.7)
do_sqlite3 (0.9.9)
erubis (2.6.2)
eventmachine (0.12.2)
extlib (0.9.9, 0.9.8)
fastthread (1.0.1)
gem_plugin (0.2.3)
god (0.7.11)
haml (2.0.5)
highline (1.5.0)
hoe (1.8.2)
hpricot (0.6.164)
json_pure (1.1.3)
mailfactory (1.4.0)
merb (1.0.4, 1.0.3)
merb-action-args (1.0.4, 1.0.3)
merb-assets (1.0.4, 1.0.3)
merb-auth (1.0.4, 1.0.3)
merb-auth-core (1.0.4, 1.0.3)
merb-auth-more (1.0.4, 1.0.3)
merb-auth-slice-password (1.0.4, 1.0.3)
merb-cache (1.0.4, 1.0.3)
merb-core (1.0.4, 1.0.3)
merb-exceptions (1.0.4, 1.0.3)
merb-gen (1.0.4, 1.0.3)
merb-haml (1.0.4, 1.0.3)
merb-helpers (1.0.4, 1.0.3)
merb-mailer (1.0.4, 1.0.3)
merb-more (1.0.4, 1.0.3)
merb-param-protection (1.0.4, 1.0.3)
merb-slices (1.0.4, 1.0.3)
merb_datamapper (1.0.4, 1.0.3)
mime-types (1.15)
mongrel (1.1.5)
nokogiri (1.0.7)
ParseTree (3.0.2, 2.1.1)
passenger (2.0.5)
rack (0.4.0)
rake (0.8.3)
randexp (0.1.4)
rspec (1.1.11)
ruby2ruby (1.2.1, 1.1.8)
rubyforge (1.0.1)
RubyInline (3.8.1)
sake (1.0.15)
sexp_processor (3.0.0)
templater (0.5.0)
thin (1.0.0)
thor (0.9.8)
uuidtools (1.0.7)
webrat (0.3.2)
wowr (0.4.0)
ZenTest (3.11.0)
data_objects (0.9.9)
dm-aggregates (0.9.8, 0.9.7)
dm-core (0.9.8, 0.9.7)
dm-timestamps (0.9.8, 0.9.7)
dm-types (0.9.8, 0.9.7)
dm-validations (0.9.8, 0.9.7)
do_sqlite3 (0.9.9)
extlib (0.9.9, 0.9.8)
merb (1.0.4, 1.0.3)
merb-core (1.0.4, 1.0.3)
$ ruby dm-error.rb
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment