Dav Yaginuma's blog



Pivots at RubyConf

edit Posted by Dav Yaginuma on Tuesday December 11, 2007 at 06:29PM

The Confreaks site has released a slew of videos from the 2007 RubyConf. The videos are in the perfect format: side by side streams with the projection material on one side and the stream of the speaker on the other.

Many great sessions are covered, including a good one on the Treetop parser presented by Pivotal Labs' own Nathan Sobo. As a bonus, in the audience you can spot other Pivots you may be familiar from this weblog (Nick Kallen and Brian Takita).

Standup 4/17/2007

edit Posted by Dav Yaginuma on Wednesday April 18, 2007 at 05:07PM

Interesting Things

  • Nesting a javascript generator within a javascript generator does not work:
<code>
  new.rhtml:
  link_to_function "myFunction" do |page|
     page.insert_html :bottom, :partial => 'new_stuff'
   end

   _new_stuff.rhtml:
   link_to_function "remove" do |page|
     page.replace_html 'some_id', ""
   end
</code>

The quotes in the nested JS are not escaped properly.

  • The plugin team introduced new email validation for the User plugin. They covered this with functional/unit tests within the plugin but projects using the plugin will need to update their own Selenium tests.

Total Stand-up Meeting Time: 10:00 minutes

Standup 4/16/2007

edit Posted by Dav Yaginuma on Tuesday April 17, 2007 at 04:59PM

Standup 04/16/2007

Help

  • Problems with initial start up of CrusieControl daemon script. J of cc.rb can take a look.
  • Running Selenium on IE7 remotely

Interesting Things

  • after_filter is called after the template is rendered, thus you cannot set instance variables in it and expect them to be available in the template. The after_filter method is good for post-render content manipulation or analysis such as gzipping, translating to pig latin or determining content-length. Perhaps it would be useful to add a before_render hook?
  • Remember integration tests are for full stack http testing (routes, REST, etc). Functional tests do not test full stack. Integration tests require some special handling.
  • After a reload on an association proxy object, the reference becomes a true Array (they always respond true to is_a?(Array). This means that none of the association proxy methods are available!
<code>
    class Foo < ActiveRecord::Base
       has_many :bar
    end

    foo = Foo.new
    foo.bars.reload.build
    NoMethodError: undefined method `build' for []:Array
</code>

Total Stand-up Meeting Time: 14:00 minutes

Automatic invocation of multiple OS X terminal windows

edit Posted by Dav Yaginuma on Tuesday March 20, 2007 at 08:35PM

As the righteous wave of Intel iMacs surges into the Pivotal Labs offices, more Pivots are finding themselves working with multiple OS X Terminal windows. The opening and positioning of terminal windows often follows the same pattern: cd into project directory, run mongrel, open next window, cd into project directory, tail the test log, etc.. To avoid violating DRY, I've hacked up some simple ruby scripts that automate the process. See my original post for details and links to the scripts.

Now it's just a matter of running one command: $ terminals.rb myproject This opens up all of the standard windows from the project in their specified positions and running the right processes.

My pair the be-whiskered

edit Posted by Dav Yaginuma on Friday February 09, 2007 at 09:26PM

Pair Programming for Ailurophiles