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.
Faster testing workflow with Spin and Kicker
I just released a testing tool that I’ve been using for the past few months. It really sped up my workflow, especially on large Rails projects. Check out the README.
Draper doesn't solve the Rails helper problem
Draper “kills the helper”, but in fact it just moves the problems we have with Rails helpers into namespaces. Here’s why I don’t think Draper solves the Rails helper problem.
Getting Ruby, QT, and Windows to play nice
A coworker and I recently battled Ruby 1.9, QT, and Windows while trying to create some desktop applications. The ultimate result is the qtbindings gem which makes it easy to use QT and Ruby on Windows. Read about all the pain on my blog.
Control Your Vim Editor
Create your own vimfiles and control your Vim editor.
Rspec2 + shoulda = Awesome!
Here’s an article I wrote about RSpec2 and Shoulda: [more inside]
optimize db migration
I just wrote a post optimize db migration to merge/optimize db migrations for production deployment.
Lipa - DSL for description treelike structures in Ruby
Version 0.3.0 has been released. About project and new release
Ratelimit initial public release
I just released the ratelimit gem. It was inspired by this article. [more inside]
Appraisal: how to test your gems across multiple versions of their dependencies
How do you test your gems across multiple versions of its dependencies (like Rails or Capybara)? Try thoughtbot’s Appraisal gem.
Mockumentary, the ActiveRecord Stubbing Companion Gem
With the happy proliferation of TDD/BDD test suites are big. Like most Rails developers, I have been working on ways to reduce test speed by tighter unit tests with more mocking and stubbing. After watching Corey Haines speak about faster Rails tests and trying to overhaul a messy, entangled codebase with its equally icky test suite, I started building the gem Mockumentary. It does a really good job of faking ActiveRecord objects, complete with association stubbing and mocked data by column type. Mockumentary introspects Rails to get its field and association data, but it also has a companion set of classes that can be loaded from YAML and work in a Rails/ActiveRecord free environment. This makes switching tests to a super-fast Rails free suite very easy. Checkout the why and how on wiki.
HTML5 Boilerplate for Rails Developers
I’ve just written a Guide to HTML5 Boilerplate for Rails Developers. HTML5 Boilerplate serves as a useful reference for Rails developers who want to provide structure and convention for the HTML, CSS, and Javascript of an application’s front-end. But not all of HTML5 Boilerplate is useful for a Rails developer. With this guide you can pick and choose the components that are useful for a Rails application.
rufus-scheduler and mutexes
I just released rufus-scheduler 2.0.12, a thread-based scheduler. The main new feature is a :mutex attribute to prevent overlapping among scheduled blocks.
Build a Simple Twilio Customer Support Line in 10 minutes with Sinatra and Heroku
I’ve just blogged about Building a Simple Twilio Customer Support Line using Twilio (obviously), Heroku and Sinatra.
Slide Show (S9) Now Includes New Template Packs: deck.js, Slidy, CSSS
Slide Show (S9) lets you author your slides in Markdown or Textile with built-in or your very own Ruby helpers and filters. The latest update now includes many more template packs. Create Deck.js-style or CSSS-style or classic Slidy2-style slides in easy-to-read and easy-to-write plain text.
How Do I Create And Publish My First Ruby Gem?
If you are a Ruby beginner, knowing how to create and publish your Ruby Gem is important. To address that I wrote an introductory article - “How Do I Create And Publish My First Ruby Gem?” Credit: Nick Quaranto.
Testing Command-line Applications with Aruba
I put together a short post on testing Ruby command-line applications with Cucumber and Aruba. It goes through some examples and explains how to extend the Aruba API.
Gaga: A Git-Backed Key/Value Store
Introducing Gaga, a simple key/value store that uses Git for storage.
Stubbing Is Not Enough
Fast tests though “mock objects” has gotten a good amount of buzz lately within the Ruby community. However the common approach of stubbing leaves us with brittle tests that are difficult to change. In this blog post, I offer an alternative way of isolating our dependencies to get fast tests without making them brittle.
Your Rails variables in your JS!
You can throw your rails variables in your JS files with easy way without data attributes with Gon gem.
A Quick Introduction to Rack
If you are a Ruby beginner, knowing how to use Rack is important. The article “A Quick Introduction to Rack”, as the name suggests, introduces you to Rack.
Rails 3.1 and installing Ruby 1.9.2-p290 with the 'fast require' patch, readline, iconv
A quick tip for those who may have not noticed that Ruby 1.9.2 and 1.9.3 are significantly slower than 1.8.7 at loading Rails 3 apps; as a result, Rails 3 apps’ startup takes much longer, affecting - for example - testing, firing up consoles, and so on. So I wrote a short post on how to patch the latest stable version of Ruby (p290) with a version of the ‘fast require’ patch that works with this revision, so to improve startup time with Rails 3/3.1 apps - plus a mention on a couple issues when installing Ruby with this patch and packages such as readline, iconv, at the same time. [more inside]
Rundown.js - RDoc Documents in Javascript
I just released an npm package called rundown. It is an RDoc document parser for Javascript/Node.js. The project is in it’s infancy and being built piecemeal by converting the showdown.js Markdown library to handle RDoc format. So far I have implemented support for headers and links. This will be a very contributor oriented project. If you think this project useful and have the skills, please help implement missing features. Thanks.
Make the most of your Tweet
Here I’ll show you how to integrate google’s url shortening service with Twitter’s tweet button to help make your site’s tweet a little more friendly. Make the Most of your Tweet.
Challenge: RSpec formatters 2
At Codebrawl, we did an RSpec formatters contest before, but we’re doing another one since a lot of you asked us to. Can you build the best RSpec formatter ever? Bring it on!