diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 17fb327..2f1b886 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,7 +6,7 @@ History 0.13.1 (unreleased) ------------------- -- No changes yet +- `BinaryCarrier` now fulfills the API contract that binary carrier objects have a `buffer` property. 0.13.0 (2016-10-14) diff --git a/lib-debug/binary_carrier.js b/lib-debug/binary_carrier.js index 733762c..8923ffc 100644 --- a/lib-debug/binary_carrier.js +++ b/lib-debug/binary_carrier.js @@ -15,7 +15,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons var BinaryCarrier = function BinaryCarrier(binaryData) { _classCallCheck(this, BinaryCarrier); - this._buffer = binaryData; + this.buffer = binaryData; }; exports.default = BinaryCarrier; diff --git a/lib-debug/binary_carrier.js.map b/lib-debug/binary_carrier.js.map index 59440c2..877aabc 100644 --- a/lib-debug/binary_carrier.js.map +++ b/lib-debug/binary_carrier.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/binary_carrier.js"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;IAMqB,a,GACjB,uBAAY,UAAZ,EAAwB;AAAA;;AACpB,SAAK,OAAL,GAAe,UAAf;AACH,C;;kBAHgB,a","file":"binary_carrier.js","sourcesContent":["/**\n * Convenience class to use as a binary carrier.\n *\n * Any valid Object with a field named `buffer` may be used as a binary carrier;\n * this class is only one such type of object that can be used.\n */\nexport default class BinaryCarrier {\n constructor(binaryData) {\n this._buffer = binaryData;\n }\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../src/binary_carrier.js"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;IAMqB,a,GACjB,uBAAY,UAAZ,EAAwB;AAAA;;AACpB,SAAK,MAAL,GAAc,UAAd;AACH,C;;kBAHgB,a","file":"binary_carrier.js","sourcesContent":["/**\n * Convenience class to use as a binary carrier.\n *\n * Any valid Object with a field named `buffer` may be used as a binary carrier;\n * this class is only one such type of object that can be used.\n */\nexport default class BinaryCarrier {\n constructor(binaryData) {\n this.buffer = binaryData;\n }\n}\n"]} \ No newline at end of file diff --git a/lib/binary_carrier.js b/lib/binary_carrier.js index 733762c..8923ffc 100644 --- a/lib/binary_carrier.js +++ b/lib/binary_carrier.js @@ -15,7 +15,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons var BinaryCarrier = function BinaryCarrier(binaryData) { _classCallCheck(this, BinaryCarrier); - this._buffer = binaryData; + this.buffer = binaryData; }; exports.default = BinaryCarrier; diff --git a/lib/binary_carrier.js.map b/lib/binary_carrier.js.map index 59440c2..877aabc 100644 --- a/lib/binary_carrier.js.map +++ b/lib/binary_carrier.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/binary_carrier.js"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;IAMqB,a,GACjB,uBAAY,UAAZ,EAAwB;AAAA;;AACpB,SAAK,OAAL,GAAe,UAAf;AACH,C;;kBAHgB,a","file":"binary_carrier.js","sourcesContent":["/**\n * Convenience class to use as a binary carrier.\n *\n * Any valid Object with a field named `buffer` may be used as a binary carrier;\n * this class is only one such type of object that can be used.\n */\nexport default class BinaryCarrier {\n constructor(binaryData) {\n this._buffer = binaryData;\n }\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../src/binary_carrier.js"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;IAMqB,a,GACjB,uBAAY,UAAZ,EAAwB;AAAA;;AACpB,SAAK,MAAL,GAAc,UAAd;AACH,C;;kBAHgB,a","file":"binary_carrier.js","sourcesContent":["/**\n * Convenience class to use as a binary carrier.\n *\n * Any valid Object with a field named `buffer` may be used as a binary carrier;\n * this class is only one such type of object that can be used.\n */\nexport default class BinaryCarrier {\n constructor(binaryData) {\n this.buffer = binaryData;\n }\n}\n"]} \ No newline at end of file diff --git a/src/binary_carrier.js b/src/binary_carrier.js index 1241c38..6aca315 100644 --- a/src/binary_carrier.js +++ b/src/binary_carrier.js @@ -6,6 +6,6 @@ */ export default class BinaryCarrier { constructor(binaryData) { - this._buffer = binaryData; + this.buffer = binaryData; } } diff --git a/test/opentracing_api.js b/test/opentracing_api.js index 607a4e8..f9b5895 100644 --- a/test/opentracing_api.js +++ b/test/opentracing_api.js @@ -66,5 +66,14 @@ module.exports = function opentracingAPITests() { expect(ref).to.be.an('object'); }); }); + + + describe('BinaryCarrier', function() { + it('should set binary data as a field called "buffer"', function() { + var buffer = new Float64Array(); + var ref = new opentracing.BinaryCarrier(buffer); + expect(ref.buffer).to.equal(buffer); + }); + }); }); }