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

public
Description: Desert is a component framework for Rails that allows your plugins have a Rails app like directory structure, routes, migrations, and dependencies.
Homepage: http://desert.rubyforge.org
Clone URL: git://github.com/pivotal/desert.git
fix incorrect nesting in plugin generator, update readme to include all 
content from the doc/index folder


git-svn-id: svn+ssh://rubyforge.org/var/svn/pivotalrb/desert/trunk@1713 
af276e61-6b34-4dac-905b-574b5f35ef33
btakita (author)
Sun Jun 22 21:02:56 -0700 2008
commit  163017471422df8056f347573a01369ec7b7aa61
tree    70081f84308c9a87a2f0c9fcf909745dcb5d11a4
parent  f668dbc6fb4303b966075c5fe1cdd96edc9b9acb
...
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
...
319
320
321
322
323
324
325
...
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
...
223
224
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
227
228
...
272
273
274
 
275
276
277
...
279
280
281
 
 
282
 
 
 
 
 
 
 
283
284
285
 
286
 
 
 
287
288
289
290
291
292
 
293
 
 
 
294
295
0
@@ -223,53 +223,6 @@ To share views, just create templates and partials in the plugin's <tt>app/views
0
 
0
 == Customize / extend behavior in each installation
0
 
0
-<<<<<<< HEAD:README.rdoc
0
-=======
0
-This line connects your routes to the app. The only difference between your plugin's
0
-routes file and the standard config/routes.rb file is that you don't need to write "map" - it's implicit.
0
-
0
-So what would be
0
-
0
- map.resources :posts
0
-
0
-in config/routes.rb becomes just
0
-
0
- resources :posts
0
-
0
-in my_app/config/routes.rb. All standard routing methods are available, such as:
0
-
0
- namespace :admin do |admin|
0
- admin.resources :posts
0
- end
0
-
0
-== Running migrations
0
-
0
-Desert uses a separate table to manage migration version to maintain backwards compatibility with Rails 1.x.
0
-Your plugin app's migration live in your_plugin/db/migrate. To run migrations, follow these steps:
0
-
0
-* Create a new migration in your main app
0
-
0
- script/generate migration migrate_my_plugin_to_045
0
-
0
-* Add the custom `migrate_plugin` method
0
-
0
- class MigrateMyPluginTo045 < ActiveRecord::Migration
0
- def self.up
0
- migrate_plugin(:my_plugin, 20080530223548)
0
- end
0
-
0
- def self.down
0
- migrate_plugin(:my_plugin, 0)
0
- end
0
- end
0
-
0
-* Run your migrations normally
0
-
0
- rake db:migrate
0
-
0
-== Example
0
-
0
->>>>>>> Merge branch 'master' of git://github.com/zilkey/desert:README.rdoc
0
 Say you want to create a plugin named acts_as_spiffy.
0
 Desert allows Spiffy to have a set of features that can be reused and extended in several projects.
0
 
0
@@ -319,7 +272,6 @@ test/specs for all installed plugins, which may not be what you want.
0
 == Running Desert Specs
0
 
0
 To run specs, you need to:
0
-<<<<<<< HEAD:README.rdoc
0
 
0
 * Make sure you have the necessary gems installed (rr, rspec)
0
 * Install git http://git.or.cz/
0
@@ -327,34 +279,17 @@ To run specs, you need to:
0
 * Update the database.yml file in <tt>spec/rails_root/config/database.yml</tt>
0
 * Install the dependencies
0
 * Run the specs
0
-=======
0
->>>>>>> Merge branch 'master' of git://github.com/zilkey/desert:README.rdoc
0
 
0
-* Make sure you have the necessary gems installed (rr, rspec)
0
-* Install git http://git.or.cz/
0
-* Create a database named desert_test
0
-* Update the database.yml file in `spec/rails_root/config/database.yml`
0
-* Install the dependencies
0
-* Run the specs
0
-
0
 Desert is a library that heavily monkey patches Rails. To ensure that Desert works with
0
 multiple versions of Rails, its tests are run against the supported versions of Rails.
0
 
0
-<<<<<<< HEAD:README.rdoc
0
 To set up the different supported versions of Rails, run
0
-=======
0
-To set up the different supported versions of Rails, run
0
->>>>>>> Merge branch 'master' of git://github.com/zilkey/desert:README.rdoc
0
 
0
   rake install_dependencies
0
 
0
 This will clone the Rails git repo and export the supported versions of rails into the
0
 respective directories.
0
 
0
-<<<<<<< HEAD:README.rdoc
0
   rake update_dependencies
0
-=======
0
- rake update_dependencies
0
->>>>>>> Merge branch 'master' of git://github.com/zilkey/desert:README.rdoc
0
 
0
 will update the clones repo on your machine.
...
40
41
42
 
43
44
45
...
57
58
59
60
 
61
62
63
...
40
41
42
43
44
45
46
...
58
59
60
 
61
62
63
64
0
@@ -40,6 +40,7 @@ end
0
 module Desert #:nodoc:
0
   module Generator #:nodoc:
0
     module Commands #:nodoc:
0
+
0
       module Create
0
         def map_route_from_plugin
0
           logger.route "adding map.routes_from_plugin(:#{file_name}) to top of routes.rb"
0
@@ -57,7 +58,7 @@ module Desert #:nodoc:
0
           gsub_file 'config/routes.rb', /(#{Regexp.escape(look_for)})/mi, ''
0
         end
0
       end
0
-
0
+
0
       module List
0
         def map_route_from_plugin
0
           logger.route "adding map.routes_from_plugin(:#{file_name}) to top of routes.rb"

Comments

    No one has commented yet.