.

Using MacFUSE with Rubyforge

I’ve always found it a PITA to administer html files for rubyforge projects, mostly because it requires a lot of command line work to move things around.

Today I started using a new trick. Google has recently released MacFUSE. The neat thing here is that you can also download the sshfs file system and use it to mount an SSH server as a network drive.

Needless to say, this works like a charm with Rubyforge. Just fire up the sshfs.app file after installing the MacFUSE core and the sshfs.app bundle.

It will ask you for a server, type ‘rubyforge.org’. Enter your rubyforge id as well, and for the directory, enter something like

/var/www/gforge-projects/project name/

It will ask you for a password, and then like magic, your rubyforge filespace will be mounted like a drive. Now you have no excuse for not putting some documentation or a spiffy web page up there.

Incidentally, once the connection is established, you can quit the ’sshfs.app’ program. There are also instructions on the Google code web page that tell you how to use this from the command line. The mounted rubyforge.org drive will also be accessible from the command line as ‘/Volumes/rubyforge.org

A quick tip for searching for rails related information

If you use Firefox, you can use this little trick.

  1. go to Rails Google co-op
  2. right click on the search box.
  3. select ‘Add keyword for this search’
  4. fill out the resulting form and add a keyword like ‘rails’
  5. move focus to the address bar (CMD-L on a Mac)
  6. Type ‘rails sciwerks’ on the address bar

You can also do this with rails or ruby API methods.

You could also set up a quicksilver web search for this too.

ruby-units 0.3.3

The latest version of the ruby-units gem has just been released.

Installation

gem install ruby-units
or
gem update ruby-units

Features

  1. Significantly improved speed
  2. Will use the ‘Chronic’ gem to interpret times/dates if loaded
  3. some nice time helpers.
    ‘1 day’.from ‘now’ #=> Wed Oct 04 18:27:13 EDT 2006
    ‘1 day’.ago #=> Mon Oct 02 18:38:56 EDT 2006
    ‘7 days’.before ‘1/1/2007′ #=> Mon Dec 25 00:00:00 EST 2006
    ‘7 days’.after ‘12/25/2006′ #=> Mon Jan 01 00:00:00 EST 2007
    ‘days’.since ‘1/1/2006′ #=> 275.436 d
    ‘days’.until ‘1/1/2007′ #=> 89.7683 d

    (works for sec, min, hours, days, weeks, fortnights, years, decades, centuries….
    but not months).

    and some others..
    these helpers will automagically give you a DateTime object
    if a Time object won’t work.

    ‘years’.since ‘1/1/1900′ #=> 106.756 y
    ‘50 years’.from ‘now’ #=> 2056-10-02T18:46:55Z
  4. units can now identify themselves (sort of..)
    ‘60 mph’.unit.kind #=> :speed
    ‘9.8 m/s^2′.unit.kind #=> :acceleration
  5. some new constructors
    Unit(10,’m') #=> 10 m
  6. Now throws an exception if it donsn’t understand a unit (during creation)
  7. Temperature handling improved
    “0 tempC”.unit #=> 273.15 degK
    “310.15 degK”.to(’tempC’) #=> 37 degC
  8. Trig functions can accept angular units
    Math.sin(’90 deg’.unit) #=> 1.0
    Math.sin(’100 grad’.unit) #=> 1.0
Next Page »