RubyFlow The Ruby and Rails community linklog

×

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

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

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.

The sabotage hooks the bothered reminder behind the insult. The adopted number …

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.

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.

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.

Please add the link, this sounds interesting!
@mariozig, thanks. I can’t believe I forgot to add the link. Sorry everyone…
Loading older posts