Empact/roo — pull request #135 by thefooj (2014-06-05 12:13:09+00:00)
Title: Excelx hyperlink r:id fix + to_csv fix for :link types = no more failing tests

Resubmitting a previous pull request. This one is off of a branch in my repo so I can update my master.

I was about to start working on some enhancements, but found that the test suite wasn't passing at least on my system (Mac - Mavericks). I made some fixes and got "bundle exec rake test" and "bundle exec rspec" to both pass without failures. One "error" remains in test:

1) Error:
test_bug_pfand_from_windows_phone_xlsx(TestRoo):
Encoding::CompatibilityError: incompatible encoding regexp match (US-ASCII regexp with UTF-16 string) for excelx

I left that one as-is.

Part of this pull request reverts what was done in https://github.com/Empact/roo/pull/123 to an earlier commit within that same pull request.

Where the xpath was changed to hyperlink[id] from just hyperlink based on a dialogue with Empact. My test suite failed on that -- perhaps due to a Nokogiri platform issue?? Because the Excelx file had the id field with a namespace prefix "r:" the normal [id] selector was not working. I figure that most entries in the Excelx references file that are "hyperlink" elements would have an id, so I'd suggest going back to being without [id] for safety. I added back the nil check that rui-castro had done initially.

Thanks for considering, and thanks so much for this great gem!