|
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.
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 similar way to Collaboa with its
Subversion source viewing and changeset facilities.
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.
Everything...
In case there's anything missed out above, here's a directory listing of
all the Ruby-related files available right now.
The favicon.ico file is adapted from the Radiant CMS
logo. Used with kind permission of J.W.Long.
|