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

Author Archives: Peter Cooper

By Peter Cooper / August 14, 2006

Apress

Authors and technical reviewers required!

Technical publishers Apress are busy working on what be the biggest line of Ruby and Rails books in the industry, and now that I’ve figured out how to self publish a book, my book Beginning Ruby is set to be one of the first to hit the shelves along with Beginning Ruby on Rails, Pro Ruby, and Beginning Ruby on Rails E-Commerce all by other great developers (Jarkko Laine is working on the e-commerce book, for instance).

Keir Thomas, an editor at Apress and responsible for the open-source web development line, has told me they’re looking for even more developers to get involved with their Ruby and Rails related offerings. Read More

By Peter Cooper / August 13, 2006

Evan Henshaw-Plath (more commonly known as rabble) is in the process of writing a book for O’Reilly about testing and debugging Ruby on Rails applications, and has just launched a companion blog, Testing Rails. The subject of the blog is exactly what the title says, and rabble hopes to post at least one in-depth tutorial relating to Rails and testing each week. The first is Building Tests from Logs – Test Driven Debugging. Read More

By Peter Cooper / August 11, 2006

100Dollars

It’s Ruby Inside’s first competition! Ruby Inside is desperate for amazing Ruby and Rails content to link to, so let’s get the ball rolling..

Ruby Inside is offering a top prize of $100 for blogging about Ruby or Rails this week. The winner will be drawn at random from all Ruby related blog posts linked to in a comment or trackback made to this very post only. To win, your post must demonstrate something interesting or new about Ruby that Ruby Inside users could find interesting. Any tutorial, insight, cool code example, etc, is eligible.

A single second prize of $15 is offered for just linking to this contest on your blog or forum. Read More

By Peter Cooper / August 11, 2006

Flizer-1

Feedalizer is a Ruby library that lets you easily scrape Web pages and convert them into RSS feeds. Some demo code that generates a feed: Read More

require “feedalizer”
require “time”

url = “http://sydsvenskan.se/serier/nemi/article101047.ece?context=serie”

feedalize(url) do
feed.title = “Nemi”
feed.about = “…”
feed.description = “Daily Nemi strip scraped from Sydsvenskan”

scrape_items(“option”) do |rss_item, html_element|
rss_item.link = html_element.attributes["value"]
rss_item.date = Time.parse(html_element.innerHTML)
rss_item.title = rss_item.date.strftime(“%Y-%m-%d”)

# This grabs the page for a particular strip and extracts the relevant img element
rss_item.description = grab_page(rss_item.link).search(“//img[@width=748]“)
end

output!
end

By Peter Cooper / August 11, 2006

ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(
:default => "%m/%d/%Y",
:date_time12 => "%m/%d/%Y %I:%M%p",
:date_time24 => "%m/%d/%Y %H:%M"
)

Richard Leonard demonstrates how to use the date formats that come with Rails, as well as how to override or add some of your own directly into Rails’ helpers on the fly. Read More

By Peter Cooper / August 11, 2006

Rubydebuggers

Scott Broson has reviewed four different Ruby debuggers and works out which is the best. Read More

By Peter Cooper / August 9, 2006

Mathew Abonyi has made available the initial release of PluginTestKit, his test kit designed to make implementing testing for plugins easy. If you’re actively developing plugins and bemoaning the lack of a decent test system, check it out. Read More

By Peter Cooper / August 8, 2006

Atomrxml

Scott Raymond’s useful Atom and RSS RXML templates for Rails have answers developers’ prayers many times. They’re easy to adapt for your own circumstances. Read More

By Peter Cooper / August 8, 2006

Continuing the Troll Of The Month feature, I came across this gold today: “Who are these mongrel Ruby developers?” by Peter Thomas, a Java developer. It was posted in late July, but as I’ve only just found it, and it came after July’s TOTM, it counts.

Of course, this award could be taken to be proving his entire point, which I think is reasonably valid. The troll award therefore, doesn’t go to Peter and his well explained argument, but to the first commenter on his post, ‘Mikael’, who has this to say:

These are children drawing on the walls with crayons with some crayon salesmen egging them on. Read More

By Peter Cooper / August 8, 2006

Aamp

Shane Vitarana, creator of Rails Stats, has released a new plugin, acts_as_most_popular. acts_as_most_popular adds a method for each column in your model’s table called most_popular_* that returns an array of the most popular entries within that column. For example, if you have 1000s of users in your user table, User.most_popular_names would return an array with the most popular names, as found in the name column.
Learn more here. This seems like the sort of thing that might eventually be useful as a Calculation of some kind. Read More

By Peter Cooper / August 7, 2006

Railsmodelgraph

Matt Biddulph demonstrates how to create a graph like the one above for your own Rails application’s models using a 18 line Ruby script and a GraphViz compatible graphing program (such as OmniGraffle that comes with the Mac – I’m sure other operating systems will have an equivalent). Read More

By Peter Cooper / August 7, 2006

Beautify

Tim Burks shows how to use a Ruby code beautifer written by Paul Lutus directly from TextMate to beautify your Ruby code with a single keypress. Ideal if you’re not consistent with the tabulation and spacing yourself! Read More

By Peter Cooper / August 6, 2006

Dzoneruby

Okay, the title is a little white lie. DZone is actually a Digg-like site covering all programming and development topics, but recently its Ruby section has become more popular than when I first checked it out a few months ago. With its focus on developers, DZone has a great feel, and I personally feel many of the features are better than those offered by Digg. If you have a Ruby article to promote, give it a try. Read More

By Peter Cooper / August 5, 2006

Datepicker

DatePicker is a cute date selector tool that’s been designed to work easily with Rails applications. That’s it. You can download the source and get going straight away from here. Read More

By Peter Cooper / August 4, 2006

RubyForIIS is a package that helps you set up the bindings between Ruby, Rails, and Microsoft’s IIS server system. Project founder, Boris Leenaars, says:

The purpose of the RubyOnIIS project is to create a consistent setup procedure and helper applications to make life easier when trying to get Ruby on Rails running together with the Microsoft Internet Information Server, a.k.a. IIS.

Find out more. Read More