RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

eric — 10 posts

http://saveyourcall.com

rack-legacy has been significantly refactored and a new version has been released.

The new PHP module is much faster than the old one (a simple hello world script ran 500% faster). A new Rack::Legacy::Index module provides generic support for index.(php|html|cgi) directory handling replacing the special handling that used to exist for index.php.
gist-dep is a command line tool that helps you share code between projects and developers. Written in Ruby but useful on any project. Common needs include JavaScript behavior and polyfills, Ruby monkey-patches and configuration code, etc. Whenever you have a bit of code you often use but it is too small/trivial to be managed as a full library gist-dep is an excellent alternative. Code snippets are stored on Github's Gist system. The tool provides a quick way to add, update (both directions) and remove gists in a project.
Taking advantage of the new "exception_app" functionality in Rails 3.2 better_exception_app provides a easy way to help you delete 404.html, 422.html and 500.html from you public directory. Error messages are rendered dynamically in your layout. No more copy/pasting, no more jarring white screen. If desired, keep certain errors static for safety (i.e. 500.html). Includes a generator to make it easy to keep the look of your static errors in sync with the rest of your site.
logmein and remindme are two Rails engines developed a while back but only just now putting a few notices around in hopes they are useful to others. Built on Authlogic they provide the views and controllers that Authlogic does not provide. Great for a drop-in authentication system. If you later need something more custom you can keep the Authlogic base and replace the controllers/views with your own stuff.
Rail's engines can be a bit of a pain to write tests for. Since they don't run in the full Rails stack it requires a bit of pain to setup anything but the most basic testing. test_engine solves this problem by making it almost as easy to write tests in your engine as it is to write tests in your Rails app. If you have been holding out on testing your engines because you don't know a good way to implement it maybe this is your ticket to get back on track.
rack_mailer provide a simple drop-in ability to send data posted to a form to an e-mail address with minimal configuration. Can send an auto-responder, provide basic spam protection and built on the mail gem.
Sprockets 2 is in active development so the docs are a little lacking. After digging through the code to figure everything out I put together a quick Gist that acts as a guide on how to get setup.
open_uri_db_cache extends OpenURI to cache content in a database. This allows you to pull things like RSS feeds faster and be nicer to other servers. Uses ActiveRecord for storage. Honors things like ETag and If-Modified-Since headers.
test_inline is a new experiment in automated testing. The idea is to put your tests next to the code being tested. Sort of like how rdoc brought documentation into the code this does the same for tests. If you feel like trying something new check it out.
A new rack module for running old legacy PHP/CGI code alongside your new shiny Ruby/Rails code. Ideal for development environments where you don't want to install and setup and full Apache stack just to hack on a bit of code. A simple use Rack::Legacy::Php, 'public' and your Rack-based app will now be executing PHP out of your public directory and all you have to do is rackup your app. For Rails it is config.middleware.use Rack::Legacy::Php, Rails.public_path and now you can just ./script/server and you are done.