Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

Rush: A Ruby Shell That Abstracts System Operations Into Ruby Ones

By Peter Cooper / February 22, 2008

Rush, by Adam Wiggins, is an interesting development. It's a shell and remote login (as with SSH) replacement written in Ruby that accepts Ruby syntax to perform system operations. Consider these operations:

processes.each { |p| p.kill if p.command == "mongrel_rails" }

Or..

local = Rush::Box.new('localhost')
remote = Rush::Box.new('my.remote.server.com')
local_dir = local['/Users/adam/myproj/']
remote_dir = remote['/home/myproj/app/']
local_dir.copy_to remote_dir
remote_dir['**/.svn/'].each { |d| d.destroy }

Instead of making you use the usual UNIX commands, Rush abstracts a collection of system related tasks and allows you to perform operations using the Ruby you know and love. I can't say I'm rushing to install this just yet, because I think there might be some security aspects that need to be figured out, but it's definitely a bold, interesting development and I'm keen to see where it goes next.

Comments

  1. Alex Zavalny says:

    Rush cannot be used on Windows, can it?

  2. Arlen says:

    It's cool, but seems to be a rather elongated way of doing most tasks. I think with some shortcuts it could be cooler.

  3. Robert Nasiadek says:

    Looks pretty nice. I totally agree with Arlen, but once this is sorted out it would be much more powerful than regular bash scripts and probably a lot faster.

Other Posts to Enjoy

Twitter Mentions