{"action":"created","comment":{"url":"https://api.github.com/repos/uonline/uonline/pulls/comments/67541817","id":67541817,"diff_hunk":"@@ -0,0 +1,51 @@\n+# This program is free software; you can redistribute it and/or modify\n+# it under the terms of the GNU Affero General Public License as published by\n+# the Free Software Foundation; either version 3 of the License, or\n+# (at your option) any later version.\n+#\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU Affero General Public License for more details.\n+#\n+# You should have received a copy of the GNU Affero General Public License\n+# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+\n+\n+'use strict'\n+\n+fs = require 'fs'\n+ask = require 'require-r'\n+{async, await} = require 'asyncawait'\n+\n+{config} = ask 'lib/test-utils.coffee'\n+TESTS_DIR = 'tests'\n+\n+pgPool = null\n+pg = null\n+useDB = {}\n+\n+\n+iter = (dirname) ->\n+\tfor fname in fs.readdirSync(dirname)\n+\t\tfpath = dirname+'/'+fname\n+\t\tif fs.statSync(fpath).isDirectory()\n+\t\t\titer(fpath)\n+\t\telse if fname.endsWith('.coffee')\n+\t\t\ttest = ask fpath\n+\t\t\tNS = fpath.substring(TESTS_DIR.length+1, fpath.length-7)\n+\t\t\tuseDB[NS] = test.useDB\n+\t\t\tdelete test.useDB\n+\t\t\texports[NS] = test\n+iter(TESTS_DIR)","path":"tests.coffee","position":40,"original_position":40,"commit_id":"ee49f0065df98babafa4eb42c2189865bb0a8a34","original_commit_id":"ee49f0065df98babafa4eb42c2189865bb0a8a34","user":{"login":"m1kc","id":1831620,"avatar_url":"https://avatars.githubusercontent.com/u/1831620?v=3","gravatar_id":"","url":"https://api.github.com/users/m1kc","html_url":"https://github.com/m1kc","followers_url":"https://api.github.com/users/m1kc/followers","following_url":"https://api.github.com/users/m1kc/following{/other_user}","gists_url":"https://api.github.com/users/m1kc/gists{/gist_id}","starred_url":"https://api.github.com/users/m1kc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m1kc/subscriptions","organizations_url":"https://api.github.com/users/m1kc/orgs","repos_url":"https://api.github.com/users/m1kc/repos","events_url":"https://api.github.com/users/m1kc/events{/privacy}","received_events_url":"https://api.github.com/users/m1kc/received_events","type":"User","site_admin":false},"body":"И опять у нас очередной directory walker.","created_at":"2016-06-17T16:56:24Z","updated_at":"2016-06-17T16:56:24Z","html_url":"https://github.com/uonline/uonline/pull/635#discussion_r67541817","pull_request_url":"https://api.github.com/repos/uonline/uonline/pulls/635","_links":{"self":{"href":"https://api.github.com/repos/uonline/uonline/pulls/comments/67541817"},"html":{"href":"https://github.com/uonline/uonline/pull/635#discussion_r67541817"},"pull_request":{"href":"https://api.github.com/repos/uonline/uonline/pulls/635"}}},"pull_request":{"url":"https://api.github.com/repos/uonline/uonline/pulls/635","id":73464375,"html_url":"https://github.com/uonline/uonline/pull/635","diff_url":"https://github.com/uonline/uonline/pull/635.diff","patch_url":"https://github.com/uonline/uonline/pull/635.patch","issue_url":"https://api.github.com/repos/uonline/uonline/issues/635","number":635,"state":"open","locked":false,"title":"Domains, pg-promise and everything","user":{"login":"m1kc","id":1831620,"avatar_url":"https://avatars.githubusercontent.com/u/1831620?v=3","gravatar_id":"","url":"https://api.github.com/users/m1kc","html_url":"https://github.com/m1kc","followers_url":"https://api.github.com/users/m1kc/followers","following_url":"https://api.github.com/users/m1kc/following{/other_user}","gists_url":"https://api.github.com/users/m1kc/gists{/gist_id}","starred_url":"https://api.github.com/users/m1kc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m1kc/subscriptions","organizations_url":"https://api.github.com/users/m1kc/orgs","repos_url":"https://api.github.com/users/m1kc/repos","events_url":"https://api.github.com/users/m1kc/events{/privacy}","received_events_url":"https://api.github.com/users/m1kc/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-11T10:03:22Z","updated_at":"2016-06-17T16:56:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b310d4068f84013ad22c5ff9ea4d095f94590409","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/uonline/uonline/pulls/635/commits","review_comments_url":"https://api.github.com/repos/uonline/uonline/pulls/635/comments","review_comment_url":"https://api.github.com/repos/uonline/uonline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uonline/uonline/issues/635/comments","statuses_url":"https://api.github.com/repos/uonline/uonline/statuses/ee49f0065df98babafa4eb42c2189865bb0a8a34","head":{"label":"uonline:domain-pgpromise-and-everything","ref":"domain-pgpromise-and-everything","sha":"ee49f0065df98babafa4eb42c2189865bb0a8a34","user":{"login":"uonline","id":5141116,"avatar_url":"https://avatars.githubusercontent.com/u/5141116?v=3","gravatar_id":"","url":"https://api.github.com/users/uonline","html_url":"https://github.com/uonline","followers_url":"https://api.github.com/users/uonline/followers","following_url":"https://api.github.com/users/uonline/following{/other_user}","gists_url":"https://api.github.com/users/uonline/gists{/gist_id}","starred_url":"https://api.github.com/users/uonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uonline/subscriptions","organizations_url":"https://api.github.com/users/uonline/orgs","repos_url":"https://api.github.com/users/uonline/repos","events_url":"https://api.github.com/users/uonline/events{/privacy}","received_events_url":"https://api.github.com/users/uonline/received_events","type":"Organization","site_admin":false},"repo":{"id":7137900,"name":"uonline","full_name":"uonline/uonline","owner":{"login":"uonline","id":5141116,"avatar_url":"https://avatars.githubusercontent.com/u/5141116?v=3","gravatar_id":"","url":"https://api.github.com/users/uonline","html_url":"https://github.com/uonline","followers_url":"https://api.github.com/users/uonline/followers","following_url":"https://api.github.com/users/uonline/following{/other_user}","gists_url":"https://api.github.com/users/uonline/gists{/gist_id}","starred_url":"https://api.github.com/users/uonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uonline/subscriptions","organizations_url":"https://api.github.com/users/uonline/orgs","repos_url":"https://api.github.com/users/uonline/repos","events_url":"https://api.github.com/users/uonline/events{/privacy}","received_events_url":"https://api.github.com/users/uonline/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uonline/uonline","description":"Browser-based MMORPG in a fantasy world.","fork":false,"url":"https://api.github.com/repos/uonline/uonline","forks_url":"https://api.github.com/repos/uonline/uonline/forks","keys_url":"https://api.github.com/repos/uonline/uonline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uonline/uonline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uonline/uonline/teams","hooks_url":"https://api.github.com/repos/uonline/uonline/hooks","issue_events_url":"https://api.github.com/repos/uonline/uonline/issues/events{/number}","events_url":"https://api.github.com/repos/uonline/uonline/events","assignees_url":"https://api.github.com/repos/uonline/uonline/assignees{/user}","branches_url":"https://api.github.com/repos/uonline/uonline/branches{/branch}","tags_url":"https://api.github.com/repos/uonline/uonline/tags","blobs_url":"https://api.github.com/repos/uonline/uonline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uonline/uonline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uonline/uonline/git/refs{/sha}","trees_url":"https://api.github.com/repos/uonline/uonline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uonline/uonline/statuses/{sha}","languages_url":"https://api.github.com/repos/uonline/uonline/languages","stargazers_url":"https://api.github.com/repos/uonline/uonline/stargazers","contributors_url":"https://api.github.com/repos/uonline/uonline/contributors","subscribers_url":"https://api.github.com/repos/uonline/uonline/subscribers","subscription_url":"https://api.github.com/repos/uonline/uonline/subscription","commits_url":"https://api.github.com/repos/uonline/uonline/commits{/sha}","git_commits_url":"https://api.github.com/repos/uonline/uonline/git/commits{/sha}","comments_url":"https://api.github.com/repos/uonline/uonline/comments{/number}","issue_comment_url":"https://api.github.com/repos/uonline/uonline/issues/comments{/number}","contents_url":"https://api.github.com/repos/uonline/uonline/contents/{+path}","compare_url":"https://api.github.com/repos/uonline/uonline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uonline/uonline/merges","archive_url":"https://api.github.com/repos/uonline/uonline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uonline/uonline/downloads","issues_url":"https://api.github.com/repos/uonline/uonline/issues{/number}","pulls_url":"https://api.github.com/repos/uonline/uonline/pulls{/number}","milestones_url":"https://api.github.com/repos/uonline/uonline/milestones{/number}","notifications_url":"https://api.github.com/repos/uonline/uonline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uonline/uonline/labels{/name}","releases_url":"https://api.github.com/repos/uonline/uonline/releases{/id}","deployments_url":"https://api.github.com/repos/uonline/uonline/deployments","created_at":"2012-12-12T21:26:13Z","updated_at":"2016-01-17T10:39:07Z","pushed_at":"2016-06-17T13:43:19Z","git_url":"git://github.com/uonline/uonline.git","ssh_url":"git@github.com:uonline/uonline.git","clone_url":"https://github.com/uonline/uonline.git","svn_url":"https://github.com/uonline/uonline","homepage":"","size":9573,"stargazers_count":3,"watchers_count":3,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":125,"forks":4,"open_issues":125,"watchers":3,"default_branch":"master"}},"base":{"label":"uonline:master","ref":"master","sha":"a0ec4dbb3a80ee683b1a0f18a65cb31d348f3040","user":{"login":"uonline","id":5141116,"avatar_url":"https://avatars.githubusercontent.com/u/5141116?v=3","gravatar_id":"","url":"https://api.github.com/users/uonline","html_url":"https://github.com/uonline","followers_url":"https://api.github.com/users/uonline/followers","following_url":"https://api.github.com/users/uonline/following{/other_user}","gists_url":"https://api.github.com/users/uonline/gists{/gist_id}","starred_url":"https://api.github.com/users/uonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uonline/subscriptions","organizations_url":"https://api.github.com/users/uonline/orgs","repos_url":"https://api.github.com/users/uonline/repos","events_url":"https://api.github.com/users/uonline/events{/privacy}","received_events_url":"https://api.github.com/users/uonline/received_events","type":"Organization","site_admin":false},"repo":{"id":7137900,"name":"uonline","full_name":"uonline/uonline","owner":{"login":"uonline","id":5141116,"avatar_url":"https://avatars.githubusercontent.com/u/5141116?v=3","gravatar_id":"","url":"https://api.github.com/users/uonline","html_url":"https://github.com/uonline","followers_url":"https://api.github.com/users/uonline/followers","following_url":"https://api.github.com/users/uonline/following{/other_user}","gists_url":"https://api.github.com/users/uonline/gists{/gist_id}","starred_url":"https://api.github.com/users/uonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uonline/subscriptions","organizations_url":"https://api.github.com/users/uonline/orgs","repos_url":"https://api.github.com/users/uonline/repos","events_url":"https://api.github.com/users/uonline/events{/privacy}","received_events_url":"https://api.github.com/users/uonline/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uonline/uonline","description":"Browser-based MMORPG in a fantasy world.","fork":false,"url":"https://api.github.com/repos/uonline/uonline","forks_url":"https://api.github.com/repos/uonline/uonline/forks","keys_url":"https://api.github.com/repos/uonline/uonline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uonline/uonline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uonline/uonline/teams","hooks_url":"https://api.github.com/repos/uonline/uonline/hooks","issue_events_url":"https://api.github.com/repos/uonline/uonline/issues/events{/number}","events_url":"https://api.github.com/repos/uonline/uonline/events","assignees_url":"https://api.github.com/repos/uonline/uonline/assignees{/user}","branches_url":"https://api.github.com/repos/uonline/uonline/branches{/branch}","tags_url":"https://api.github.com/repos/uonline/uonline/tags","blobs_url":"https://api.github.com/repos/uonline/uonline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uonline/uonline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uonline/uonline/git/refs{/sha}","trees_url":"https://api.github.com/repos/uonline/uonline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uonline/uonline/statuses/{sha}","languages_url":"https://api.github.com/repos/uonline/uonline/languages","stargazers_url":"https://api.github.com/repos/uonline/uonline/stargazers","contributors_url":"https://api.github.com/repos/uonline/uonline/contributors","subscribers_url":"https://api.github.com/repos/uonline/uonline/subscribers","subscription_url":"https://api.github.com/repos/uonline/uonline/subscription","commits_url":"https://api.github.com/repos/uonline/uonline/commits{/sha}","git_commits_url":"https://api.github.com/repos/uonline/uonline/git/commits{/sha}","comments_url":"https://api.github.com/repos/uonline/uonline/comments{/number}","issue_comment_url":"https://api.github.com/repos/uonline/uonline/issues/comments{/number}","contents_url":"https://api.github.com/repos/uonline/uonline/contents/{+path}","compare_url":"https://api.github.com/repos/uonline/uonline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uonline/uonline/merges","archive_url":"https://api.github.com/repos/uonline/uonline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uonline/uonline/downloads","issues_url":"https://api.github.com/repos/uonline/uonline/issues{/number}","pulls_url":"https://api.github.com/repos/uonline/uonline/pulls{/number}","milestones_url":"https://api.github.com/repos/uonline/uonline/milestones{/number}","notifications_url":"https://api.github.com/repos/uonline/uonline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uonline/uonline/labels{/name}","releases_url":"https://api.github.com/repos/uonline/uonline/releases{/id}","deployments_url":"https://api.github.com/repos/uonline/uonline/deployments","created_at":"2012-12-12T21:26:13Z","updated_at":"2016-01-17T10:39:07Z","pushed_at":"2016-06-17T13:43:19Z","git_url":"git://github.com/uonline/uonline.git","ssh_url":"git@github.com:uonline/uonline.git","clone_url":"https://github.com/uonline/uonline.git","svn_url":"https://github.com/uonline/uonline","homepage":"","size":9573,"stargazers_count":3,"watchers_count":3,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":125,"forks":4,"open_issues":125,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uonline/uonline/pulls/635"},"html":{"href":"https://github.com/uonline/uonline/pull/635"},"issue":{"href":"https://api.github.com/repos/uonline/uonline/issues/635"},"comments":{"href":"https://api.github.com/repos/uonline/uonline/issues/635/comments"},"review_comments":{"href":"https://api.github.com/repos/uonline/uonline/pulls/635/comments"},"review_comment":{"href":"https://api.github.com/repos/uonline/uonline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uonline/uonline/pulls/635/commits"},"statuses":{"href":"https://api.github.com/repos/uonline/uonline/statuses/ee49f0065df98babafa4eb42c2189865bb0a8a34"}}}}
{"actor":{"display_login":"m1kc"}}