public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Search Repo:
Log instead of raising when dependencies mechanism this ORM required 
twice.

 * This makes this fragile piece work fine with DM.
 * This proves dependencies should be simplified before 1.0.
Michael S. Klishin (author)
Thu May 15 16:51:10 -0700 2008
commit  c866de0dbafa600248a8a2601785505e5e6ce621
tree    e7e4f10741ae070cd6b4f88c8d9cdb54faf1efd6
parent  1f4aa010a15ef24b3d833f6432cd50becf5f9ac3
...
115
116
117
118
 
119
120
121
...
115
116
117
 
118
119
120
121
0
@@ -115,7 +115,7 @@
0
   # # This will use the DataMapper generator for your ORM
0
   # $ ruby script/generate model MyModel
0
   def use_orm(orm)
0
- raise "Don't call use_orm more than once" unless Merb.generator_scope.include?(:merb_default)
0
+ Merb.logger.warn "Don't call use_orm more than once" unless Merb.generator_scope.include?(:merb_default)
0
 
0
     begin
0
       register_orm(orm)
...
23
24
25
 
 
26
27
 
28
29
30
...
23
24
25
26
27
28
 
29
30
31
32
0
@@ -23,8 +23,10 @@
0
   end
0
 
0
   it "should raise an error if use_orm is called twice" do
0
+ Merb.logger.should_receive(:warn)
0
+
0
     use_orm(:activerecord)
0
- lambda { use_orm(:datamapper) }.should raise_error("Don't call use_orm more than once")
0
+ use_orm(:datamapper)
0
   end
0
 
0
   it "should not have :merb_default in GENERATOR_SCOPE with use_orm(:activerecord)" do

Comments

    No one has commented yet.