[Radiant] [ANN] Ray extension

john muhl lists at johnmuhl.com
Wed Jul 16 19:24:12 CDT 2008


Despite the dependence on GitHub there is no required dependency on  
git the program, if you don't have git installed Ray will gladly use  
wget instead. So if you had noticed the extension on GitHub already  
but thought "pfft, more 'requires git' nonsense" you might have a  
second look.

Ray is basically a collection of rake commands that let you manage  
your extensions with less typing. For example, if you currently want  
to install the Page Attachments extension you'd do something like

   gem install mini_magick
   cd /radiant/app
   git clone git://github.com/technoweenie/attachment_fu.git vendor/ 
plugins/attachment_fu
   git clone git://github.com/radiant/radiant-page-attachments- 
extension.git vendor/extensions/page_attachments
   rake radiant:extensions:page_attachments:migrate
   rake radiant:extensions:page_attachments:update
   monit -g mongrels restart all

With Ray you would run

   rake ray:extension:page_attachments lib=mini_magick  
restart=mongrel_cluster

Page Attachments is what Ray calls a “special extension,” namely that  
it's not a normal installation pattern. For all the other great  
extensions on GitHub you have a few options. For example, if you  
wanted the Mailer extension from the official repository

   rake ray:extension:install name=mailer

What if you want if want ntalbott's fork of the Mailer extension?

   rake ray:extension:install name=mailer hub=ntalbott

You can get away with only specifing the short name as long as the  
extension author has used a name for their extension like "radiant- 
extension-name-extension". So what if Bob the extension developer has  
decided on some other kind of name, like sweet-sauce_for-radiant?

   rake ray:extension:install name=sweet-sauce hub=bob fullname=sweet- 
sauce_for-radiant

Right now, Ray is sort of stupid about migrate/update tasks and just  
blindly runs them both for all extensions regardless. If an extension  
doesn't need one or both tasks run you might see some errors but  
they'll be harmless.

Once an extension is installed it can be easily disabled or enabled with

   rake ray:extension:disable name=mailer
   rake ray:extension:enable name=mailer

To install Ray either

   git clone git://github.com/johnmuhl/radiant-ray-extension.git  
vendor/extensions/ray

or unpack the tarball into vendor/extensions and rename it ray. No  
migrate or update tasks are necessary.

http://github.com/johnmuhl/radiant-ray-extension/tarball/master


---
I know if you watch the dev. list this may seem like a day late but  
that's OK – I think there's room plus Ray has other options on the  
horizon that might be neat outside the extension context.



More information about the Radiant mailing list