Aaron, of PluginAWeek fame, released PluginAssets.
This plugin handles copying assets from your plugins to your public/ folder. I decided to give it a whirl, since I needed it for a plugin I’m writing.

I use Piston to manage my external dependencies, so I simply Pistoned the code from Aaron’s repository:

 1 $ piston import \
 2     http://svn.pluginaweek.org/trunk/plugins/action_pack/plugin_assets \
 3     vendor/plugins/plugin_assets
 4 Exported r85 from 'http://svn.pluginaweek.org/trunk/plugins/action_pack/plugin_assets' to 'vendor/plugins/plugin_assets'
 5 
 6 $ rake assets:update
 7 (in D:/wwwroot/staging.teksol.info)
 8 rake aborted!
 9 undefined method `require_plugin' for #<Object:0x27bfa3c>
10 
11 (See full trace by running task with --trace)

Oops, not good… So, two dependencies later:

 1 $ piston import \
 2     http://svn.pluginaweek.org/trunk/plugins/rails/loaded_plugins \
 3     vendor/plugins/loaded_plugins
 4 Exported r85 from 'http://svn.pluginaweek.org/trunk/plugins/rails/loaded_plugins' to 'vendor/plugins/loaded_plugins'
 5 
 6 $ piston import \
 7     http://svn.pluginaweek.org/trunk/plugins/rails/plugin_dependencies \
 8     vendor/plugins/plugin_dependencies
 9 Exported r85 from 'http://svn.pluginaweek.org/trunk/plugins/rails/plugin_dependencies' to 'vendor/plugins/plugin_dependencies'
10 
11 $ rake --trace assets:update
12 (in D:/staging.teksol.info)
13 ** Invoke assets:update (first_time)
14 ** Invoke environment (first_time)
15 ** Execute environment
16 rake aborted!
17 undefined method `require_plugin' for #<Object:0x27bfa3c>
18 D:/staging.teksol.info/config/../vendor/plugins/plugin_assets/lib/plugin_assets.rb:1

Whoa, this is even worse. I have to apply a known “workaround” to get plugin_assets to load:

 1 $ mv vendor/plugins/plugin_dependencies \
 2      vendor/plugins/aaa_plugin_dependencies
 3 $ mv vendor/plugins/loaded_plugins \
 4      vendor/plugins/aaa_loaded_plugins
 5 $ rake assets:update
 6 (in D:/wwwroot/staging.teksol.info)
 7 
 8 Mirroring assets for link_with_icon:
 9 ...

It does look like the dependencies aren’t well considered here. Mind you, Aaron is doing a fantastic job.

Update 2006-11-10 3 PM EDT: Aaron did a nice job of reworking the code to not require as many dependencies. Read Revisited: plugin_assets and loaded_plugins for the details.

Search

Your Host

A picture of me

I am François Beausoleil, a Ruby on Rails and Scala developer. During the day, I work on Seevibes, a platform to measure social interactions related to TV shows. At night, I am interested many things. Read my biography.

Top Tags

Books I read and recommend

Links

Projects I work on

Projects I worked on