Git Product home page Git Product logo

comatose's Introduction

Comatose

Version

0.8

Author

M@ McCray

Website

www.mattmccray.com

Email

darthapo at gmail dot com

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: comatose.rubyforge.org

Installation

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

      the comatose plugin installed.

$ ./script/plugin source http://mattmccray.com/svn/rails/plugins
$ ./script/plugin install comatose
$ ./script/generate comatose_migration
$ rake migrate

Open your routes.rb and add the comatose root route at the bottom:

map.comatose_admin
map.comatose_root ''

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

Upgrading

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 AuthentiationSystem 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 (http://home.leetsoft.com/liquid) by Tobias Luetke (http://blog.leetsoft.com) 
* RedCloth (http://whytheluckystiff.net/ruby/redcloth) by why the lucky stiff (http://whytheluckystiff.net)
* Acts as Versioned (http://ar-versioned.rubyforge.org) by Rick Olsen (http://weblog.techno-weenie.net)
* Behaviors (http://behaviors.rubyforge.org) 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: comatose.rubyforge.org/getting-started-guide

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

darthapo at gmail dot com

comatose's People

Contributors

mattmccray avatar

Stargazers

Angus H. avatar Ahmet Abdi avatar gustin avatar

Watchers

gustin avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.