The Mega March 2012 Ruby and Rails News and Release Roundup
And again, a mixture of travel, illness, and exhaustion have prevented me from my weekly updates on here (although Ruby Weekly is still going out on a weekly basis!) so here's a bumper update for all of the top Ruby and Rails news from March 2012.
Highlights include: Matz wins a prize, Ruby is approved by the ISO, some awesome jobs, Bundler 1.1, Vagrant 1.0, Rails 3.2.3, Avdi Grimm's Object on Rails book, the Pragmatic Programmers release some more awesome books and, of course, a lot more.
Matz Wins FSF's 2011 Award for the Advancement of Free Software
Free Software Foundation president Richard M. Stallman announced the winners of the FSF's annual free software awards recently with Ruby's own Yukihiro 'Matz' Matsumoto picking up the Award for the Advancement of Free Software. He joins a short list of open source heroes including Alan Cox, Larry Wall, and Guido van Rossum.
Released: 'The Rails View' by John Athayde and Bruce Williams
Working in Rails' view layer can be tricky with brittle, complex views all too easy to rustle up. This book digs into strategies and approaches for upping your Rails view game and breaking free from tangles of logic and markup in your views. Two thumbs up.
Objects on Rails: How to Apply Classic OO Ideas to Rails Apps
For a while now, Avdi Grimm has been slaving over a delicious 'developer's notebook' documenting guidelines, techniques, and ideas for applying classic object-oriented thought to Rails apps. He's now released it free to read on the Web. I recommend reading this, it's good.
Ruby Language Accepted As An International Standard by ISO
Dalla Rosa noticed a press release from Japan's IT Promotion Agency which notes that the long awaited Ruby specification (not to be confused with RubySpec) has been approved by the International Standards Organization as the ISO/IEC 30170 standard.
Rails 3.2.3 Released
The usual laundry list of minor changes but the biggest deal here is the default value of 'config.active_record.whitelist_attributes' becomes 'true', inspired by the recent GitHub mass assignment issue. Note that the change only affects newly generated apps but you can learn more in this post.
Yehuda Katz Raises $40k for 'rails.app', an OS X Rails Environment Installer
Recently Yehuda Katz (well known as the lead architect behind Rails 3) launched a campaign to raise $25k to build a Ruby and Rails environment installer for OS X. It has now gone on to raise over $40k but left some in the community wondering quite what was really needed.
Vagrant 1.0: Virtualized Development for the Masses
Vagrant is a popular VirtualBox-driven Ruby tool for quickly building and deploying virtual machines for development and testing purposes. After years of development, it has reached the all important 1.0 release. Congrats!
Bundler 1.1 is Out!
No official blog post yet, but Bundler 1.1 is out and you can grab it with a gem install bundler. The big win on this release is significantly improved performance when fetching gemsets with complex dependencies.
GitHub Public Key Security Vulnerability and Mitigation
GitHub experienced a security issue involving mass assignments in Rails. They've fixed it up now but you might want to get up to speed with what happened.
The Ruby on Rails Tutorial, Now With Twitter's Bootstrap
Michael Hartl has updated the new Rails 3.2 version of his popular 'Rails Tutorial' to use Twitter's increasingly popular Bootstrap framework.
ActiveResource Removed From Edge Rails (and Rails 4.0)
Just as it says in the title, but take care to scroll down to see the full story, since the proposal was initially deferred but has now been implemented. Active Resouce is now available as a separate project.
The Prags Release 'The dRuby Book'
Learn from legendary Japanese Ruby hacker Masatoshi Seki in this first English-language book on his own Distributed Ruby library (DRb). Pick up distributed programming ideas straight from the source here. Available in print and e-book formats.
Exploring Ruby's Regular Expression Algorithm
Pat Shaughnessy, Ruby implementation spelunker extraordinaire, digs into Oniguruma, the regular expression engine used by MRI Ruby 1.9. What does it do and how does it process your regexes?
Why You Should Be Excited About Garbage Collection in Ruby 2.0
Could it be Pat Shaughnessy again? Yes, sirree. Here he digs into the 'bitmap marking' garbage collection algorithm that promises to reduce Ruby's memory consumption in Ruby 2.0.
Using MiniTest::Spec With Rails
Ken Collins has been working on minitest-spec-rails, a gem that makes it reasonably trivial to use MiniTest::Spec (part of the Ruby 1.9 stdlib) with Rails. Learn how here. Ignore the date on this article, it was just updated!
Building Backbone.js Apps With Ruby, Sinatra, MongoDB and Haml
An extensive tutorial by Addy Osmani on building a Backbone.js at both the front and back ends. The server side part is powered by Ruby's light but powerful webapp DSL Sinatra.
Zero to Jekyll in 20 Minutes
Jonathan Jackson explains how to use the popular Jekyll blog-focused static Web site generator from scratch.
What Would Happen If You Ran 'bundle update' Right Now?
Is there a bundle command to tell you what would be updated with bundle update, without actually making those updates? With Bundler 1.1.. yes there is!
GitHub's Ruby Style Guide
The folks at GitHub have put together a document outlining the Ruby styles and conventions they use for their internal apps. Plenty of good practice in here, along with a little opinion.
Learning More About JRuby from Charles Nutter
Pat Shaughnessy has interviewed Charles Nutter of the JRuby core team and digs into the meaning behind JRuby, what JRuby is well suited for, how its internals work, and where JRuby is headed in the future.
A Use of Enumerable#chunk
Enumerable#chunk is a not particularly well known method in the Enumerable module (and therefore available to your arrays and hashes by default) and in this post, Eric Hodel shows off a use for it.
How to Use Bundler Instead of RVM Gemsets
Stephen Ball recently heard Bundler maintainer Andre Arko say that Bundler can obviate the need to use RVM gemsets. In this post, he investigates the idea.
Rails Is Just An API
Alex MacCaw says there's nothing wrong with relegating Rails to the API layer.
Tailin' Ruby: 'Faking' Tail Call Optimization
By default, Ruby doesn't implement tail call optimization (although it can be enabled in various ways in 1.9) so Magnus Holm set out to try and 'fake' it. An interesting experiment.
How to Test External APIs
It's common to integrate with an external API and in order to effectively test the integration, you might want to stub it out. Jared Carroll of Carbon Five shares a testing strategy using stubs for an external API.
Ruby 2.0's Enumerable::Lazy
Innokenty Mihailov's Enumerable::Lazy patch was accepted into Ruby trunk this week which gives us some ActiveRecord 3-style 'lazy evaluation' features on enumerations in Ruby. Worth checking out as a key new feature to come along in Ruby 2.0.
API Versions in Rails Routes: A Mind Blowing Answer?
Ryan Bigg promises to 'blow your mind' in his answer on Stack Overflow that shows some Rails 3 routing magic (in the context of versioning an API through the URL).
Sinatra + Heroku = Super Fast Deployment
Darren Jones demonstrates creating a very simple Sinatra app and deploying it on Heroku.
Getting the Most out of Bundler Groups
Bundler lets you create different 'groups' in your Gemfile so different environments can have different dependencies. Iain Hecker shows off some uses for this feature.
Yehuda Katz's Proposal for Improving Mass Assignment (in Rails)
After the GitHub issue (above), Rails 3 guru Yehuda Katz came up with a proposal for improving how mass assignment works in Rails. I don't agree with the approach but it sparked an interesting discussion.
The NOR Machine: Building a CPU With Only One Instruction
Have you ever developed in an assembly language? Have you developed an assembly language? Ever developed a CPU running your own assembly language? Alexander Demin shows you how in this fun Ruby-oriented walkthrough.
Flexible Searching with Solr and Sunspot
Mike Pack outlines how the Solr full text search server can benefit your project's indexing capabilities and shows how Solr can be used within a Rails app using Sunspot.
A Common .ruby-version File For Ruby Projects
Got .rvmrc and .rbenv-version (and possibly more) floating around your projects? What if we had an ecosystem of fabulous Ruby managers that all understood the semantics of a generic dotfile like '.ruby-version'? Here's a proposal to weigh in on.
Wizard-ify Your Rails Controllers with Wicked
Multi-page 'wizards' are popular in both desktop software and webapps and Wicked by Richard Schneeman brings a way to make them easier to produce in a Rails app.
Load Balancing and Reverse Proxying with Nginx (for Rails Apps)
Nginx is a modern, open-source, high-performance web server that's well known in the Rails hosting world. In this post, Justin Kulesza demonstrates how to do a load balanced, reverse proxying setup with Nginx for a Rails app.
What is docrails?
docrails is a branch of Ruby on Rails with public write access where anyone can push documentation fixes. Xavier Noria explains how it works.
The Hardest, Most Rewarding Job I've Ever Had
Mitchell Hashimoto of the Vagrant project (which recently hit 1.0 - above) shares his take on the history of Vagrant and the experiences it brought him. Always nice to see a post like this.
Watching and Listening
RailsCasts on Copycopter
Copycopter provides an interface that clients can use to edit the text in a Rails application. Learn how to deploy a Copycopter server using Heroku and integrate it in a Rails application through I18n.
PeepCode Play by Play: Jim Weirich
PeepCode continues its Play by Play screencast series with Jim Weirich, the author of the ubiquitous Rake build tool for Ruby and chief scientist at EdgeCase. Want a view over an experienced Rubyist's shoulder? This is a good place to go.
Don't Fear The Threads: Simplify Your Life with JRuby
An epic 161 slide slide-deck by David Copeland, focused on threading and JRuby.
Inside Ruby: Concurrency and Garbage Collection Explained
Matt Aimonetti's presentation from Ruby Argentina has finally been released. Skip a few minutes in unless you want to enjoy Matt's Spanish skills.
14 Presentation Videos from ArrrrCamp 2011
Videos from last year's ArrrrCamp have been released, including presentations by Corey Haines, Elise Huard, Jim Gay, Anthony Eden and John Long.
RubyConf Argentina 2011 - Day 1
It must be the week for releasing conference videos. RubyConf Argentina (back in November 2011) has released theirs too.
Refinery CMS Basics with RailsCasts
Ryan Bates shows off how to quickly build a Rails app with out of the box content management using the Rails-based CMS, Refinery CMS.
Love Your Lib Directory
Brian Cardarella shares some conventions over the use of the 'lib' directory within Ruby projects and libraries. A 20 minute talk given at Boston.rb.
Ruby Rogues on Bundler with Andre Arko
The lovable rogues are back for another hour long podcast, this time discussing the Bundler project with its maintainer Andre Arko.
Libraries and Code
Rubydeps: Create Dependency Graphs from Test Suites
Rubydeps is a tool to create class dependency graphs from test suites. It runs your suite, records the call graph between the classes, and uses this info to create a Graphviz dot graph.
Weary: Framework and DSL for Building RESTful Web Service Clients
Mark Wunsch's Weary is a suite of tools built around the Rack ecosystem that makes it both easy to build elegant clients for (ideally RESTful) Web services.
store_configurable: A Hash for Config Options on ActiveRecord Objects
A zero-configuration recursive hash for storing a tree of options in a serialized ActiveRecord column.
S3itch: Amazon S3 WebDAV Proxy for Skitch
Popular OS X screenshot tool Skitch is dropping its native file sharing component so Mathias Meyer has built a Sinatra-based proxy that can accept files over WebDAV and then upload them to S3.
minitest-metadata: Metadata for your MiniTest Test Cases
minitest-metadata allows you to set metadata (key-value) for your test cases so that before and after hooks can use them.
RSpec is Not The Reason Your Rails Test Suite is Slow
In a simple gist, RSpec maintainer David Chelimsky dispels the myth that RSpec drags slowness around with it, wherever it goes.
Ry: The Simplest Ruby Version Manager
We have RVM, we have rbenv.. we now have 'ry' too! It bills itself as the 'simplest Ruby virtual environment' and its major design goal is to explicit, unobtrusive, and easy to query. It can also lean on ruby-build to install new versions.
Rake-Pipeline: Rake-Powered Asset Packaging
A system for packaging assets for deployment to the web built as an extension to Rake. Developed by the masterminds over at Living Social.
Capital: 'Top Off' Your ActiveRecord Columns
Capital extends what's returned via your model's columns, converting values to and from 'rich objects.' It's inspired by MongoMapper's serialization.
Ruby-Doc.com: Ruby and Rails API Docs Hosted on S3
Rob Cameron was getting tired of slow or inaccessible Ruby and Rails docs so has rendered and put up an entire set of Ruby and Rails API docs (various versions) on Amazon S3.
VCR 2.0.0 Released: Recording Your Tests' HTTP Interactions
VCR is a library for recording a test suite's HTTP interactions to replay during future runs. Version 2 is now out and brings a lot more flexibility, custom request matchers and serializers, request hooks, and more.
'wow how come I commit in master? O_o'
The Rails commit that started the drama around the GitHub / Rails mass assignment issue. Linked for posterity but also because the comments turned into the typical meme-fest.
Zonebie: Timezone Randomization for Robust Time Tests
Zonebie helps you hunt down bugs in code that deals with timezones by randomly assigning a different timezone on each run.
Metriks: A Simple, Lightweight Ruby Metrics Experiment
An experiment in making a thread-safe, low impact library to measure performance metrics in your Ruby apps. One of the most interesting uses is to have it update your process's title so the metrics info appears live in ps or top!
md2man: Markdown to Man Page
A Ruby library and command-line program that converts Markdown documents into UNIX manual pages.
Rocket Pants: Tools for Building Well Designed Web APIs
A humorously named and highly opinionated toolkit for building well-designed Web APIs, with a focus on Rails.
MethodProfiler: Get Performance Info about Methods on Your Objects
MethodProfiler collects performance information about the methods in your objects and creates reports to help you identify slow methods. The collected data can be sorted in various ways, converted into an array, or pretty printed as a table.
Rails Developer at On The Beach [Manchester, UK]
One of the better designed and more creative job ad pages I've seen!
Ruby and Web Developer at Hubbub [Highbury, London, UK]
Pass a simple API challenge to apply..
Last but not least..
'Working With Unix Processes' by Jesse Storimer
Jesse Storimer doesn't think you should need to learn C to pick up some intricacies of Unix and Unix-style systems. In this (pay for) e-book he takes a Ruby based approach at explaining file descriptors, processes and forking, signals, and more.
Cloudinary: Image Manipulation in the Cloud
A lot of webapp developers seem sick of installing things like ImageMagic to do image cropping and scaling. Cloudinary adds another solution. It's a commercial service but makes it easy to do image manipulations via URLs.
Heroku Add-ons Catalog
There are lots of add-ons for the Heroku cloud hosting service nowadays but Ivan Schneider thought they were hard to scan through, merely being in an alphabetical list, so he built a different way to browse them.