josephholsten / rets4r

Bringing RETS to ruby
MIT License
52 stars 28 forks source link

Use Nokogiri response parser if applicable / available, fall back to pure ruby. #7

Open briandunn opened 14 years ago

briandunn commented 14 years ago

Actually I'm cool with Nokogiri as a dep, but in order to fulfill our pledge of pure rubyness...

Given I search And the server responds with compact decoded xml And nokogiri is installed Then the response should be parsed really fast, yielding between rows

Given I search And the server responds with a different type Then the response should be parsed slowly and purely.

Given I search And the server responds with compact decoded xml And the gem "nokogiri" is not available Then the response should be parsed slowly and purely.

Is that what you had in mind, josephholsten?

kidbrax commented 13 years ago

I was wondering about this as well. I just had a feed that kept choking because apparently the RETS tag wasn't being closed. I switched all the parsing to Nokogiri and was able to get past the problem. So I was just wondering if there was any reason to not move all the parsing to Nokogiri?

briandunn commented 13 years ago

This is a branding thing. We want to stay true to the "4R" part of the name: ideally the only dependencies would also be in pure ruby.

Ideals aside, Nokogiri is awesome, and libxml ubiquitous. We should implement the automatic use of nokogiri where available. Tested pull requests welcome. :)