I just read the latest posting from Adam Wiggins, very cool dude, hard-core Rubyist, and friend. He has a new project called Rush, the Ruby shell. Adam is one of the guys behind Heroku, which is a pretty amazing pure web browser-based IDE/deployment/hosting solution for Ruby on Rails, if you haven’t seen that yet.
Anyhow, like many of us, Adam seems like he just wants to use Ruby for everything. And when I say everything, I mean EVERYTHING. Writing bash scripts…. sucks. Destroying the sanctity of your Ruby code with``` `bash-shell-command /ugly /madness`
Here is a little taste of Rush, from the Rush site:
>
> How about killing those pesky stray mongrels? Before:
> ```
>
> kill \`ps aux | grep mongrel\_rails | grep -v grep | cut -c 10-20\`
>
> ```
> After:
> ```
>
> processes.each { |p| p.kill if p.command == "mongrel\_rails" }
>
> ```
> But rush is more than just an interactive shell and a library: it can also control any number of remote machines from a single location. Copy files or directories between servers as seamlessly as if it was all local. bash and ssh, we love you, but your era is past.
>
> Example of remote access:
> ```
>
> 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 }
>
> ```
I have not had a chance to play with Rush yet, but I'm sure I will be. Unix shell scripting is not syntactical sugar, that is for sure, and Rush looks pretty sweet.