Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

some cosmetic changes

  • Loading branch information...
commit fade29eb54fa390464bbcbc821b5a11d1898e336 1 parent 6b12f26
@mkristian authored
Showing with 19 additions and 18 deletions.
  1. +18 −18 datamapper_rails_templates.rb
  2. +1 −0  spec/spec_helper.rb
View
36 datamapper_rails_templates.rb
@@ -2,10 +2,10 @@
###################################################
# get all datamapper related gems
-gem "addressable", :lib => "addressable/uri"
+gem 'addressable', :lib => 'addressable/uri'
# assume sqlite3 to be database
-gem "do_sqlite3"
+gem 'do_sqlite3'
# assume you want to have validations and timestamps in your models
gem 'dm-validations'
@@ -14,25 +14,25 @@
gem 'dm-serializer' # to allow xml interface to work
# assume you prefer rspec over unit tests
-gem "rspec", :lib => false
-gem "rspec-rails", :lib => false
+gem 'rspec', :lib => false
+gem 'rspec-rails', :lib => false
# this pulls in rails_datamapper and rack_datamapper
-gem "datamapper4rails"
+gem 'datamapper4rails'
# install all gems
-rake "gems:install"
+rake 'gems:install'
# install specs rake tasks
-generate("rspec", "-f")
+generate('rspec', '-f')
# install datamapper rake tasks
-generate("datamapper_install")
+generate('datamapper_install')
# fix config files to work with datamapper instead of active_record
-environment ""
-environment "config.frameworks -= [ :active_record ]"
-environment "# deactive active_record"
+environment ''
+environment 'config.frameworks -= [ :active_record ]'
+environment '# deactive active_record'
gsub_file 'spec/spec_helper.rb', /^\s*config[.]/, ' #\0'
gsub_file 'test/test_helper.rb', /^[^#]*fixtures/, ' #\0'
@@ -42,16 +42,15 @@
# add middleware
def middleware(name)
- log "middleware", name
+ log 'middleware', name
environment "config.middleware.use '#{name}'"
end
-environment ""
-middleware "DataMapper::RestfulTransactions"
-middleware "DataMapper::IdentityMaps"
-middleware "Rack::Deflater"
-environment "# add middleware"
-
+environment ''
+middleware 'DataMapper::RestfulTransactions'
+middleware 'DataMapper::IdentityMaps'
+middleware 'Rack::Deflater'
+environment '# add middleware'
# init a session store
initializer 'datamapper_store.rb', <<-CODE
@@ -102,6 +101,7 @@ def <<(arg)
echo "more info on"
echo "\thttp://github.org/mkristian/rails-maven-plugin"
echo
+echo
CODE
rake 'db:sessions:create'
View
1  spec/spec_helper.rb
@@ -1,5 +1,6 @@
require 'rubygems'
require 'dm-core'
+require 'base64'
$LOAD_PATH << Pathname(__FILE__).dirname.parent.expand_path + 'lib'
# just define a empty abstract store
Please sign in to comment.
Something went wrong with that request. Please try again.