{"action":"created","comment":{"url":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/comments/62773891","id":62773891,"diff_hunk":"@@ -34,21 +36,70 @@ gulp.task(\"dist\", function () {\n   return;\n });\n \n-gulp.task(\"build\", function () {\n+gulp.task(\"build\", () => {\n   browserify({entries: \"src/proc.edu.ria.es6.js\", extensions: [\".es6.js\"], debug: true})\n     .transform(babelify, { presets: [\"es2015\"] })\n     .bundle()\n     .pipe(source(\"proc.edu.ria.js\"))\n     .pipe(gulp.dest(\"dist\"));\n });\n \n+let getTestFilePath = filepath => filepath.replace(\"./src/\", \"./test/\").replace(\".es6\", \"\");\n+gulp.task(\"build-tests\", () => {\n+  glob.sync(\"./src/**/*.es6.js\")\n+  .filter((filepath) => {\n+    return !fs.existsSync(getTestFilePath(filepath));\n+  }).forEach((filepath, index) => {\n+    let filename = path.basename(filepath);\n+    let functionName = filename.split(\".\")[0];\n+    let testCode = `import \"babel-polyfill\";\n+import ${functionName} from \".${filepath}\";\n+import assert from \"assert\";\n+import jsdom from \"mocha-jsdom\";\n \n-gulp.task(\"watch\", function () {\n-    watch([\"./src/**/*.js\", \"!./src/**/rules.es6.js\"], batch(function (events, done) {\n-        gulp.start(\"rules_build_dist\", done);\n+describe(\"${functionName}\", () => {\n+  jsdom();\n+  it(\"is a function\", (done) => {\n+    assert(typeof ${functionName} === \"function\");\n+    done();\n+  });\n+});`;\n+    fs.writeFileSync(getTestFilePath(filepath), testCode, {encoding: \"utf8\"});\n+  });\n+  return;\n+});\n+\n+gulp.task(\"watch-rules\", () => {\n+    watch([\"./rules/**/*.json\"], batch((events, done) => {\n+        gulp.start(\"rules\", done);\n+    }));\n+});\n+\n+gulp.task(\"watch-src\", () => {\n+  watch([\"./src/**/*.js\", \"!./src/**/rules.es6.js\"], batch((events, done) => {\n+        gulp.start(\"build\", done);\n     }));\n });\n \n+gulp.task(\"nodemon\", function (cb) {\n+\tvar started = false;\n+\n+\treturn nodemon({\n+    script: \"./app.js\"\n+  , ext: \"js json\"\n+  , tasks: function (changedFiles) {","path":"gulpfile.js","position":84,"original_position":84,"commit_id":"491730ee150f9033d9b75f2d5f6d2afe2bffa202","original_commit_id":"9569211452158125b24f59fa2258a963dbf0ac66","user":{"login":"lagora","id":1552901,"avatar_url":"https://avatars.githubusercontent.com/u/1552901?v=3","gravatar_id":"","url":"https://api.github.com/users/lagora","html_url":"https://github.com/lagora","followers_url":"https://api.github.com/users/lagora/followers","following_url":"https://api.github.com/users/lagora/following{/other_user}","gists_url":"https://api.github.com/users/lagora/gists{/gist_id}","starred_url":"https://api.github.com/users/lagora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lagora/subscriptions","organizations_url":"https://api.github.com/users/lagora/orgs","repos_url":"https://api.github.com/users/lagora/repos","events_url":"https://api.github.com/users/lagora/events{/privacy}","received_events_url":"https://api.github.com/users/lagora/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Unexpected console statement.](https://www.codacy.com/app/lagora-franck/proc-edu-ria/file/2546558171/issues/source?bid=3286583&fileBranchId=3287652#l91)","created_at":"2016-05-10T23:57:28Z","updated_at":"2016-05-10T23:57:28Z","html_url":"https://github.com/lagora/proc.edu.ria/pull/43#discussion_r62773891","pull_request_url":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/comments/62773891"},"html":{"href":"https://github.com/lagora/proc.edu.ria/pull/43#discussion_r62773891"},"pull_request":{"href":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/43","id":69584427,"html_url":"https://github.com/lagora/proc.edu.ria/pull/43","diff_url":"https://github.com/lagora/proc.edu.ria/pull/43.diff","patch_url":"https://github.com/lagora/proc.edu.ria/pull/43.patch","issue_url":"https://api.github.com/repos/lagora/proc.edu.ria/issues/43","number":43,"state":"open","locked":false,"title":"lots of function atomisation, removed build at test end","user":{"login":"lagora","id":1552901,"avatar_url":"https://avatars.githubusercontent.com/u/1552901?v=3","gravatar_id":"","url":"https://api.github.com/users/lagora","html_url":"https://github.com/lagora","followers_url":"https://api.github.com/users/lagora/followers","following_url":"https://api.github.com/users/lagora/following{/other_user}","gists_url":"https://api.github.com/users/lagora/gists{/gist_id}","starred_url":"https://api.github.com/users/lagora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lagora/subscriptions","organizations_url":"https://api.github.com/users/lagora/orgs","repos_url":"https://api.github.com/users/lagora/repos","events_url":"https://api.github.com/users/lagora/events{/privacy}","received_events_url":"https://api.github.com/users/lagora/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-10T21:53:11Z","updated_at":"2016-05-10T23:57:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58113911022689184c06f183d943cf6c83c8c920","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/43/commits","review_comments_url":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/43/comments","review_comment_url":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lagora/proc.edu.ria/issues/43/comments","statuses_url":"https://api.github.com/repos/lagora/proc.edu.ria/statuses/491730ee150f9033d9b75f2d5f6d2afe2bffa202","head":{"label":"lagora:feat-atomicFunctions","ref":"feat-atomicFunctions","sha":"491730ee150f9033d9b75f2d5f6d2afe2bffa202","user":{"login":"lagora","id":1552901,"avatar_url":"https://avatars.githubusercontent.com/u/1552901?v=3","gravatar_id":"","url":"https://api.github.com/users/lagora","html_url":"https://github.com/lagora","followers_url":"https://api.github.com/users/lagora/followers","following_url":"https://api.github.com/users/lagora/following{/other_user}","gists_url":"https://api.github.com/users/lagora/gists{/gist_id}","starred_url":"https://api.github.com/users/lagora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lagora/subscriptions","organizations_url":"https://api.github.com/users/lagora/orgs","repos_url":"https://api.github.com/users/lagora/repos","events_url":"https://api.github.com/users/lagora/events{/privacy}","received_events_url":"https://api.github.com/users/lagora/received_events","type":"User","site_admin":false},"repo":{"id":55171778,"name":"proc.edu.ria","full_name":"lagora/proc.edu.ria","owner":{"login":"lagora","id":1552901,"avatar_url":"https://avatars.githubusercontent.com/u/1552901?v=3","gravatar_id":"","url":"https://api.github.com/users/lagora","html_url":"https://github.com/lagora","followers_url":"https://api.github.com/users/lagora/followers","following_url":"https://api.github.com/users/lagora/following{/other_user}","gists_url":"https://api.github.com/users/lagora/gists{/gist_id}","starred_url":"https://api.github.com/users/lagora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lagora/subscriptions","organizations_url":"https://api.github.com/users/lagora/orgs","repos_url":"https://api.github.com/users/lagora/repos","events_url":"https://api.github.com/users/lagora/events{/privacy}","received_events_url":"https://api.github.com/users/lagora/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lagora/proc.edu.ria","description":"","fork":false,"url":"https://api.github.com/repos/lagora/proc.edu.ria","forks_url":"https://api.github.com/repos/lagora/proc.edu.ria/forks","keys_url":"https://api.github.com/repos/lagora/proc.edu.ria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lagora/proc.edu.ria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lagora/proc.edu.ria/teams","hooks_url":"https://api.github.com/repos/lagora/proc.edu.ria/hooks","issue_events_url":"https://api.github.com/repos/lagora/proc.edu.ria/issues/events{/number}","events_url":"https://api.github.com/repos/lagora/proc.edu.ria/events","assignees_url":"https://api.github.com/repos/lagora/proc.edu.ria/assignees{/user}","branches_url":"https://api.github.com/repos/lagora/proc.edu.ria/branches{/branch}","tags_url":"https://api.github.com/repos/lagora/proc.edu.ria/tags","blobs_url":"https://api.github.com/repos/lagora/proc.edu.ria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lagora/proc.edu.ria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lagora/proc.edu.ria/git/refs{/sha}","trees_url":"https://api.github.com/repos/lagora/proc.edu.ria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lagora/proc.edu.ria/statuses/{sha}","languages_url":"https://api.github.com/repos/lagora/proc.edu.ria/languages","stargazers_url":"https://api.github.com/repos/lagora/proc.edu.ria/stargazers","contributors_url":"https://api.github.com/repos/lagora/proc.edu.ria/contributors","subscribers_url":"https://api.github.com/repos/lagora/proc.edu.ria/subscribers","subscription_url":"https://api.github.com/repos/lagora/proc.edu.ria/subscription","commits_url":"https://api.github.com/repos/lagora/proc.edu.ria/commits{/sha}","git_commits_url":"https://api.github.com/repos/lagora/proc.edu.ria/git/commits{/sha}","comments_url":"https://api.github.com/repos/lagora/proc.edu.ria/comments{/number}","issue_comment_url":"https://api.github.com/repos/lagora/proc.edu.ria/issues/comments{/number}","contents_url":"https://api.github.com/repos/lagora/proc.edu.ria/contents/{+path}","compare_url":"https://api.github.com/repos/lagora/proc.edu.ria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lagora/proc.edu.ria/merges","archive_url":"https://api.github.com/repos/lagora/proc.edu.ria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lagora/proc.edu.ria/downloads","issues_url":"https://api.github.com/repos/lagora/proc.edu.ria/issues{/number}","pulls_url":"https://api.github.com/repos/lagora/proc.edu.ria/pulls{/number}","milestones_url":"https://api.github.com/repos/lagora/proc.edu.ria/milestones{/number}","notifications_url":"https://api.github.com/repos/lagora/proc.edu.ria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lagora/proc.edu.ria/labels{/name}","releases_url":"https://api.github.com/repos/lagora/proc.edu.ria/releases{/id}","deployments_url":"https://api.github.com/repos/lagora/proc.edu.ria/deployments","created_at":"2016-03-31T17:58:15Z","updated_at":"2016-03-31T22:24:39Z","pushed_at":"2016-05-10T23:57:09Z","git_url":"git://github.com/lagora/proc.edu.ria.git","ssh_url":"git@github.com:lagora/proc.edu.ria.git","clone_url":"https://github.com/lagora/proc.edu.ria.git","svn_url":"https://github.com/lagora/proc.edu.ria","homepage":null,"size":1752,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"lagora:master","ref":"master","sha":"f7d31fdc8d23436bcf01c90dc8105379541af20d","user":{"login":"lagora","id":1552901,"avatar_url":"https://avatars.githubusercontent.com/u/1552901?v=3","gravatar_id":"","url":"https://api.github.com/users/lagora","html_url":"https://github.com/lagora","followers_url":"https://api.github.com/users/lagora/followers","following_url":"https://api.github.com/users/lagora/following{/other_user}","gists_url":"https://api.github.com/users/lagora/gists{/gist_id}","starred_url":"https://api.github.com/users/lagora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lagora/subscriptions","organizations_url":"https://api.github.com/users/lagora/orgs","repos_url":"https://api.github.com/users/lagora/repos","events_url":"https://api.github.com/users/lagora/events{/privacy}","received_events_url":"https://api.github.com/users/lagora/received_events","type":"User","site_admin":false},"repo":{"id":55171778,"name":"proc.edu.ria","full_name":"lagora/proc.edu.ria","owner":{"login":"lagora","id":1552901,"avatar_url":"https://avatars.githubusercontent.com/u/1552901?v=3","gravatar_id":"","url":"https://api.github.com/users/lagora","html_url":"https://github.com/lagora","followers_url":"https://api.github.com/users/lagora/followers","following_url":"https://api.github.com/users/lagora/following{/other_user}","gists_url":"https://api.github.com/users/lagora/gists{/gist_id}","starred_url":"https://api.github.com/users/lagora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lagora/subscriptions","organizations_url":"https://api.github.com/users/lagora/orgs","repos_url":"https://api.github.com/users/lagora/repos","events_url":"https://api.github.com/users/lagora/events{/privacy}","received_events_url":"https://api.github.com/users/lagora/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lagora/proc.edu.ria","description":"","fork":false,"url":"https://api.github.com/repos/lagora/proc.edu.ria","forks_url":"https://api.github.com/repos/lagora/proc.edu.ria/forks","keys_url":"https://api.github.com/repos/lagora/proc.edu.ria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lagora/proc.edu.ria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lagora/proc.edu.ria/teams","hooks_url":"https://api.github.com/repos/lagora/proc.edu.ria/hooks","issue_events_url":"https://api.github.com/repos/lagora/proc.edu.ria/issues/events{/number}","events_url":"https://api.github.com/repos/lagora/proc.edu.ria/events","assignees_url":"https://api.github.com/repos/lagora/proc.edu.ria/assignees{/user}","branches_url":"https://api.github.com/repos/lagora/proc.edu.ria/branches{/branch}","tags_url":"https://api.github.com/repos/lagora/proc.edu.ria/tags","blobs_url":"https://api.github.com/repos/lagora/proc.edu.ria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lagora/proc.edu.ria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lagora/proc.edu.ria/git/refs{/sha}","trees_url":"https://api.github.com/repos/lagora/proc.edu.ria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lagora/proc.edu.ria/statuses/{sha}","languages_url":"https://api.github.com/repos/lagora/proc.edu.ria/languages","stargazers_url":"https://api.github.com/repos/lagora/proc.edu.ria/stargazers","contributors_url":"https://api.github.com/repos/lagora/proc.edu.ria/contributors","subscribers_url":"https://api.github.com/repos/lagora/proc.edu.ria/subscribers","subscription_url":"https://api.github.com/repos/lagora/proc.edu.ria/subscription","commits_url":"https://api.github.com/repos/lagora/proc.edu.ria/commits{/sha}","git_commits_url":"https://api.github.com/repos/lagora/proc.edu.ria/git/commits{/sha}","comments_url":"https://api.github.com/repos/lagora/proc.edu.ria/comments{/number}","issue_comment_url":"https://api.github.com/repos/lagora/proc.edu.ria/issues/comments{/number}","contents_url":"https://api.github.com/repos/lagora/proc.edu.ria/contents/{+path}","compare_url":"https://api.github.com/repos/lagora/proc.edu.ria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lagora/proc.edu.ria/merges","archive_url":"https://api.github.com/repos/lagora/proc.edu.ria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lagora/proc.edu.ria/downloads","issues_url":"https://api.github.com/repos/lagora/proc.edu.ria/issues{/number}","pulls_url":"https://api.github.com/repos/lagora/proc.edu.ria/pulls{/number}","milestones_url":"https://api.github.com/repos/lagora/proc.edu.ria/milestones{/number}","notifications_url":"https://api.github.com/repos/lagora/proc.edu.ria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lagora/proc.edu.ria/labels{/name}","releases_url":"https://api.github.com/repos/lagora/proc.edu.ria/releases{/id}","deployments_url":"https://api.github.com/repos/lagora/proc.edu.ria/deployments","created_at":"2016-03-31T17:58:15Z","updated_at":"2016-03-31T22:24:39Z","pushed_at":"2016-05-10T23:57:09Z","git_url":"git://github.com/lagora/proc.edu.ria.git","ssh_url":"git@github.com:lagora/proc.edu.ria.git","clone_url":"https://github.com/lagora/proc.edu.ria.git","svn_url":"https://github.com/lagora/proc.edu.ria","homepage":null,"size":1752,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/43"},"html":{"href":"https://github.com/lagora/proc.edu.ria/pull/43"},"issue":{"href":"https://api.github.com/repos/lagora/proc.edu.ria/issues/43"},"comments":{"href":"https://api.github.com/repos/lagora/proc.edu.ria/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lagora/proc.edu.ria/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/lagora/proc.edu.ria/statuses/491730ee150f9033d9b75f2d5f6d2afe2bffa202"}}}}