We've all heard the admonitions: "Don't Repeat Yourself!" But how do you avoid this if you're working on a Ruby codebase that stretches to thousands of lines, maintained by multiple developers? One answer is to run a tool that looks for duplicate code. This is an area where good tools are tantalizingly close - there are at least three out there that are worth checking out:
RubyMine is an all new IDE for Ruby and Rails developers, developed by JetBrains (best known for Java IDE IntelliJ IDEA). RubyMine is built upon the IntelliJ IDEA platform and brings together all of the essential features you'd expect of an IDE (editor, debugging tools, source control integration, code completion, and so forth) along with lots of extra goodies specific to Ruby, such as GUI-based support for RSpec and Test::Unit.
Yesterday, Aaron Patterson (@tenderlove) and Mike Dalessio released Nokogiri (Github repository), a new HTML and XML parser for Ruby. It "parses and searches XML/HTML faster than Hpricot" (Hpricot being the current de facto Ruby HTML parser) and boasts XPath support, CSS3 selector support (a big deal, because CSS3 selectors are mega powerful) and the ability to be used as a "drop in" replacement for Hpricot.
Last week, Noel Rappin of Pathfinder Development wrote Elements of Ruby Style - an attempt at producing a Ruby "style guide." After some initial feedback to this, he's followed up with a response to some of the initial criticisms and suggestions.
It was with much excitement that Merbcamp started yesterday with a keynote from Ezra Zygmuntowicz, initial creator of the Merb Web application framework. Aside from covering Merb-related news, Ezra revealed a project called Nanite - a "self assembling cluster of Ruby daemons."
Configatron is a new Ruby library that makes it easy to have persistently accessible configuration data available through your Ruby application. It bears some similarities to the Rails pluginSimpleConfig, but being distributed as a gem, is suitable for non-Rails applications. To install: gem install configatron
After tackling the difficult task of improving Rails deployment, Phusion - the creators of Passenger (mod_rails) recently announced the availability of daemon_controller - a library (rather than a stand-alone tool) for managing daemons. It lets you write applications that manage daemons in a robust manner (e.g. mongrel_cluster or UltraSphinx could be adapted to use this library).
RubyFlow - the community based companion site to Ruby Inside - has been on fire! I'm finding out about lots of new stuff on there that then gets included into Ruby Inside posts. It's the place to be if you want the most up to date Ruby and Rails news, but don't mind putting up with a bit of 'noise'.
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: