From b21e6cd1d6d85b37ea2bd7b0be5f7ca43a81a23f Mon Sep 17 00:00:00 2001 From: Eric Feminella Date: Mon, 6 Aug 2012 09:42:49 -0400 Subject: [PATCH 1/3] Issues #2: Adding LICENSE. --- LICENSE | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d939413 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011 - 2012 Eric Feminella, http://www.ericfeminella.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file From 76007b8a946591bb6ce2e5f3f01c86dc4c4db551 Mon Sep 17 00:00:00 2001 From: Eric Feminella Date: Mon, 6 Aug 2012 09:58:15 -0400 Subject: [PATCH 2/3] Updated README. --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index ed2e840..377cd82 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## EventBroker API -Provides a general purpose [Backbone](http://documentcloud.github.com/backbone/ "Title") Event Broker implementation based on the Backbone [Events API](http://documentcloud.github.com/backbone/#Events "Title"). The `EventBroker` can be used directly to serve as a centralized event management mechanism for an entire application. Additional namespaced brokers can also be created in order to provide context specific brokers within a particular part of an application. +Provides a general purpose [Backbone](http://documentcloud.github.com/backbone/ "Title") Event Broker implementation based on the Backbone [Events API](http://documentcloud.github.com/backbone/#Events "Title"). The `EventBroker` can be used directly to serve as a centralized event management mechanism for an entire application. Namespaced brokers can also be created in order to provide context specific brokers within an application. ### Basic Usage The `EventBroker` can be used directly to publish and subscribe to events of interest: @@ -159,7 +159,7 @@ var CartView = Backbone.View.extend({ itemsBroker: Backbone.EventBroker.get('items'), // Reference the 'inventory' EventBroker... - inventoryBroker: Backbone.EventBroker.get('inventory'), + inventoryBroker: Backbone.EventBroker.get('inventory'), initialize: function() { // register events/callbacks with 'items' EventBroker... @@ -190,9 +190,9 @@ To test if an `EventBroker` has been created for a given `namespace`, invoke the ``` javascript // determines if an event broker for the given namespace exists var EventBroker = Backbone.EventBroker; -EventBroker.get( 'roles' ); // returns the 'roles' EventBroker -EventBroker.has( 'roles' ); //true -EventBroker.has( 'users' ); //false +EventBroker.get('roles'); // returns the 'roles' EventBroker +EventBroker.has('roles'); //true +EventBroker.has('users'); //false ``` @@ -202,9 +202,9 @@ To destroy an existing `EventBroker` for a given `namespace`, invoke the `destro ``` javascript // deletes the event broker for the given namespace var EventBroker = Backbone.EventBroker; -EventBroker.get( 'permissions' ); -EventBroker.destroy( 'permissions' ); // returns the 'permissions' EventBroker -EventBroker.has( 'permissions' ); //false +EventBroker.get('permissions'); +EventBroker.destroy('permissions'); // returns the 'permissions' EventBroker +EventBroker.has('permissions'); //false ``` @@ -214,12 +214,12 @@ To destroy all existing `EventBrokers`, invoke the `destroy` method with no argu ``` javascript // deletes the event broker for the given namespace var EventBroker = Backbone.EventBroker; -EventBroker.get( 'permissions' ); -EventBroker.get( 'users' ); -EventBroker.get( 'roles' ); +EventBroker.get('permissions'); // returns the 'permissions' EventBroker +EventBroker.get('users'); // returns the 'users' EventBroker +EventBroker.get('roles'); // returns the 'roles' EventBroker EventBroker.destroy(); -EventBroker.has( 'permissions' ); //false -EventBroker.has( 'users' ); //false -EventBroker.has( 'roles' ); //false +EventBroker.has('permissions' ); //false +EventBroker.has('users'); //false +EventBroker.has('roles'); //false ``` From c1c498a39296c6933d48a9ec777ffe622f3f86ba Mon Sep 17 00:00:00 2001 From: Eric Feminella Date: Mon, 6 Aug 2012 09:59:21 -0400 Subject: [PATCH 3/3] Updated README. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 377cd82..d160749 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## EventBroker API -Provides a general purpose [Backbone](http://documentcloud.github.com/backbone/ "Title") Event Broker implementation based on the Backbone [Events API](http://documentcloud.github.com/backbone/#Events "Title"). The `EventBroker` can be used directly to serve as a centralized event management mechanism for an entire application. Namespaced brokers can also be created in order to provide context specific brokers within an application. +Provides a general purpose [Backbone](http://documentcloud.github.com/backbone/ "Title") Event Broker implementation based on the Backbone [Events API](http://documentcloud.github.com/backbone/#Events "Title"). + +The `EventBroker` can be used directly to serve as a centralized event management mechanism for an entire application. Namespaced brokers can also be created in order to provide context specific brokers within an application. ### Basic Usage The `EventBroker` can be used directly to publish and subscribe to events of interest: