Wednesday, June 11th, 2008
John Leach has created a very cool new open source project called Frizione (Italian for Clutch).
You run Frizione as a Web server and it gives you a set of services:
unnecessary whitespace. This can be a destructive operation in that the original
To invoke the service, send a POST request to /run_compressor, appending the
can be set to modify the behaviour of the compressor, using the YUICompressor
command line options.
The fixture service allows you to write text to hard disk. When sent a POST, the
service writes the POST data to the file specified in the URL, optionally modifying the
contents with parameter values specified in the POST request, using ERB.
To invoke the service, send a POST request to /run_fixture, appending the
absolute output text file path, with respect to the /Clutch root directory, as part of
The join (or concatenate) service uses ERB to join together a list of text files,
producing a single concatenated file. Each file can contain include commands
which contain relative URLs to other files to be included at the point of the include
command itself. This process can also be repeated within the included files (nesting).
To invoke the service, send a POST request to /run_join, specifying the absolute
text file path, with respect to the /Clutch root directory, as part of the URL. Clutch
will then create the joined (or concatenated) file. The to request parameter is
required to set the destination absolute URL of the resulting joined file.
The original lint program analysed C source code for potential (and subtle)
malpractices likely to lead to run-time bugs. Modern C compilers now provide
sufficient syntactic and semantic checking that lint is now rarely required or used.
potentially poor code before unit testing is an essential process, at least for me.
Unfortunately, cutting and pasting code to the web page can itself be error prone.
Clutch alleviates this problem by creating static HTML pages that read in your
To invoke the service, send a POST request to /run_jslint, specifying the absolute
Clutch will then produce a static HTML file under the /jslint folder, which
a link to this static HTML file in the /jslint/index.html page.
file. The reasons for using two HTML files is explained in the ‘Unit Testing’ section
It can also provide functionality similar to the join service. It can use ERB to join
only if the to parameter is specified.
To invoke the service, send a POST request to /run_test, specifying the absolute
Clutch will then create the two static HTML files.
The Unit Test Framework
The framework follows a similar pattern to the well known JUnit Java testing
clutch.unittest function call, as shown in the first example above. All functions
in your test object which begin with test will be executed by the unit test
framework, but the order of function execution is not guaranteed.
Before a testxxx function is executed, the unit test framework will execute a setUp
function in your object. After a testxxx function has been executed, the unit test
framework will execute a tearDown function in your object. Clutch provides a
default no-operation function for setUp and tearDown if none are defined in your
Posted by Dion Almaer at 9:10 am