From 7024876e49fd7bb13e37d369a24a06c358a52635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Tue, 25 Jun 2019 10:30:25 -0300 Subject: [PATCH] Specversion placebo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- lib/cloudevent.js | 4 ++++ lib/specs/spec_0_2.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/lib/cloudevent.js b/lib/cloudevent.js index d86ca3a..4f05de3 100644 --- a/lib/cloudevent.js +++ b/lib/cloudevent.js @@ -43,6 +43,10 @@ Cloudevent.prototype.getType = function() { return this.spec.getType(); }; +Cloudevent.prototype.specversion = function(version) { + return this.spec.specversion(version); +}; + Cloudevent.prototype.getSpecversion = function() { return this.spec.getSpecversion(); }; diff --git a/lib/specs/spec_0_2.js b/lib/specs/spec_0_2.js index 489af96..dfef99c 100644 --- a/lib/specs/spec_0_2.js +++ b/lib/specs/spec_0_2.js @@ -53,6 +53,11 @@ Spec02.prototype.getType = function(){ return this.payload["type"]; }; +Spec02.prototype.specversion = function(_specversion){ + // does not set! This is right + return this; +}; + Spec02.prototype.getSpecversion = function() { return this.payload["specversion"]; };