{"action":"created","comment":{"url":"https://api.github.com/repos/gemini-testing/hermione/pulls/comments/78534841","id":78534841,"diff_hunk":"@@ -1,72 +1,70 @@\n 'use strict';\n \n-var _ = require('lodash'),\n-    Q = require('q'),\n-    ConfigReader = require('./config-reader'),\n-    URI = require('urijs'),\n-    commander = require('commander'),\n-    chalk = require('chalk'),\n-    Hermione = require('./hermione'),\n-    logger = require('./utils').logger,\n-    defaults = require('./defaults'),\n+const chalk = require('chalk');\n+const commander = require('commander');\n+const _ = require('lodash');\n+const q = require('q');\n \n-    helpMessages = {\n-        grid: _.template('Selenium grid URL [${grid}]')(defaults),\n-        baseUrl: _.template('Page under test base URL [${baseUrl}]')(defaults),\n-        waitTimeout: _.template('Default timeout for all `waitXXX` commands [${waitTimeout}ms]')(defaults),\n-        screenshotPath: _.template('Screenshot save path [${screenshotPath}]')(defaults),\n-        reporters: _.template('Reporters [${reporters}]')(defaults),\n-        debug: _.template('Enable debug output [${debug}]')(defaults),\n-        conf: _.template('Config path [${conf}]')(defaults),\n-        browser: 'Run tests in specific browser',\n-        grep: 'Filter tests matching string or regexp'\n-    },\n-    coercion = {\n-        grid: function(val) {\n-            var uri = new URI(val);\n-            if (!uri.scheme()) {\n-                uri.scheme('http');\n-            }\n-            return uri.toString();\n-        },\n-        collect: function(newValue, array) {\n-            array = array || [];\n-            return array.concat(newValue);\n-        }\n-    };\n+const Config = require('./config');\n+const Hermione = require('./hermione');\n+const logger = require('./utils').logger;\n+const validateBrowsers = require('./config/validators').validateBrowsers;\n+\n+const collect = (newValue, array) => (array || []).concat(newValue);\n \n-exports.run = function() {\n+exports.run = () => {\n     commander\n-        .option('-c, --conf <path>', helpMessages.conf)\n-        .option('--baseUrl <url>', helpMessages.baseUrl)\n-        .option('--grid <url>', helpMessages.grid, coercion.grid)\n-        .option('--wait-timeout <ms>', helpMessages.waitTimeout)\n-        .option('--screenshot-path <path>', helpMessages.screenshotPath)\n-        .option('--debug <boolean>', helpMessages.debug)\n-        .option('-r, --reporter <reporter>', helpMessages.reporters, coercion.collect)\n-        .option('-b, --browser <browser>', helpMessages.browser, coercion.collect)\n-        .option('--grep <grep>', helpMessages.grep)\n+        .option('-c, --conf <path>', 'config file')\n+        .option('-r, --reporter <reporter>', 'test reporter', collect)\n+        .option('-b, --browser <browser>', 'run tests only in specified browser', collect)\n+        .option('--grep <grep>', 'run only tests matching string or regexp')\n         .allowUnknownOption()\n-        .on('--help', function() {\n-            logger.log(chalk.bold('Example: \\n'));\n-            logger.log(chalk.green('$ hermione --baseUrl http://yandex.ru/search\\n'));\n+        .on('--help', () => {\n+            console.log('  Overriding config');\n+            console.log('    To override any config option use full option path converted to --kebab-case');\n+            console.log('');\n+\n+            console.log('    Examples:');\n+            console.log('      hermione --debug true');\n+            console.log('      hermione --base-url http://example.com');\n+            console.log('      hermione --browsers-firefox-sessions-per-browser 10');\n+            console.log('');\n+            console.log('    You can also use environment variables converted to snake_case with');\n+            console.log('    hermione_ prefix');\n+            console.log('');\n+            console.log('    Examples:');\n+            console.log('      hermione_debug=true hermione');\n+            console.log('      hermione_base_url=http://example.com hermione');\n+            console.log('      hermione_browsers-firefox-sessions-per-browser 10 hermione');\n+            console.log('');\n+            console.log('    If both cli flag and env var are used, cli flag takes precedence') ;","path":"lib/cli.js","position":86,"original_position":86,"commit_id":"7dca7fdcc6f11cf5b4db6de89f01fd650da5af17","original_commit_id":"9e6e022a3bc59507cb579e0bf39b3abacf28ef27","user":{"login":"sipayRT","id":1658415,"avatar_url":"https://avatars.githubusercontent.com/u/1658415?v=3","gravatar_id":"","url":"https://api.github.com/users/sipayRT","html_url":"https://github.com/sipayRT","followers_url":"https://api.github.com/users/sipayRT/followers","following_url":"https://api.github.com/users/sipayRT/following{/other_user}","gists_url":"https://api.github.com/users/sipayRT/gists{/gist_id}","starred_url":"https://api.github.com/users/sipayRT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sipayRT/subscriptions","organizations_url":"https://api.github.com/users/sipayRT/orgs","repos_url":"https://api.github.com/users/sipayRT/repos","events_url":"https://api.github.com/users/sipayRT/events{/privacy}","received_events_url":"https://api.github.com/users/sipayRT/received_events","type":"User","site_admin":false},"body":"значит нужно добавить это правило","created_at":"2016-09-13T10:38:54Z","updated_at":"2016-09-13T10:38:54Z","html_url":"https://github.com/gemini-testing/hermione/pull/55#discussion_r78534841","pull_request_url":"https://api.github.com/repos/gemini-testing/hermione/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/gemini-testing/hermione/pulls/comments/78534841"},"html":{"href":"https://github.com/gemini-testing/hermione/pull/55#discussion_r78534841"},"pull_request":{"href":"https://api.github.com/repos/gemini-testing/hermione/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/gemini-testing/hermione/pulls/55","id":84169192,"html_url":"https://github.com/gemini-testing/hermione/pull/55","diff_url":"https://github.com/gemini-testing/hermione/pull/55.diff","patch_url":"https://github.com/gemini-testing/hermione/pull/55.patch","issue_url":"https://api.github.com/repos/gemini-testing/hermione/issues/55","number":55,"state":"open","locked":false,"title":"Add configparser","user":{"login":"DudaGod","id":5900697,"avatar_url":"https://avatars.githubusercontent.com/u/5900697?v=3","gravatar_id":"","url":"https://api.github.com/users/DudaGod","html_url":"https://github.com/DudaGod","followers_url":"https://api.github.com/users/DudaGod/followers","following_url":"https://api.github.com/users/DudaGod/following{/other_user}","gists_url":"https://api.github.com/users/DudaGod/gists{/gist_id}","starred_url":"https://api.github.com/users/DudaGod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DudaGod/subscriptions","organizations_url":"https://api.github.com/users/DudaGod/orgs","repos_url":"https://api.github.com/users/DudaGod/repos","events_url":"https://api.github.com/users/DudaGod/events{/privacy}","received_events_url":"https://api.github.com/users/DudaGod/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-06T18:08:42Z","updated_at":"2016-09-13T10:38:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"067ff8c497164714b04b128e56613245474ec5fe","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gemini-testing/hermione/pulls/55/commits","review_comments_url":"https://api.github.com/repos/gemini-testing/hermione/pulls/55/comments","review_comment_url":"https://api.github.com/repos/gemini-testing/hermione/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gemini-testing/hermione/issues/55/comments","statuses_url":"https://api.github.com/repos/gemini-testing/hermione/statuses/7dca7fdcc6f11cf5b4db6de89f01fd650da5af17","head":{"label":"gemini-testing:add-configparser","ref":"add-configparser","sha":"7dca7fdcc6f11cf5b4db6de89f01fd650da5af17","user":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"repo":{"id":51917537,"name":"hermione","full_name":"gemini-testing/hermione","owner":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-testing/hermione","description":"Browser test runner based on mocha and wdio","fork":false,"url":"https://api.github.com/repos/gemini-testing/hermione","forks_url":"https://api.github.com/repos/gemini-testing/hermione/forks","keys_url":"https://api.github.com/repos/gemini-testing/hermione/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-testing/hermione/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-testing/hermione/teams","hooks_url":"https://api.github.com/repos/gemini-testing/hermione/hooks","issue_events_url":"https://api.github.com/repos/gemini-testing/hermione/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-testing/hermione/events","assignees_url":"https://api.github.com/repos/gemini-testing/hermione/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-testing/hermione/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-testing/hermione/tags","blobs_url":"https://api.github.com/repos/gemini-testing/hermione/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-testing/hermione/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-testing/hermione/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-testing/hermione/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-testing/hermione/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-testing/hermione/languages","stargazers_url":"https://api.github.com/repos/gemini-testing/hermione/stargazers","contributors_url":"https://api.github.com/repos/gemini-testing/hermione/contributors","subscribers_url":"https://api.github.com/repos/gemini-testing/hermione/subscribers","subscription_url":"https://api.github.com/repos/gemini-testing/hermione/subscription","commits_url":"https://api.github.com/repos/gemini-testing/hermione/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-testing/hermione/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-testing/hermione/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-testing/hermione/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-testing/hermione/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-testing/hermione/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-testing/hermione/merges","archive_url":"https://api.github.com/repos/gemini-testing/hermione/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-testing/hermione/downloads","issues_url":"https://api.github.com/repos/gemini-testing/hermione/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-testing/hermione/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-testing/hermione/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-testing/hermione/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-testing/hermione/labels{/name}","releases_url":"https://api.github.com/repos/gemini-testing/hermione/releases{/id}","deployments_url":"https://api.github.com/repos/gemini-testing/hermione/deployments","created_at":"2016-02-17T11:26:05Z","updated_at":"2016-09-12T11:06:43Z","pushed_at":"2016-09-13T10:33:09Z","git_url":"git://github.com/gemini-testing/hermione.git","ssh_url":"git@github.com:gemini-testing/hermione.git","clone_url":"https://github.com/gemini-testing/hermione.git","svn_url":"https://github.com/gemini-testing/hermione","homepage":null,"size":444,"stargazers_count":31,"watchers_count":31,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":31,"default_branch":"master"}},"base":{"label":"gemini-testing:master","ref":"master","sha":"8524559c3c82d707743c566af7f3fefb78dc5977","user":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"repo":{"id":51917537,"name":"hermione","full_name":"gemini-testing/hermione","owner":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-testing/hermione","description":"Browser test runner based on mocha and wdio","fork":false,"url":"https://api.github.com/repos/gemini-testing/hermione","forks_url":"https://api.github.com/repos/gemini-testing/hermione/forks","keys_url":"https://api.github.com/repos/gemini-testing/hermione/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-testing/hermione/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-testing/hermione/teams","hooks_url":"https://api.github.com/repos/gemini-testing/hermione/hooks","issue_events_url":"https://api.github.com/repos/gemini-testing/hermione/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-testing/hermione/events","assignees_url":"https://api.github.com/repos/gemini-testing/hermione/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-testing/hermione/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-testing/hermione/tags","blobs_url":"https://api.github.com/repos/gemini-testing/hermione/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-testing/hermione/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-testing/hermione/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-testing/hermione/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-testing/hermione/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-testing/hermione/languages","stargazers_url":"https://api.github.com/repos/gemini-testing/hermione/stargazers","contributors_url":"https://api.github.com/repos/gemini-testing/hermione/contributors","subscribers_url":"https://api.github.com/repos/gemini-testing/hermione/subscribers","subscription_url":"https://api.github.com/repos/gemini-testing/hermione/subscription","commits_url":"https://api.github.com/repos/gemini-testing/hermione/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-testing/hermione/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-testing/hermione/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-testing/hermione/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-testing/hermione/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-testing/hermione/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-testing/hermione/merges","archive_url":"https://api.github.com/repos/gemini-testing/hermione/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-testing/hermione/downloads","issues_url":"https://api.github.com/repos/gemini-testing/hermione/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-testing/hermione/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-testing/hermione/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-testing/hermione/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-testing/hermione/labels{/name}","releases_url":"https://api.github.com/repos/gemini-testing/hermione/releases{/id}","deployments_url":"https://api.github.com/repos/gemini-testing/hermione/deployments","created_at":"2016-02-17T11:26:05Z","updated_at":"2016-09-12T11:06:43Z","pushed_at":"2016-09-13T10:33:09Z","git_url":"git://github.com/gemini-testing/hermione.git","ssh_url":"git@github.com:gemini-testing/hermione.git","clone_url":"https://github.com/gemini-testing/hermione.git","svn_url":"https://github.com/gemini-testing/hermione","homepage":null,"size":444,"stargazers_count":31,"watchers_count":31,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gemini-testing/hermione/pulls/55"},"html":{"href":"https://github.com/gemini-testing/hermione/pull/55"},"issue":{"href":"https://api.github.com/repos/gemini-testing/hermione/issues/55"},"comments":{"href":"https://api.github.com/repos/gemini-testing/hermione/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/gemini-testing/hermione/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/gemini-testing/hermione/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gemini-testing/hermione/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/gemini-testing/hermione/statuses/7dca7fdcc6f11cf5b4db6de89f01fd650da5af17"}}}}
{"actor":{"display_login":"sipayRT"}}