This week I created a patch for Nate Murray’s Excellent Backup Gem that adds support for Amazon’s Simple Storage Solution (S3). “Grandfather Father Son” rotation is supported via a YAML index stored on s3 with your backups.
The patch was accepted and Backup Gem 0.0.5 has been released.
I just discovered a useful, but poorly (if at all) documented, feature for setting up your routes in Ruby on Rails.
One of the best things about using ActiveResource for controllers is the limiting of actions to specific HTTP methods. Sometimes you have a controller that doesn’t manipulate a specific resource, but you can still use some of that RESTy goodness.
map.connect '/kiosk', :controller => 'kiosk',
:action => 'index',
:conditions => { :method => :get }
map.connect '/kiosk', :controller => 'kiosk',
:action => 'signin',
:conditions => { :method => :post }
Now the same URI performs two different actions based on the HTTP verb thanks to the conditions hash you can pass to the Mapper’s connect method.
No more of that if request.post? ... else ... business.
Nice and clean.