public
Description: All the extra stuff you could want for the Mack Framework.
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack-more.git
Feature: DataMapper 0.9.3 Support [#54 state:resolved]
markbates (author)
Fri Jul 25 08:29:56 -0700 2008
commit  08d20fb232d80b962e085007603d3f573ee7c3bd
tree    4b117c96598058e15501d09224d647dbc2f6124c
parent  4e1f5603135a852b59a3e1fbb1ae8259cdf4f40a
...
15
16
17
18
19
20
21
 
22
23
24
...
15
16
17
 
 
 
 
18
19
20
21
0
@@ -15,10 +15,7 @@ require File.join(crt, "rake_task_requires")
0
   s.files = FileList['lib/**/*.*', 'README', 'doc/**/*.*', 'bin/**/*.*']
0
   s.require_paths << 'lib'
0
 
0
-  # s.add_dependency("dm-core", "0.9.2")
0
-  # s.add_dependency("dm-migrations", "0.9.2")
0
-  # s.add_dependency("dm-validations", "0.9.2")
0
-  s.add_dependency("data_mapper", "0.9.2")
0
+  s.add_dependency("data_mapper", "0.9.3")
0
   s.extra_rdoc_files = ["README"]
0
   s.has_rdoc = true
0
   s.required_ruby_version = ">= 1.8.6"
...
1
2
3
4
 
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
24
...
1
2
3
 
4
5
6
7
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
10
0
@@ -1,23 +1,9 @@
0
 module DataMapper # :nodoc:
0
   module MigrationRunner # :nodoc:
0
     
0
-    def reset!
0
+    def self.reset!
0
       @@migrations = []
0
     end
0
     
0
   end
0
-end
0
-
0
-module SQL # :nodoc:
0
-  class TableCreator # :nodoc:
0
-    class Column # :nodoc:
0
-
0
-      def build_type(type_class)
0
-        schema = {:name => @name, :quote_column_name => quoted_name}.merge(@opts)
0
-        schema = @adapter.class.type_map[type_class].merge(schema)
0
-        @adapter.property_schema_statement(schema)
0
-      end
0
-
0
-    end
0
-  end
0
-end
0
+end
0
\ No newline at end of file
...
2
3
4
5
6
7
8
...
2
3
4
 
 
5
6
0
@@ -2,6 +2,4 @@ whiny_config_missing: false
0
 
0
 mack::session_id: _fake_application_session_id
0
 
0
-orm: data_mapper
0
-
0
 mack::testing_framework: rspec
0
\ No newline at end of file
...
10
11
12
 
 
...
10
11
12
13
14
0
@@ -10,3 +10,5 @@ require_gems do |gem|
0
   # gem.add :termios
0
   # gem.add :rubyzip, :source => "http://gems.rubyforge.org"
0
 end
0
+
0
+require File.join(Mack.root, "..", "..", "lib", "mack-data_mapper")
...
33
34
35
36
 
37
38
 
39
40
41
42
43
44
45
46
47
48
49
50
 
 
 
 
 
 
51
52
53
54
55
56
57
58
 
 
 
59
60
61
62
63
64
65
66
67
68
69
 
 
 
 
 
 
70
71
72
...
33
34
35
 
36
37
 
38
39
40
41
42
 
 
 
 
 
 
 
 
43
44
45
46
47
48
49
50
51
 
 
 
 
 
52
53
54
55
56
57
 
 
 
 
 
 
 
 
58
59
60
61
62
63
64
65
66
0
@@ -33,40 +33,34 @@ describe "rake" do
0
       
0
         it "should create a db for the current environment" do
0
           repository(:mysql_test_tmp) do |repo|
0
-            repo.adapter.query("show databases;").should_not include("mack_data_mapper_test")
0
+            repository(:mysql_test_tmp).adapter.query("show databases;").should_not include("mack_data_mapper_test")
0
             rake_task("db:recreate")
0
-            repo.adapter.query("show databases;").should include("mack_data_mapper_test")
0
+            repository(:mysql_test_tmp).adapter.query("show databases;").should include("mack_data_mapper_test")
0
           end
0
         end
0
       
0
         it "should drop/create a db if it already exists for the current environment" do
0
-          repository(:mysql_test_tmp) do |repo|
0
-            rake_task("db:recreate")
0
-            Zombie.should_not be_storage_exists
0
-            Zombie.auto_migrate!
0
-            Zombie.should be_storage_exist
0
-            rake_task("db:recreate")
0
-            Zombie.should_not be_storage_exists
0
-          end
0
+          rake_task("db:recreate")
0
+          Zombie.should_not be_storage_exists
0
+          Zombie.auto_migrate!
0
+          Zombie.should be_storage_exist
0
+          rake_task("db:recreate")
0
+          Zombie.should_not be_storage_exists
0
         end
0
       
0
         it "should create a db for the specified environment" do
0
-          repository(:mysql_test_tmp) do |repo|
0
-            repo.adapter.query("show databases;").should_not include("mack_data_mapper_production")
0
-            rake_task("db:recreate", "MACK_ENV" => "production")
0
-            repo.adapter.query("show databases;").should include("mack_data_mapper_production")
0
-          end
0
+          repository(:mysql_test_tmp).adapter.query("show databases;").should_not include("mack_data_mapper_production")
0
+          rake_task("db:recreate", "MACK_ENV" => "production")
0
+          repository(:mysql_test_tmp).adapter.query("show databases;").should include("mack_data_mapper_production")
0
         end
0
       
0
         it "should drop/create a db if it already exists for the specified environment" do
0
-          repository(:mysql_test_tmp) do |repo|
0
-            rake_task("db:recreate", "MACK_ENV" => "production")
0
-            Zombie.should_not be_storage_exists
0
-            Zombie.auto_migrate!
0
-            Zombie.should be_storage_exist
0
-            rake_task("db:recreate", "MACK_ENV" => "production")
0
-            Zombie.should_not be_storage_exists
0
-          end
0
+          rake_task("db:recreate", "MACK_ENV" => "production")
0
+          Zombie.should_not be_storage_exists
0
+          Zombie.auto_migrate!
0
+          Zombie.should be_storage_exist
0
+          rake_task("db:recreate", "MACK_ENV" => "production")
0
+          Zombie.should_not be_storage_exists
0
         end
0
         
0
       end

Comments