From 3f79fa37d9adec589c63469ff6b331ea7e06b130 Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Wed, 8 Jul 2015 11:33:07 -0700 Subject: [PATCH 1/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6a532e8..34fe1b48 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Version 0.2.0 is currently in alpha. Important changes include `.get` to `.val` GUN is not stable, and therefore should not be trusted in a production environment. *** -## API +## [API](https://github.com/amark/gun/wiki/JS-API) Below is a really basic overview of how the gun API works. For a more detailed explanation with many more examples, [check out the wiki](https://github.com/amark/gun/wiki). From c12de322a40ae7b4e527d6c9c6677f32ddd2482c Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Wed, 8 Jul 2015 12:07:16 -0700 Subject: [PATCH 2/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 34fe1b48..fd6e26ff 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ var gun = Gun({ }); ``` -These are the default persistence layers, they are modular and can be replaced others. +These are the default persistence layers, they are modular and can be replaced by others. Using S3 is recommended for deployment, and using a file is recommended for local development. From 5a1b5eaad628c4cee4f892273298bc19e37dd3d2 Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Thu, 9 Jul 2015 12:52:13 -0700 Subject: [PATCH 3/5] Update think.html --- web/think.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/web/think.html b/web/think.html index 5fdaf5bd..27f7cf6c 100644 --- a/web/think.html +++ b/web/think.html @@ -73,7 +73,7 @@ var code = $('.edit').load('./editor.html', function(){setTimeout(function(){

Insert the following between the ending ul tag and the ending body tag, replacing the comment line:

@@ -97,7 +97,7 @@ var code = $('.edit').load('./editor.html', function(){setTimeout(function(){
    - + alert("Good job! You'll replace this line in the next step!"); @@ -137,7 +137,7 @@ var code = $('.edit').load('./editor.html', function(){setTimeout(function(){
      - + $('form').on('submit', function(event){ event.preventDefault(); @@ -169,7 +169,7 @@ var code = $('.edit').load('./editor.html', function(){setTimeout(function(){
        - + var gun = Gun().get('thoughts').set(); $('form').on('submit', function(event){ @@ -201,7 +201,7 @@ var code = $('.edit').load('./editor.html', function(){setTimeout(function(){
          - + var gun = Gun().get('thoughts').set(); $('form').on('submit', function(event){ @@ -249,7 +249,7 @@ var code = $('.edit').load('./editor.html', function(){setTimeout(function(){
            - + var gun = Gun().get('thoughts').set(); $('form').on('submit', function(event){ @@ -295,7 +295,7 @@ var code = $('.edit').load('./editor.html', function(){setTimeout(function(){
              - + var gun = Gun().get('thoughts').set(); $('form').on('submit', function(event){ @@ -358,7 +358,7 @@ next.step = [null, null, function(){ code.contents().filter(function(){ return this.nodeType == 8 }).remove(); var ul = code.find('ul'); if(ctx.alert){ ul.after($(' - \ No newline at end of file + From 5b17a67ae0c0098ecf18a7a4b3cbbd5c6d0612d0 Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Sat, 11 Jul 2015 20:26:47 -0700 Subject: [PATCH 4/5] deploy --- examples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/package.json b/examples/package.json index 98c46f2a..54ead4bb 100644 --- a/examples/package.json +++ b/examples/package.json @@ -8,7 +8,7 @@ } , "dependencies": { "express": "~>4.9.0", - "gun": "~>0.2.0-alpha-2" + "gun": "~>0.2.0-alpha-3" } , "scripts": { "start": "node http.js", From 17cf41ed72bd44d739d53664771ddf450e95fb25 Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Sat, 11 Jul 2015 21:17:47 -0700 Subject: [PATCH 5/5] ToDo tests --- test/common.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/common.js b/test/common.js index dbcc5f10..1c0876a3 100644 --- a/test/common.js +++ b/test/common.js @@ -1836,6 +1836,28 @@ describe('Gun', function(){ }); }) }); + + it("ToDo", function(done){ // Simulate ToDo app! + var gun = Gun().get('example/todo/data'); + gun.on(function renderToDo(val){ + if(done.done){ return } + if(done.clear){ + done.done = true; + expect(val[done.id]).to.not.be.ok(); + return done(); + } + delete val._; + Gun.obj.map(val, function(val, field){ return done.id = field; }); + expect(val[done.id]).to.be('groceries'); + }); + setTimeout(function(){ // form submit + gun.set("groceries"); + setTimeout(function(){ // clear off element + done.clear = true; + gun.path(done.id).put(null); + },100); + },200); + }); }); describe('Streams', function(){