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.
Spellchecking for HTML
I just launched HTML Spellchecker, a Ruby gem for spellchecking HTML fragments.
Fix the content-type for file uploads with the rack-fix-content-type gem
We wrote the rack-fix-content-type gem to fix the content type of form uploads (by using the file-utility). A lot of browsers screw up the content type so we don’t trust the given value in the header. We had a couple of different content-types for each type of uploaded file which can create a lot of trouble (for example when using the content-type in mail attachments).
Feature matrix of Ruby HTTP clients
I posted Ruby HTTP clients feature matrix. It covers 17 clients and 48 features. Let me know if you find any mistakes (it must include some!) and my misunderstandings.
Understanding Ruby and Rails: Lazy load hooks
I just posted a new article in my Understanding Ruby and Rails about Rails 3 lazy load hooks. It covers the Rails 3 on_load feature.
Drawing Binary Trees with Ruby and HTML 5
I just launched a small Ruby web app to draw binary trees. This site draws the tree via the canvas element in HTML 5. You can check the details here
HireFire - The Heroku Worker Manager
Just pushed out a new gem called HireFire (GitHub link)! HireFire automatically “hires” and “fires” (aka “scales”) Delayed Job (and soon Resque!) workers on Heroku. When there are no queued jobs, HireFire will fire (shut down) all workers. If there are queued jobs, then it’ll hire (spin up) workers. The amount of workers that get hired depends on the amount of queued jobs (the ratio can be configured by you). [more inside]
Tux - A Sinatra Console
Introducing tux, a console for your sinatra app. Use it to interact with helpers, view rendering and response objects. Also comes with commands to view your app’s routes and settings. For more read the blog post.
Simple Console Progress Bar
I was working on a script to sync hundreds of thousands of records between two databases, and wanted a simple way to keep track of progress. I couldn’t find one that was easy to use and did what I wanted, so I wrote my own. Blog Post with Example Source Code on Github
Extending "Capistrano" to execute command to multiple remote servers with different credentials
Extend capistrano to connect to multiple remote servers
rails_template_backend: template backend for rails 3
I just launched rails_template_backend - a template for rails 3 based on inherited_resources,simple_form, inherited_template and activo rails.
Run only Focus Examples in RSpec like Cucumber
While I am coding using Vim as my editor, I don’t know an easy way to run only an example or a group examples of RSpec that I am working on until RSpec-2 came out. Run only Focus Examples in RSpec like Cucumber
A voting extension from scratch for Rails 3 (Part 3)
Just posted part 3 of the blog series about developing a Rails 3 extension (named MakeVoteable). This time it is all about API decisions and ActiveSupport::Concern.
Padrino Framework Slides: A Tour of Padrino
Padrino is a full featured webapp framework built on top of Sinatra. Check out these Padrino Slides to get a tour. Please share it with your friends and don’t forget to leave a comment!
Pidly - A super simple daemon library
Pidly is a very minimalistic daemon library that doesnt make assumptions. Pidly allows you to control the daemon without getting in the way with forced verbose output and usage messages. Run gem install pidly - source code
docs
Using Sprocket 2 in Rails with CoffeeScript & SASS
Sprockets 2 is in active development so the docs are a little lacking. After digging through the code to figure everything out I put together a quick Gist that acts as a guide on how to get setup.
Rubydeps: A tool to create class dependency graphs from test suites
It works by running your test suite to record the call graph of your project and uses it to create a directed graph showing the class dependencies. Check it out!
Podcast Interview: Tung Nguyen, Bleacher Report
Listen to Tung Nguyen’s podcast interview about Bleacher Report’s explosive growth, the performance monitoring/optimization tools they use, and their plans to upgrade to Rails 3.
Examining Dwemthy's Array composite pattern
Here is a blog post about Dwemthy’s Array interesting way of implementing the composite design pattern Examining Dwemthy’s Array composite pattern.
Ruby (love) .Net: literate programming - rocco and C#
I’ve jused pushed support for C# in rocco, here is how it looks like.
Is It Rubinius? (Which Gems Work on Rubinius?)
I recently launched Is It Rubinius?. 100% written and deployed on Rubinius. If you’ve written a gem, or are considering using Rubinius for your next project, try it out on Rubinius and report your findings on Is It Rubinius.
Google Protocol Buffers in Ruby (interview)
Pat Eyler from On Ruby interviewed me about my involvement and knowledge with Google’s Protocol Buffers (protobuf) in Ruby. Topics include protobuf (of course) as well as background queues and general service oriented architecture in Ruby.
Pow! A Zero-Config Rack Server for OS X
From 37signals comes an interesting new Ruby project: POW!! It’s a “zero-config Rack server for Mac OS X” by Sam Stephenson and it allows you to “knock out Rails & Rack apps like a superhero.” Pretty bodacious stuff and people have been raving about it over Twitter and Hacker News all day.
Investigating configuration blocks
I looked at the Capybara source code to discover how it implemented its configure block syntax. Some excellent other techniques are presented in the comments.
How to Use RVM (8 minutes)
We’ve just released the How to Use RVM screencast. RVM stands for Ruby Version Manager which allows you to quickly install and switch between Ruby implementations. It also has a great feature where you can specify which version of Ruby you want for a particular project with isolated gemset. All this is auto-switched when you cd into the project directory. Check it out!
Tanker: Integrate IndexTank with your favorite Ruby ORM
Finally a community supported and officially recognized Gem to integrate Indextank to your favorite ORM. Pull requests and ruby community related awesomeness is expected to happen. Read the post here. Get the code here.