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.
Rack::Throttle: HTTP Request Rate Limiter for Rack Applications
Rack::Throttle is a Rack middleware for limiting HTTP request rates to Rack-based Web applications. It’s public domain and is also on GitHub.
Publish your data with ERB and markdown
I will show you how to write a powerful and flexible publishing system by combining the power of ruby templates (ERB) and Markdown standard syntax in just 50 lines of code. The idea is to store your data in simple text files thanks to Markdown and use a template engine to present them in the format you want. Also, you can use the ruby power inside your markdown files for free! Check the source code for more information and examples.
WebRI, RDoc Seuss
WebRI 1.2 is now up on the RubyGems.org servers. WebRI is a smart front-end for RDoc that provides a large selection of generators/templates for your documenting pleasure. The design is super-sexy so it’s easy to create new templates if you want to contribute to the project. Big thanks to Володя Колесников for SDoc which I used as a study guide for getting my head around hacking RDoc. (It also explains the existence of the blackfish template).
Skip repetitive map.resources with Restful Catch All Route rails plugin
A light and hassle-free alternative to defining every resource/member/collection by hand. No more routing errors because a new action was not added to routes.rb Try the Restful catch all route Rails plugin.
RSense: Code Completion for Vim and Emacs
RSense is a code completion and type inspection system designed for use with Vim and Emacs. It’s based on JRuby but includes everything ready to go out of the box. It seems to have blown up in the Japanese Ruby world but I hadn’t see any English language mentions of it yet..
it { should work_with_machinist }
I put together an RSpec macro for quickly making sure your model works with machinist.
SimplyStored - a Ruby wrapper for CouchDB
SimplyStored is a nice Ruby library for interacting with CouchDB. It offers many of the convenience methods Rails developers are used to: associations, callbacks, validations, dynamic finders, S3 attachments, or paranoid delete. A recent presentation at the Berlin Ruby User Group has some introductory slides and a video.
Ruby scales, and it’s fast – if you do it right!
Over at the EngineYard blog, Kirk Haines talks about how to scale Ruby.
Faked #require and #autoload for defunkt's FakeFS
Testing a library that loads ruby source files by configuration, I noticed that defunkt’s great FakeFS was lacking support for faking #require, #autoload, etc. - gem install fakefs-require or clone the source.
rubyproblems.com preview:
While we don’t officially launch until April 6th, people have been asking about what to expect. So here’s a screencast that gives you a sneak peek. Enjoy!
Fast Data Faker (a.k.a. ffaker)
ffaker (GitHub repo) is faker (the fake data generator for Ruby) refactored to be faster and work better on 1.9.
Gem for scanning isbn numbers
risbn is a little gem to scan for isbn numbers on strings. It also can verify validity of isbns and extract them from pdf and chm files. Small but handy so far.
Blue Light Special User Authentication Gem
The Envy Labs crew just released Blue Light Special. Spawned from the Clearance user authentication gem, Blue Light Special also contains mini_fb for facebook connect, mad_mimi_mailer for delivering emails, delayed_job for sending emails in the background, user impersonation, and a VERY thorough test suite.
Great Lakes Ruby Bash - Registration now open
We are pleased to announce that registration is now open for the Great Lakes Ruby Bash to be held on Michigan State University’s campus in East Lansing, Michigan on Saturday, April 17th. The conference will feature talented speakers from all over the Great Lakes region. The ticket price is $20, and attendance is limited to 200 attendees. Reserve your seat or find additional information here.
Sequel, Oracle and Snow Leopard (german article)
German article on using Sequel with Oracle on Snow Leopard on the new blaulabs blog.
Onfire brings Bubbling Events to your Ruby Objects
Check out this blog post if Ruby’s Observable is not enough and you want generic mechanics for bubbling events in your Ruby objects. The gem’s somehow comparable to JavaScript’s event system but is pure Ruby, lightweight, simple, small and tested.
Figure out %s() and other % shortcuts
I just wrote up all the %() shortcuts I know about — go take a look and hopefully learn one or two you didn’t know about!
An Interview Question That Prints Out Its Own Source Code (In Ruby)
I recently decided to play around with writing a ruby quine (especially since there didn’t seem to be many around). Along with discussing the possible merits of quines as an interview question, here is what I came up with.
Dupe 0.5.1 includes POST, PUT, and DELETE mocking for ActiveResource (ideal for Cucumber testing)
I released Dupe 0.5.1 over the weekend, it includes support for mocking the full life cycle of an ActiveResource object (create, find, update, delete).
Loading rake tasks from a gem in rails 3
A short article that shows how to build a gem with a rake task that will get included into your rails 3 application. http://nathanhumbert.com/2010/02/rails-3-loading-rake-tasks-from-gem.html
Notes from ActiveRecord::Base
I was reading the source code for ActiveRecord::Base and made a few notes of things I found that I didn’t already know. You can read them here.
Ruby's Class.allocate & ActiveRecord::Base.find
I just came across ruby’s Class.allocate
method when learning how ActiveRecord returns objects from ActiveRecord::Base.find
and I figure I would share it! Read here.
Timing Ruby Code – It Is Easy With Benchmark
I’ve recently been looking at timing bits of Ruby code as they were executing. Here is what I learned http://www.skorks.com/2010/03/timing-ruby-code-it-is-easy-with-benchmark/.
Rails 3: Code coverage with rcov
An easy way to get test coverage reporting in your rails 3 app http://nathanhumbert.com/2010/03/rails-3-code-coverage-with-rcov.html