Sunday, July 23, 2006

Comatose v0.6

Comatose 0.6 is out! Here’s a quick summary of the new stuff:

  • ComatoseController has been split into ComatoseController and ComatoseAdminController
  • Both controllers extend your ApplicationController
  • The views, stylesheets, and javascripts have been updated and renamed to reflect the controller change
  • Configuration via Comatose::Options class
  • Liquid is the default text processor
  • Support for named routes
  • A Getting Started Guide
  • Pages now have a created_on field
  • Bug-fixes

For more, see the CHANGELOG.

Turns out I spoke too soon in my earlier post, there is a schema change. So if you're upgrading you'll need to run:

$ ./script/generate comatose_migration --upgrade --from=0.5

If you have questions/problems/feedback, drop by the Comatose project site and post in the forum or report a bug.

14 comments:

  1. Damn... This is getting cooler and cooler. I am 100% behind the thought of these things being done in plugins. Allowing people do build websites in a modular fashion. I myself is working on a tumblelog plugin(use your plugin as an inspiration on how to do things right) and hopefully soon others will have similar plugins for blogging, links or guestbooks etc. That way you would build your personal website for example by installing the Comates+Tumblelog+link plugins.
    The only problem I'm facing is that then administration would be split into multiple areas. Thus making you manually travel between site.com/tumbler and site.com/comatose etc.
    I'm wondering if we should make some way to allow plugins of these kind to sense each other. By adding themselves to some array so various plugins could at least provide links to each other.
    Other way would be to make an plugin-admin plugin that's universal. And plugins of these kinds add administration tasks into that plugin. much like plugins can have rake.task files. Of course that would mean that our plugins would be dependant on another plugin so I don't know if that's the best idea.
    But I'm just floating this idea forward. I think the first idea to allow plugins to sense each other and provide links would be something easy and simple but something that would really simplify things for users of multiple content plugins.

    ReplyDelete
  2. [...] Matt McCray announced Comatose v0.6 yesterday, and gave mere mortals like myself a great lesson in developing Rails plugin. [...]

    ReplyDelete
  3. That sounds super useful, and I, also, greatly appreciate this, and things like this, being implemented as plugins.
    But using a meta-admin plugin wouldn't necessarily make other plugins dependent on it. Just make it a plugin that detects & supports certain other admin plugins, or a generic admin plugin interface. call it at site.com/MetAdmin, site.com/metadmin/tumbler, etc. You could make it so that you can still call site.com/tumbler/admin as well, or build the other ("client") plugins with a flag to disable their built in admin interface, or a before_filter in the ApplicationController that caches the result of metadmin detection and turns it on or off based on such, or doesn't turn it off but does a redirect to the metadmin version, etc, etc.

    ReplyDelete
  4. There's a minor bug when you generate the admin controller. In the comatose_admin.rhtml layout the javascript include for 'comatose_amdin' is misspelled (it should be 'comatose_admin').
    Keep up the great work! (can I buy you a beer to add rollback support?)

    ReplyDelete
  5. Can we get an option to make the slugs with underscores instead of dashes, or is there a reason behind the dashes?

    ReplyDelete
  6. IMHO slugs with hyphens are better than underscores. (and URLs in general)
    Google has stated that when they see a URL with underscores, they index the words as a single phrase, not the individual words. So "ruby_rails" would only show up for searches on "rubyrails", and not "ruby" or "rails". Google has advised people to use hypens if you want URLs to be indexed by the individual words. Google does not consider underscores to be word separators.
    (Search for GoogleGuy and underscore to find out more about this)
    There's also the issue of how a URL looks when hyperlinked and it contains an underscore. An underscore could easily be mistaken for a space by a non-technical person, or someone with vision impairment. Not a big deal when people are bookmarking or cut & pasting the URL, but could cause problems with people writing down URLs.
    Both of these reasons aren't major, but if you have no strong preference either way, I believe hyphens are usually a better choice.

    ReplyDelete
  7. bq. Both controllers extend your ApplicationController
    So it is now possible to use Rails' helpers?
    Thanks again for this fantastic piece of code, Matt!

    ReplyDelete
  8. FYI, this isn't working with ozimodo. I haven't tried to figure out what the problem is, but her e are the errors.
    on install, at the very end:
    /Users/hello/p/ozimodo/vendor/plugins/comatose/install.rb:2: warning: already initialized constant RAILS_ROOT
    trying to run ./script/generate comatose_migration:
    /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing': uninitialized constant THEME_DIR (NameError)

    ReplyDelete
  9. Running 0.5...(yeah yeah)...
    All of a sudden I get error 500 on some comatose pages:
    Errno::ENOENT (No such file or directory - getcwd):
    /vendor/rails/actionpack/lib/action_controller/routing.rb:269:in `expand_path'
    http://www.hill107.com/about-hill-107 works but http://www.hill107.com/faq doesnt...
    Any suggestions??

    ReplyDelete
  10. "solved" it by restarting lighty and not just fcgi listeners...weird...

    ReplyDelete
  11. m@ it was actually running for a couple of days...I think a rake remote:cleanup somehow messed it up...

    ReplyDelete
  12. Hey Matt, is comatose still working with edge? The admin interface isnt mapping.

    ReplyDelete
  13. *San*: Well, Comatose has never "officially" supported edge rails. And probably won't until it's more stable. \n\nThat said, I do have some _experimental_ "support":http://comatose.rubyforge.org/dev-blog/comatose-0-6-3-and-edge-rails for edge rails in there. However, it doesn't "just work" like it does in the official releases. To get the administration working, I had to add an empty @comatose_admin_controller.rb@ file in the @app/controllers@ folder... Weird, but seems to work.\n\nAs edge rails gets closer to being released, I'll spend some extra cycles on making sure it works nicely.\n

    ReplyDelete
  14. Ah, terrific, that fixed it. Thanks! I agree, Weird! Might be a good bug to file now before they release 1.2.

    ReplyDelete