Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

some cosmetic changes

  • Loading branch information...
commit fade29eb54fa390464bbcbc821b5a11d1898e336 1 parent 6b12f26
Christian Meier authored October 19, 2009
36  datamapper_rails_templates.rb
@@ -2,10 +2,10 @@
2 2
 ###################################################
3 3
 
4 4
 # get all datamapper related gems
5  
-gem "addressable", :lib => "addressable/uri"
  5
+gem 'addressable', :lib => 'addressable/uri'
6 6
 
7 7
 # assume sqlite3 to be database
8  
-gem "do_sqlite3"
  8
+gem 'do_sqlite3'
9 9
 
10 10
 # assume you want to have validations and timestamps in your models
11 11
 gem 'dm-validations'
@@ -14,25 +14,25 @@
14 14
 gem 'dm-serializer' # to allow xml interface to work
15 15
 
16 16
 # assume you prefer rspec over unit tests
17  
-gem "rspec", :lib => false
18  
-gem "rspec-rails", :lib => false
  17
+gem 'rspec', :lib => false
  18
+gem 'rspec-rails', :lib => false
19 19
 
20 20
 # this pulls in rails_datamapper and rack_datamapper
21  
-gem "datamapper4rails"
  21
+gem 'datamapper4rails'
22 22
 
23 23
 # install all gems
24  
-rake "gems:install"
  24
+rake 'gems:install'
25 25
 
26 26
 # install specs rake tasks
27  
-generate("rspec", "-f")
  27
+generate('rspec', '-f')
28 28
 
29 29
 # install datamapper rake tasks
30  
-generate("datamapper_install")
  30
+generate('datamapper_install')
31 31
 
32 32
 # fix config files to work with datamapper instead of active_record
33  
-environment "" 
34  
-environment "config.frameworks -= [ :active_record ]"
35  
-environment "# deactive active_record"
  33
+environment ''
  34
+environment 'config.frameworks -= [ :active_record ]'
  35
+environment '# deactive active_record'
36 36
 gsub_file 'spec/spec_helper.rb', /^\s*config[.]/, '  #\0'
37 37
 gsub_file 'test/test_helper.rb', /^[^#]*fixtures/, '  #\0'
38 38
 
@@ -42,16 +42,15 @@
42 42
 
43 43
 # add middleware
44 44
 def middleware(name)
45  
-  log "middleware", name
  45
+  log 'middleware', name
46 46
   environment "config.middleware.use '#{name}'"
47 47
 end
48 48
 
49  
-environment ""
50  
-middleware "DataMapper::RestfulTransactions"
51  
-middleware "DataMapper::IdentityMaps"
52  
-middleware "Rack::Deflater"
53  
-environment "# add middleware"
54  
-
  49
+environment ''
  50
+middleware 'DataMapper::RestfulTransactions'
  51
+middleware 'DataMapper::IdentityMaps'
  52
+middleware 'Rack::Deflater'
  53
+environment '# add middleware'
55 54
 
56 55
 # init a session store
57 56
 initializer 'datamapper_store.rb', <<-CODE
@@ -102,6 +101,7 @@ def <<(arg)
102 101
 echo "more info on"
103 102
 echo "\thttp://github.org/mkristian/rails-maven-plugin"
104 103
 echo
  104
+echo
105 105
 CODE
106 106
 
107 107
 rake 'db:sessions:create'
1  spec/spec_helper.rb
... ...
@@ -1,5 +1,6 @@
1 1
 require 'rubygems'
2 2
 require 'dm-core'
  3
+require 'base64'
3 4
 $LOAD_PATH << Pathname(__FILE__).dirname.parent.expand_path + 'lib'
4 5
 
5 6
 # just define a empty abstract store

0 notes on commit fade29e

Please sign in to comment.
Something went wrong with that request. Please try again.