diff --git a/src/index.html b/src/index.html
index 7828348..4442549 100755
--- a/src/index.html
+++ b/src/index.html
@@ -12,7 +12,7 @@
-
+
diff --git a/src/lib/backbone-0.9.10.min.js b/src/lib/backbone-0.9.10.min.js
deleted file mode 100644
index d4b0314..0000000
--- a/src/lib/backbone-0.9.10.min.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// Backbone.js 0.9.10
-
-// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
-// Backbone may be freely distributed under the MIT license.
-// For all details and documentation:
-// http://backbonejs.org
-(function(){var n=this,B=n.Backbone,h=[],C=h.push,u=h.slice,D=h.splice,g;g="undefined"!==typeof exports?exports:n.Backbone={};g.VERSION="0.9.10";var f=n._;!f&&"undefined"!==typeof require&&(f=require("underscore"));g.$=n.jQuery||n.Zepto||n.ender;g.noConflict=function(){n.Backbone=B;return this};g.emulateHTTP=!1;g.emulateJSON=!1;var v=/\s+/,q=function(a,b,c,d){if(!c)return!0;if("object"===typeof c)for(var e in c)a[b].apply(a,[e,c[e]].concat(d));else if(v.test(c)){c=c.split(v);e=0;for(var f=c.length;e<
-f;e++)a[b].apply(a,[c[e]].concat(d))}else return!0},w=function(a,b){var c,d=-1,e=a.length;switch(b.length){case 0:for(;++d=b);this.root=("/"+this.root+"/").replace(I,"/");b&&this._wantsHashChange&&(this.iframe=g.$('').hide().appendTo("body")[0].contentWindow,this.navigate(a));if(this._hasPushState)g.$(window).on("popstate",this.checkUrl);else if(this._wantsHashChange&&"onhashchange"in window&&!b)g.$(window).on("hashchange",this.checkUrl);
-else this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval));this.fragment=a;a=this.location;b=a.pathname.replace(/[^\/]$/,"$&/")===this.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!b)return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0;this._wantsPushState&&(this._hasPushState&&b&&a.hash)&&(this.fragment=this.getHash().replace(z,""),this.history.replaceState({},document.title,
-this.root+this.fragment+a.search));if(!this.options.silent)return this.loadUrl()},stop:function(){g.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl);clearInterval(this._checkUrlInterval);m.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();a===this.fragment&&this.iframe&&(a=this.getFragment(this.getHash(this.iframe)));if(a===this.fragment)return!1;this.iframe&&this.navigate(a);this.loadUrl()||this.loadUrl(this.getHash())},
-loadUrl:function(a){var b=this.fragment=this.getFragment(a);return f.any(this.handlers,function(a){if(a.route.test(b))return a.callback(b),!0})},navigate:function(a,b){if(!m.started)return!1;if(!b||!0===b)b={trigger:b};a=this.getFragment(a||"");if(this.fragment!==a){this.fragment=a;var c=this.root+a;if(this._hasPushState)this.history[b.replace?"replaceState":"pushState"]({},document.title,c);else if(this._wantsHashChange)this._updateHash(this.location,a,b.replace),this.iframe&&a!==this.getFragment(this.getHash(this.iframe))&&
-(b.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,a,b.replace));else return this.location.assign(c);b.trigger&&this.loadUrl(a)}},_updateHash:function(a,b,c){c?(c=a.href.replace(/(javascript:|#).*$/,""),a.replace(c+"#"+b)):a.hash="#"+b}});g.history=new m;var A=g.View=function(a){this.cid=f.uniqueId("view");this._configure(a||{});this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()},L=/^(\S+)\s*(.*)$/,M="model collection el id attributes className tagName events".split(" ");
-f.extend(A.prototype,h,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();this.stopListening();return this},setElement:function(a,b){this.$el&&this.undelegateEvents();this.$el=a instanceof g.$?a:g.$(a);this.el=this.$el[0];!1!==b&&this.delegateEvents();return this},delegateEvents:function(a){if(a||(a=f.result(this,"events"))){this.undelegateEvents();for(var b in a){var c=a[b];f.isFunction(c)||(c=this[a[b]]);
-if(!c)throw Error('Method "'+a[b]+'" does not exist');var d=b.match(L),e=d[1],d=d[2],c=f.bind(c,this),e=e+(".delegateEvents"+this.cid);if(""===d)this.$el.on(e,c);else this.$el.on(e,d,c)}}},undelegateEvents:function(){this.$el.off(".delegateEvents"+this.cid)},_configure:function(a){this.options&&(a=f.extend({},f.result(this,"options"),a));f.extend(this,f.pick(a,M));this.options=a},_ensureElement:function(){if(this.el)this.setElement(f.result(this,"el"),!1);else{var a=f.extend({},f.result(this,"attributes"));
-this.id&&(a.id=f.result(this,"id"));this.className&&(a["class"]=f.result(this,"className"));a=g.$("<"+f.result(this,"tagName")+">").attr(a);this.setElement(a,!1)}}});var N={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};g.sync=function(a,b,c){var d=N[a];f.defaults(c||(c={}),{emulateHTTP:g.emulateHTTP,emulateJSON:g.emulateJSON});var e={type:d,dataType:"json"};c.url||(e.url=f.result(b,"url")||x());if(null==c.data&&b&&("create"===a||"update"===a||"patch"===a))e.contentType="application/json",
-e.data=JSON.stringify(c.attrs||b.toJSON(c));c.emulateJSON&&(e.contentType="application/x-www-form-urlencoded",e.data=e.data?{model:e.data}:{});if(c.emulateHTTP&&("PUT"===d||"DELETE"===d||"PATCH"===d)){e.type="POST";c.emulateJSON&&(e.data._method=d);var h=c.beforeSend;c.beforeSend=function(a){a.setRequestHeader("X-HTTP-Method-Override",d);if(h)return h.apply(this,arguments)}}"GET"!==e.type&&!c.emulateJSON&&(e.processData=!1);var m=c.success;c.success=function(a){m&&m(b,a,c);b.trigger("sync",b,a,c)};
-var j=c.error;c.error=function(a){j&&j(b,a,c);b.trigger("error",b,a,c)};a=c.xhr=g.ajax(f.extend(e,c));b.trigger("request",b,a,c);return a};g.ajax=function(){return g.$.ajax.apply(g.$,arguments)};r.extend=s.extend=y.extend=A.extend=m.extend=function(a,b){var c=this,d;d=a&&f.has(a,"constructor")?a.constructor:function(){return c.apply(this,arguments)};f.extend(d,c,b);var e=function(){this.constructor=d};e.prototype=c.prototype;d.prototype=new e;a&&f.extend(d.prototype,a);d.__super__=c.prototype;return d};
-var x=function(){throw Error('A "url" property or function must be specified');}}).call(this);
diff --git a/src/lib/lawnchair/lawnchair-adapter-webkit-sqlite-git.js b/src/lib/lawnchair/lawnchair-adapter-webkit-sqlite-git.js
index 737b8d7..561280b 100644
--- a/src/lib/lawnchair/lawnchair-adapter-webkit-sqlite-git.js
+++ b/src/lib/lawnchair/lawnchair-adapter-webkit-sqlite-git.js
@@ -59,7 +59,7 @@ Lawnchair.adapter('webkit-sqlite', (function () {
// you think thats air you're breathing now?
save: function (obj, callback, error) {
var that = this
- objs = (this.isArray(obj) ? obj : [obj]).map(function(o){if(!o.key) { o.key = that.uuid()} return o})
+ , objs = (this.isArray(obj) ? obj : [obj]).map(function(o){if(!o.key) { o.key = that.uuid()} return o})
, ins = "INSERT OR REPLACE INTO " + this.record + " (value, timestamp, id) VALUES (?,?,?)"
, win = function () { if (callback) { that.lambda(callback).call(that, that.isArray(obj)?objs:objs[0]) }}
, error= error || function() {}
diff --git a/src/lib/lawnchair/lawnchair-git.min.js b/src/lib/lawnchair/lawnchair-git.min.js
index 73b5109..ee47926 100644
--- a/src/lib/lawnchair/lawnchair-git.min.js
+++ b/src/lib/lawnchair/lawnchair-git.min.js
@@ -1,14 +1,14 @@
-var Lawnchair=function(e,h){if(!(this instanceof Lawnchair))return new Lawnchair(e,h);if(!JSON)throw"JSON unavailable! Include http://www.json.org/json2.js to fix.";if(arguments.length<=2&&arguments.length>0){h=typeof arguments[0]==="function"?arguments[0]:arguments[1];e=typeof arguments[0]==="function"?{}:arguments[0]}else throw"Incorrect # of ctor args!";if(typeof h!=="function")throw"No callback was provided";this.record=e.record||"record";this.name=e.name||"records";var a;if(e.adapter){if(typeof e.adapter===
-"string")e.adapter=[e.adapter];for(var b=0,c=e.adapter.length;b=0;d--)if(Lawnchair.adapters[d].adapter===e.adapter[b])if(a=Lawnchair.adapters[d].valid()?Lawnchair.adapters[d]:undefined)break;if(a)break}}else{d=0;for(c=Lawnchair.adapters.length;d=0;d--)if(Lawnchair.adapters[d].adapter===e.adapter[b])if(a=Lawnchair.adapters[d].valid()?Lawnchair.adapters[d]:undefined)break;if(a)break}}else{d=0;for(c=Lawnchair.adapters.length;d0||b&&c.lambda(b).call(c)})};for(d=0;d0||b&&c.lambda(b).call(c)})};for(d=0;d>> ((i & 0x03) << 3) & 0xff;
- }
-
- return b;
- }
-
- // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto
- // WebKit only (currently), moderately fast, high quality
- if (_global.crypto && crypto.getRandomValues) {
- var _rnds = new Uint32Array(4);
- whatwgRNG = function() {
- crypto.getRandomValues(_rnds);
-
- for (var c = 0 ; c < 16; c++) {
- _rndBytes[c] = _rnds[c >> 2] >>> ((c & 0x03) * 8) & 0xff;
- }
- return _rndBytes;
- }
- }
+ // Unique ID creation requires a high quality random # generator. We feature
+ // detect to determine the best RNG source, normalizing to a function that
+ // returns 128-bits of randomness, since that's what's usually required
+ var _rng;
// Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html
- // Node.js only, moderately fast, high quality
- try {
- var _rb = require('crypto').randomBytes;
- nodeRNG = _rb && function() {
- return _rb(16);
- };
- } catch (e) {}
+ //
+ // Moderately fast, high quality
+ if (typeof(require) == 'function') {
+ try {
+ var _rb = require('crypto').randomBytes;
+ _rng = _rb && function() {return _rb(16);};
+ } catch(e) {}
+ }
- // Select RNG with best quality
- var _rng = nodeRNG || whatwgRNG || mathRNG;
+ if (!_rng && _global.crypto && crypto.getRandomValues) {
+ // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto
+ //
+ // Moderately fast, high quality
+ var _rnds8 = new Uint8Array(16);
+ _rng = function whatwgRNG() {
+ crypto.getRandomValues(_rnds8);
+ return _rnds8;
+ };
+ }
+
+ if (!_rng) {
+ // Math.random()-based (RNG)
+ //
+ // If all else fails, use Math.random(). It's fast, but is of unspecified
+ // quality.
+ var _rnds = new Array(16);
+ _rng = function() {
+ for (var i = 0, r; i < 16; i++) {
+ if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
+ _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
+ }
+
+ return _rnds;
+ };
+ }
// Buffer class to use
var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array;
@@ -227,27 +224,22 @@
uuid.unparse = unparse;
uuid.BufferClass = BufferClass;
- // Export RNG options
- uuid.mathRNG = mathRNG;
- uuid.nodeRNG = nodeRNG;
- uuid.whatwgRNG = whatwgRNG;
-
- //
- // module is defined in qunit, so comment node.js option out
- //
-
- // if (typeof(module) != 'undefined') {
- // // Play nice with node.js
- // module.exports = uuid;
- // } else {
- // Play nice with browsers
+ if (_global.define && define.amd) {
+ // Publish as AMD module
+ define(function() {return uuid;});
+ } else if (typeof(module) != 'undefined' && module.exports) {
+ // Publish as node.js module
+ module.exports = uuid;
+ } else {
+ // Publish as global (in browsers)
var _previousRoot = _global.uuid;
// **`noConflict()` - (browser only) to reset global 'uuid' var**
uuid.noConflict = function() {
_global.uuid = _previousRoot;
return uuid;
- }
+ };
+
_global.uuid = uuid;
- // }
+ }
}());
diff --git a/test/integration/index.html b/test/integration/index.html
index caa0391..2fbed2b 100644
--- a/test/integration/index.html
+++ b/test/integration/index.html
@@ -19,7 +19,7 @@
-
+
diff --git a/test/unit/index.html b/test/unit/index.html
index e4d16e2..33faa1f 100644
--- a/test/unit/index.html
+++ b/test/unit/index.html
@@ -19,7 +19,7 @@
-
+