• Stars
    star
    192
  • Rank 202,019 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 16 years ago
  • Updated over 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Comatose

  • Version: 3.0.0
  • 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 3+ (3.0.7)
  • acts_as_list, acts_as_tree and acts_as_versioned gems are required (at the moment)

Development Notes

NOTE: This is an active branch of Comatose that is built specifically for Rails 3.0. I will probably remove any legacy support.

  • Make comatose fully self-contained, which means removing acts_as_(tree|list|versioned)
  • 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

$ rails plugin install git://github.com/niciliketo/comatose.git
$ rails generate comatose
$ 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.

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

More Repositories

1

liquid.js

JavaScript port of Tobias Luetke's Liquid template engine.
JavaScript
221
star
2

gumdrop

The sweet 'n simple cms/prototyping tool for creating static html websites and webapps.
Ruby
17
star
3

flipbook.js

FlipBook is an embeddable comic viewer...
CoffeeScript
12
star
4

dm.js

DM.js is a simple JavaScript ORM (loosely based on ActiveRecord) that supports the following sqlite browser backends: Safari/HTML5, Adobe Air, and Google Gears.
JavaScript
11
star
5

Template.ts

Simple, code based, template engine for TypeScript.
JavaScript
9
star
6

new-react-simple

Simple ReactJS + CoffeeScript skeleton includes: react-brunch, react-brunch-tags, elucidata-react-coffee
CoffeeScript
9
star
7

klass.js

A prototype-chain based class inheritance library (no dependencies).
JavaScript
7
star
8

thor-tasks

Miscellaneous Thor Tasks
Ruby
6
star
9

middleman-webcomic

An extension for MiddleMan (2) for creating webcomic sites.
Ruby
3
star
10

cumulus

A simple HTML, file based, content management tool.
Ruby
2
star
11

darthapo.github.com

My github page...
2
star
12

sequent

Sequent, an easy to use web-comic publishing tool.
Ruby
2
star
13

blam.js

Templates are just code.
JavaScript
2
star
14

stratus

Static blog generation tool, based on ideas form Cumulus
Ruby
2
star
15

boilerplate

Tool for generating boilerplate directories and files
2
star
16

taskthis

Simple, AJAX enabled, todo list manager.
Ruby
2
star
17

core-js-utils

JavaScript
1
star
18

sdo.js

Simple Data Objects. Very simple, intended for use with React and small projects.
JavaScript
1
star
19

core-js

JavaScript
1
star
20

ShortStack

A compact, customizable, MVC framework for PHP.
PHP
1
star
21

ShortStack-Starter

A starter project for a ShortStack application.
PHP
1
star
22

wabu

Web App Bundling Utility
1
star
23

lumbar

Lumbar supports building Backbone (JS) applications
Ruby
1
star
24

settee.js

S-Expression template engine.
JavaScript
1
star
25

McUtils-tmbundle

My bundle of snippets/commands for Textmate.
1
star
26

crudly

Locally cruderific
Ruby
1
star
27

ewok.js

Yub Nub!
JavaScript
1
star
28

syncodemayo

FTP syncing tool for servers that don't support rsync.
TypeScript
1
star
29

GraphicNovelist-tmbundle

Textmate bundle for syntax highlighting and HTML export of Graphic Novelist scripts.
Ruby
1
star
30

taskthis2

TaskTHIS 2, HTML5 client-side app using Rails 3.
Ruby
1
star