Austin PutmanAustin Putman
Standup 7/22/2010: XML <-> JS scrimmage. Go!
edit Posted by Austin Putman on Thursday July 22, 2010 at 09:36AM

Ask for Help

"Is there a good heap analyzer to debug some memory issues in our app?"

Some options to look into include rubyprof, valgrind, bleakhouse and memprof.

"Anyone else having problems with RubyMine 2.02 allowing the cursor to be placed at arbitrary locations out beyond the end of the line? We've turned off the setting that controls this."

This can happen if RM is in column-edit mode. Also there's a setting to "Strip Trailing Spaces" -- if you previously were allowing arbitrary cursor placement, you may need to enable this to clean up.

"Anyone have experience dealing with E4X to parse javascript in XML? It seems to be choking on é characters -- in the iso-8559 doctype these are legal content."

No solutions were forthcoming. To recreate this error yourself, plug the following into your Firebug console:

var someHtml = '<p>cr&egrave;me fraiche</p>';
new XML(someHtml);

// => "TypeError: unknown XML entity egrave"

"What is the best javascript XML parser?"

jQuery is recommended in the browser and also works on top of env.js in Rhino. libxmljs is built on top of V8.

"Webmock is having trouble correctly parsing matching query params in SSL. Anyone seen this?"

The easiest thing may be to skip the SSL requirement for the tests.

UPDATE: The webmock issue was resolved using a couple of techniques. Firstly, the keys for your query params have to be symbols, not strings. This avoids a problem with sorting them for the comparisons. Secondly, it's better to pass the expected url as a regex. This may be related to :443 getting added to the end of SSL requests, or may just be a bug.

Comments

  1. Bartosz Blimke Bartosz Blimke on July 25, 2010 at 01:11AM

    Hi. Could you provide an example of a WebMock stub and SSL request with query params where WebMock fails to match the request? I will check if it's a bug in WebMock and try to fix it.