GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

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
Remove special case for dm-core in use_orm

merb_datamapper is now maintained by the DataMapper folks, and they don't 
call
it dm-merb anymore.  Removed the resolve_orm_plugin_name() method and now
just use merb_#{orm}
ivey (author)
Sun May 04 13:59:59 -0700 2008
commit  2657c8034974f5d6cda0938139e1f3664ce25ba2
tree    4891a68c5caa7f08993a261fafb0e3420c85afe5
parent  dc540241b2c5361e84502bef2f38f98846f05796
...
119
120
121
122
123
124
 
125
126
127
...
133
134
135
136
 
137
138
139
...
149
150
151
152
 
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
...
119
120
121
 
 
122
123
124
125
126
...
132
133
134
 
135
136
137
138
...
148
149
150
 
151
152
153
154
155
156
157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
159
160
0
@@ -119,9 +119,8 @@ module Kernel
0
 
0
     begin
0
       Merb.generator_scope.delete(:merb_default)
0
- orm_plugin = resolve_orm_plugin_name(orm)
0
-
0
       register_orm(orm)
0
+ orm_plugin = "merb_#{orm}"
0
       Kernel.dependency(orm_plugin)
0
     rescue LoadError => e
0
       Merb.logger.warn!("The #{orm_plugin} gem was not found. You may need to install it.")
0
@@ -133,7 +132,7 @@ module Kernel
0
   #
0
   # ==== Parameters
0
   # orm<~to_sym>::
0
- # ORM alias, like :activerecord, :datamapper or :sequel. :dm_core is an ad hoc solution.
0
+ # ORM alias, like :activerecord, :datamapper or :sequel.
0
   #
0
   # ==== Returns
0
   # Boolean::
0
@@ -149,42 +148,13 @@ module Kernel
0
   #
0
   # ==== Parameters
0
   # orm<~to_sym>::
0
- # ORM alias, like :activerecord, :datamapper or :sequel. :dm_core is an ad hoc solution.
0
+ # ORM alias, like :activerecord, :datamapper or :sequel.
0
   #--
0
   # @private
0
   def register_orm(orm)
0
     Merb.generator_scope.unshift(orm.to_sym) unless Merb.generator_scope.include?(orm.to_sym)
0
   end
0
 
0
- # Registers ORM alias into ORM plugin gem name.
0
- #
0
- # ==== Parameters
0
- # orm<~to_sym>::
0
- # ORM alias, like :activerecord, :datamapper or :sequel. :dm_core is an ad hoc solution.
0
- #
0
- # ==== Notes
0
- # DataMapper is in the process of rewrite and this introduces number of specific notes.
0
- #
0
- # dm_core is used as an ad hoc solution because Datamapper team decided to mantain
0
- # Merb plugin on their own.
0
- #
0
- # So :datamapper uses merb_datamapper (old) for DM 0.3 and :dm_core uses new dm-merb for DM 0.9.
0
- #
0
- # ==== Examples
0
- #
0
- # resolve_orm_plugin_name(:activerecord) # => merb_activerecord
0
- # resolve_orm_plugin_name(:merb_activerecord) # => merb_activerecord
0
- # resolve_orm_plugin_name(:dm_core) # => dm-merb
0
- #--
0
- # @private
0
- def resolve_orm_plugin_name(orm)
0
- case orm.to_s
0
- when /^merb_/ then orm.to_s
0
- when 'dm_core' then 'dm-merb'
0
- else "merb_#{orm}"
0
- end
0
- end
0
-
0
   # Used in Merb.root/config/init.rb to tell Merb which testing framework to
0
   # use. Currently Merb has plugins to support RSpec and Test::Unit.
0
   #

Comments

    No one has commented yet.