Hello community,

here is the log from the commit of package nodejs-boom for openSUSE:Factory 
checked in at 2015-08-05 06:51:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nodejs-boom (Old)
 and      /work/SRC/openSUSE:Factory/.nodejs-boom.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nodejs-boom"

Changes:
--------
--- /work/SRC/openSUSE:Factory/nodejs-boom/nodejs-boom.changes  2015-06-30 
10:17:01.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.nodejs-boom.new/nodejs-boom.changes     
2015-08-05 06:51:29.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Jul 30 10:36:16 UTC 2015 - [email protected]
+
+- update version 2.8.0
+
+-------------------------------------------------------------------

Old:
----
  boom-2.7.2.tgz

New:
----
  boom-2.8.0.tgz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nodejs-boom.spec ++++++
--- /var/tmp/diff_new_pack.4Yard5/_old  2015-08-05 06:51:29.000000000 +0200
+++ /var/tmp/diff_new_pack.4Yard5/_new  2015-08-05 06:51:29.000000000 +0200
@@ -19,7 +19,7 @@
 %define base_name boom
 
 Name:           nodejs-boom
-Version:        2.7.2
+Version:        2.8.0
 Release:        0
 Summary:        HTTP-friendly error objects
 License:        BSD-2-Clause
@@ -37,18 +37,18 @@
 
 %prep
 %setup -q -n package
-chmod 0644 index.js lib/*.js README.md LICENSE images/*.png
+chmod 0644 lib/*.js README.md LICENSE images/*.png
 
 %build
 
 %install
-mkdir -p %{buildroot}%{nodejs_modulesdir}/%{base_name}
-cp -pr package.json index.js lib images \
-        %{buildroot}%{nodejs_modulesdir}/%{base_name}/
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{base_name}
+cp -pr package.json lib images \
+        %{buildroot}%{nodejs_sitelib}/%{base_name}/
 
 %files
 %defattr(-,root,root,-)
 %doc README.md LICENSE CONTRIBUTING.md
-%{nodejs_modulesdir}/%{base_name}
+%{nodejs_sitelib}/%{base_name}
 
 %changelog

++++++ boom-2.7.2.tgz -> boom-2.8.0.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/README.md new/package/README.md
--- old/package/README.md       2015-05-21 18:29:44.000000000 +0200
+++ new/package/README.md       2015-06-14 03:05:08.000000000 +0200
@@ -82,7 +82,12 @@
 - `scheme` can be one of the following:
   - an authentication scheme name
   - an array of string values. These values will be separated by ', ' and set 
to the 'WWW-Authenticate' header.
-- `attributes` - an object of values to use while setting the 
'WWW-Authenticate' header. This value is only used when `schema` is a string, 
otherwise it is ignored. Every key/value pair will be included in the 
'WWW-Authenticate' in the format of 'key="value"'. `null` and `undefined` will 
be replaced with an empty string. If `attributes` is set, `message` will be 
used as the 'error' segment of the 'WWW-Authenticate' header. If `message` is 
unset, the 'error' segment of the header will not be present and `isMissing` 
will be true on the error object.
+- `attributes` - an object of values to use while setting the 
'WWW-Authenticate' header. This value is only used
+  when `schema` is a string, otherwise it is ignored. Every key/value pair 
will be included in the
+  'WWW-Authenticate' in the format of 'key="value"' as well as in the response 
payload under the `attributes` key.
+  `null` and `undefined` will be replaced with an empty string. If 
`attributes` is set, `message` will be used as
+  the 'error' segment of the 'WWW-Authenticate' header. If `message` is unset, 
the 'error' segment of the header
+  will not be present and `isMissing` will be true on the error object.
 
 If either `scheme` or `attributes` are set, the resultant `Boom` object will 
have the 'WWW-Authenticate' header set for the response.
 
@@ -111,7 +116,10 @@
 "payload": {
     "statusCode": 401,
     "error": "Unauthorized",
-    "message": "invalid password"
+    "message": "invalid password",
+    "attributes": {
+        "error": "invalid password"
+    }
 },
 "headers" {
   "WWW-Authenticate": "sample error=\"invalid password\""
@@ -128,7 +136,13 @@
 "payload": {
     "statusCode": 401,
     "error": "Unauthorized",
-    "message": "invalid password"
+    "message": "invalid password",
+    "attributes": {
+        "error": "invalid password",
+        "ttl": 0,
+        "cache": "",
+        "foo": "bar"
+    }
 },
 "headers" {
   "WWW-Authenticate": "sample ttl=\"0\", cache=\"\", foo=\"bar\", 
error=\"invalid password\""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/index.js new/package/index.js
--- old/package/index.js        2014-08-08 15:53:25.000000000 +0200
+++ new/package/index.js        1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-module.exports = require('./lib');
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/lib/index.js new/package/lib/index.js
--- old/package/lib/index.js    2015-04-16 15:36:02.000000000 +0200
+++ new/package/lib/index.js    2015-06-14 03:05:08.000000000 +0200
@@ -99,20 +99,27 @@
         // function (message, scheme, attributes)
 
         wwwAuthenticate = scheme;
+
+        if (attributes || message) {
+            err.output.payload.attributes = {};
+        }
+
         if (attributes) {
             var names = Object.keys(attributes);
             for (i = 0, il = names.length; i < il; ++i) {
+                var name = names[i];
                 if (i) {
                     wwwAuthenticate += ',';
                 }
 
-                var value = attributes[names[i]];
+                var value = attributes[name];
                 if (value === null ||
                     value === undefined) {              // Value can be zero
 
                     value = '';
                 }
-                wwwAuthenticate += ' ' + names[i] + '="' + 
Hoek.escapeHeaderAttribute(value.toString()) + '"';
+                wwwAuthenticate += ' ' + name + '="' + 
Hoek.escapeHeaderAttribute(value.toString()) + '"';
+                err.output.payload.attributes[name] = value;
             }
         }
 
@@ -121,6 +128,7 @@
                 wwwAuthenticate += ',';
             }
             wwwAuthenticate += ' error="' + 
Hoek.escapeHeaderAttribute(message) + '"';
+            err.output.payload.attributes.error = message;
         }
         else {
             err.isMissing = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/package.json new/package/package.json
--- old/package/package.json    2015-05-21 18:30:00.000000000 +0200
+++ new/package/package.json    2015-06-14 03:05:28.000000000 +0200
@@ -1,9 +1,9 @@
 {
   "name": "boom",
   "description": "HTTP-friendly error objects",
-  "version": "2.7.2",
+  "version": "2.8.0",
   "repository": "git://github.com/hapijs/boom",
-  "main": "index",
+  "main": "lib/index.js",
   "keywords": [
     "error",
     "http"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/test/index.js new/package/test/index.js
--- old/package/test/index.js   2015-04-16 15:36:02.000000000 +0200
+++ new/package/test/index.js   2015-06-14 03:05:08.000000000 +0200
@@ -200,6 +200,7 @@
         var err = Boom.unauthorized('boom', 'Test', { a: 1, b: 'something', c: 
null, d: 0 });
         expect(err.output.statusCode).to.equal(401);
         expect(err.output.headers['WWW-Authenticate']).to.equal('Test a="1", 
b="something", c="", d="0", error="boom"');
+        expect(err.output.payload.attributes).to.deep.equal({ a: 1, b: 
'something', c: '', d: 0, error: 'boom' });
         done();
     });
 


Reply via email to