public
Description: A Ruby web application framework
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack.git
Click here to lend your support to: mack and make a donation at www.pledgie.com !
fixed 'orm tasks aren't available' [#49 state:resolved]
dsutedja (author)
Wed Jul 23 08:44:22 -0700 2008
commit  69a51e3b1dea6244fb1cb1bb1347e2641fb4476d
tree    18219558cedc53ece68a440f90889f1b93d85a30
parent  6455ed89edd2f9179f0fb0e806901ad82af474c3
...
15
16
17
 
 
 
 
18
19
20
...
15
16
17
18
19
20
21
22
23
24
0
@@ -15,6 +15,10 @@
0
 * [#7] Added support for Extlib::Hook in a few places.
0
 * [#41] Deprecate orm_support.rb
0
 * [#6] RJS support
0
+* [#49] Making sure the orm tasks is available when orm_support is removed from the app_config
0
+* [#49] mack-active_record:  mack-active_record.rb will require mack-active_record_tasks.rb
0
+* [#49] mack-data_mapper:  mack-data_mapper.rb will require mack-data_mapper_tasks.rb
0
+* [#49] Updated warning message if orm is defined in app_config (i.e. user only needs to require mack-[orm_name], instead of both that and mack-[orm_name]_tasks).
0
 * gem: application_configuration 1.5.1
0
 * gem: ruby-debug 0.10.0
0
 
...
11
12
13
14
 
15
16
17
...
11
12
13
 
14
15
16
17
0
@@ -11,7 +11,7 @@ unless orm.nil?
0
         orm: data_mapper
0
         from the app_config/default.yml file
0
     2.  In gem.rb, add the following line in the require_gems block:
0
-        gem.add "mack-data_mapper", :version => "0.6.0", :libs => ["mack-data_mapper", "mack-data_mapper_tasks"]
0
+        gem.add "mack-data_mapper", :version => "0.6.0", :libs => ["mack-data_mapper"]
0
         ** if you use active record, then change it to mack-active_record instead of mack-data_mapper
0
     }
0
   Mack.logger.info "Initializing #{orm} orm..."
...
3
4
5
 
 
6
7
 
 
 
 
 
 
 
 
8
9
 
 
 
 
 
 
 
 
 
 
10
11
12
...
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
0
@@ -3,10 +3,30 @@ require 'rake/testtask'
0
 require 'rake/rdoctask'
0
 require 'rubygems'
0
 require 'application_configuration'
0
+require 'mack-facets'
0
+require 'log4r'
0
 
0
 require File.join(File.dirname(__FILE__), "initialization", "configuration.rb")
0
+
0
+# Load all the supporting files, so we can load the required gems
0
+require File.join(File.dirname(__FILE__), "core_extensions", "kernel.rb")
0
+require File.join(File.dirname(__FILE__), "utils", "gem_manager.rb")
0
+require File.join(File.dirname(__FILE__), "initialization", "logging.rb")
0
+require File.join(Mack.root, "config", "initializers", "gems.rb")
0
+Mack::Utils::GemManager.instance.do_requires
0
+
0
 orm = app_config.orm
0
 unless orm.nil?
0
+  Mack.logger.warn %{
0
+    Please note that setting up orm in app_config has been deprecated, and will not be supported in future mack releases.
0
+    Here's how to update your existing application:
0
+    1.  Remove the line:
0
+        orm: data_mapper
0
+        from the app_config/default.yml file
0
+    2.  In gem.rb, add the following line in the require_gems block:
0
+        gem.add "mack-data_mapper", :version => "0.6.0", :libs => ["mack-data_mapper"]
0
+        ** if you use active record, then change it to mack-active_record instead of mack-data_mapper
0
+    }
0
   require "mack-#{orm}_tasks"
0
 end
0
 

Comments