April 12th, 2010
I’ve just released a new version of the [Loris gem](http://rubygems.org/gems/loris) with a couple of minor fixes:
* The dependency on `win32-process` has now been removed from the gem. This means the gem now installs correctly on OSX. Windows users will manually need to install the `win32-process` gem.
* The dependancy on `visionmedia-bind` has been updated to just `bind`, reflecting the gems new name on RubyGems.
* The JS Test Driver server is now reset between all tests. This stops it getting into a situation where it failed to pick up changes to files.
Because [RubyGems](http://rubygems.org/) is now the default gem host, this install process is a little simpler.
sudo gem install loris
or on Windows
gem install loris gem install win32-process
November 6th, 2009
While this all worked, it felt a little clunky as Autotest doesn’t natively support the idea of running multiple tasks one after the other. Rather than hack at the Autotest codebase, I thought I’d get some ruby experience by rolling my own autotest-style framework. Not great for reuse of code, but a great way for me to learn :)
Loris is hosted on [Gemcutter](http://gemcutter.org/), so you need to install their gem if you haven’t already.
sudo gem update --system sudo gem install gemcutter gem tumble
Then to install Loris, just run the following:
sudo gem install loris
Loris has no command line options, and no configuration file (at the moment). It looks for configurations files to decide which tasks to run.
You just need to specify which files Javascipt Lint should process. For example:
### Files # Specify which files to lint # Use "+recurse" to enable recursion (disabled by default). # To add a set of files, use "+process FileName", "+process Folder\Path\*.js", # or "+process Folder\Path\*.htm". # +process src/js/*.js +process tests/js/*.js
### Configuring JS Test Driver
To enable JS Test Driver, create a `jsTestDriver.conf` file in the folder where you run Loris. This should be a standard [JS Test Driver config file](http://code.google.com/p/js-test-driver/wiki/ConfigurationFile).
This should specify which files JS Test Driver should process, and how it connects to the JS Test Driver server. For example:
server: http://localhost:9876 load: - tests/qunit/equiv.js - tests/qunit/QUnitAdapter.js - src/js/*.js - tests/js/*.js
If no `jsTestDriver.conf` file is found, the JS Test Driver task is silently skipped.
To make it really simple to run JS Test Driver tests, if the server is set to run on `localhost`, and Loris doesn’t detect one running, it will automatically start one, and register your default browser with it.
This makes it a one step process to get automated tests up and running.
To run, open a command line window, navigate to the root folder of your project, and run:
#### Example output
Loris will clear the command line when re-running tasks. So the latest run is always at the top of you command line.
Loris will also report a summary of each task using [Growl](http://growl.info/) (if it is installed). This allows you to get quick feedback without needing to refer back to the command line on every change.
JS Test Driver is written in Java, so you will need to have Java installed to run it.
To get Growl notifications, you will need to install either [Growl for OSX](http://growl.info/) or [Growl for Windows](http://www.growlforwindows.com/). Growl for Windows requires the [.NET Framework 2.0+](http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en).
Loris is pretty limited at the moment, I just wired up the basics to get it running for a work project.
It doesn’t have any configuration options at the moment, so you have to follow it’s assumptions for now. I’m happy to add configuration options for any element as required.
If you want to modify the code, just fork the [Loris github project](http://github.com/karl/loris)