[nodejs-xml2js] Patch test result for xmlbuilder 0.4.6 support

Tom Hughes tomh at fedoraproject.org
Wed Feb 11 18:54:39 UTC 2015


commit b7ec6aa2c54e557c3e244cbf8d57f54203d2ad54
Author: Tom Hughes <tom at compton.nu>
Date:   Wed Feb 11 18:43:25 2015 +0000

    Patch test result for xmlbuilder 0.4.6 support

 nodejs-xml2js-xmlbuilder.patch |   32 ++++++++++++++++++++++++++++++++
 nodejs-xml2js.spec             |   10 ++++++++--
 2 files changed, 40 insertions(+), 2 deletions(-)
---
diff --git a/nodejs-xml2js-xmlbuilder.patch b/nodejs-xml2js-xmlbuilder.patch
new file mode 100644
index 0000000..0bda1dc
--- /dev/null
+++ b/nodejs-xml2js-xmlbuilder.patch
@@ -0,0 +1,32 @@
+commit d2ccc41b0f795ee1c2aa04a0e5f10bfb321f12ce
+Author: Tom Hughes <tom at compton.nu>
+Date:   Wed Feb 11 18:40:39 2015 +0000
+
+    Update test result for latest xmlbuilder
+
+diff --git a/package.json b/package.json
+index 1742a07..74f910c 100644
+--- a/package.json
++++ b/package.json
+@@ -49,7 +49,7 @@
+   },
+   "dependencies" : {
+     "sax" : "0.6.x",
+-    "xmlbuilder" : ">=1.0.0"
++    "xmlbuilder" : ">=2.4.6"
+   },
+   "devDependencies" : {
+     "coffee-script" : ">=1.7.1",
+diff --git a/test/builder.test.coffee b/test/builder.test.coffee
+index 7f8235d..ddb83a6 100644
+--- a/test/builder.test.coffee
++++ b/test/builder.test.coffee
+@@ -18,7 +18,7 @@ diffeq = (expected, actual) ->
+ 
+ module.exports =
+   'test building basic XML structure': (test) ->
+-    expected = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><xml><Label></Label><MsgId>5850440872586764820</MsgId></xml>'
++    expected = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><xml><Label/><MsgId>5850440872586764820</MsgId></xml>'
+     obj = {"xml":{"Label":[""],"MsgId":["5850440872586764820"]}}
+     builder = new xml2js.Builder renderOpts: pretty: false
+     actual = builder.buildObject obj
diff --git a/nodejs-xml2js.spec b/nodejs-xml2js.spec
index e0f59c9..0a6e49c 100644
--- a/nodejs-xml2js.spec
+++ b/nodejs-xml2js.spec
@@ -2,12 +2,14 @@
 
 Name:           nodejs-xml2js
 Version:        0.4.5
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Simple XML to JavaScript object converter
 
 License:        MIT
 URL:            https://github.com/Leonidas-from-XIV/node-xml2js
 Source0:        https://github.com/Leonidas-from-XIV/node-xml2js/archive/%{commit}/node-xml2js-%{commit}.tar.gz
+#
+Patch0:         nodejs-xml2js/nodejs-xml2js-xmlbuilder.patch
 
 BuildArch:      noarch
 ExclusiveArch:  %{nodejs_arches} noarch
@@ -18,7 +20,7 @@ BuildRequires:  npm(zap)
 BuildRequires:  npm(coffee-script)
 BuildRequires:  npm(sax)
 BuildRequires:  npm(diff)
-BuildRequires:  npm(xmlbuilder)
+BuildRequires:  npm(xmlbuilder) >= 2.4.6
 
 %description
 Ever had the urge to parse XML? And wanted to access the data in
@@ -28,6 +30,7 @@ reason? Then xml2js is what you're looking for!
 
 %prep
 %setup -q -n node-xml2js-%{commit}
+%patch0 -p1
 %nodejs_fixdep sax "~0.5"
 rm -rf node_modules
 
@@ -52,6 +55,9 @@ cp -pr package.json lib %{buildroot}/%{nodejs_sitelib}/xml2js
 
 
 %changelog
+* Wed Feb 11 2015 Tom Hughes <tom at compton.nu> - 0.4.5-2
+- Patch test result for xmlbuilder 0.4.6 support
+
 * Wed Feb 11 2015 Tom Hughes <tom at compton.nu> - 0.4.5-1
 - Update to 0.4.5 upstream release
 


More information about the scm-commits mailing list