Brian Jenkins's blog



Brian JenkinsBrian Jenkins
Nice post on the development of the new Google button.
edit Posted by Brian Jenkins on Friday February 06, 2009 at 03:29PM

http://stopdesign.com/archive/2009/02/04/recreating-the-button.html

Please move quickly to the chamberlock as the effects of prolonged exposure to the button are not part of this test.

Brian JenkinsBrian Jenkins
Standup 11/26/2008: Assorted Incompatibilities
edit Posted by Brian Jenkins on Wednesday November 26, 2008 at 06:42PM

Interesting Things

The garbage collection bug we encountered on Monday has popped up in new places:

  • Rspec version < 1.1.11 + Linux ruby 1.8.6 patchlevel > 114 = (small explosion)

  • libxml version 0.5.4 (11 versions out of date) + Linux ruby 1.8.6 patchlevel > 114 = (another small explosion)

Also, speaking of libxml:

  • ActsAsSolr was incompatible with more recent versions of libxml, but David has submitted a fix which has been incorporated into mattmatt's github fork.

Ask for Help

"Turning off cache-busting for test environment replaces cache-busting junk with ??. Is there a way to make it replace it with nothing instead?"

With cache busting on, you have would have to test like this:

 admin_button.should have_tag("a > img[src ='/images/v3/admin/image_name.png?12121212?']")

which is awkward.

We turned it off by adding the following to config/environments/test.rb (google said to do it)

 ENV['RAILS_ASSET_ID'] = ''

But, then we had to do this:

 admin_button.should have_tag("a > img[src ='/images/v3/admin/image_name.png??']")

Is there a way to turn off cache-busting that doesn't put weird/ugly question marks at the end of your image names?

"with_tag & have_tag don't work in non-controller (e.g. model) rspecs?"

Yes, they don't. Use Hpricot instead. Or maybe assert_elements.

Brian JenkinsBrian Jenkins
Standup 11/24/2008: Changes to GC in Ruby 1.8.6?
edit Posted by Brian Jenkins on Monday November 24, 2008 at 06:54PM

Ask for Help

"Does anyone know about recent changes to Ruby 1.8.6 garbage collection?"

We're seeing a strange test failure on one of our CI boxes:

[BUG] object allocation during garbage collection phase ruby 1.8.6 (2008-08-11) [i686-linux]

ruby -v gives this:

ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux]

On the developer's OSX machine, which doesn't experience this bug, ruby -v gives:

ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]

There have apparently been changes to garbage collection in 1.8.7 and 1.9 -- does anyone know if these have been backported to 1.8.6 somewhere between patchlevels 114 and 287?