[ANN] PluginAWeek: appable_plugins - Share models/controller

appable_plugins - Adds the ability for plugins to share models,
controllers, and
helpers with your Rails application. Classes are automatically mixed
in with
your own or other plugins’ models/controllers/helpers.

Wiki
http://wiki.pluginaweek.org/Appable_plugins

Announcement

Source
http://svn.pluginaweek.org/trunk/plugins/rails/appable_plugins

Development
http://dev.pluginaweek.org/browser/trunk/plugins/rails/appable_plugins

Enjoy, from the PluginAWeek team :slight_smile:

Aaron P. wrote:

appable_plugins - Adds the ability for plugins to share models,
controllers, and
helpers with your Rails application. Classes are automatically mixed
in with
your own or other plugins’ models/controllers/helpers.

Wiki
http://wiki.pluginaweek.org/Appable_plugins

Announcement
アコムの審査は甘いのか他社カードローンと審査難易度を比較

Source
http://svn.pluginaweek.org/trunk/plugins/rails/appable_plugins

Development
http://dev.pluginaweek.org/browser/trunk/plugins/rails/appable_plugins

Enjoy, from the PluginAWeek team :slight_smile:

That’s a pretty badass thing that really feels like it should be in the
core. It would prevent lots of ugly send(:include, ModuleName) and
self.included(base) hacks.

But since it’s a plugin itself, how can you release a plugin that
depends on it?

Alex,

Thanks for the comment :slight_smile:

I would have to disagree with you, though, on it being included in
core. I think it’s a little too “magical” and invasive to warrant core
inclusion. That’s part of the reason engines were never considered for
core. Plugins, as provided in the framework, were meant to be very
simple and clean-cut. I actually wrote a little piece on when plugins
should be included in the core
(アコムの審査は甘いのか他社カードローンと審査難易度を比較).

As far as releasing plugins that use this type of functionality, you’ll
have to take the same approach you would with anything else.
Generally, what I do is require the plugin from within my
lib/plugin_xyz.rb file. If the plugin isn’t there, then the
application will fail to initialize, warning the user that a required
file is missing. You would then have to point them to a place to get
your plugin’s dependencies (in this case, appable_plugins).

There’re currently ideas floating around on building a framework on top
of existing components (generators/gems) for installing plugins along
with their dependencies. Hopefully something will come out of this in
order to help ease the process of distributing plugins that depend on
other plugins.

P.S. Most of the plugins at PluginAWeek will eventually be released as
gems as well. We’re working on it :slight_smile: