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.
valid_attribute
A minimalist validation matcher library for your model specs. I’ve found this to be a more flexible BDD solution than the existing validation matchers out there.
IndexTank Hosted Search API Contest is Live!
IndexTank and Factual have teamed up for an awesome contest. The theme is: local businesses! By hacking up an application that uses both IndexTank real-time custom search API and Factual’s dataset of 14M US businesses. You could win an iPad 2 and IndexTank is Ruby / Rails ready to make it super easy to get up and going and a native add-on in Heroku. Come check out complete details:
Axiom of Choice: Set#pick and Set#pop
I’ve just proposed that Sets gain #pick and #pop in the standard library, but until that pans out, I’ve pushed a super-tiny gem called axiom_of_choice that monkey-patches the methods in.
RSpec Outlines
Ever wanted cucumber-style scenario outlines in RSpec? Now you can with RSpec Outlines.
The Many Uses of Enumerators
A short series on enumerators in Ruby, covering: making enumerators out of a method, making ad-hoc and infinite sequences, extending Enumerable with lazy-friendly methods, and using enumerators to handle memory constraints and error-handling.
voteable_mongoid: Up / Down Voting for Mongoid
Check it out at https://github.com/vinova/voteable_mongoid. It was released in Sep 2010 and we did a lot of enhancements recently. By take the advantage of MongoDB’s flexible schema and findAndModify command, it uses only ONE database request to validate, update, and get updated data.
Ripple 0.9.0 Release
I just pushed the 0.9.0 release of the riak-client, ripple, and riak-sessions gems that help you connect your Ruby and Rails apps to Riak. They include support for the Protocol Buffers transport (> 50% faster on some operations), Riak 0.14 features like list buckets and MapReduce key-filters, and lots of bug fixes.
grifizoid - racking up files with Mongo and GridFS
We’ve just released a little Rack middleware called Grifizoid for serving static files from MongoDB GridFS. Enjoy
Rails Misapprehensions: The Hardest Thing about REST is Working with Representations!
Working with resource representations is the hardest part about REST. This blog post discusses how Rails handles de-/serialization of representations, the limitations of the Rails way and the problems when cluttering transformation rules. It then introduces the new roar gem which tries to solve all that with representers and more.
Golaith and Fibers
I picked apart the Goliath web server to figure out how it uses Fibers to work its magic.
Podcast Interview with Josh Knowles
Dr Nic grills Josh about GoRuCo, working at Pivotal NY, Batman, and other good stuff. Listen to the podcast here.
Koala is an absolutely FANTASTIC library for Facebook
After struggling with Mogli, I found Koala which is absolutely top-notch work and wanted to share. If you need Facebook support in your Ruby or Rails app, check it out.
Object-Oriented vs Class-Oriented, metaclasses, MOP, yeah.
Take a little step back to go back to Ruby’s basics ;) Blog post
Spot invalid Active Record objects with active_sanity (and sleep better at night!)
We just released a little gem that logs (and stores) all the invalid Active Record objects your database contains. As you add / update ActiveRecord model validations, existing records may become invalid. An invalid record can break migrations, raise weird bugs in production or just prevent a customer from ordering stuff on your webstore. Just add gem 'active_sanity' to your Gemfile, run rake db:check_sanity and go fix your records! More info on the blog post introducing active_sanity or the active_sanity Github project.
Sirtet: A new MacRuby game
I’ve spent the day creating a new game in MacRuby and it’s called Sirtet. Checkout the downloads and source. Have a nice weekend everyone :) (and yada yada)
Ruby on Rails Model Validations
I released a new podcast episode where I discuss the basics of Ruby on Rails model validations. If you’re new to Rails or need to pick up some ActiveRecord chops then check it out.
The DHH RSpec debate
I weighed in on why I think debates are important and what I got out of the DHH debate in a recent podcast episode. I think this type of debate is important, even if we don’t agree.
Benchmarking ActsAsList vs RankedModel vs Resort
We ran some benchmarks on different sorting libraries for Rails 3 and wrote a blog post explaining what we found out :)
New gem: ruby-perl (run Perl in Ruby)
Today we announced ruby-perl. ruby-perl lets you evaluate and run Perl code within the same binary, without any heavy-weight forking of sub-processes. Enjoy the compactness, robustness and maintainability of Perl! For more background info see our announcement blog post.
Bookshop: Where Ruby Meets DocBook Development
I just published an early release of our gem, bookshop, an open-source Ruby-based framework for DocBook toolchain happiness and sustainable productivity. The framework is optimized to help developers quickly ramp-up, allowing them to more rapidly jump in and develop their DocBook-to-Output flows, by favoring convention over configuration, setting them up with best practices from the get-go. Reflections, Suggestions, and Assinine Comments Welcome! [more inside]
13 Rails-specific hints for your rails console.
Get some ideas for your .railsrc :)
Psychedelic: Awesome Syntax Colorizer in Ruby
I just published a new gem: Psychedelic, Awesome syntax colorizer in Ruby. It can automatically colorize any output in your console, supporting Ruby, Python, Perl, C++, Brainfuck… and any language you know magically. What are you waiting for? Use Psychedelic in your project TODAY!! RIGHT NOW!! (If it’s April 1 in your timezone LOL)
Vim for rails developers: indenting code
I just published a new tiny post of the series vim for rails developers: indenting code.
Freezing code and how to extend functionality
It is agreed that monkey patching can be naughty, but with a bit of discipline can be a great tool, a slightly more evil (in most instances) thing to do is to freeze code. This beginners article shows how to extend classes using modules. Even if those are frozen.
Ruby VS Python Event
RubyVsPython.org - we are organizing an event between rubyist and pythoners to see who has the smartest engineers. Now we need more rubyist to “beat” pythoners. :P Check the website to see if you are interested in this.