FreerangeFuture / gluttonberg forked from lukesutton/gluttonberg

A content management system built on top of Merb

This URL has Read+Write access

Luke Sutton (author)
Mon May 25 21:07:15 -0700 2009
commit  9a2536fa73edb56bdbb34033dc6ccec5ca3a55af
tree    a2d971d760903cf11b0fb7b5fd8d6fd013618722
parent  c4dac6a05314fcefa5ad0f81d136e08796a0bf32 parent  64df1b717974577d3d74376da51918ee86af695a
gluttonberg / gluttonberg
name age message
..
file LICENSE Sun Sep 21 17:02:24 -0700 2008 Initial commit of prototype [Luke Sutton]
file README Thu Mar 26 20:26:34 -0700 2009 Addition of textile headers and lists to glutto... [Taryn Hicks]
file Rakefile Tue Mar 03 17:03:34 -0800 2009 Some tweaks to make the help display correctly. [Luke Sutton]
file TODO Tue Sep 30 17:25:20 -0700 2008 Stubbing out base slice. Warning: currently no... [Luke Sutton]
directory app/ Mon May 04 21:40:49 -0700 2009 Fix layout issues in asset browser. [Luke Sutton]
directory config/ Wed Dec 03 17:00:43 -0800 2008 Add a database.yml file and store the test DB i... [Luke Sutton]
directory help/ Mon Mar 30 16:33:47 -0700 2009 Added table textile to Textile help [Taryn Hicks]
directory lib/ Loading commit data...
directory public/
directory schema/ Sun Jan 18 21:14:34 -0800 2009 Add migration for moving an existing app to the... [Luke Sutton]
directory spec/ Mon Mar 02 22:01:08 -0800 2009 Expand the specs for the localization mixin. St... [Luke Sutton]
directory stubs/ Tue Sep 30 17:25:20 -0700 2008 Stubbing out base slice. Warning: currently no... [Luke Sutton]
gluttonberg/README
Gluttonberg
===========

A slice for the Merb framework which provides the core components of a 
content management system; content editing, asset management and 
authentication. It will be built in such a way as to allow extensions to be
added without having to modify the core library and without being limited to
a narrow API. Instead additional code is added in exactly the same way as any
other Merb app, but is given access to the CMS's API i.e. for authentication.

It's in a minimal state currently, but we have detailed our development plans
here: http://github.com/lukesutton/gluttonberg/wikis

Upgrading
=========
For those of you that have been testing early versions of Gluttonberg there are 
some changes in this latest version which you will need to be aware of.

Previously pages and their contents were described using the PageType, 
PageSection and Layout models. This was not a particularly elegant. So we've 
now replaced these models with a DSL for describing the pages instead. 

Typically, the documentation for this feature is lacking. Sorry :)

But if you feel like playing about, there are some examples of how to use the
descriptions in spec/lib/page_description_spec.rb

In the future we will be expanding the documentation on how to use this feature.

For those of you that aren't ready to move to this new method, you can stick
with the previous version for now. We've tagged 0.0.2 in the repository. This 
tag will only receive bug-fixes from here on out.

Contributing
============

Here are the things you need to know to started contributing to Gluttonberg.

Firstly, there are some dependencies, so make sure you have all 
of these gems installed. Gems like merb should install their own deps like 
haml. You need to install these exact versions.

If you want the full merb stack:
  * merb (1.0)
  * dm-adjust (0.9.6)
  * dm-is-list (0.9.6)
  * dm-is-tree (0.9.6)
  * dm-observer (0.9.6)
  * RedCloth (4.1.0)
  * mongrel (1.1.5)
  * webrat (0.3.2)
  * echoe (3.0.2)

If you want a minimal merb install:
  * merb-core (1.0)
  * merb-assets (1.0)
  * merb-helpers (1.0)
  * merb_datamapper (1.0)
  * merb-auth-core (1.0)
  * merb-auth-more (1.0)
  * merb-haml (1.0)
  * dm-adjust (0.9.6)
  * dm-aggregates (0.9.6)
  * dm-core (0.9.6)
  * dm-is-list (0.9.6)
  * dm-is-tree (0.9.6)
  * dm-observer (0.9.6)
  * dm-sweatshop (0.9.6)
  * dm-timestamps (0.9.6)
  * dm-types (0.9.6)
  * dm-validations (0.9.6)
  * RedCloth (4.1.0)
  * mongrel (1.1.5)
  * webrat (0.3.2)
  * echoe (3.0.2)

Next, you need to migrate the app. This is a bit of a pest since we don’t have
a rake task yet. Firstly make a db directory inside the slice. Then start up
an interactive merb session and auto migrate DataMapper.

  $ slice -i
  $ DataMapper.auto_migrate!
  $ Gluttonberg::User.create({:name => 'admin', :email => 'admin@localhost', :password => 'password', 
  :password_confirmation => 'password'})

This migrates the database to create the tables and then creates an initial user
to be able to login with.

Now, if you run the slice command normally the app should boot up as expected. 
Yay!

  $ slice

Open your browser to http://localhost:4000 to view Gluttonberg!

Maintenance Tasks
=================
To regenerate all thumbnails for all assets you can:

When working with the Slice:
  $ slice -i
  $ Gluttonberg::Asset.generate_all_thumbnails

When working in a merb application
  $ rake slices:gluttonberg:create_thumbnails



To generate the necessary Asset Types and Asset Categories. This is safe to
run on existing database as it only rebuilds the Gluttonberg set data
and not and custom data entered by the user.

When working with the Slice:
  $ slice -i
  $ Gluttonberg::Library.rebuild

When working in a merb application
  $ rake slices:gluttonberg:rebuild_asset_types


Thumbnailing
============
For thumbnailing of images to work you need to install image science gem. See the
following link for details.
http://seattlerb.rubyforge.org/ImageScience.html

(Ubuntu users see notes below)

To generate thumbs for assets already in the database see the Maintenance Tasks section
of this readme.

Notes for Ubuntu Linux
======================
Merb 1.0 requires that you use Ruby Gems version 1.3 or later, this is not included
in the default packages in Ubuntu 8.10 or earlier. You will need to download the
latest Ruby Gems and install it.

Merb also uses SQLite3 and need the header files installed so make sure you have the
package libsqlite3-dev installed. (SQLite3 is installed by default in 8.10 but not the
header files required to build native extensions.)

Gluttonberg uses webrat which uses nokogiri which uses libxml, so you need to install the 
libxml-ruby, libxslt-ruby, libxslt1-dev and libxml2-dev package as well.

For thumbnailing to work you need to install imagescience. This requires compiling on Ubuntu.
Following the directions in the blog article (works for Ubuntu 8.10 as well)
http://www.urbanpuddle.com/articles/2008/01/22/install-freeimage-imagescience-on-ubuntu-gutsy