Issues » 70

Previous issues | Read this issue on the Web
Ruby Weekly Issue 70
November 30, 2011
From the Editor's Desk..
Welcome to issue 70 of Ruby Weekly - it's bumper sized this week. And a big congratulations to David Heinemeier Hansson, the creator of Rails, as he got married this week.
Sinatra: Up and Running (New Book from O'Reilly)
A new book from O'Reilly, written by Alan Harris and Konstantin Hasse, that takes a look at the popular Sinatra Ruby webapp library. It's available in e-book and print formats.
awesome_print 1.0 Released
OK, it's already at 1.0.1, but Michael Dvorkin's awesome 'pretty printer' for Ruby objects has reached its 1.0 milestone. This is definitely one of my favorite Ruby projects.
From Our Sponsor
Scout: Sys-Adminless Hosted Server Monitoring, Built on Ruby
Monitoring a server cluster without a sys admin? You'll love Scout. You can be up and running within five minutes and then configure your monitoring and reporting scripts online (they'll be automatically and securely retrieved by each of your monitored servers). Easy for sysadmins and non-sysadmins alike.
Articles and Tutorials
Cut and Polish: A Guide to Crafting Gems
At the RubyC conference in Ukraine, Pat Allan gave a talk about building gems, some of the tools you can use, and some best practices. All 47 minutes of it is now available to watch here too.
Method Chaining and Lazy Evaluation in Ruby
Ever wondered how that ActiveRecord query style method chaining works? Jeff Kreeftmeijer shows you one way to go about implementing your own method chaining mechanism.
Implementing Autocomplete with Redis in Rails 3.1
Pat Shaughnessy demonstrates how to set up a Rails 3.1 app to do Redis-backed autocompletion using the Soulmate library. Very detailed and a lot to learn here.
Ruby Blocks as Dynamic Callbacks
A callback is a block of code passed as an argument to a method which can be run under certain conditions later on. Matt Sears shows off a clever technique to have multiple types of callback within a single code block which can be triggered independently.
Writing Simple Ruby Client/Servers using Protobufs
Rails 3.2 Gets 'pluck' Method, Returns Array of Table Column Values
ActiveRecord::Relation#pluck is used to get values from a single column of a table. It accepts a column name as its argument and returns an array of values. It'll be in the forthcoming Rails 3.2 or, if you're brave, is in head now.
Acceptance Testing with Responsive Layouts
The State of Ruby ORMs
Piotr Solnica presents a roundup of the popular Ruby ORMs (Object Relational Mappers) ActiveRecord, DataMapper, and Sequel.
Xavier Shay's DataMapper Retrospective
Xavier used DataMapper, rather than ActiveRecord, on his last two major projects and in this post he shares what he sees as the pros and cons of the DataMapper approach.
In-Place Editing - RailsCasts
Ryan Bates's weekly screencast outing shows us how to edit an on-page attribute in-place using the 'Best In Place' gem. He also shows how to add validations and support for different field types.
Pat Shaughnessy on Bundler 1.1
I've recently linked to a couple of great articles by Pat about Bundler 1.1's new features and performance improvements but if you want it in 20 minute video form.. here you go :-)
Heroku and Rails 3.1
The Ruby Rogues on Software Craftsmanship
The latest episode of the always awesome Ruby Rogues podcast looks at 'software craftsmanship', code retreats, and developer apprentice programs.
Building a Rails Plugin with Tested Assets (Screencast)
An hour long screencast by Dmytrii Nagirniak working in real time on a Rails plugin, along with using Sass, Jasmine, and CSS assets. Be warned, however, it's not a particularly easy watching experience, even at fullscreen.
Libraries and code
Jbuilder: DHH's JSON Production Library
Despite getting married this week, DHH has still been busy coding. Jbuilder gives you a simple DSL for declaring JSON structures that beats massaging giant hash structures. This is particularly helpful when the generation process is fraught with conditionals and loops.
Wash Out: A Simple Rails 3 SOAP Server Library
Wash Out is a gem that greatly simplifies creation of SOAP service providers within Rails 3 applications.
Methadone - Build Better Ruby-based CLIs with Logging and Cucumber Support
Methadone (gotta love these project names..) is a collection of tools 'to make your command-line apps easily awesome'. It includes a DSL that wraps OptionParser, logging utility classes, and Cucumber steps.
Command Line Reporter: Nicer Formatting for Ruby Script Output
Command Line Reporter offers RSpec-like formatting of the output of your Ruby scripts. Rather than using "puts" statements everywhere, you can lean on CLR's extensible methods and formatters.
Moxy: A Programamble Mock HTTP Proxy
Moxy (or moxy) is a programmable mock proxy. It is an HTTP proxy exposing web hooks that you can use in order to tell it what to do, and when to do it.
faye-websocket: A Standards-Compliant WebSocket Library
Ruby Jobs of the Week
Rails Developer at New Relic [Portland, Oregon]
Senior Rails Engineer at RevenueMed [Norcross, Georgia]
Want your job featured? Learn more here.
Last but not least..
Ruby Command-Line One-Liners (Working, This Time)
Due to a Tumblr bug, this link didn't work properly in last week's Ruby Weekly so it's in again.. a bumper collection of Ruby one-liners you can use from the command line, mostly to perform various functions on files and other streaming data.
Published by Cooper Press.
Want to sponsor an issue? See our Q2 2014 media kit.

© 2014 Cooper Press Ltd. Email policy Privacy policy
Office 30, Fairfield Enterprise Centre, Louth, LN11 0LS, UK
Update your email address
or unsubscribe here

ONE e-mail each Thursday. Easy to unsubscribe. No spam — your e-mail address is safe
Published by Cooper Press and curated by Peter Cooper