public
Description: A basic Typo clone written in Merb
Homepage:
Clone URL: git://github.com/wolfmanjm/wolfmanblog.git
name age message
file .gitignore Fri Nov 20 20:46:30 -0800 2009 updated gitignore [wolfmanjm]
file README Mon Nov 09 21:05:55 -0800 2009 updated README [wolfmanjm]
file Rakefile Wed Dec 24 12:40:35 -0800 2008 initial checkin [wolfmanjm]
directory app/ Mon Nov 09 20:25:48 -0800 2009 Try to upgrade to latest cucumber, however the ... [wolfmanjm]
directory autotest/ Sun Feb 01 00:14:28 -0800 2009 Added cucumber/webrat feature support modified ... [wolfmanjm]
directory bin/ Mon Nov 09 20:25:48 -0800 2009 Try to upgrade to latest cucumber, however the ... [wolfmanjm]
file config.ru Tue Jan 13 14:29:58 -0800 2009 update config.run [wolfmanjm]
directory config/ Mon Nov 09 20:25:48 -0800 2009 Try to upgrade to latest cucumber, however the ... [wolfmanjm]
file cucumber.yml Mon Nov 09 21:03:02 -0800 2009 Reorganize features, and finally get it to run ... [wolfmanjm]
directory doc/ Wed Dec 24 12:40:35 -0800 2008 initial checkin [wolfmanjm]
directory features/ Mon Nov 09 21:03:02 -0800 2009 Reorganize features, and finally get it to run ... [wolfmanjm]
directory gems/ Wed May 20 01:06:42 -0700 2009 Upgraded to merb 1.0.11 Changed over to will_pa... [wolfmanjm]
directory lib/ Mon Nov 09 21:03:02 -0800 2009 Reorganize features, and finally get it to run ... [wolfmanjm]
directory merb/ Sun Dec 28 23:37:24 -0800 2008 tweaked look Changed deletes to method deletes ... [wolfmanjm]
directory nbproject/ Tue May 19 00:45:12 -0700 2009 Added initial caching for index and show [wolfmanjm]
directory public/ Wed May 20 01:06:42 -0700 2009 Upgraded to merb 1.0.11 Changed over to will_pa... [wolfmanjm]
directory schema/ Tue Feb 24 13:40:42 -0800 2009 Added editable statics for static sidebar items... [wolfmanjm]
directory spec/ Mon Nov 09 20:25:48 -0800 2009 Try to upgrade to latest cucumber, however the ... [wolfmanjm]
directory tasks/ Mon Jan 12 12:08:18 -0800 2009 bundle gems [wolfmanjm]
README
NOTE - I am about to rewrite this blog in GRAILS, just for fun ;) 

This is a very basic Blogging engine, specifically written to host
blog.wolfman.com.

Written in Merb as a way to learn Merb, and compare and contrast to
Rails.

Uses HAML as the rendering engine and Sequel as the ORM.

The sidebar components (ads, tags, categories etc) use parts, where
each sidebar component is an action in the parts controller, and has a
view for each sidebar component, then the sidebar components (ie
parts) are listed in ther order they should appear in the global
layout.

It has RSS feeds for comments and articles.

Has a simple admin mode which allows the admin to delete posts or
comments, and to upload new articles.

Has a ridiculously simple scheme for stopping spambots, which actually
seems to work very well.

To run the cucumber based features you need to...

> gem sources -a http://gems.github.com  
> sudo gem install cucumber      
> sudo gem install webrat   
> sudo gem install roman-merb_cucumber
> rake features

I didn't add these to the dependencies (for bundling) as they are not
required for production.

NOTE that none of the specs work, as I used cucumber to do the testing
instead, but I left the spec stubs in case I changed my mind.

A note on my feature testing...

I use a hybrid paradigm of fixtures and factories for seeding the
database. Basically I load the data directly into the database using
some Sequel helpers (see db_helpers). The idea is that data is loaded
as needed by Givens in each Scenario, which calls the relevant
db_helper to load the data needed for that Scenario.  This means that
all data is not loaded every time, it is faster than a factory because
it loads directly into the database bypassing the Models, it keeps the
data close to the tests so it is easier to maintain.  It maybe slower
than fixtures as data is not loaded once at the start as it can be
with fixturesm but faster if the fixtures are reloaded every Scenario.

At least that is the theory. YMMV

Recent Changes
--------------

* Added page caching, full pages get cached and Apache mod_rewrite fetches
  the cached pages directly.
* Uses will_paginate instead of merb-paginate.
* Made all article/post access via permalink
* Made access to / redirect to /posts/page/1 to keep the cache from duplicating the index
* Flush entire page cache on new comments
* Flush entire page cache on create and update posts
* Switched to action store cache instead, still delete as above
* using action store do not use cache if authenticated so admin oages are not cached

TODO
====

1. Figure out how to flush a specific page cache rather than the whole lot
2. purge empty categories and tags
3. have different messages in different colors (error, note, warning)