Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (33 sloc) 1.23 kB
Version 0.1.1 (2008-03-30)
Validations
ValidationOfPresence lets you ensure a parameter is present.
CGI
url_for helper lets you construct escaped parameters programmatically.
url_for('index.cgi', :q => 'bar') => 'index.cgi?test=bar'
Made URI completion more consistent
Fixed CGI header duplication
Templating
Better error handling
Version 0.1.0 (2008-03-27)
Initial release
Validations
Simple validations for incoming parameters
Supports object comparison (rubric === value)
Supports block comparison (block.call value)
Natural language for expressing validation
validate(:quantity).when(Numeric).because('must be a number')
validate(:quantity, 'must be a number') { |value| value.kind_of? Numeric }
validate(:short).explain('must be less than 5 characters').unless(
lambda { |s| s.length >= 5 }
)
CGI
Casts incoming parameters to numerics when appropriate
Infers and completes URIs
HTTP redirection
Templating
Erubis templating
Infers template name from class name
Only specified values from #process are available to the template
Miscallaneous
Basic logging to file
Error and backtrace display in browser
Jump to Line
Something went wrong with that request. Please try again.