Pond logo
Pond’s Place
Ruby software
Home  |  Music  |  Software  |  Photos  |  Panoramas  |  Wallpaper  |  Forum  |  More!

Rails applications

  • TrackRecord
    Timesheets
  • Hub
    Single sign-on
  • RCVSWeb
    Rails CVS viewing

Rails plugins

  • YUI Tree
    Easy YUI TreeView integration
  • Safe In Place Editor
    Secure, flexible, reliable in-place editing

Radiant v0.5 extensions

  • ERB filter
    (Radiant text filter, 1K)
  • ERB behavior
    (Radiant page behavior, 4K)
  • News behavior
    (Radiant page behavior, 4K)

General Ruby tools

  • Gem Would Update (1)
    (Ruby script, requires Tempfile, 4K)
  • Gem Would Update (2)
    (Ruby script, edit tmp_path before running, 4K)

Ruby & Ruby On Rails

Rails applications

TrackRecord is a timesheet entry and analysis application which uses OpenID for user identification. It is released under a BSD licence.

Hub single sign-on facilities for multiple Rails applications running on the same domain.

RCVSWeb wraps around viewer scripts like the Perl cvsweb and revision tracking scripts like the Python cvshistory to provide Rails based CVS viewing and revision summaries in a manner similar to the Subversion source and changeset browsing features of Retrospectiva.

Rails plugins

YUI Tree is a plugin for Rails 2.3.x which makes it easy to use YUI TreeView components in your Ruby On Rails applications.

Safe In Place Editing is a plugin for Rails 2.3.x which improves upon the standard InPlaceEditing plugin in various ways, including supporting Rails optimistic locking and adding special editor support for boolean fields.

Radiant extensions

Radiant is a Ruby On Rails based content management system that I've found quite useful. I have written some behavior and filter code; Ruby files should be placed in the app/behaviors and app/filters directories, respectively, of your Radiant 0.5 installation. I believe the mechanism has changed in later versions so this code may not work there.

Filters

  • ERB filter - a simple filter that provides ERB (Embedded Ruby) support for pages. Note that no instance variables are available, so the range of possibilities is relatively limited - no @request or helper methods, for example. To do more than this requires core changes to Radiant.

Behaviors

  • ERB behavior - overrides the default page rendering method to provide ERB support. Since behaviors have a few instance variables available to them, the ERB code executing in a page with the ERB behavior does have access to some items like @request though it is still not possible to call helper methods directly. The same 'magic' that ActionView uses for .rhtml templates is used to make the behavior's instance variables accessible by the executing embedded Ruby code. To examine the available variables, insert something like "<%= instance_variables.inspect %>" in the page.
  • News behavior - a simple RSS parsing behavior that defines a r:news tag for listing "headlines" from the given RSS feed. Very easy to use but limited in flexibility. If you want a more comprehensive expression of an RSS feed in terms of Radiant tags, have a look at the RSS behavior listed here.

General Ruby tools

Asking gem about updates

I once saw a mailing list post that asked whether or not it was possible to ask gem for a list of the updates that gem update would perform, without actually doing those updates. At the time of writing gem can't actually do that. Below is a Ruby script which does the job instead - it queries the local and remote repositories, compares version numbers of locally installed gems with the remote repository equivalents and lists the out of date local items.

The script is very simple - just run it under Ruby. There are no parameters to pass. Example output:

Building local gem list
Building remote gem list - this can take a while...

fxruby: Local version 1.6.0 would be updated to 1.6.1.

  • gem-would-update.rb (requires Tempfile)
  • gem-would-update-no-tempfile.rb (does not use Tempfile, but you must edit the value of tmp_path so that it provides a valid temporary file's full pathname before running)

Everything...

In case there's anything missed out above, here's a directory listing of all the Ruby-related files available right now.

  • erb_behavior.rb
  • erb_filter.rb
  • favicon.ico
  • gem-would-update-no-tempfile.rb
  • gem-would-update.rb
  • Pond's Place: Ruby software: Hub
  • news_behavior.rb
  • Pond's Place: Ruby software: RCVSWeb
  • Pond's Place: Ruby software: Safe In Place Editing plugin
  • Pond's Place: Ruby software: TrackRecord
  • Pond's Place: Ruby software: YUI Tree plugin

The favicon.ico file is adapted from the Radiant CMS logo. Used with kind permission of J.W.Long.
Valid HTML 4.0 Valid CSS
A.D.Hodgkinson
Updated 11 Dec 2009
Creative Commons License The HTML, CSS and image files herein are
subject to a Creative Commons License