Testing RJS with ARTS

An Achilles’ heal of Rails is no good way to test your RJS. As the presentation behavior gets more and more sophisticated, the inability to test it becomes a real problem. Not anymore.

Kevin Clark has released ARTS, a mechanism to test RJS. His API is simple yet flexible. A single point of entry let’s you test a considerable amount of the RJS you can generate. Here’s an idea of what you can do:


  assert_rjs :alert, 'Hi!'                                                     
  assert_rjs :assign, 'a', '2'                                                 
  assert_rjs :call, 'foo', 'bar', 'baz'                                        
  assert_rjs :draggable, 'draggable_item'                                      
  assert_rjs :drop_receiving, 'receiving_item'                                 
  assert_rjs :hide, "post_1", "post_2", "post_3"                               
  assert_rjs :insert_html, :bottom, 'posts'                                    
  assert_rjs :redirect_to, :action => 'list'                                   
  assert_rjs :remove, "post_1", "post_2", "post_3"                             
  assert_rjs :replace, 'completely_replaced_div', '<p>This replaced the        
div</p>'                                                                       
  assert_rjs :replace_html, 'replaceable_div', "This goes inside the           
div"                                                                           
  assert_rjs :show, "post_1", "post_2", "post_3"                               
  assert_rjs :sortable, 'sortable_item'                                        
  assert_rjs :toggle, "post_1", "post_2", "post_3"                             
  assert_rjs :visual_effect, :highlight, "posts", :duration => '1.0'           

He’s written up an extensive tutorial to get you up and running.

The Railways at Reboot 8

Finnish superstar Jarkko Laine, who’s been in the Rails community since day one, is going to be hosting a discussion this Thursday around 9PM at Reboot 8 in Copenhagen called The Railways.

The idea of
the discussion is to bring together people who have already dipped
their toes in the Rails koolaid with those who have contemplated doing so but have not yet made the jump. The conversation will be around
topics like:

  • What in the Rails way has struck people as most important?
    What has made the most difference?
  • Real-world war stories. How has Rails made something possible/
    easier/more productive?
  • Whatever people feel is important to tell Rails newbies.

All Rails people attending Reboot are kindly asked to participate in
the discussion and think beforehand of a few good stories they can
tell to spread the love.

Rails Helps People Find and Share Wine

Dan Benjamin, the man who brought A List Apart to Rails, has teamed up with web-standards guru Dan Cederholm and launched Cork’d, a free service for wine fans.

Built with Rails, Cork’d lets you rate, review, and catalog the wines you’ve tried. You can also keep track of wines you’d like to try and buy easily. Best of all, the site has a nice social network aspect to it, where members are encouraged to share and subscribe to each others’ reviews and recommendations.

Guide: Environments in Rails 1.1

As mentioned last week, Kevin Clark is taking your suggestions and developing weekly guides that cover the ins and outs of Rails.

He’s delivered on his first guide: Environments in Rails 1.1. The accompaying Cheat Sheet is particularly noteworthy. It lists all the various configuration options available to you, with a brief description of the purpose they serve.

To have your say on what Kevin covers next, send him your suggestion at kevin dot clark at gmail dot com with [idea] in the subject.

Dan Webb's Request Routing Plugin

Have you ever wanted to write Rails routes using a URL’s subdomain? What about routing based on whether a request was HTTP vs HTTPS? Well, now you can. Recently Dan Webb released his “Request Routing Plugin”:http://svn.vivabit.net/external/rubylibs/request_routing/README for public use. This plugin lets you create routing rules that use a whole slew of new properties: domain, subdomain, method, port, remote_ip, content_type, accepts, request_uri, and protocol.

You can obtain the plugin from Dan’s subversion repository:

ruby script/plugin install \
   http://svn.vivabit.net/external/rubylibs/request_routing/

Rails Day 2006

Last June was the first Rails Day, where teams of two or three competed to build the best all around Rails app in a 24 hour period.

Well they’re doing it again this year: Rails Day 2006 will be held on June 17th, just a few days before the first official Rails Conference.

Last year’s contest had dozens of dozens of teams and almost as many prizes, including some pretty sweet ones for the teams that won top honors.

This year’s organizers are looking for your help on fine tuning the rules. So weigh in with your opinions if you have any.

Registration isn’t quite open yet. So rally the troops and stay tuned.

Getting Real after RailsConf in Chicago

If you’re in Chicago for RailsConf, you might want to extend your stay to include the following Monday. The Getting Real workshop by 37signals is going down on June 26th. Learn all about how you can put those Rails skills towards your own business and build web applications like Basecamp, Backpack, and Campfire.

The workshop was announced yesterday and half the seats are already gone. If you want to partake, you’ll probably have to sign up pretty soon.

Wellington Rails User's Group

Tomek Piatek and others have started Well Railed, the Rails User’s Group in Wellington, NZ. The first meeting will be on the 30th May at 6:30-ish at Hell Pizza in Bond Street. So come along for some pizza and beers to meet the local rails crowd.

You can follow group discussions on-line on Google Groups page.