A basic Typo clone written in Merb
Ruby JavaScript
Latest commit 1cb86bb Oct 28, 2010 @wolfmanjm Add google phone to contact me
Change text of email link
Permalink
Failed to load latest commit information.
app
autotest
bin
config
doc/rdoc/generators
features
gems/cache
lib
merb
nbproject
public
schema/migrations
spec
tasks
.gitignore
README
Rakefile
config.ru
cucumber.yml

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)