Open meismann opened 8 years ago
@bjjb Took up your suggestion to make it backward compatible. Here is the result.
Please remember to use the "=>" over ":" for hashes, since this project targets ruby 1.8.7 as well. the tests return this error " /home/travis/build/bjjb/ebayr/test/ebayr/request_test.rb:24: syntax error, unexpected ':', expecting ')'
xml_of(a: [ 1, { b: [1, 2] } ])."
it can be fixed with "xml_of(:a=> [ 1, { :b=> [1, 2] } ])"
Ok, will change it in a minute.
Any progress here?
Any chance that theses changes will make it into master? If not, let us close it.
Hi @meismann The changes currently conflict with other changes in master. Is it still an issue for you? If not, then I guess we can just close it. If so, then I can make some suggestions for prepping the MR.
Old behaviour:
New behaviour:
If a value in this Hash is an Array, then each of the Array's elements is wrapped in the same tag (which is the value's key), like here (1 and 2 are both wrapped in the tag
b
):If you have to, you can switch the legacy syntax on with this setting:
Also: These methods cannot be used from outside of
Ebayr::Request
any more: .xml, .serialize_input, .camelize, #input_xml