{"action":"created","comment":{"url":"https://api.github.com/repos/tastejs/todomvc/pulls/comments/31866423","id":31866423,"diff_hunk":"@@ -0,0 +1,130 @@\n+(function () {\n+\t/*global blocks */\n+\n+\t'use strict';\n+\n+\tvar ENTER_KEY = 13;\n+\tvar ESCAPE_KEY = 27;\n+\n+\tvar App = blocks.Application();\n+\n+\tvar Todo = App.Model({\n+\t\ttitle: App.Property(),\n+\n+\t\tcompleted: App.Property(),\n+\n+\t\tediting: blocks.observable(),\n+\n+\t\tinit: function () {\n+\t\t\tvar collection = this.collection();\n+\t\t\tif (collection) {\n+\t\t\t\tthis.title.on('change', collection.save);\n+\t\t\t\tthis.completed.on('change', collection.save);\n+\t\t\t}\n+\t\t\tthis.title.on('change', function (newValue) {\n+\t\t\t\tthis.title((newValue || '').trim());\n+\t\t\t});\n+\t\t},\n+\n+\t\ttoggleComplete: function () {\n+\t\t\tthis.completed(!this.completed());\n+\t\t},\n+\n+\t\tedit: function () {\n+\t\t\tthis.lastValue = this.title();\n+\t\t\tthis.editing(true);\n+\t\t},\n+\n+\t\tcloseEdit: function () {\n+\t\t\tif (this.title()) {\n+\t\t\t\tthis.editing(false);\n+\t\t\t} else {\n+\t\t\t\tthis.destroy();\n+\t\t\t}\n+\t\t},\n+\n+\t\thandleAction: function (e) {\n+\t\t\tif (e.which === ENTER_KEY) {\n+\t\t\t\tthis.closeEdit();\n+\t\t\t} else if (e.which === ESCAPE_KEY) {\n+\t\t\t\tthis.title(this.lastValue);\n+\t\t\t\tthis.editing(false);\n+\t\t\t}\n+\t\t}\n+\t});\n+\n+\tvar Todos = App.Collection(Todo, {\n+\t\tremaining: blocks.observable(),\n+\n+\t\tinit: function () {\n+\t\t\tthis\n+\t\t\t\t.reset(JSON.parse(localStorage.getItem('todos-jsblocks')) || [])\n+\t\t\t\t.on('add remove', this.save)\n+\t\t\t\t.updateRemaining();\n+\t\t},\n+\n+\t\ttoggleAll: function () {\n+\t\t\tvar complete = this.remaining() === 0 ? false : true;\n+\t\t\tthis.each(function (todo) {\n+\t\t\t\ttodo.completed(complete);\n+\t\t\t});\n+\t\t},\n+\n+\t\tclearCompleted: function () {\n+\t\t\tthis.removeAll(function (todo) {","path":"examples/blocks/js/app.js","position":74,"original_position":74,"commit_id":"da476760fb90af15199c1bc89c858d2af5d7a44c","original_commit_id":"da476760fb90af15199c1bc89c858d2af5d7a44c","user":{"login":"arthurvr","id":6025224,"avatar_url":"https://avatars.githubusercontent.com/u/6025224?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurvr","html_url":"https://github.com/arthurvr","followers_url":"https://api.github.com/users/arthurvr/followers","following_url":"https://api.github.com/users/arthurvr/following{/other_user}","gists_url":"https://api.github.com/users/arthurvr/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurvr/subscriptions","organizations_url":"https://api.github.com/users/arthurvr/orgs","repos_url":"https://api.github.com/users/arthurvr/repos","events_url":"https://api.github.com/users/arthurvr/events{/privacy}","received_events_url":"https://api.github.com/users/arthurvr/received_events","type":"User","site_admin":false},"body":"Might be just my feeling but `removeAll` is a confusing name if you only want to remove specific items.","created_at":"2015-06-06T09:35:32Z","updated_at":"2015-06-06T09:35:32Z","html_url":"https://github.com/tastejs/todomvc/pull/1297#discussion_r31866423","pull_request_url":"https://api.github.com/repos/tastejs/todomvc/pulls/1297","_links":{"self":{"href":"https://api.github.com/repos/tastejs/todomvc/pulls/comments/31866423"},"html":{"href":"https://github.com/tastejs/todomvc/pull/1297#discussion_r31866423"},"pull_request":{"href":"https://api.github.com/repos/tastejs/todomvc/pulls/1297"}}},"pull_request":{"url":"https://api.github.com/repos/tastejs/todomvc/pulls/1297","id":35417330,"html_url":"https://github.com/tastejs/todomvc/pull/1297","diff_url":"https://github.com/tastejs/todomvc/pull/1297.diff","patch_url":"https://github.com/tastejs/todomvc/pull/1297.patch","issue_url":"https://api.github.com/repos/tastejs/todomvc/issues/1297","number":1297,"state":"open","locked":false,"title":"Add jsblocks","user":{"login":"astoilkov","id":884810,"avatar_url":"https://avatars.githubusercontent.com/u/884810?v=3","gravatar_id":"","url":"https://api.github.com/users/astoilkov","html_url":"https://github.com/astoilkov","followers_url":"https://api.github.com/users/astoilkov/followers","following_url":"https://api.github.com/users/astoilkov/following{/other_user}","gists_url":"https://api.github.com/users/astoilkov/gists{/gist_id}","starred_url":"https://api.github.com/users/astoilkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astoilkov/subscriptions","organizations_url":"https://api.github.com/users/astoilkov/orgs","repos_url":"https://api.github.com/users/astoilkov/repos","events_url":"https://api.github.com/users/astoilkov/events{/privacy}","received_events_url":"https://api.github.com/users/astoilkov/received_events","type":"User","site_admin":false},"body":"[jsblocks](http://jsblocks.com) have been developed for the past couple of years. Two weeks ago it was released and collected more than 800 stars. You could take a look at some of the advantages of the project [here](http://jsblocks.com/learn/introduction-why-jsblocks). Some of the things include:\r\n* Performance\r\n* Debugging exprience\r\n* Server-side rendering\r\n\r\nTest results:\r\n\r\n```\r\nTodoMVC - blocks\r\n  When page is initially opened\r\n    √ should focus on the todo input field\r\n  No Todos\r\n    √ should hide #main and #footer (109ms)\r\n  New Todo\r\n    √ should allow me to add todo items (459ms)\r\n    √ should clear text input field when an item is added (288ms)\r\n    √ should append new items to the bottom of the list (570ms)\r\n    √ should trim text input (262ms)\r\n    √ should show #main and #footer when items added (253ms)\r\n  Mark all as completed\r\n    √ should allow me to mark all items as completed (610ms)\r\n    √ should allow me to clear the completion state of all items (687ms)\r\n    √ complete all checkbox should update state when items are completed / cleared (739ms)\r\n  Item\r\n    √ should allow me to mark items as complete (575ms)\r\n    √ should allow me to un-mark items as complete (585ms)\r\n    √ should allow me to edit an item (942ms)\r\n    √ should show the remove button on hover\r\n  Editing\r\n    √ should hide other controls when editing (672ms)\r\n    √ should save edits on enter (867ms)\r\n    √ should save edits on blur (942ms)\r\n    √ should trim entered text (868ms)\r\n    √ should remove the item if an empty text string was entered (800ms)\r\n    √ should cancel edits on escape (939ms)\r\n  Counter\r\n    √ should display the current number of todo items (399ms)\r\n  Clear completed button\r\n    √ should display the correct text (571ms)\r\n    √ should remove completed items when clicked (865ms)\r\n    √ should be hidden when there are no items that are completed (615ms)\r\n  Persistence\r\n    √ should persist its data (854ms)\r\n  Routing\r\n    √ should allow me to display active items (633ms)\r\n    √ should respect the back button (892ms)\r\n    √ should allow me to display completed items (616ms)\r\n    √ should allow me to display all items (776ms)\r\n    √ should highlight the currently applied filter (678ms)\r\n\r\n\r\n30 passing (3m)\r\n```","created_at":"2015-05-14T12:32:02Z","updated_at":"2015-06-06T09:35:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa0577841042c5a79ee4cbeb7f2310511bc0474b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tastejs/todomvc/pulls/1297/commits","review_comments_url":"https://api.github.com/repos/tastejs/todomvc/pulls/1297/comments","review_comment_url":"https://api.github.com/repos/tastejs/todomvc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tastejs/todomvc/issues/1297/comments","statuses_url":"https://api.github.com/repos/tastejs/todomvc/statuses/da476760fb90af15199c1bc89c858d2af5d7a44c","head":{"label":"astoilkov:master","ref":"master","sha":"da476760fb90af15199c1bc89c858d2af5d7a44c","user":{"login":"astoilkov","id":884810,"avatar_url":"https://avatars.githubusercontent.com/u/884810?v=3","gravatar_id":"","url":"https://api.github.com/users/astoilkov","html_url":"https://github.com/astoilkov","followers_url":"https://api.github.com/users/astoilkov/followers","following_url":"https://api.github.com/users/astoilkov/following{/other_user}","gists_url":"https://api.github.com/users/astoilkov/gists{/gist_id}","starred_url":"https://api.github.com/users/astoilkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astoilkov/subscriptions","organizations_url":"https://api.github.com/users/astoilkov/orgs","repos_url":"https://api.github.com/users/astoilkov/repos","events_url":"https://api.github.com/users/astoilkov/events{/privacy}","received_events_url":"https://api.github.com/users/astoilkov/received_events","type":"User","site_admin":false},"repo":{"id":35597455,"name":"todomvc","full_name":"astoilkov/todomvc","owner":{"login":"astoilkov","id":884810,"avatar_url":"https://avatars.githubusercontent.com/u/884810?v=3","gravatar_id":"","url":"https://api.github.com/users/astoilkov","html_url":"https://github.com/astoilkov","followers_url":"https://api.github.com/users/astoilkov/followers","following_url":"https://api.github.com/users/astoilkov/following{/other_user}","gists_url":"https://api.github.com/users/astoilkov/gists{/gist_id}","starred_url":"https://api.github.com/users/astoilkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astoilkov/subscriptions","organizations_url":"https://api.github.com/users/astoilkov/orgs","repos_url":"https://api.github.com/users/astoilkov/repos","events_url":"https://api.github.com/users/astoilkov/events{/privacy}","received_events_url":"https://api.github.com/users/astoilkov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/astoilkov/todomvc","description":"Helping you select an MV* framework - Todo apps for Backbone.js, Ember.js, AngularJS, and many more","fork":true,"url":"https://api.github.com/repos/astoilkov/todomvc","forks_url":"https://api.github.com/repos/astoilkov/todomvc/forks","keys_url":"https://api.github.com/repos/astoilkov/todomvc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astoilkov/todomvc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astoilkov/todomvc/teams","hooks_url":"https://api.github.com/repos/astoilkov/todomvc/hooks","issue_events_url":"https://api.github.com/repos/astoilkov/todomvc/issues/events{/number}","events_url":"https://api.github.com/repos/astoilkov/todomvc/events","assignees_url":"https://api.github.com/repos/astoilkov/todomvc/assignees{/user}","branches_url":"https://api.github.com/repos/astoilkov/todomvc/branches{/branch}","tags_url":"https://api.github.com/repos/astoilkov/todomvc/tags","blobs_url":"https://api.github.com/repos/astoilkov/todomvc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astoilkov/todomvc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astoilkov/todomvc/git/refs{/sha}","trees_url":"https://api.github.com/repos/astoilkov/todomvc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astoilkov/todomvc/statuses/{sha}","languages_url":"https://api.github.com/repos/astoilkov/todomvc/languages","stargazers_url":"https://api.github.com/repos/astoilkov/todomvc/stargazers","contributors_url":"https://api.github.com/repos/astoilkov/todomvc/contributors","subscribers_url":"https://api.github.com/repos/astoilkov/todomvc/subscribers","subscription_url":"https://api.github.com/repos/astoilkov/todomvc/subscription","commits_url":"https://api.github.com/repos/astoilkov/todomvc/commits{/sha}","git_commits_url":"https://api.github.com/repos/astoilkov/todomvc/git/commits{/sha}","comments_url":"https://api.github.com/repos/astoilkov/todomvc/comments{/number}","issue_comment_url":"https://api.github.com/repos/astoilkov/todomvc/issues/comments{/number}","contents_url":"https://api.github.com/repos/astoilkov/todomvc/contents/{+path}","compare_url":"https://api.github.com/repos/astoilkov/todomvc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astoilkov/todomvc/merges","archive_url":"https://api.github.com/repos/astoilkov/todomvc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astoilkov/todomvc/downloads","issues_url":"https://api.github.com/repos/astoilkov/todomvc/issues{/number}","pulls_url":"https://api.github.com/repos/astoilkov/todomvc/pulls{/number}","milestones_url":"https://api.github.com/repos/astoilkov/todomvc/milestones{/number}","notifications_url":"https://api.github.com/repos/astoilkov/todomvc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astoilkov/todomvc/labels{/name}","releases_url":"https://api.github.com/repos/astoilkov/todomvc/releases{/id}","created_at":"2015-05-14T07:23:37Z","updated_at":"2015-05-14T07:23:39Z","pushed_at":"2015-06-02T08:05:29Z","git_url":"git://github.com/astoilkov/todomvc.git","ssh_url":"git@github.com:astoilkov/todomvc.git","clone_url":"https://github.com/astoilkov/todomvc.git","svn_url":"https://github.com/astoilkov/todomvc","homepage":"http://todomvc.com","size":47805,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tastejs:master","ref":"master","sha":"80a55a231586fff2a8de47341ed3092f3f2375ba","user":{"login":"tastejs","id":1733746,"avatar_url":"https://avatars.githubusercontent.com/u/1733746?v=3","gravatar_id":"","url":"https://api.github.com/users/tastejs","html_url":"https://github.com/tastejs","followers_url":"https://api.github.com/users/tastejs/followers","following_url":"https://api.github.com/users/tastejs/following{/other_user}","gists_url":"https://api.github.com/users/tastejs/gists{/gist_id}","starred_url":"https://api.github.com/users/tastejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tastejs/subscriptions","organizations_url":"https://api.github.com/users/tastejs/orgs","repos_url":"https://api.github.com/users/tastejs/repos","events_url":"https://api.github.com/users/tastejs/events{/privacy}","received_events_url":"https://api.github.com/users/tastejs/received_events","type":"Organization","site_admin":false},"repo":{"id":1844251,"name":"todomvc","full_name":"tastejs/todomvc","owner":{"login":"tastejs","id":1733746,"avatar_url":"https://avatars.githubusercontent.com/u/1733746?v=3","gravatar_id":"","url":"https://api.github.com/users/tastejs","html_url":"https://github.com/tastejs","followers_url":"https://api.github.com/users/tastejs/followers","following_url":"https://api.github.com/users/tastejs/following{/other_user}","gists_url":"https://api.github.com/users/tastejs/gists{/gist_id}","starred_url":"https://api.github.com/users/tastejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tastejs/subscriptions","organizations_url":"https://api.github.com/users/tastejs/orgs","repos_url":"https://api.github.com/users/tastejs/repos","events_url":"https://api.github.com/users/tastejs/events{/privacy}","received_events_url":"https://api.github.com/users/tastejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tastejs/todomvc","description":"Helping you select an MV* framework - Todo apps for Backbone.js, Ember.js, AngularJS, and many more","fork":false,"url":"https://api.github.com/repos/tastejs/todomvc","forks_url":"https://api.github.com/repos/tastejs/todomvc/forks","keys_url":"https://api.github.com/repos/tastejs/todomvc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tastejs/todomvc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tastejs/todomvc/teams","hooks_url":"https://api.github.com/repos/tastejs/todomvc/hooks","issue_events_url":"https://api.github.com/repos/tastejs/todomvc/issues/events{/number}","events_url":"https://api.github.com/repos/tastejs/todomvc/events","assignees_url":"https://api.github.com/repos/tastejs/todomvc/assignees{/user}","branches_url":"https://api.github.com/repos/tastejs/todomvc/branches{/branch}","tags_url":"https://api.github.com/repos/tastejs/todomvc/tags","blobs_url":"https://api.github.com/repos/tastejs/todomvc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tastejs/todomvc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tastejs/todomvc/git/refs{/sha}","trees_url":"https://api.github.com/repos/tastejs/todomvc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tastejs/todomvc/statuses/{sha}","languages_url":"https://api.github.com/repos/tastejs/todomvc/languages","stargazers_url":"https://api.github.com/repos/tastejs/todomvc/stargazers","contributors_url":"https://api.github.com/repos/tastejs/todomvc/contributors","subscribers_url":"https://api.github.com/repos/tastejs/todomvc/subscribers","subscription_url":"https://api.github.com/repos/tastejs/todomvc/subscription","commits_url":"https://api.github.com/repos/tastejs/todomvc/commits{/sha}","git_commits_url":"https://api.github.com/repos/tastejs/todomvc/git/commits{/sha}","comments_url":"https://api.github.com/repos/tastejs/todomvc/comments{/number}","issue_comment_url":"https://api.github.com/repos/tastejs/todomvc/issues/comments{/number}","contents_url":"https://api.github.com/repos/tastejs/todomvc/contents/{+path}","compare_url":"https://api.github.com/repos/tastejs/todomvc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tastejs/todomvc/merges","archive_url":"https://api.github.com/repos/tastejs/todomvc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tastejs/todomvc/downloads","issues_url":"https://api.github.com/repos/tastejs/todomvc/issues{/number}","pulls_url":"https://api.github.com/repos/tastejs/todomvc/pulls{/number}","milestones_url":"https://api.github.com/repos/tastejs/todomvc/milestones{/number}","notifications_url":"https://api.github.com/repos/tastejs/todomvc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tastejs/todomvc/labels{/name}","releases_url":"https://api.github.com/repos/tastejs/todomvc/releases{/id}","created_at":"2011-06-03T19:56:33Z","updated_at":"2015-06-06T09:27:34Z","pushed_at":"2015-06-06T01:41:02Z","git_url":"git://github.com/tastejs/todomvc.git","ssh_url":"git@github.com:tastejs/todomvc.git","clone_url":"https://github.com/tastejs/todomvc.git","svn_url":"https://github.com/tastejs/todomvc","homepage":"http://todomvc.com","size":101332,"stargazers_count":12878,"watchers_count":12878,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6958,"mirror_url":null,"open_issues_count":85,"forks":6958,"open_issues":85,"watchers":12878,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tastejs/todomvc/pulls/1297"},"html":{"href":"https://github.com/tastejs/todomvc/pull/1297"},"issue":{"href":"https://api.github.com/repos/tastejs/todomvc/issues/1297"},"comments":{"href":"https://api.github.com/repos/tastejs/todomvc/issues/1297/comments"},"review_comments":{"href":"https://api.github.com/repos/tastejs/todomvc/pulls/1297/comments"},"review_comment":{"href":"https://api.github.com/repos/tastejs/todomvc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tastejs/todomvc/pulls/1297/commits"},"statuses":{"href":"https://api.github.com/repos/tastejs/todomvc/statuses/da476760fb90af15199c1bc89c858d2af5d7a44c"}}}}