github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

darthapo / comatose

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 206
    • 28
  • Source
  • Commits
  • Network (28)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • gh-pages
    • master ✓
  • Tags (0)
Sending Request…
Click here to lend your support to: comatose and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Comatose is a micro CMS, implemented as a Rails plugin, that is designed to be easy to embed and extend. — Read more

  cancel

http://comatose.rubyforge.org

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

stub out authentication when testing admin controller 
kovacs (author)
Wed Jan 07 10:26:37 -0800 2009
darthapo (committer)
Thu Feb 26 20:38:35 -0800 2009
commit  65ef4859e1403cbf1baf353c15caba91485606c4
tree    e3db29a8aa0fda58cee66e14f066d0cbb7e756dd
parent  ba32c63ed4dc24e44408eeba760bc3639f6dd77c
comatose /
name age
history
message
file CHANGELOG Fri Oct 31 00:27:24 -0700 2008 * Added configuration option for importing/expo... [darthapo]
file INSTALL Thu Oct 30 23:35:02 -0700 2008 * Added a rake task to generate a test_harness ... [darthapo]
file LICENSE Thu Mar 27 21:24:39 -0700 2008 Initial import into git (based on rev 15 of the... [darthapo]
file MANIFEST Fri Oct 31 00:27:24 -0700 2008 * Added configuration option for importing/expo... [darthapo]
file README.markdown Fri Oct 31 00:27:24 -0700 2008 * Added configuration option for importing/expo... [darthapo]
file Rakefile Fri Oct 31 00:27:24 -0700 2008 * Added configuration option for importing/expo... [darthapo]
file SPECS Tue May 20 12:42:15 -0700 2008 Version 2.0 (uber-alpha) * Removed controllers... [darthapo]
file about.yml Fri Oct 31 00:27:24 -0700 2008 * Added configuration option for importing/expo... [darthapo]
directory bin/ Fri Oct 31 00:27:24 -0700 2008 * Added configuration option for importing/expo... [darthapo]
file comatose.gemspec Fri Oct 31 00:27:24 -0700 2008 * Added configuration option for importing/expo... [darthapo]
directory generators/ Thu Oct 30 23:35:02 -0700 2008 * Added a rake task to generate a test_harness ... [darthapo]
file init.rb Tue May 20 22:57:32 -0700 2008 * More updates in preparation for use as a GemP... [darthapo]
file install.rb Fri Oct 31 00:27:24 -0700 2008 * Added configuration option for importing/expo... [darthapo]
directory lib/ Thu Feb 26 20:38:34 -0800 2009 Update main controller to append the comatose v... [Michael Kovacs]
directory rails/ Tue May 20 22:57:32 -0700 2008 * More updates in preparation for use as a GemP... [darthapo]
directory resources/ Fri Oct 31 00:27:24 -0700 2008 * Added configuration option for importing/expo... [darthapo]
directory tasks/ Thu Oct 30 23:35:02 -0700 2008 * Added a rake task to generate a test_harness ... [darthapo]
directory test/ Thu Feb 26 20:38:35 -0800 2009 stub out authentication when testing admin cont... [kovacs]
directory views/ Fri Oct 31 00:27:24 -0700 2008 * Added configuration option for importing/expo... [darthapo]
README.markdown

Comatose

  • Version: 2.0.5 (beta)
  • Author: M@ McCray
  • Website: comatose.rubyforge.org
  • Email: matt at elucidata dot net

Comatose is a micro CMS designed for being embedded into existing Rails applications.

It's intended for simple CMS support. Comatose supports

  • Nested pages
  • Versioning
  • Page markup in Textile, Markdown, RDoc, or easily add your own
  • Page processing through Liquid or ERb
  • Generators for easy installation/migration
  • Completely self-contained within plugin folder

It's meant to be lean, mean, easily embedded, and easy to re-skin for existing applications. If you need something more, I would recommend looking into Radiant.

For more information, see the Getting Started guide.

Requirements

  • Rails 2+ (2.1)
  • acts_as_list and acts_as_tree plugins are required (at the moment)

Development Notes

NOTE: This is an active branch of Comatose that is built specifically for Rails 2.1.

    I will *probably* remove any legacy support.
  • Make comatose fully self-contained, which means removing acts_as_(tree|list)
  • Improve ComatoseAdminController to reduce number of DB calls for building the page tree
  • Move to gem plugin
  • Comatose.configure needs to be an initializer (update docs)
  • Go through bugs on 1x branch from google code and ensure they are fixed
  • Give access to all the default rails helpers to Comatose Pages by default?
  • UI refresh (nothing major, just some cleanup).
  • RESTful goodness.
  • Support XML/JSON responses from ComatoseController and ComatoseAdminController.
  • Support for static rendering (for generating sites like this blog).

Installation

Note: See the 'Upgrading' section if you already have an older version of

    the comatose plugin installed.

$ ./script/plugin install git://github.com/darthapo/comatose.git
$ ./script/generate comatose_migration
$ rake db:migrate

Open your routes.rb and move the following comatose route to the bottom:

map.comatose_root ''

That's it, you're ready to go! You should be able to browse to http://127.0.0.1:3000/comatose_admin and start adding pages to your CMS. Browsing to http://127.0.0.1:3000/ will render your comatose pages if routing doesn't match any of your controllers.

Upgrading

NOTE: This is an experimental 2.0 branch, so upgrading is possible at

    the moment, but these instructions may not work for much longer.

If you are upgrading from an older version of Comatose (version 0.3, 0.4, 0.5, or 0.6), then you will need to re-install the comatose plugin and run:

$ ./script/plugin remove comatose
$ ./script/plugin install comatose
$ ./script/generate comatose_migration --upgrade --from=VERSION
$ rake migrate

Note: Be sure to set the --from parameter to the version of Comatose you last had installed. Also, you only need to first two digits, including the dot, of the version you are upgrading from. For example, if you're upgrading from version 0.6.9 you can use:

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

This will create the upgrade migration(s) for you. It just adds the new fields, so you can keep the original migration comatose created.

Configuration

You configure Comatose in your config/environment.rb file. Here is an example configuration block:

Comatose.configure do |config|
  # Sets the text in the Admin UI's title area
  config.admin_title = "Site Content"
  config.admin_sub_title = "Content for the rest of us..."
end

Here's an example that uses the AuthenticationSystem as generated by the restful_authentication plugin:

Comatose.configure do |config|
  # Includes AuthenticationSystem in the ComatoseController
  config.includes << :authenticated_system

  # admin 
  config.admin_title = "Comatose - TESTING"
  config.admin_sub_title = "Content for the rest of us..."

  # Includes AuthenticationSystem in the ComatoseAdminController
  config.admin_includes << :authenticated_system

  # Calls :login_required as a before_filter
  config.admin_authorization = :login_required
  # Returns the author name (login, in this case) for the current user
  config.admin_get_author do
    current_user.login
  end
end

Extra Credit

This plugin includes the work of many wonderful contributors to the Railsphere. Following are the specific libraries that are distributed with Comatose. If I've missed someone/something please let me know.

  • Liquid by Tobias Luetke
  • RedCloth by _why
  • Acts as Versioned by Rick Olsen
  • Behaviors by Atomic Object LLC -- very nice BDD-like testing library

Feedback

I’ve released Comatose under the MIT license. Which basically means you can use it however you want.

Don't forget to read the Getting Started guide located on the RubyForge project site.

If you like it, hate it, or have some ideas for new features, let me know!

matt at elucidata dot net

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server