I’ve got two major announcements to make affecting my professional life this month. Today the first of them is ready to go live: I’ve accepted a position with the new Ruby on Rails Activists team. Probably the easiest way to explain what that means is to quote from the blog entry announcing our existence:

The mission of the Rails Activists is to empower and support the worldwide network of Ruby on Rails users. We do this by publicizing Rails, making adoption easier, and enhancing developer support.

Generally speaking, the Activists will be working alongside the Rails Core team, with the intent of helping publicize Rails and pull together efforts from all parts of the Rails ecosystem. We have a lot of ideas about what this could translate to in terms of concrete initiatives, but I’d like to emphasize that we’re here to support the rest of the community, not to direct it. If you want to get involved with promoting Rails and improving things, feel free to contact any one of us to discuss how we can help out. I’m easy to find:

  • mikeg1 on Twitter
  • MikeG1@larkfarm.com via email
  • mikeg1a on IRC (freenode.net, almost always in #rubyonrails)
  • It’s also important to note that although there are four of us who are now in some sense authorized to speak on behalf of Rails, this does not mean that everything we say is an Official Statement. We all have our own businesses and blogs and so on, and we have lives beyond Rails activism, shocking though that may be. For example, just because I link something on this weblog doesn’t mean it’s gotten some official stamp of approval.

    We also intend for the communication to flow in as many directions as possible - one of our roles is to serve as ombudsmen for the Rails community. If for any reason you’re feeling frustrated in an attempt to talk to the core team (though personally, I’ve found them very approachable), do get in touch to see if we can help.

    As some of you have probably guessed, the new team owes something to the much-discussed merger of Rails and Merb. In addition to picking up the best ideas from Merb, Rails is also working on picking up some of the best patterns from the Merb community. Just as Rails isn’t throwing out all of its old code to become a copy of Merb, we’re not throwing out all of our old activities (such as the Rails Guides) to copy Merb’s ecosystem. What we are doing is trying to incorporate some of the energy from the combined communities to revitalize both of them as they become one.

    So stay tuned to see what initiatives emerge from this new group and its interactions with the wider Rails community. If you have any questions, I’ll be more than happy to address them in comments here or privately.

    Stay tuned for some Rails news later today.

  • Rapid Fluid Support - A how-to on adding SSB support to a web application.
  • consent - A new access control layer for Action Pack.
  • simplepay 0.2.0 - An upgrade to the Amazon Simple Pay gem just in time for me to need it.
  • RSpactor 1.0.1 - First 1.x release of this project for automatic spec running on OS X.
  • Freelancing Tips via Rails Camp 4 - Some good ideas here for beginning freelancers.
  • @the_rails_way.awaken! - Good news: The Rails Way is coming back.
  • I’ve recently been working to integrate Amazon Simple Pay into an application. In general, this has been pretty straightforward, thanks to the simplepay gem, which was recently bumped to version 0.2.0. (Amazon also has their own Ruby sample for ASP integration, which came in handy for a first smoke test - though unfortunately at the moment the Amazon site is having trouble delivering that file).

    For the most part, using the simplepay gem is quite straightforward. There’s a helper to build a payment form:

    
    Click here to send us $120 every year
    <%= simplepay_form_for(:subscription, {
      :amount                 => 120.00,
      :description            => "Annual Subscription",
      :recurring_frequency    => "1 year",
      :abandon_url            =>  amaz_abandon_customers_url,
      :collect_shipping_address => false,
      :immediate_return       =>  false,
      :ipn_url                =>  amaz_ipn_customers_url,
      :process_immediately    =>  true,
      :reference_id           =>  @customer.id,
      :return_url             =>  amaz_return_customers_url
    }) %>
    

    When Amazon executes callbacks, it sends a signature parameter along so that you can verify that the request is legitimate. This is the only spot where I ran into a little gotcha. The simplepay gem includes a helper to validate the parameters of a request to see if they match the signature, but you have to be sure to take out the parameters that Rails inserts before you call it:

    
    def amaz_ipn
        params.delete('controller')
        params.delete('action')
         if AWS::SimplePay::IpnValidator.valid_ipn_post?
    (Simplepay.aws_secret_access_key, params)
          # save the results somewhere
          render :action => 'show'
        else
          logger.info "bad request from Amazon Simple Pay"
          render :nothing => true, :status => 200
        end
      end
    

    Also note that you should send back a 200 response even if you’re unable to verify the signature. This will prevent Amazon from sending the same request to you over and over again.

    Somehow it doesn’t seem like it should be Friday already.

  • Linotype FontExplorer X - This came in handy when I wanted to compare some sample text in various fonts I already have installed. I’m sure there are other ways, but it was free.
  • Sanitize - Sanitization seems to be in the air. This one is a whitelist-based HTML sanitizer.
  • Cerberus - A continuous integration server for Ruby and Rails software.
  • Welcome to 2009. Now I’m off to fix some date-related bugs.

  • Ansuz CMS and BrowserCMS - Must be Rails CMS day; here are two that I just caught announcements for.
  • Cool Routes Trick: Dev Cheat - Route everything in dev but not in production.
  • Geokit 1.2.0 - Now separated into a gem and a plugin.
  • Allowing custom CSS in your app - court3nay is out with a sanitizer for CSS.
  • 2008 was a good year for me professionally. Here’s hoping that 2009 shapes up even better.

    • Ubiquity 0.1.3 - Just out, the new version of the command line for Firefox. Like TextMate, this is one of those applications that I know I’m barely scratching the surface of.
    • What good is a flexible paperclip? - Thoughtbot’s file attachment plugin is getting some overhaul.
    • Espresso Public Beta - MacRabbit’s new web development environment. I need to find time to play with this, too.
    • [ANN] Ruby 1.9.1 RC1 is released‘ - I’m responsible for this, you know: it happened minutes after I managed to get 1.9.1-pre2 installed.
    • Learnivore! - Aggregation portal for Ruby and related screencasts.

    I spent a lot of yesterday working on the Rails continuous integration story. Well, you know, it was shiny…

  • acts_without_database: Using ActiveRecord for Non-Database Backed Objects - A sometimes-useful technique.
  • rubigen 1.5.1 - This code generator is coming full-circle, having originally come from Rails and now being included back into Rails.
  • ColumnScope 1.0 - Rails plugin to make it easier to return just column values. Looks interesting.
  • I spent a lot of yesterday deep in the Rails source, trying to figure out why some tests weren’t passing. No final conclusion but I think I’m on the right track.

  • Timecop 0.2.0 - Gem for freezing time to make it easier to write reproducible tests. Here’s the original announcement.
  • Pages Generator - Another helpful little tool from GitHub.
  • Bringing Merb’s provides/display into Rails 3 - DHH gives us a peek at one of the planned bits of merging.
  • Dispatch from the Front Lines - And Yehuda Katz is also writing about the work to come. The more of this sort of thing we see from the merged team, the less FUD there will be to go around.
  • Overview of Jekyll - a static site generator written in Ruby - A look at the tool that’s tied into GitHub’s pages.
  • Kontrol - a micro framework - Yes, it’s another small Ruby web framework.
  • Over the years, ActionController::Base#render has grown quite a few options:

    
    render :action => "edit"
    render :template => "products/show"
    render :file => "/u/apps/other/warning.html"
    render :nothing => true
    render :inline => "<% @product.name %>"
    render :update {|p| p.replace_html "A", "Error!"}
    render :text => "OK"
    render :json => @product
    render :xml => @product
    render :js => "alert('error!');"
    

    Those options will still be in Rails 2.3, but the first three have a simpler alternative now:

    
    render "edit"
    render "products/show"
    render "/u/apps/other/warning.html"
    

    Rails will figure out whether you’re rendering an action, template, or file, and do the right thing. In addition, if you like symbols, you can render an action via a symbol:

    
    render :edit
    

    Last one of these before my tiny Christmas break.

  • Merb gets merged into Rails 3! and Rails and Merb Merge - The big news from yesterday is that Rails and Merb will be as one some time next year. I am guardedly optimistic; though I look forward to seeing what comes of the partnership, as someone who spends much of his time reviewing others’ code I dread all the additional pieces I will need to develop expertise in.
  • iphone-rdoc-template - If you find yourself wanting to read ruby library docs on your iPhone, this would come in handy. Demonstration at PocketRails.
  • irb & script/console tips - Some useful tidbits here.
  • FireUnit - JavaScript unit testing extension for Firefox and FireBug.
  • Super Daring App Template - Peter Cooper contributes a template for the templating feature in edge Rails.