Browse files

use datamapper4rail to get things working

Signed-off-by: Jeremy McAnally <>
  • Loading branch information...
mkristian authored and jm committed Mar 21, 2009
1 parent 4dad584 commit 939a0f5bc1d05694df2b98c488603263043fbdb5
Showing with 17 additions and 13 deletions.
  1. +17 −13 datamapper.rb
@@ -1,28 +1,32 @@
# inspired by
-# have specs
-plugin 'rspec',
- :git => 'git://'
-plugin 'rspec-rails',
- :git => 'git://'
# get all datamapper related gems (assume sqlite3 to be database)
gem "addressable", :lib => "addressable/uri"
-gem "data_objects"
gem "do_sqlite3"
-gem "dm-core"
-gem "rails_datamapper"
+gem 'dm-validations'
+gem 'dm-timestamps'
+gem "rspec", :lib => false
+gem "rspec-rails", :lib => false
+gem "datamapper4rail", :lib => 'datamapper4rails' # excuse the typo
rake "gems:install"
+# have specs
# install datamapper rake tasks
-# fix config/environment.rb to work with datamapper instead of active_record
-run "sed -i config/environment.rb -e 's/#.*config.plugins.*/config.plugins = [ :rails_datamapper, :all ]/'"
+# fix config files to work with datamapper instead of active_record
run "sed -i config/environment.rb -e 's/#.*config.frameworks.*/config.frameworks -= [ :active_record ]/'"
+run "sed -i spec/spec_helper.rb -e 's/^\\s*config[.]/#\\0/'"
+run "sed -i test/test_helper.rb -e 's/^[^#]*fixtures/#\\0/'"
+# fix a problem with missing class constants for models woth relations
+initializer 'preload_models.rb', <<-CODE
+require 'datamapper4rails/preload_models'
# set up git
git :init

0 comments on commit 939a0f5

Please sign in to comment.