bjjb / ebayr

A small library to help using the eBay Trading API with Ruby
MIT License
60 stars 49 forks source link

really need a serious xml builder #16

Closed onyxblade closed 9 years ago

onyxblade commented 9 years ago

{"Name"=>"Color", "Value"=>["Black", "Pink", "Yellow", "Blue"]} went in and <Name>Color</Name><Value>BlackPinkYellowBlue</Value> went out

which should be <Name>Color</Name><Value>Black</Value><Value>Pink</Value><Value>Yellow</Value><Value>Blue</Value>

why not try ActiveSupport or something?

onyxblade commented 9 years ago

well, i see

you prefer another way to handle that array params, to input {"Name"=>"Color", [{"Value"=>"Black"}, {"Value"=>"Pink"}, {"Value"=>"Yellow"}, {"Value"=>"Blue"}]}

ummm, but this is not so common...

i would like to have my own fork :-(

SpeerJ commented 9 years ago

looking through the forks i found this commit https://github.com/meismann/ebayr/commit/d7c46e2c3e56c6dd40350fcaac5e35bec4a05505

SpeerJ commented 9 years ago

Look's ready to go except that the hash's use the ruby 1.9 syntax "{asdf: 1}." We target 1.8.7+

bjjb commented 9 years ago

I disagree with the title of the issue, @CicholGricenchos - "need" is too strong a word. Of course I started with XML builder libraries (nobody with any experience writes XML processors without good reason); if you dig through the history, you might find some old versions that used various libraries (including ActiveSupport, Nokogiri::XML::Builder, and even REXML). I systematically abandoned them one by one, for various reasons (poor Ruby version compatibility, inappropriate APIs, or way too many gem dependencies). Eventually I determined that the more reasonable course of action for the very predictable XML output requirements of eBayR was a (thoroughly tested), bare-bones custom job.

So I need to be convinced. Please feel free to fork the project, and if a pull request comes in which replaced eBayR's built-in XML processors, provably works on all Ruby version from 1.8.7 onwards, includes benchmarks indicating a significant speedup, and has the support of the other developers, I'll of course be quite happy to merge it into master and release a new version.

onyxblade commented 9 years ago

Sorry for that phrasing, since I don't daily use English.. I knew more about the situation now, thank you @bjjb and your post!

bjjb commented 9 years ago

You're welcome, @CicholGricenchos, and it's a credit to your English that I didn't notice you weren't a native speaker. :gb: