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.
(Fully) Document your DataMapper models with YARD
YARD can easily be extended to recognize and document new meta-programming methods. yard-dm is a new YARD plugin gem, which adds support for documenting the properties/relations of DataMapper models. More on this.
rake_commit_tasks now supports git
rake_commit_tasks is a set of rake tasks to help with checking in code. Now, it supports git (in addition to subversion). Read more about it: rake_commit_tasks now supports git
Kansas City Ruby User Group presentation: Ryan (dot) Smith on the Decorator pattern
Ryan (dot) Smith presents on the Decorator pattern (video on vimeo) with source code for the Decorator example at github.com/ryandotsmith/decorator
Websockets made easy with Cramp
Taking advantage of HTML5’s websockets cannot possibly get any easier than this. More about this on my blog : Websockets made easy with Cramp
Distributed Ruby with the MagLev VM
MagLev Ruby VM has a unique persistence model: it is a database and a ruby runtime in one. Based on the smalltalk VM, it offers a JIT, transparent object persistence, distributed layer, and many other goodies. A on overview of the state, architecture and examples of use.
Cappuccino on Rails
CappuccinoResource is like ActiveResource for Cappuccino projects. There is an introductory blog post, a demo application, and source code for the demo and the library on GitHub. Also of note, there is also a Flow dedicated to the Cappuccino community. Be sure to follow it if you have any interest in this exciting framework!
helper plugin for highcharts js
just released a plugin for rails, a helper to help create graphics with the javascript library “highcharts” the samples of the graphics are in the highcharts site; and the code of the helper can be found, as always, in github: http://github.com/michelson/lazy_high_charts
The Latest Developments in Ruby 1.9.2
Japan’s WEB+DB PRESS has an English translation of an interview with Ruby 1.9’s release manager, Yugui, on the latest developments on the forthcoming Ruby 1.9.2.
Book Review on The Passionate Programmer
Click for a full review on Chad Fowler’s The Passionate Programmer, a guide to a software developer’s career!
Ruby Setup 5 - A reworking of setup.rb
I just launched Ruby Setup 5 (aka setup.rb). Ruby Setup is a fork –or perhaps more appropriately called a “torch”, of Minero Aoki’s setup.rb 3.4.1. Version 5 is major re-implementation of the system. Primarily the new system organizes the code into proper OOP structure, and uses an aggregate-and-process procedure instead of the previous traverse-and-process procedure.
Testing your MongoMapper models with Machinist and Remarkable
There are new versions of machinist_mongo (1.0.1) and remarkable_mongo (0.1.2). For this occasion I made a tutorial about them.
Random, Previous and Next entries from Active Record models using offset
Finding a random active record entry can be a tricky task and many of the solutions out there come with considerable performance hits. This quick blog post shows a couple of options and how to make use of the offset option, something quite often ignored by rails developers.
How slow are (Ruby) Exceptions?
If you are used to benchmark your Ruby scripts or if you ever had to improve the performance of some strategic tasks, then this post won’t tell you nothing new because you should already know that Ruby Exceptions are slow. And this is not really a Ruby problem: .NET Exceptions are slow, JAVA Exceptions are slow just because the begin/raise/rescue (or try/throw/catch) architecture is slow by nature.
Asynchronous Table Views With MacRuby
New blog post about speeding up NSTableView loading for BirdWatch, a MacRuby Twitter search app…read more here
Play with Rendera and learn HTML5 and CSS3!
I recently launched Rendera.heroku.com so I could easily test out some HTML5 and CSS3 examples, and I decided to open it up for others to use. I’ve added several examples, as well as support for HAML and SASS. There’s no support for saving your work on my server, but you can export anything you do to a standalone HTML file. [more inside]
Introducing Churn, a gem for class and method level churn rates
A post introducing a Churn gem, which will give detailed churn metrics for Ruby projects. High churn sections of code have been correlated with high defect rates. This tool will help identify potentially problematic code so it can be refactored.
Using geokit with searchlogic
I’ve got quite a few emails asking me the best way to use geokit with searchlogic. So I wrote an article describing how I do this. Hopefully this helps some of you. If not, its an interesting way to change the behavior of named_scopes.
Discover the Magic
Magic gem uses magic library (used by file command) to determine content types and encodings of files and strings. The library does three types of tests: filesystem tests, magic number tests, and language tests.
Miniskirt: factory_girl in about 30 LOC
For a bit of fun, I recreated the bulk of factory_girl (with some nice syntax niceties), packaged à la minitest, into about 30 LOC. The source is on Gist.
Ruby 1.9 character encoding field notes
The last few weeks I’ve been spending some time figuring out how to handle character encoding in your Ruby 1.9 application. I’ve posted my findings with a short blog post and a released a gem.
Screencast: live audio VST plugins coding with JRuby
Daniel309 made a screencast demonstrating how to use Opaz-PlugDK (experimental JRuby VST plugin framework) to code and tweak VST plugins in real-time. [more inside]
Introduction to ActiveModel
Yehuda Katz published a great introduction about ActiveModel which will be shipped with Rails 3.
Introducing the new Web Spider Obstacle Course.
Introducing the new Web Spider Obstacle Course (WSOC). WSOC was completely re-written as a Sinatra app, and can easily be used to test the robustness of any Web Spider/Crawler/Scanner. Currently, Spidr uses WSOC as part of it’s test suite.
Collaboratively developing Facebook apps with Rails
Robert Shedd just posted a tutorial on how to set up a collaborative development environment for Facebook apps. The set-up utilizes Facebooker’s tunneling system.
RailsBridge BugMash for Rails 3
The upcoming BugMash will take place on 1/16 and 1/17. We're going to try something a little different. With Rails 3 on the way, we didn't want to spend a lot of effort on withstanding 2.3.x bugs, so the idea is to have participants get to know Rails 3 better. [more inside]