Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Author Archives: Peter Cooper

By Peter Cooper / October 25, 2006

Rubysearch-1
Ruby Search, a project by Simon Parker, is a special Web search tool that looks through the Rails class index, Rails methods, Ruby standard libraries, and Programming Ruby and presents the results in a simple sidebar to be viewed in a frame on the right. It seems to be a bit patchy from my tests, but it’s still a cool tool. (Found via ozmm) Read More

By Peter Cooper / October 22, 2006

Freckle
The winners of the Rails Day have been announced. For those who haven’t heard about it before, Rails Day is an annual contest in which hundreds of developers take 24 hours to develop an application.

Evan Weaver has put together a great run-through of the different winners along with what each one is and how it looks. Read More

By Peter Cooper / October 22, 2006

Merb is a micro-framework (developed by Ezra Zygmuntowicz) that ties in with Mongrel and erb and provides basic controller and view templating. It’s an ideal way to put together quick and simple Web applications with Ruby that don’t rely on any of the fancier features offered by Rails. It does have support for ActiveRecord, however. Merb allows you to create small systems that produce dynamic requests and can interact with databases but without the significant weight of the Rails framework. Where Ruby on Rails is a Big Mac, Merb is a McNugget. Read More

By Peter Cooper / October 18, 2006

Simpleconsole

I think t0fuu has hit upon gold with SimpleConsole, his new Ruby framework for console applications. Imagine Ruby on Rails, but entirely for command line scripts, and that’s SimpleConsole. It has automatic options parsing, before and after filter support, has logic and view separation, and a routing system. It’s real thinking out of the box, and with more work it could be an incredibly powerful and productive way to knock up quick scripts for the command line. Read More

By Peter Cooper / October 17, 2006

Rb-AppScript is an event bridge between Ruby and OS X that allows you to get AppleScript-esque control in OS X. The Appscript creators claim Appscript is a ‘serious alternative’ to AppleScript and it certainly looks good. Check out this example:

AS.app(‘TextEdit’).documents[1].paragraphs[1].get

The equivalent AppleScript?

tell application “TextEdit”
get paragraph 1 of document 1
end tell

Appscript provides the system to perform remote procedure calls to OS X applications, converts values between Ruby and Apple classes, and allows developers to get full use out of OS X while still using Ruby’s object oriented environment. Read More

By Peter Cooper / October 17, 2006

Courtenay has come up with an ingenious solution to caching and precaching in Ruby on Rails with memcached. It caches data from database requests, as you’d expect, but you can also put together a special forking method that caches data in advance. Courtenay’s suggestion for this is if a user does a search and you cache the initial page of search results, you could speculate the user might progress onto page two of the search, so you can get Rails to precache that data in advance so the next page load is blazing fast. Read More

By Peter Cooper / October 16, 2006

The eminent Dr. Nic Williams has put together a useful generator that makes it a lot easier to construct your own gems. It’s an ideal script if you’ve never put a gem together before, or if you’re sick of the repetition involved. Nic tells me that this tool might make its way into the core RubyGems distribution in the future, but it’s worth playing with straight away.

Once installed, all you do is run newgem followed by the desired name of your gem, and Nic’s generator creates the correct directories and pre-populates several relevant files (for testing, documentation, Rake tasks, etc.). Read More

By Peter Cooper / October 13, 2006

Teslyjr

Tesly Jr. is a service that provides good-looking HTML reports for your tests. It can hook into Ruby / Rails’ Test::Unit library and receive the results of tests as they’re being completing. The results are logged and shown on the Tesly Jr. site, allowing your customers to see up to date results as you go. You can also subscribe to RSS feeds that are updated every time your tests are run. Read More

By Peter Cooper / October 12, 2006

Some user mail from Nathan Murray:

I just wanted to let you guys know I’ve just released the first version of my Backup Gem. You can read the manual here:
http://tech.natemurray.com/backup/

BackupGem aims to be the easiest and most flexible backup, archive and rotate tool. It’s a beginning-to-end solution for scheduled backups in a clean ruby package that is simple use and powerful when customized.

A configuration as simple as:

set :backup_path, “/var/local/backups/my_old_logs”
action :content, :is_contents_of => “/var/my_logs”

Will compress, encrypt, deliver, and rotate the contents of /var/my_logs. But this is just a taste of the power this gem has.

You can install the gem easily with gem install backup and the official documentation is very complete and full of examples. Read More

By Peter Cooper / October 11, 2006

Railscamp

Ruby on Rails Camp is a gathering (in the ‘unconference’ style) of Ruby and Rails enthusiasts on November 9 in San Jose, California. The event’s sponsored by the IBM Almaden Research Center and registration costs $25. To learn more, check out the official Ruby on Rails Camp site. Read More

By Peter Cooper / October 11, 2006

Begrubycover

It’s not the final version, but there’s now a cover and a page on Amazon for my book, Beginning Ruby, due March 2007. APress also have a page about the book up now too, although that biography’s going to need a bit of a re-write I think :) In terms of the practicalities, the book is well over half-written and there’s a very dim light at the end of the tunnel, but it’s hard work! Read More

By Peter Cooper / October 11, 2006

Chronicsc

Tom Preston-Werner demonstrates his Chronic “natural date parsing” library for Ruby in this cool, live presentation / screencast. He goes deep into how the library works and how it parses the natural language inputs. Read More

By Peter Cooper / October 9, 2006

Restvideo

After watching Geoffrey Grosenbach’s latest episode of Peepcode, a pay-for screencast series showing you how to do cool stuff with Ruby on Rails, I can safely say Restful Rails is the best $9 you could spend on Rails knowledge right now. Almost 90 minutes of screencast bliss packed with info is a steal, especially since you’ll save so much time playing about.

It covers REST (Representational State Transfer), a concept, in Rails at least, where your models and data rule the roost. URLs are accessed with differing HTTP verbs depending on the action (GET to get data, POST to create data, etc) and data can be returned in different formats (HTML, XML, sometimes RSS) on the fly. Read More

By Peter Cooper / October 9, 2006

Restcheatsheet

Check out this cool PDF cheatsheet covering REST on Rails. It was put together by Geoffrey Grosenbach and covers routing, verb/path formats, nested resources, MIME types, the scaffold resource generator, and custom method examples. Read More