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.
Firewool, a firewalling gem for rails 3
I just published firewool, a rails 3 firewall in sheep’s clothing. It lets you specify IPs you want allowed and blocked with a filter. So you can restrict IP access to controller actions and therefore, URLs. There are more ideas of usage in the README.
RSpec best practices
I’ve just created an article, where I make some summaries on the best practices on using RSpec. Its based on articles, books and my experience. For now the document is editable from everyone, so whoever have any suggestion, just put them in.
Lazy load your heavy work through dunder
To increase performance typically one might want start multiple heavy tasks concurrent. This is already solvable with threads or the reactor-pattern but setting this up could be cumbersome or require direct interactions with threads etc. What inspired me was the quest to run concurrent database queries within a single request in rails. I just released dunder which tries to solve that problem. For a working example app check this one out: dunder-rails-demo
Magic Ruby Roundup
Last week, I attended the MagicRuby conference in Orlando. In this blog post, I tell you (a) where to find slides/video, (b) who would be most interested in each talk, and (c) what I think the most important points are.
Contributing to Rails 101: Your first patch
I created a screencast to help new Rails developers get their first patch into Rails. Check it out!
rails_best_practices 0.7.0 released
I just released rails_best_practices 0.7.0, it adds remove trailing whitespace check and use multipart/alternative as content_type of email check support, I also did some refactorings and added better html output support. See more changelogs here.
Ruby Enumerables: Operation on hashes
I wrote the second post about Ruby Hashes: Ruby Enumerables: Operation on hashes.
Real Web Based Console
Couple weeks ago I worked on making a web based shell. Before, I started googling web based shell, but couldn’t find what I was looking for. Later, I decided to start build my own with my own view. I picked Sinatra Web Framework for its ease of use for building APIs. And here I talk about the concept of it.
Introduction to Haml Screencast (6 minutes)
Screencasts.org has released Introduction to Haml, a (free) screencast that introduces you to a popular (but somewhat divisive) Ruby templating library. If you already love/hate Haml, this isn’t going to sway you but if you’re new to it, check it out.
New RubyGems search using Picky
I’ve written a new style RubyGems search. It adds author, version and dependency searches (i.e. who uses your gem). There’s examples to try on the gemsearch page. Blog post on the whys and hows.
Slice and dice Cucumber run-times
Inspired by The road to faster tests and Crank Your Specs, I decided to apply the delayed/enforced garbage collector technique to a fairly large Cucumber test suite that I have.
A review of Ruby Best Practices
I just posted a review of Ruby Best Practices by Gregory “seacreature” Brown.
Did You Know That (in Ruby): Exception Handling
This edition of Did You Know That (in Ruby), my series of small posts on lesser-known Ruby mechanics, covers the mechanics of exception handling in Ruby in its weirder forms.
RichRC, a customization tool for Rails 3 console
I published a gem, RichRC, a customization tool for Rails 3 console. With RichRC, you can load extra gems such as hirb and wirble without editing Gemfile. RubyGems Github
Rails3 Custom Environment Variables
I just posted an article on setting up custom per-environment variables for Rails3.
ROTP - Ruby One Time Password library
I published a gem to generate and verify one time passwords in ruby - gem / github. It’s based on the HOTP/TOTP standard and therefore works with the Google Authenticator iPhone/Android app.
Basic funnel tracking in Rails
Funnel tracking is a very useful device for measuring and improving user acquisition and retention. Here’s how I did it in my Rails-based strategy game, Elite Command.
Parsing large (log) files with ruby
I experimented with various ways of parsing rather large files of text with ruby and blogged about it with example code and the results. Link to blog post
Rails Misapprehensions: Caching Views is Not the View’s Job!
Read and discuss view caching in Rails, the pros and cons of fragment caching, how Cells handles caching, and why we should put work into testing cache mechanics.
Ruby Tricks. Call a method using case ... when
Use Ruby flexibility to improve readability of your code a bit. See how case … when statement can call method for you. Read full story here
gem install abstract_class
abstract classes in ruby https://github.com/shuber/abstract_class
Data, Context and Interaction Pattern
Andrzej Krzywda blogs about DCI (Data, Context and Interaction) Pattern. It was invented by Trygve Reenskaug who also formulated MVC. Ruby with its Object#extend capability fits perfectly to DCI approach. Read the full story here
ActiveRecord migrations outside of Rails
Sometimes you are working with a database that is not used in the full rails context. This blog post describes how I accomplished using ActiveRecord migrations to build and manage my database.
Quick and Cheap Usability for Programmers (Episode 84 from the SD Ruby podcast)
Megan O’Rorke introduces the general concept and goal of usability, and shares some quick and cheap usability resources for Ruby developers. Watch episode