4.1 progress

$ ls -l components/plugins/textfilters
ls: components/plugins/textfilters: No such file or directory
$ ls -l vendor/plugins/
drwxr-xr-x 4 slaird staff 136 Aug 12 23:26 expiring_action_cache
drwxr-xr-x 9 slaird staff 306 Aug 16 20:09 typo_textfilter_amazon
drwxr-xr-x 9 slaird staff 306 Aug 16 20:13 typo_textfilter_code
drwxr-xr-x 9 slaird staff 306 Aug 16 20:21 typo_textfilter_flickr

$ ruby ./test/unit/text_filter_test.rb
Loaded suite ./test/unit/text_filter_test
Started

Finished in 0.884198 seconds.

9 tests, 98 assertions, 0 failures, 0 errors

Scott

“Scott L.” [email protected] writes:

Started

Finished in 0.884198 seconds.

9 tests, 98 assertions, 0 failures, 0 errors

Yay!

Will approach you are using for textfilters work in migrating sidebars
from
components to plugins?


Thanks,
-Steve
http://www.stevelongdo.com

It should be possible. I think Piers has something clever planned for
sidebars, but I’m not quite sure what it is yet .

Scott

Edge rails has support for adding named routes from a plugin so moving
the
controllers out to plugin land is viable.

http://www.nabble.com/Re%3A-Plugin-Routes-p5856460.html

“Scott L.” [email protected] writes:

It should be possible. I think Piers has something clever planned for
sidebars, but I’m not quite sure what it is yet .

Well, you say planned. Currently the plan goes:

  1. Write a bunch of tests for a few sidebars.
  2. Refactor like mad 'til the sidebars have identical controllers and
    all the behaviour is stashed in the model and the view.
  3. Merge the controllers.
  4. Pull the controller behaviour up into a set of helper methods.
  5. Eliminate the controllers.
  6. Work out how the heck to render a view from vendor/plugins (hey, if
    we can monkey patch rails to make themes work, we should be able to
    do something similar for sidebars)
  7. Push a few sidebars out to their own plugins directories.
  8. Write a generator for a sidebar
  9. Err…
  10. That’s it.

I’m at the beginnings of step 2 at the moment. The meta methods,
‘description’ and ‘setting’ have moved from the controller to the
sidebar model (Sidebar now gets subclassed for every sidebar) where,
frankly, they make more sense.

“Steve L.” [email protected] writes:

Edge rails has support for adding named routes from a plugin so moving the
controllers out to plugin land is viable.

http://www.nabble.com/Re%3A-Plugin-Routes-p5856460.html

Useful. But to be honest, we want rid of the controllers in most cases
because we also want rid of render_component rather than because it’s
awkward to have a controller in a plugin directory.

Still, there may be cases where we can’t get away without a dedicated
controller, so that will still come in handy.

I look forward to the svn delete of the compnents directory from Typo
:slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs