Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

LABS
Ripper Event structure

If you know about Ripper, you know that it’s a bridge between the ruby language parser and your own ruby app. It lets you parse ruby files just as ruby would see them. It’s currently marked as experimental, but its been in ruby since 1.9.

Read more »

LABS
Ruby 2.1.0 changes of note.

The Ruby 2.1.0

Release is nearly a month old, so its well past time to look over the changes and uncover the features least discussed.

This release received relatively exceptional social coverage. The attention largely due to the addition of Generational Garbage collection.

Read more »

PIVOTAL LABS
Visualizing Garbage Collection by Pat Shaughnessy

Visualizing Garbage Collection in Rubinius, JRuby and Ruby 2.0

Watch live streaming video from pivotallabs at livestream.com

In this talk we’ll dive into Ruby internals and take a close look at an ugly topic: garbage collection. How do these Ruby VM’s allocate memory for new objects?

Read more »

LABS
Capybara's save_page with CSS

At Pivotal, we often use Capybara to write a suite of integration tests that navigate a browser through any scenario that can emerge in the application. We use these tests to guard against regressions and to drive out the design of the application in a red-green cycle throughout the day.

Read more »

LABS
Messages Not Types: Exploring Ruby's Conversion Protocols

Duck typing is a style of programming that relies on what an object does, rather than on what it is. Avoiding class dependencies results in highly flexible code. Ruby’s conversion protocols, used throughout the core and standard libraries, are a great example of the power of duck typing.

Read more »

LABS
Testing Custom Form Builders in Rails

Rails gives you the ability to customize the output when using the form_for view helper in a view by using a custom form builder. This functionality is great if you want to change the default HTML generated by the form_for view helper.

Read more »

LABS
Using Ruby Expect Library to Reboot Ruckus Wireless Access Points via ssh

Abstract

We require a nightly rebooting of our Ruckus Wireless WiFi access points.  The Ruckus controllers (ZoneDirector™ and FlexMaster™) do not offer that capability [automated reboots] via their web interface.  This blog posts describes a method of using the ruby expect library, ssh, cron, Ruckus’s CLI, and a ruby script to reboot the APs.

Read more »

LABS
Pivots Talking Tuesday: Arduino the Ruby way

This week on Pivots Talking Tuesday, I present to you Austin Vance speaking on using Ruby with Arduinos at Ruby Conf 2012. If you’re wondering what the thing is he’s standing next to, it’s a Ruby and Arduino powered tshirt cannon… and yes he fires it during his talk.

Read more »

LABS
ActiveRecord Refactoring: Move Association Behavior to Associated Class

In a typical Rails app, one ActiveRecord model tends to accumulate a lot of associations and related methods. This is usually the User class; e.g., the User has many posts, comments, contacts, projects, etc. It’s also common to have a few instance methods to filter these associations, e.g., User#unpublished_posts, or User#recent_contacts.

Read more »

LABS
Reading the Ruby Source to Understand Rails Idiosyncrasies

Suppose somewhere within our Rails application, we have something like the following line of code.

(10.days.ago..2.days.ago).include? Date.today

The formulation represents the power of Ruby and the expressiveness of Rails. All seems fine and well. That is, until the code is executed.

Read more »