You have disabled auto-rotation for stories. Re-enable?
With the release of Rails 4, support for Rails 2.3 and Rails 3.0 has ended. Security vulnerabilities are no longer patched for these versions. Rails LTS offers a solution for mission critical applications by providing security patches for old versions of Rails.
Last week, Ruby 1.9.3p547 was released. As the release announcement explains, there is one exception to the security only maintenance phase that 1.9.3 is currently in, and that’s critical regressions. Apparently some Ruby users on Ubuntu 10.04 LTS noticed that when their system had an old version of OpenSSL, a segfault was possible when using the get method on Net::HTTP, and this release fixes that prevents the segfault. Only affected users are invited to upgrade. ￼
Harlow Ward wrote in to let us know about a small library from Michael Choi and his blog post on the HotelTonight engineering blog covering Rails email failover with multiSMTP support. Using the Mail gem, MultiSMTP gives your app multiple SMTP server configuration support with failover. With multiple SMTP servers configured like SendGrid, Mandrill, or Google you get multiple host redundancy and very likely geographical and service redundancy.
The virtue and value of mocks has been under siege for the past few weeks as DHH and others attacked the construct for enabling bad behavior when testing. Justin Searls, who I discovered with his great Breaking Up With Your Test Suite talk at Ancient City Ruby this year, created a great screencast in which he shows how useful mocks can be in what he calls Discovery Tests. He describes only using mocks to the extent he needs them in order to specify the contract between a subject's dependencies. The screencast is quite thorough and provides a lot of concrete examples. I think whether you agree with him or not, it’s rare enough to be able to witness another developer’s design habits at play, that you should take the time to watch this. He also mentions Gary Bernhardt’s Test Isolation Is About Avoiding Mocks post which is long, but quite worth the read, as well.
Piotr Solnica, maintainer of ROM — the Ruby Object Mapper library — put together a post where he describes the current state of ROM, the purpose, the foundation, where it’s been, the current ecosystem, and most importantly, instructions on how to get started contributing to the project. Because the project has been going on for so long, there is a lot of history and experimentation. There’s also a large number of libraries and concepts floating around. Things like mutant for mutation testing, memoizable for method return value memoization and adamantium to create immutable objects. So, rather than have to re-explain all of this knowledge for each developer who wants to get started, he distilled it into one page.
Josh Peek, the current maintainer of the ExecJS gem (which the Asset Pipeline depends on) announced on Twitter yesterday that he’s looking for a more active maintainer for the project, especially someone who cares about Windows support.
George Mendoza wrote in to let us know about a Capybara extension library that he’s created and released, called Napybara. It's a Capybara extension which adds a lightweight DSL for defining Capybara helpers that are easy to abstract, compose, and introspect. An example of this are for nested reference support for selecting your page inputs and elements. Basically, rather than just working with element names or whatever, with Napybara, you can "dot-reference" page objects by tag name or class to get all the way down to what you’re after. Rather than maybe doing within scopes or something, you can now just reference elements more directly with something like "testpage.form.row1.text_field". You can find by Ruby objects or selectors, you can easily determine element existence, it works with RSpec and it is extensible. Check it out on GitHub.
Zachary Scott wrote an interesting piece of documentation for Rails last week, covering method visibility. While the Ruby core team marks methods that people shouldn’t use directly as private, on the Rails core team some internal methods are indeed public but they’re marked with a :nodoc: comment. A lot of people do ingenious stuff with internal methods like arel_table and end up getting bit whenever they are changed, renamed or removed without notice from the Rails core team because that’s exactly what people should expect.
Ruby5 is released Tuesday and Friday mornings. To stay informed about and active with this podcast, we encourage you to do one of the following:
This episode was co-produced and edited by audio guru Jamison Rabbe.
A rich text editor that isn't awful, over one thousand free programming books, handle email subscriptions and track emails sent, super easy email unsubscribe, and a cheatsheet for OAuth exploits.
In this episode we talk about new Ruby releases for versions 2.1.2 and 2.0.0-p48, Jekyll 2.0, Ruby core team disputing a CVE report, How Batched Queries work in Rails and FiniteMachine.
Untangline spaghetti code, opening the Atom source, better presenters with DumbDelegator, managing your OS X setup with osxc, an intro to Rails view caching, and the Eldritch async DSL all in this episode of the Ruby5!
Good news from the Ruby Core meeting, TDD debates galore, AdequateRecord, and some surprisingly uneventful code ping pong this week.
Looking to learn about Ruby? Take a look at the Ruby Path on Code School
This podcast is produced and distributed by Code School. Copyright © 2018 Code School LLC