Kicking the Gem Extension Tires

by Jim Gay

Josh French has been working on loading extensions in RadiantCMS as gems. I walked through the process and pushed out some changes to the Vapor extension to be loaded as a gem.

There’s currently no plan to cram this into the official release of the 0.9 version of Radiant, but I’d like to see it happen. I think that extension development and usage is a sticking point for the growth of Radiant and the community of extensions and developers.

Creating the gem was relatively easy using the jeweler and gemcutter gems, and then (after installing the radiant-vapor gem) I required it in my Radiant environment.rb with config.gem "radiant-vapor".

Radiant extensions (by default) have an update task which will copy public files to the project’s public directory such as images, stylesheets, and javascript files. The current downside of using extensions that are gems is that the rake tasks are not available from the extension. We’ll solve this problem in some way, but currently extensions such as Vapor won’t have much of a problem since there are no public files to worry about and even though this task won’t be found rake radiant:extensions:vapor:migrate, this one will rake db:migrate:extensions and will make the necessary changes to the database since the migrations are loaded.

Comments

john said on Wednesday, December 30, 2009:

<http://github.com/radiant/radiant/commit/046670dd45f733571ed4763cd1a8f06d181210ff> certainly made me think this was in for 0.9. did i miss something?

Jim Gay said on Thursday, December 31, 2009:

Sorry. I haven't tackled it myself and Josh commented here http://groups.google.com/group/radiantcms-dev/browse_thread/thread/62cc8462a03b9b4e that he wasn't planning to push it into 0.9.

It's in, but if the rake problem isn't tackled, it could be undocumented. Not much fanfare was created when he added the ability to do extension_config in 0.8. That piece has been there, but nobody really knew about it since the auto-generated extensions didn't provide sample code.

I imagine this is a possibility for extension gems.

Post a comment


(required, but not displayed)

(optional)



(required)

1999 - 2010 © Saturn Flyer LLC 1901 N. Moore St. Suite 206 Arlington, VA 22209

Call Jim Gay at 571 403 0338