Skip to content
This repository has been archived by the owner on Jun 13, 2018. It is now read-only.

Fix finding of error description in USPS tracking #266

Merged
merged 2 commits into from May 25, 2015

Conversation

trishume
Copy link
Contributor

The existing code for error message extraction wasn't tested, and was totally wrong.

Code Issues Fixed in this PR

  • document.elements[...] doesn't search the document, it indexes an array.
  • failed searches return an empty array-ish-thing not nil so first_thing || second_thing doesn't work
  • Same thing made the checking multiple xpaths pattern not work, replaced it with a single general xpath.

I'm ashamed that I didn't have to Google the xpath syntax. I try to repress the memories of my days working with XSLT.

@Shopify/shipping

@trishume
Copy link
Contributor Author

Failing tests are just RemoteCorreiosTest as usual.

@kmcphillips
Copy link
Member

Well I do have to google xpath. 👍

@RichardBlair
Copy link
Contributor

👍

trishume added a commit that referenced this pull request May 25, 2015
Fix finding of error description in USPS tracking
@trishume trishume merged commit 41fa974 into master May 25, 2015
@trishume trishume deleted the fix-error-extraction branch May 25, 2015 20:12
maartenvg pushed a commit that referenced this pull request Nov 9, 2017
Fix finding of error description in USPS tracking
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants