diff --git a/CHANGELOG.md b/CHANGELOG.md index 8df9862..993ef1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change log +### v1.3.3 + * Bump version range of backbone and underscore support. + ### v1.3.2 * Increase underscore range * Minor underscore refactors diff --git a/bower.json b/bower.json index 6352dd0..a1abc7c 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "backbone.wreqr", - "version": "1.3.2", + "version": "1.3.3", "homepage": "https://github.com/marionettejs/backbone.wreqr", "authors": [ "Derick Bailey" diff --git a/component.json b/component.json index 71051ab..9bac6c2 100644 --- a/component.json +++ b/component.json @@ -1,7 +1,7 @@ { "name": "backbone.wreqr", "description": "A Simple Service Bus For Backbone and Backbone.Marionette", - "version": "1.3.1", + "version": "1.3.3", "repo": "marionettejs/backbone.wreqr", "keywords": [ "backbone", diff --git a/lib/backbone.wreqr.js b/lib/backbone.wreqr.js index 1804326..bfee8e0 100644 --- a/lib/backbone.wreqr.js +++ b/lib/backbone.wreqr.js @@ -1,8 +1,8 @@ // Backbone.Wreqr (Backbone.Marionette) // ---------------------------------- -// v1.3.2 +// v1.3.3 // -// Copyright (c)2014 Derick Bailey, Muted Solutions, LLC. +// Copyright (c)2015 Derick Bailey, Muted Solutions, LLC. // Distributed under MIT license // // http://github.com/marionettejs/backbone.wreqr @@ -29,7 +29,7 @@ var Wreqr = Backbone.Wreqr = {}; - Backbone.Wreqr.VERSION = '1.3.2'; + Backbone.Wreqr.VERSION = '1.3.3'; Backbone.Wreqr.noConflict = function () { Backbone.Wreqr = previousWreqr; diff --git a/lib/backbone.wreqr.map b/lib/backbone.wreqr.map index bedb837..f93d8fe 100644 --- a/lib/backbone.wreqr.map +++ b/lib/backbone.wreqr.map @@ -1 +1 @@ -{"version":3,"file":"lib/backbone.wreqr.min.js","sources":["?"],"names":["root","factory","define","amd","Backbone","_","exports","require","module","this","previousWreqr","Wreqr","VERSION","noConflict","Handlers","options","_wreqrHandlers","isFunction","initialize","extend","Model","prototype","Events","setHandlers","handlers","each","handler","name","context","isObject","callback","setHandler","config","trigger","hasHandler","getHandler","apply","arguments","removeHandler","removeAllHandlers","CommandStorage","_commands","getCommands","commandName","commands","command","instances","addCommand","args","push","clearCommands","Commands","storageType","constructor","_initializeStorage","on","_executeCommands","execute","rest","storage","StorageType","RequestResponse","request","EventAggregator","EA","Channel","channelName","vent","reqres","reset","off","stopListening","connectEvents","hash","_connect","connectCommands","connectRequests","type","method","fn","eventName","bind","radio","Radio","_channels","_proxyMethods","channel","Error","_getChannel","system","messageSystems","proxyMethod","messageSystem"],"mappings":"CAUC,SAASA,EAAMC,GAEd,GAAsB,kBAAXC,SAAyBA,OAAOC,IACzCD,QAAQ,WAAY,cAAe,SAASE,EAAUC,GACpD,MAAOJ,GAAQG,EAAUC,SAEtB,IAAuB,mBAAZC,SAAyB,CACzC,GAAIF,GAAWG,QAAQ,YACnBF,EAAIE,QAAQ,aAChBC,QAAOF,QAAUL,EAAQG,EAAUC,OAEnCJ,GAAQD,EAAKI,SAAUJ,EAAKK,KAG9BI,KAAM,SAASL,EAAUC,GACzB,YAEA,IAAIK,GAAgBN,EAASO,MAEzBA,EAAQP,EAASO,QAmZrB,OAjZAP,GAASO,MAAMC,QAAU,QAEzBR,EAASO,MAAME,WAAa,WAE1B,MADAT,GAASO,MAAQD,EACVD,MAOTE,EAAMG,SAAW,SAAUV,EAAUC,GAMnC,GAAIS,GAAW,SAASC,GACtBN,KAAKM,QAAUA,EACfN,KAAKO,kBAEDX,EAAEY,WAAWR,KAAKS,aACpBT,KAAKS,WAAWH,GAqEpB,OAjEAD,GAASK,OAASf,EAASgB,MAAMD,OAKjCd,EAAEc,OAAOL,EAASO,UAAWjB,EAASkB,QAGpCC,YAAa,SAASC,GACpBnB,EAAEoB,KAAKD,EAAU,SAASE,EAASC,GACjC,GAAIC,GAAU,IAEVvB,GAAEwB,SAASH,KAAarB,EAAEY,WAAWS,KACvCE,EAAUF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,OACFA,QAKP,IAAIiF,IACFvB,MACE,KACA,MACA,UACA,OACA,gBACA,WACA,gBAGFvB,UACE,UACA,aACA,cACA,gBACA,qBAGFwB,QACE,UACA,aACA,cACA,gBACA,sBAIAuB,EAAc,SAAST,EAAOO,EAAQX,GACxC,MAAO,UAASZ,GACd,GAAI0B,GAAgBV,EAAMM,YAAYtB,GAAauB,EAEnD,OAAOG,GAAcd,GAAQ1C,MAAMwD,EAAevF,EAAEqD,KAAKrB,aAI7D,OAAO,IAAI8C,IAEVxE,EAAON,GAGHD,EAASO"} \ No newline at end of file +{"version":3,"sources":["?"],"names":["root","factory","define","amd","Backbone","_","exports","require","module","this","previousWreqr","Wreqr","VERSION","noConflict","Handlers","options","_wreqrHandlers","isFunction","initialize","extend","Model","prototype","Events","setHandlers","handlers","each","handler","name","context","isObject","callback","setHandler","config","trigger","hasHandler","getHandler","apply","arguments","removeHandler","removeAllHandlers","CommandStorage","_commands","getCommands","commandName","commands","command","instances","addCommand","args","push","clearCommands","Commands","storageType","constructor","_initializeStorage","on","_executeCommands","execute","rest","storage","StorageType","RequestResponse","request","EventAggregator","EA","Channel","channelName","vent","reqres","reset","off","stopListening","connectEvents","hash","_connect","connectCommands","connectRequests","type","method","fn","eventName","bind","radio","Radio","_channels","_proxyMethods","channel","Error","_getChannel","system","messageSystems","proxyMethod","messageSystem"],"mappings":"CAUC,SAASA,EAAMC,GAEd,GAAsB,kBAAXC,SAAyBA,OAAOC,IACzCD,QAAQ,WAAY,cAAe,SAASE,EAAUC,GACpD,MAAOJ,GAAQG,EAAUC,SAEtB,IAAuB,mBAAZC,SAAyB,CACzC,GAAIF,GAAWG,QAAQ,YACnBF,EAAIE,QAAQ,aAChBC,QAAOF,QAAUL,EAAQG,EAAUC,OAEnCJ,GAAQD,EAAKI,SAAUJ,EAAKK,KAG9BI,KAAM,SAASL,EAAUC,GACzB,YAEA,IAAIK,GAAgBN,EAASO,MAEzBA,EAAQP,EAASO,QAmZrB,OAjZAP,GAASO,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,gBAGPhF,GAAEc,OAAOgE,EAAM9D,WAEbiE,QAAS,SAASpB,GAChB,IAAKA,EACH,KAAUqB,OAAM,8BAGlB,OAAO9E,MAAK+E,YAAatB,IAG3BsB,YAAa,SAAStB,GACpB,GAAIoB,GAAU7E,KAAK2E,UAAUlB,EAO7B,OALIoB,KACFA,EAAU,GAAI3E,GAAMsD,QAAQC,GAC5BzD,KAAK2E,UAAUlB,GAAeoB,GAGzBA,GAGTD,cAAe,WACbhF,EAAEoB,MAAM,OAAQ,WAAY,UAAW,SAASgE,GAC9CpF,EAAEoB,KAAMiE,EAAeD,GAAS,SAASX,GACvCrE,KAAKgF,GAAQX,GAAUa,EAAYlF,KAAMgF,EAAQX,IAChDrE,OACFA,QAKP,IAAIiF,IACFvB,MACE,KACA,MACA,UACA,OACA,gBACA,WACA,gBAGFvB,UACE,UACA,aACA,cACA,gBACA,qBAGFwB,QACE,UACA,aACA,cACA,gBACA,sBAIAuB,EAAc,SAAST,EAAOO,EAAQX,GACxC,MAAO,UAASZ,GACd,GAAI0B,GAAgBV,EAAMM,YAAYtB,GAAauB,EAEnD,OAAOG,GAAcd,GAAQ1C,MAAMwD,EAAevF,EAAEqD,KAAKrB,aAI7D,OAAO,IAAI8C,IAEVxE,EAAON,GAGHD,EAASO","file":"lib/backbone.wreqr.min.js"} \ No newline at end of file diff --git a/lib/backbone.wreqr.min.js b/lib/backbone.wreqr.min.js index 8452ed8..9715fdc 100644 --- a/lib/backbone.wreqr.min.js +++ b/lib/backbone.wreqr.min.js @@ -1,12 +1,12 @@ // Backbone.Wreqr (Backbone.Marionette) // ---------------------------------- -// v1.3.2 +// v1.3.3 // -// Copyright (c)2014 Derick Bailey, Muted Solutions, LLC. +// Copyright (c)2015 Derick Bailey, Muted Solutions, LLC. // Distributed under MIT license // // http://github.com/marionettejs/backbone.wreqr -(function(n,e){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(n,t){return e(n,t)});else if("undefined"!=typeof exports){var t=require("backbone"),r=require("underscore");module.exports=e(t,r)}else e(n.Backbone,n._)})(this,function(n,e){"use strict";var t=n.Wreqr,r=n.Wreqr={};return n.Wreqr.VERSION="1.3.2",n.Wreqr.noConflict=function(){return n.Wreqr=t,this},r.Handlers=function(n,e){var t=function(n){this.options=n,this._wreqrHandlers={},e.isFunction(this.initialize)&&this.initialize(n)};return t.extend=n.Model.extend,e.extend(t.prototype,n.Events,{setHandlers:function(n){e.each(n,function(n,t){var r=null;e.isObject(n)&&!e.isFunction(n)&&(r=n.context,n=n.callback),this.setHandler(t,n,r)},this)},setHandler:function(n,e,t){var r={callback:e,context:t};this._wreqrHandlers[n]=r,this.trigger("handler:add",n,e,t)},hasHandler:function(n){return!!this._wreqrHandlers[n]},getHandler:function(n){var e=this._wreqrHandlers[n];if(e)return function(){return e.callback.apply(e.context,arguments)}},removeHandler:function(n){delete this._wreqrHandlers[n]},removeAllHandlers:function(){this._wreqrHandlers={}}}),t}(n,e),r.CommandStorage=function(){var t=function(n){this.options=n,this._commands={},e.isFunction(this.initialize)&&this.initialize(n)};return e.extend(t.prototype,n.Events,{getCommands:function(n){var e=this._commands[n];return e||(e={command:n,instances:[]},this._commands[n]=e),e},addCommand:function(n,e){var t=this.getCommands(n);t.instances.push(e)},clearCommands:function(n){var e=this.getCommands(n);e.instances=[]}}),t}(),r.Commands=function(n,e){return n.Handlers.extend({storageType:n.CommandStorage,constructor:function(e){this.options=e||{},this._initializeStorage(this.options),this.on("handler:add",this._executeCommands,this),n.Handlers.prototype.constructor.apply(this,arguments)},execute:function(n){n=arguments[0];var t=e.rest(arguments);this.hasHandler(n)?this.getHandler(n).apply(this,t):this.storage.addCommand(n,t)},_executeCommands:function(n,t,r){var s=this.storage.getCommands(n);e.each(s.instances,function(n){t.apply(r,n)}),this.storage.clearCommands(n)},_initializeStorage:function(n){var t,r=n.storageType||this.storageType;t=e.isFunction(r)?new r:r,this.storage=t}})}(r,e),r.RequestResponse=function(n,e){return n.Handlers.extend({request:function(n){return this.hasHandler(n)?this.getHandler(n).apply(this,e.rest(arguments)):void 0}})}(r,e),r.EventAggregator=function(n,e){var t=function(){};return t.extend=n.Model.extend,e.extend(t.prototype,n.Events),t}(n,e),r.Channel=function(){var t=function(e){this.vent=new n.Wreqr.EventAggregator,this.reqres=new n.Wreqr.RequestResponse,this.commands=new n.Wreqr.Commands,this.channelName=e};return e.extend(t.prototype,{reset:function(){return this.vent.off(),this.vent.stopListening(),this.reqres.removeAllHandlers(),this.commands.removeAllHandlers(),this},connectEvents:function(n,e){return this._connect("vent",n,e),this},connectCommands:function(n,e){return this._connect("commands",n,e),this},connectRequests:function(n,e){return this._connect("reqres",n,e),this},_connect:function(n,t,r){if(t){r=r||this;var s="vent"===n?"on":"setHandler";e.each(t,function(t,i){this[n][s](i,e.bind(t,r))},this)}}}),t}(r),r.radio=function(n,e){var t=function(){this._channels={},this.vent={},this.commands={},this.reqres={},this._proxyMethods()};e.extend(t.prototype,{channel:function(n){if(!n)throw Error("Channel must receive a name");return this._getChannel(n)},_getChannel:function(e){var t=this._channels[e];return t||(t=new n.Channel(e),this._channels[e]=t),t},_proxyMethods:function(){e.each(["vent","commands","reqres"],function(n){e.each(r[n],function(e){this[n][e]=s(this,n,e)},this)},this)}});var r={vent:["on","off","trigger","once","stopListening","listenTo","listenToOnce"],commands:["execute","setHandler","setHandlers","removeHandler","removeAllHandlers"],reqres:["request","setHandler","setHandlers","removeHandler","removeAllHandlers"]},s=function(n,t,r){return function(s){var i=n._getChannel(s)[t];return i[r].apply(i,e.rest(arguments))}};return new t}(r,e),n.Wreqr}); +(function(n,e){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(n,t){return e(n,t)});else if("undefined"!=typeof exports){var t=require("backbone"),r=require("underscore");module.exports=e(t,r)}else e(n.Backbone,n._)})(this,function(n,e){"use strict";var t=n.Wreqr,r=n.Wreqr={};return n.Wreqr.VERSION="1.3.3",n.Wreqr.noConflict=function(){return n.Wreqr=t,this},r.Handlers=function(n,e){var t=function(n){this.options=n,this._wreqrHandlers={},e.isFunction(this.initialize)&&this.initialize(n)};return t.extend=n.Model.extend,e.extend(t.prototype,n.Events,{setHandlers:function(n){e.each(n,function(n,t){var r=null;e.isObject(n)&&!e.isFunction(n)&&(r=n.context,n=n.callback),this.setHandler(t,n,r)},this)},setHandler:function(n,e,t){var r={callback:e,context:t};this._wreqrHandlers[n]=r,this.trigger("handler:add",n,e,t)},hasHandler:function(n){return!!this._wreqrHandlers[n]},getHandler:function(n){var e=this._wreqrHandlers[n];if(e)return function(){return e.callback.apply(e.context,arguments)}},removeHandler:function(n){delete this._wreqrHandlers[n]},removeAllHandlers:function(){this._wreqrHandlers={}}}),t}(n,e),r.CommandStorage=function(){var t=function(n){this.options=n,this._commands={},e.isFunction(this.initialize)&&this.initialize(n)};return e.extend(t.prototype,n.Events,{getCommands:function(n){var e=this._commands[n];return e||(e={command:n,instances:[]},this._commands[n]=e),e},addCommand:function(n,e){var t=this.getCommands(n);t.instances.push(e)},clearCommands:function(n){var e=this.getCommands(n);e.instances=[]}}),t}(),r.Commands=function(n,e){return n.Handlers.extend({storageType:n.CommandStorage,constructor:function(e){this.options=e||{},this._initializeStorage(this.options),this.on("handler:add",this._executeCommands,this),n.Handlers.prototype.constructor.apply(this,arguments)},execute:function(n){n=arguments[0];var t=e.rest(arguments);this.hasHandler(n)?this.getHandler(n).apply(this,t):this.storage.addCommand(n,t)},_executeCommands:function(n,t,r){var s=this.storage.getCommands(n);e.each(s.instances,function(n){t.apply(r,n)}),this.storage.clearCommands(n)},_initializeStorage:function(n){var t,r=n.storageType||this.storageType;t=e.isFunction(r)?new r:r,this.storage=t}})}(r,e),r.RequestResponse=function(n,e){return n.Handlers.extend({request:function(n){return this.hasHandler(n)?this.getHandler(n).apply(this,e.rest(arguments)):void 0}})}(r,e),r.EventAggregator=function(n,e){var t=function(){};return t.extend=n.Model.extend,e.extend(t.prototype,n.Events),t}(n,e),r.Channel=function(){var t=function(e){this.vent=new n.Wreqr.EventAggregator,this.reqres=new n.Wreqr.RequestResponse,this.commands=new n.Wreqr.Commands,this.channelName=e};return e.extend(t.prototype,{reset:function(){return this.vent.off(),this.vent.stopListening(),this.reqres.removeAllHandlers(),this.commands.removeAllHandlers(),this},connectEvents:function(n,e){return this._connect("vent",n,e),this},connectCommands:function(n,e){return this._connect("commands",n,e),this},connectRequests:function(n,e){return this._connect("reqres",n,e),this},_connect:function(n,t,r){if(t){r=r||this;var s="vent"===n?"on":"setHandler";e.each(t,function(t,i){this[n][s](i,e.bind(t,r))},this)}}}),t}(r),r.radio=function(n,e){var t=function(){this._channels={},this.vent={},this.commands={},this.reqres={},this._proxyMethods()};e.extend(t.prototype,{channel:function(n){if(!n)throw Error("Channel must receive a name");return this._getChannel(n)},_getChannel:function(e){var t=this._channels[e];return t||(t=new n.Channel(e),this._channels[e]=t),t},_proxyMethods:function(){e.each(["vent","commands","reqres"],function(n){e.each(r[n],function(e){this[n][e]=s(this,n,e)},this)},this)}});var r={vent:["on","off","trigger","once","stopListening","listenTo","listenToOnce"],commands:["execute","setHandler","setHandlers","removeHandler","removeAllHandlers"],reqres:["request","setHandler","setHandlers","removeHandler","removeAllHandlers"]},s=function(n,t,r){return function(s){var i=n._getChannel(s)[t];return i[r].apply(i,e.rest(arguments))}};return new t}(r,e),n.Wreqr}); //@ sourceMappingURL=backbone.wreqr.map \ No newline at end of file diff --git a/package.json b/package.json index 805b1cd..9ee7c20 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "backbone.wreqr", "description": "A Simple Service Bus For Backbone and Backbone.Marionette", - "version": "1.3.2", + "version": "1.3.3", "homepage": "https://github.com/marionettejs/backbone.wreqr", "main": "lib/backbone.wreqr.js", "keywords": [