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.
A Lightweight Alternative to DCI
With all the talk about putting models on a diet with DCI, I thought I’d write about how I used the Command Pattern to achieve similar goals in my aptly-named turn-based strategy game Elite Command.
Designing Rails API using Rabl and Devise
Enabling RESTful API access for Rails application is easy. However, the complexity arises when some responses are expected in xml format and JSON format. Complexity increases manyfold when these API calls need authentication. Sethu explains how to use Rabl and Devise for designing your API access.
Newman 0.2.0 Released!
For the last week or so, I’ve been trying to build a framework which does for email what Sinatra/Rack have done for web application development. It’s not nearly production ready, but Newman now has good documentation of its implementation, and I’d love to hear what people think of it. I could really use some help, since email is not something I’m an expert on.
DCI Role Injection in Ruby
Many people have been wondering the proper way to inject Roles into Data objects with DCI. I tackle this topic in DCI Role Injection in Ruby.
'Working With Unix Processes' eBook update
I just launched a big update to Working With Unix Processes, an eBook addressing Unix programming specifically for Ruby developers. The book was released back in December but it never got a mention here on Rubyflow. To mark the release the book is selling for 25% off today only.
New Virtus Release With Truly Awesome Features
I’m happy to announce that I’ve released Virtus 0.2.0 with nice new features. You can learn more here.
Triggering the DCI Context
In continuing the discussion of DCI, I’ve written a bit about what purpose the Context serves. It’s not just a new junk drawer to use extend with objects and modules.
Mendicant University Global Hack Day #1, Thursday 2/16
Many Ruby users groups have periodic hack nights where folks get together and work on their own projects while sharing questions and ideas with one another. We’d like to do something similar at Mendicant University, but on a global scale. [more inside]
Filling PDF forms with Ruby and pdftk
I frequently need to populate pdfs with dynamic data, and found a really easy way to do so with ruby and pdftk and finally got around to writing a blog post on it. Enjoy!
Ruby Trick Shots - a screencast of Ruby tricks and techniques
I’m putting together a free e-book of Ruby tricks and techniques that I’ve seen surprise other Rubyists I know. To commit myself to the project, I’ve recorded a screencast of 24 random tricks from my selection. Enjoy!
More on Ruby internals
Two weeks ago I wrote about My first impression of Rubinius internals, and this morning I went on a Journey to the center of JRuby.
What code goes in the lib/ directory?
A common question teams run into while building a Rails app is “What code should go in the lib/ directory?”. In this post I describe a common antipattern for Rails code organization and a principle for determining what classes should go where.
Travis needs your help!
Travis CI has run 406,714 tests for 5,442 open-source projects to date, including Ruby, Rails, Rubinius, Rubygems, Bundler, Leiningen, Parrot, Symfony, … If you use any of these then you benefit from Travis CI. [more inside]
logmein & remindme - Drop-in authlogic-based login and forgot password engines
logmein and remindme are two Rails engines developed a while back but only just now putting a few notices around in hopes they are useful to others. Built on Authlogic they provide the views and controllers that Authlogic does not provide. Great for a drop-in authentication system. If you later need something more custom you can keep the Authlogic base and replace the controllers/views with your own stuff.
Sidekiq - simple, efficient message processing for Rails
Sidekiq is my new message processor for Rails 3 apps. It aims to be Resque-compatible but much, much more efficient because it uses threads rather than multiple processes. Read the wiki or the code.
SSTable and Log Structured Storage: LevelDB
LevelDB combines the SSTable, MemTable a number of processing conventions to create a fast, open-source database engine. LevelDB is now embedded in WebKit (IndexDB), but you can also easily embed it in your own Ruby application!
Faster unit tests by skipping loading fixtures
A lot of the time when running individual unit tests was wasted re-loading fixtures into the test db, but I figured out how to let ActiveRecord think it’s loading in fixtures w/o actually touching the DB. If you’re stuck with a lot of fixtures, maybe this will help your tests run faster!
Introducing Monday Talks at Codegram
We’ve started doing weekly talks about Ruby, software engineering and computer science in general at our office, and we put the slides open for everyone! Check out our blog post about this.
Command Line Reporter 3.0 Released
The latest version of Command Line Reporter has undergone a major refactoring and now supports color and boldface output. Highlighting and making data visually appealing on the terminal screen is easy now. The gem is available on rubygems.org with source on github. For those not familiar with Command Line Reporter, the gem provides a ruby DSL for writing ascii reports with built in features like progress reporting and table formatting. It is very handy for system level and data reporting scripts.
Extend Your Toolbox: Custom Matchers
I just wrote a short blog post about using custom matchers in your unit tests to achieve clearer, DRYer tests.
Geo-Rails part 9 posted
I posted Geo-Rails part 9: The PostGIS spatial_ref_sys Table and You, the latest installment in my ongoing series on geospatial programming using Ruby and Rails. It describes how to use the standard spatial_ref_sys table provided by most spatial databases.
Webmachine v0.4.0 Released
Webmachine, the HTTP toolkit (for Ruby), has been released in version 0.4.0. This release includes some important refactorings that enable greater modularity and extensibility, and some great new features. Check out the release notes in the README for more details.
semanticgs-rails
A friend of mine recently turned me onto semantic.gs, the semantic grid system. I just packaged it up as a gem for use with the asset pipeline.