Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
SqueezeBox, a simple file system based routing framework
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ry  
View profile  
 More options Aug 13 2007, 2:19 pm
From: Ry <coldredle...@gmail.com>
Date: Mon, 13 Aug 2007 18:19:51 -0000
Local: Mon, Aug 13 2007 2:19 pm
Subject: [ANN] SqueezeBox, a simple file system based routing framework
SqueezeBox is a simple file system based routing framework for erubis
templates.

It aims for a couple of niceties as well:

Instead of putting your logic inside your template, like you would
with PHP, SqueezeBox recognizes a separate logic file to be called
before it loads the template. This allows you room to load
ActiveRecord models or do calculations. These logic files return to
the webserver the last line of their execution. If render() is the
last line, it will load the template associated with that logic file.
If a string containing, say, JSON is returned, then the JSON will be
the body of the response and the template ignored. In fact, any object
that contains a read method can be returned and the SqueezeBox will
stream the response. (This cute behavior is stolen from Merb.)

A file called initialize.rb is loaded when the website starts, in
there you can define classes or functions that will be used throughout
the site. database.yml is looked for in the case you plan on using
ActiveRecord.

There are several predefined Ruby exceptions which correspond to
common HTTP errors like NotFound and MethodNotAllowed, and Forbidden.
For example one could do:

  raise MethodNotAllowed unless @request.post?

Raising one of these exceptions will display a default error page -
but these error pages can be overridden by placing a template, for
example,  at
document_root/exceptions/not_found.erb  or
document_root/exceptions/method_not_allowed.erb
The default error message can be overridden at
document_root/exceptions/index.erb. (Another behavior stolen from
Merb)

Please try it out! Thanks!

http://four.livejournal.com/789870.html
http://s3.amazonaws.com/four.livejournal/20070813/SqueezeBox-0.0.0.tgz
http://tinyclouds.org/svn/squeeze_box/trunk

ry


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google