The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
So what is “binding.pry” exactly?
The very first feature that you learn about Pry is undoubtedly “binding.pry”. You put it here, there and everywhere; you’re happier than you’ve ever been before. In simple words: “binding.pry” makes your life a lot easier. But, have you ever wondered what “binding.pry” is?
All you need to know about writing a mountable Rails Gem with rspec
writing mountable rails gem with rspec [more inside]
Is MonoLogger safe?
MonoLogger is a “lock-free logger for Ruby 2.0”. It’s actually the exact same as Ruby’s Logger, minus the lock. I wasn’t sure if this was safe, so I did some research. Turns out MonoLogger does the right things to ensure that log messages aren’t interleaved even in the face of multiple threads. Warning: you might learn a thing or two about working with Unix file descriptors!
Temporarily add behavior to objects
The ability to add behavior to an object for a short time can make for some very flexible structures. Casting is a new gem that allows you to run methods from a module at runtime without altering the object’s superclass structure (for example, no need for #extend).
Countdown to the "big announcement" at Ruby Kaigi
The countdown on ruby-lang.github.io has almost reached zero. Once the clock hits zero, the “big announcement” will be made at Ruby Kaigi and posted on the website. Only seven more hours to go!
Creating Static Sites in Ruby with Rack
It can be useful to host static sites on heroku sometimes. Everything I found on the internet, including heroku’s own guide wasn’t ideal, so I created a tiny gem to do this and wrote a blog post about it.
heroku-buildpack-ruby-bower - Deploy Rails app to Heroku with Bower
I just released heroku-buildpack-ruby-bower. See Wiki page for usage.
Profiling Ruby 2.0 apps using DTrace - Part 2
Part 2 of much loved Profiling Ruby 2.0 apps using DTrace
Troubleshooting Konacha Timeout Errors
If you’re having Konacha timeout errors, you’re not alone. Read how we fixed this problem at SmartLogic.
Errbit 0.1.0
Errbit is not dead and the errbit team release the 0.1.0 version.
Auto-Saving Screenshots on Test Failures & Other Capybara Tricks
I just released a blog post detailing some Capybara tricks.
Compose nested entities with Datamappify
For those of you who don’t already know, Datamappify is a library for separating domain logic from data persistence. It utilises existing ORMs so you don’t lose the powerfulness of say, ActiveRecord. [more inside]
Phusion Passenger 3.0.21 and 4.0.5 released, fix temp file vulnerability CVE-2013-2119
Phusion Passenger 3.0.21 and 4.0.5 have been released. Both versions contain, among other changes, a fix for security vulnerability CVE-2013-2119.
Naught: A toolkit for building Null Objects
I just released a gem called Naught for implementing the Null Object pattern. While Null Objects aren’t exactly difficult to create by hand, Naught has some features you may find helpful.
Managing test data with factory girl
When writing software tests, you usually need to get your application into a certain state by creating test data. This test data is the basis to run your tests on. In this screencast you will learn about the test data generation tool factory_girl. [more inside]
HAL, Siren, Rabl, Roar, Garner: Building Hypermedia APIs in Ruby/Rails
This blog post covers a broad overview of Hypermedia API technologies for Ruby, and why we went with HAL, Grape, and Roar at reverb.com:
Rails Quick Tips - ActiveRecord::Calculations.pluck
Pluck is an ActiveRecord calculation method introduced in Nov 2011 and is designed to return a collection of values by performing a single column SELECT query as direct SQL. Now what problem could this help solve and how does it affect us?
RailsGirls Summer of Code crowdfunding campaign
Did you know that women make up only 2% of of the open source community? That’s right. Only 2%. [more inside]
Setting up Jasmine tests for CI
Say you’re using Jasmine, and you’re writing CoffeeScript in a Rails app. Here are some tips for running those tests in CI environment.
Don't mock what you don't own
Continuing a discussion about how to achieve better isolation in your tests.
ruby-install 0.1.0 released!
ruby-install 0.1.0 has been released! Supports MRI, JRuby, Rubinius, installing into /opt/rubies or ~/.rubies, installing arbitrary versions right after they are released, installing build dependencies via the package manager, applying arbitrary patches and passing in arbitrary ./configure options.
RuboCop 0.8.0 Is Out, Support for JRuby and Rubinius Is In!
I just released RuboCop 0.8.0! The big news is that RuboCop now runs on JRuby and Rubinius :-)
Need to Version Your API?
Quit polluting your routes file with version namespaces or complicating your logic with separate controllers. Version Cake 1.2 is the unobtrusive way to version APIs in your Rails app. Works great with Jbuilder and RABL. Now with Rails 4 support. [more inside]
RSpec 2.14.0.rc1
RSpec 2.14.0.rc1 has been released. RSpec 2.14 introduces a new syntax for message expectations, bringing them in line with the new expect syntax for state based expectations. [more inside]