{"action":"created","comment":{"url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/comments/31822233","id":31822233,"diff_hunk":"@@ -0,0 +1,90 @@\n+/**\n+ * keysets\n+ * ==================\n+ *\n+ * Собирает `?.keysets.<язык>.js`-файлы на основе `*.i18n`-папок для указанных языков.\n+ *\n+ * **Опции**\n+ *\n+ * * *String* **target** — Результирующий таргет. По умолчанию — `?.keysets.{lang}.js`.\n+ * * *String* **lang** — Язык, для которого небходимо собрать файл.\n+ *\n+ * **Пример**\n+ *\n+ * ```javascript\n+ * nodeConfig.addTechs([\n+ *   [ require('enb-bem-i18n/techs/keysets'), { lang: '{lang}' } ]\n+ * ]);\n+ * ```\n+ */\n+\n+var vow = require('vow'),\n+    serialize = require('serialize-javascript'),\n+    asyncRequire = require('enb/lib/fs/async-require'),\n+    dropRequireCache = require('enb/lib/fs/drop-require-cache');\n+\n+module.exports = require('enb/lib/build-flow.js').create()\n+    .name('i18n-merge-keysets')\n+    .target('target', '?.keysets.{lang}.js')\n+    .defineRequiredOption('lang')\n+    .useFileList(['i18n.js'])\n+    .useDirList(['i18n'])\n+    .builder(function (i18nFiles, i18nDirs) {\n+        var node = this.node,\n+            cache = node.getNodeCache(this._target),\n+            lang = this._lang,\n+            langname = lang + '.js',\n+            result = {},\n+            files = [].concat(i18nFiles).concat(i18nDirs\n+                    .reduce(function (prev, dir) {\n+                        return prev.concat(dir.files);\n+                    }, [])\n+                    .filter(function (file) {\n+                        return [langname, 'all.js'].indexOf(file.name) > -1;\n+                    })\n+                    .sort(function (a, b) {","path":"techs/keysets.js","position":45,"original_position":45,"commit_id":"28f193786d9d7979eedb1d9f0406da503d7afcc4","original_commit_id":"28f193786d9d7979eedb1d9f0406da503d7afcc4","user":{"login":"blond","id":2225579,"avatar_url":"https://avatars.githubusercontent.com/u/2225579?v=3","gravatar_id":"","url":"https://api.github.com/users/blond","html_url":"https://github.com/blond","followers_url":"https://api.github.com/users/blond/followers","following_url":"https://api.github.com/users/blond/following{/other_user}","gists_url":"https://api.github.com/users/blond/gists{/gist_id}","starred_url":"https://api.github.com/users/blond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blond/subscriptions","organizations_url":"https://api.github.com/users/blond/orgs","repos_url":"https://api.github.com/users/blond/repos","events_url":"https://api.github.com/users/blond/events{/privacy}","received_events_url":"https://api.github.com/users/blond/received_events","type":"User","site_admin":false},"body":"file1, file2","created_at":"2015-06-05T15:25:53Z","updated_at":"2015-06-05T15:25:53Z","html_url":"https://github.com/enb-bem/enb-bem-i18n/pull/35#discussion_r31822233","pull_request_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/comments/31822233"},"html":{"href":"https://github.com/enb-bem/enb-bem-i18n/pull/35#discussion_r31822233"},"pull_request":{"href":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/35","id":36702968,"html_url":"https://github.com/enb-bem/enb-bem-i18n/pull/35","diff_url":"https://github.com/enb-bem/enb-bem-i18n/pull/35.diff","patch_url":"https://github.com/enb-bem/enb-bem-i18n/pull/35.patch","issue_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/issues/35","number":35,"state":"open","locked":false,"title":"Implement merge for i18n-merge-keysets techs","user":{"login":"tormozz48","id":996162,"avatar_url":"https://avatars.githubusercontent.com/u/996162?v=3","gravatar_id":"","url":"https://api.github.com/users/tormozz48","html_url":"https://github.com/tormozz48","followers_url":"https://api.github.com/users/tormozz48/followers","following_url":"https://api.github.com/users/tormozz48/following{/other_user}","gists_url":"https://api.github.com/users/tormozz48/gists{/gist_id}","starred_url":"https://api.github.com/users/tormozz48/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tormozz48/subscriptions","organizations_url":"https://api.github.com/users/tormozz48/orgs","repos_url":"https://api.github.com/users/tormozz48/repos","events_url":"https://api.github.com/users/tormozz48/events{/privacy}","received_events_url":"https://api.github.com/users/tormozz48/received_events","type":"User","site_admin":false},"body":"Implement merge for i18n-merge-keysets techs from different enb-bem-i18n packages. Rename i18n-merge-keysets tech to keysets tech.\r\n\r\nResolved #32 \r\n\r\nPlease review it @blond ","created_at":"2015-06-02T08:02:00Z","updated_at":"2015-06-05T15:25:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5249daba32790d094b3c43ac4602984ded8dac9f","assignee":{"login":"tormozz48","id":996162,"avatar_url":"https://avatars.githubusercontent.com/u/996162?v=3","gravatar_id":"","url":"https://api.github.com/users/tormozz48","html_url":"https://github.com/tormozz48","followers_url":"https://api.github.com/users/tormozz48/followers","following_url":"https://api.github.com/users/tormozz48/following{/other_user}","gists_url":"https://api.github.com/users/tormozz48/gists{/gist_id}","starred_url":"https://api.github.com/users/tormozz48/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tormozz48/subscriptions","organizations_url":"https://api.github.com/users/tormozz48/orgs","repos_url":"https://api.github.com/users/tormozz48/repos","events_url":"https://api.github.com/users/tormozz48/events{/privacy}","received_events_url":"https://api.github.com/users/tormozz48/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/35/commits","review_comments_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/35/comments","review_comment_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/comments{/number}","comments_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/issues/35/comments","statuses_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/statuses/28f193786d9d7979eedb1d9f0406da503d7afcc4","head":{"label":"enb-bem:issue-32","ref":"issue-32","sha":"28f193786d9d7979eedb1d9f0406da503d7afcc4","user":{"login":"enb-bem","id":8117111,"avatar_url":"https://avatars.githubusercontent.com/u/8117111?v=3","gravatar_id":"","url":"https://api.github.com/users/enb-bem","html_url":"https://github.com/enb-bem","followers_url":"https://api.github.com/users/enb-bem/followers","following_url":"https://api.github.com/users/enb-bem/following{/other_user}","gists_url":"https://api.github.com/users/enb-bem/gists{/gist_id}","starred_url":"https://api.github.com/users/enb-bem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enb-bem/subscriptions","organizations_url":"https://api.github.com/users/enb-bem/orgs","repos_url":"https://api.github.com/users/enb-bem/repos","events_url":"https://api.github.com/users/enb-bem/events{/privacy}","received_events_url":"https://api.github.com/users/enb-bem/received_events","type":"Organization","site_admin":false},"repo":{"id":20487132,"name":"enb-bem-i18n","full_name":"enb-bem/enb-bem-i18n","owner":{"login":"enb-bem","id":8117111,"avatar_url":"https://avatars.githubusercontent.com/u/8117111?v=3","gravatar_id":"","url":"https://api.github.com/users/enb-bem","html_url":"https://github.com/enb-bem","followers_url":"https://api.github.com/users/enb-bem/followers","following_url":"https://api.github.com/users/enb-bem/following{/other_user}","gists_url":"https://api.github.com/users/enb-bem/gists{/gist_id}","starred_url":"https://api.github.com/users/enb-bem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enb-bem/subscriptions","organizations_url":"https://api.github.com/users/enb-bem/orgs","repos_url":"https://api.github.com/users/enb-bem/repos","events_url":"https://api.github.com/users/enb-bem/events{/privacy}","received_events_url":"https://api.github.com/users/enb-bem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/enb-bem/enb-bem-i18n","description":"BEM.I18N for ENB","fork":false,"url":"https://api.github.com/repos/enb-bem/enb-bem-i18n","forks_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/forks","keys_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/teams","hooks_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/hooks","issue_events_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/issues/events{/number}","events_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/events","assignees_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/assignees{/user}","branches_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/branches{/branch}","tags_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/tags","blobs_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/git/refs{/sha}","trees_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/statuses/{sha}","languages_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/languages","stargazers_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/stargazers","contributors_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/contributors","subscribers_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/subscribers","subscription_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/subscription","commits_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/commits{/sha}","git_commits_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/git/commits{/sha}","comments_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/comments{/number}","issue_comment_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/issues/comments{/number}","contents_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/contents/{+path}","compare_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/merges","archive_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/downloads","issues_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/issues{/number}","pulls_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls{/number}","milestones_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/milestones{/number}","notifications_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/labels{/name}","releases_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/releases{/id}","created_at":"2014-06-04T14:35:56Z","updated_at":"2015-04-02T20:56:34Z","pushed_at":"2015-06-05T14:24:39Z","git_url":"git://github.com/enb-bem/enb-bem-i18n.git","ssh_url":"git@github.com:enb-bem/enb-bem-i18n.git","clone_url":"https://github.com/enb-bem/enb-bem-i18n.git","svn_url":"https://github.com/enb-bem/enb-bem-i18n","homepage":"","size":768,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":4,"default_branch":"master"}},"base":{"label":"enb-bem:master","ref":"master","sha":"9c44ecf1405a99ecb032150ff06761b0fe5a761a","user":{"login":"enb-bem","id":8117111,"avatar_url":"https://avatars.githubusercontent.com/u/8117111?v=3","gravatar_id":"","url":"https://api.github.com/users/enb-bem","html_url":"https://github.com/enb-bem","followers_url":"https://api.github.com/users/enb-bem/followers","following_url":"https://api.github.com/users/enb-bem/following{/other_user}","gists_url":"https://api.github.com/users/enb-bem/gists{/gist_id}","starred_url":"https://api.github.com/users/enb-bem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enb-bem/subscriptions","organizations_url":"https://api.github.com/users/enb-bem/orgs","repos_url":"https://api.github.com/users/enb-bem/repos","events_url":"https://api.github.com/users/enb-bem/events{/privacy}","received_events_url":"https://api.github.com/users/enb-bem/received_events","type":"Organization","site_admin":false},"repo":{"id":20487132,"name":"enb-bem-i18n","full_name":"enb-bem/enb-bem-i18n","owner":{"login":"enb-bem","id":8117111,"avatar_url":"https://avatars.githubusercontent.com/u/8117111?v=3","gravatar_id":"","url":"https://api.github.com/users/enb-bem","html_url":"https://github.com/enb-bem","followers_url":"https://api.github.com/users/enb-bem/followers","following_url":"https://api.github.com/users/enb-bem/following{/other_user}","gists_url":"https://api.github.com/users/enb-bem/gists{/gist_id}","starred_url":"https://api.github.com/users/enb-bem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enb-bem/subscriptions","organizations_url":"https://api.github.com/users/enb-bem/orgs","repos_url":"https://api.github.com/users/enb-bem/repos","events_url":"https://api.github.com/users/enb-bem/events{/privacy}","received_events_url":"https://api.github.com/users/enb-bem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/enb-bem/enb-bem-i18n","description":"BEM.I18N for ENB","fork":false,"url":"https://api.github.com/repos/enb-bem/enb-bem-i18n","forks_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/forks","keys_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/teams","hooks_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/hooks","issue_events_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/issues/events{/number}","events_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/events","assignees_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/assignees{/user}","branches_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/branches{/branch}","tags_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/tags","blobs_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/git/refs{/sha}","trees_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/statuses/{sha}","languages_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/languages","stargazers_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/stargazers","contributors_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/contributors","subscribers_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/subscribers","subscription_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/subscription","commits_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/commits{/sha}","git_commits_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/git/commits{/sha}","comments_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/comments{/number}","issue_comment_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/issues/comments{/number}","contents_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/contents/{+path}","compare_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/merges","archive_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/downloads","issues_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/issues{/number}","pulls_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls{/number}","milestones_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/milestones{/number}","notifications_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/labels{/name}","releases_url":"https://api.github.com/repos/enb-bem/enb-bem-i18n/releases{/id}","created_at":"2014-06-04T14:35:56Z","updated_at":"2015-04-02T20:56:34Z","pushed_at":"2015-06-05T14:24:39Z","git_url":"git://github.com/enb-bem/enb-bem-i18n.git","ssh_url":"git@github.com:enb-bem/enb-bem-i18n.git","clone_url":"https://github.com/enb-bem/enb-bem-i18n.git","svn_url":"https://github.com/enb-bem/enb-bem-i18n","homepage":"","size":768,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/35"},"html":{"href":"https://github.com/enb-bem/enb-bem-i18n/pull/35"},"issue":{"href":"https://api.github.com/repos/enb-bem/enb-bem-i18n/issues/35"},"comments":{"href":"https://api.github.com/repos/enb-bem/enb-bem-i18n/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/enb-bem/enb-bem-i18n/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/enb-bem/enb-bem-i18n/statuses/28f193786d9d7979eedb1d9f0406da503d7afcc4"}}}}