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.
Prawn 0.11.1 released!
After over a year of developing the PDF generation library Prawn without doing an official release, the core team has finally replaced the legacy Prawn 0.8.4 gem with the 0.11.1 codebase. This brings the team very close to 1.0, and fixes many issues and adds many new features that Prawn users have been asking for since the start of the project. See the release notes, check out the awesome self-documenting manual, and kick the tires, because this release is one of our last stops on the path to 1.0! [more inside]
Screencast: Creating Ruby Hashes
I just created a short screencast on Creating Ruby Hashes over at HeartMindCode showing 5 ways to create a hash—including one way you should probably never use. Come tell me what you think!
rvmprompt.vim
I just published rvmprompt.vim, a short post about my vim plugin for the rvm prompt command.
Gibberish - Easier Ruby Encryption
The top result on Google for “Ruby Encryption” is a DZone snippet, and it’s incorrectly implemented. I’m trying to fix this with a well documented, tested, and easy to use library based on OpenSSL. Check it out on GitHub
Try AppCloud Risk-free
Dr. Nic explains the new Engine Yard AppCloud trial. Create a new AppCloud account, and you can launch your app on a High-CPU instance with 2 virtual cores and 1.7GB of memory for up to 500 hours – for free.
Pending Examples via NotImplementedError in rSpec
It’s quite handy when NotImplementedError results in a pending example rather than in a broken one. Fortunately with rSpec it’s easy-peasy: Pending examples via NotImplementedError in rSpec.
Serving Your Maintenance Page for POST Requests
Getting a 405 when people POST to your maintenance page? I’ll show you how to serve your facebook app’s maintenance page for POST requests.
Understanding class instance variables in Ruby
We just wrote a little refresh on the Ruby object model and one of their weirdest features: class instance variables.
Prevent registration of reserved login
I wrote a post about prevent registration of reserved login with Ruby on Rails with some examples. [more inside]
Redmine-lite: Simple redmine fork that deploys in minutes (90 sec screencast)
I recently released redmine-lite, an easy-to-install fork of Redmine 1.0.3-stable, a project management and issue-tracking tool. Check out the blog post here. It includes links to the github repo and a short-and-sweet 90-second screencast!
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: http://bit.ly/rubyflow0404
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)