Running lunit with luarocks and mac ports

Posted by petrik on Mar 07, 2009

Install lua and luarocks: sudo port install lua luarocks

If you get the “lunit: command not found” error you need to add luarocks/bin to your PATH:

export PATH=/opt/local/lib/luarocks/bin:$PATH

If you get the “module ‘lunit’ not found” error you need to add luarocks to your LUA_PATH:

export LUA_PATH="/opt/local/share/lua/5.1//?.lua;${LUA_PATH}"</br>
export LUA_INIT="require 'luarocks.require'"

Redirect, a simple Ruby redirect DSL build on Rack

Posted by petrik on Feb 19, 2009

Just released another small gem called Redirect for doing quick redirects.

Example

Create a file and pass an array to the redirect method:

  require 'redirect'
  redirect  ['/catch_url', '/redirect_url'],
            ['/catch_url2', '/redirect_url2',
             {:code => 307, :name => 'redirect link'}],
            ['^/some_regexp', '/all']

The catch_url can be a regular expression. You can overwrite the default 301 http code in the options.

The default redirect code can be changed:

  Redirect.default_code = 307

A sitemap.xml is generated for all redirects that have a name.

"no <group_id> configured for ..." error when releasing a Gem to Rubyforge

Posted by petrik on Feb 19, 2009

If you get the "no <group_id> configured for <PROJECTNAME>" error, you probably need to do the following:

rubyforge setup # unless you already did this before
rubyforge config PROJECTNAME

Bukka White - Old Lady Blues

Posted by petrik on Feb 13, 2009

Casablanca, a ruby CAS client

Posted by petrik on Jan 30, 2009

In search of a single sign-on solution I came across rubycas-client. But I needed a tested solution with an MIT license so I decided to write Casablanca instead.
(Relevance wrote Castronaut, a tested ruby CAS server with a MIT license, for the same reasons.)

Current features

Casablanca can be run as a Rails plugin. Gatewaying (permitting the user to continue without authentication) is not implemented. Just skip the filter for those actions.

Casablanca includes a commandline Client to test getting service tickets from a CAS server.

Todo

I still need to implement proxing.

Documentation: http://casablanca.rubyforge.org/
Github: http://github.com/p8/casablanca/tree/master

admin