{"action":"created","comment":{"url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/comments/71485499","id":71485499,"diff_hunk":"@@ -0,0 +1,36 @@\n+import path from 'path';\n+import ensureDirectory from '../utils/ensure-directory';\n+import { execFile } from '../utils/exec';\n+import BINARIES from '../binaries';\n+\n+\n+const DEFAULT_THUMBNAIL_WIDTH  = 240;\n+const DEFAULT_THUMBNAIL_HEIGHT = 130;\n+\n+function getThumbnailPath (imagePath) {\n+    var imageName = path.basename(imagePath);\n+    var imageDir  = path.dirname(imagePath);\n+\n+    return path.join(imageDir, 'thumbnails', imageName);\n+}\n+\n+/**\n+ * Creates a small preview image called thumbnail image for the specified image file.\n+ * @function\n+ * @async\n+ * @name generateThumbnail\n+ * @param {string} imagePath - Specifies the path to the source image, must be in PNG format.\n+ * @param {string} thumbnailPath - Specifies the path to the resulting thumbnail image, defaults to a file named same as\n+ *                                 the source file inside 'thumbnails' subdirectory of the source file directory.\n+ * @param {number} width - Specifies the width of the thumbnail image, in pixels (default is 240).\n+ * @param {number} height - Specifies the height of the thumbnail image, in pixels (default is 130).\n+ */","path":"src/api/generate-thumbnail.js","position":27,"original_position":27,"commit_id":"78ce8c82fd7be987f8b7b8bcac3e77943bd6e341","original_commit_id":"78ce8c82fd7be987f8b7b8bcac3e77943bd6e341","user":{"login":"VasilyStrelyaev","id":11459924,"avatar_url":"https://avatars.githubusercontent.com/u/11459924?v=3","gravatar_id":"","url":"https://api.github.com/users/VasilyStrelyaev","html_url":"https://github.com/VasilyStrelyaev","followers_url":"https://api.github.com/users/VasilyStrelyaev/followers","following_url":"https://api.github.com/users/VasilyStrelyaev/following{/other_user}","gists_url":"https://api.github.com/users/VasilyStrelyaev/gists{/gist_id}","starred_url":"https://api.github.com/users/VasilyStrelyaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VasilyStrelyaev/subscriptions","organizations_url":"https://api.github.com/users/VasilyStrelyaev/orgs","repos_url":"https://api.github.com/users/VasilyStrelyaev/repos","events_url":"https://api.github.com/users/VasilyStrelyaev/events{/privacy}","received_events_url":"https://api.github.com/users/VasilyStrelyaev/received_events","type":"User","site_admin":false},"body":"```\r\n/**\r\n * Creates a thumbnail image from the specified PNG image file.\r\n * @function\r\n * @async\r\n * @name generateThumbnail\r\n * @param {string} sourcePath - Specifies the path to the source image in PNG format.\r\n * @param {string} thumbnailPath - Specifies the path to the resulting thumbnail image.\r\n*                                 Defaults to '<sourcePathDirectory>/thumbnails/<sourcePathFileName>'\r\n * @param {number} width - Specifies the width of the thumbnail image, in pixels (default is 240).\r\n * @param {number} height - Specifies the height of the thumbnail image, in pixels (default is 130).\r\n */\r\n```","created_at":"2016-07-20T08:36:33Z","updated_at":"2016-07-20T08:36:33Z","html_url":"https://github.com/DevExpress/testcafe-browser-natives/pull/88#discussion_r71485499","pull_request_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/88","_links":{"self":{"href":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/comments/71485499"},"html":{"href":"https://github.com/DevExpress/testcafe-browser-natives/pull/88#discussion_r71485499"},"pull_request":{"href":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/88"}}},"pull_request":{"url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/88","id":78005859,"html_url":"https://github.com/DevExpress/testcafe-browser-natives/pull/88","diff_url":"https://github.com/DevExpress/testcafe-browser-natives/pull/88.diff","patch_url":"https://github.com/DevExpress/testcafe-browser-natives/pull/88.patch","issue_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/issues/88","number":88,"state":"open","locked":false,"title":"Implement 'generateThumbnail' method (closes #87)","user":{"login":"AndreyBelym","id":4479386,"avatar_url":"https://avatars.githubusercontent.com/u/4479386?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreyBelym","html_url":"https://github.com/AndreyBelym","followers_url":"https://api.github.com/users/AndreyBelym/followers","following_url":"https://api.github.com/users/AndreyBelym/following{/other_user}","gists_url":"https://api.github.com/users/AndreyBelym/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreyBelym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreyBelym/subscriptions","organizations_url":"https://api.github.com/users/AndreyBelym/orgs","repos_url":"https://api.github.com/users/AndreyBelym/repos","events_url":"https://api.github.com/users/AndreyBelym/events{/privacy}","received_events_url":"https://api.github.com/users/AndreyBelym/received_events","type":"User","site_admin":false},"body":"\\cc @VasilyStrelyaev @AlexanderMoskovkin @helen-dikareva ","created_at":"2016-07-19T16:15:32Z","updated_at":"2016-07-20T08:36:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2c8f4759d44ea76d858602210d5692271fc3018","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/88/commits","review_comments_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/88/comments","review_comment_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/issues/88/comments","statuses_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/statuses/78ce8c82fd7be987f8b7b8bcac3e77943bd6e341","head":{"label":"AndreyBelym:thumbnail-generation-api","ref":"thumbnail-generation-api","sha":"78ce8c82fd7be987f8b7b8bcac3e77943bd6e341","user":{"login":"AndreyBelym","id":4479386,"avatar_url":"https://avatars.githubusercontent.com/u/4479386?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreyBelym","html_url":"https://github.com/AndreyBelym","followers_url":"https://api.github.com/users/AndreyBelym/followers","following_url":"https://api.github.com/users/AndreyBelym/following{/other_user}","gists_url":"https://api.github.com/users/AndreyBelym/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreyBelym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreyBelym/subscriptions","organizations_url":"https://api.github.com/users/AndreyBelym/orgs","repos_url":"https://api.github.com/users/AndreyBelym/repos","events_url":"https://api.github.com/users/AndreyBelym/events{/privacy}","received_events_url":"https://api.github.com/users/AndreyBelym/received_events","type":"User","site_admin":false},"repo":{"id":38818258,"name":"testcafe-browser-natives","full_name":"AndreyBelym/testcafe-browser-natives","owner":{"login":"AndreyBelym","id":4479386,"avatar_url":"https://avatars.githubusercontent.com/u/4479386?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreyBelym","html_url":"https://github.com/AndreyBelym","followers_url":"https://api.github.com/users/AndreyBelym/followers","following_url":"https://api.github.com/users/AndreyBelym/following{/other_user}","gists_url":"https://api.github.com/users/AndreyBelym/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreyBelym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreyBelym/subscriptions","organizations_url":"https://api.github.com/users/AndreyBelym/orgs","repos_url":"https://api.github.com/users/AndreyBelym/repos","events_url":"https://api.github.com/users/AndreyBelym/events{/privacy}","received_events_url":"https://api.github.com/users/AndreyBelym/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AndreyBelym/testcafe-browser-natives","description":"","fork":true,"url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives","forks_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/forks","keys_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/teams","hooks_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/hooks","issue_events_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/issues/events{/number}","events_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/events","assignees_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/assignees{/user}","branches_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/branches{/branch}","tags_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/tags","blobs_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/git/refs{/sha}","trees_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/statuses/{sha}","languages_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/languages","stargazers_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/stargazers","contributors_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/contributors","subscribers_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/subscribers","subscription_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/subscription","commits_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/commits{/sha}","git_commits_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/git/commits{/sha}","comments_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/comments{/number}","issue_comment_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/issues/comments{/number}","contents_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/contents/{+path}","compare_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/merges","archive_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/downloads","issues_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/issues{/number}","pulls_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/pulls{/number}","milestones_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/milestones{/number}","notifications_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/labels{/name}","releases_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/releases{/id}","deployments_url":"https://api.github.com/repos/AndreyBelym/testcafe-browser-natives/deployments","created_at":"2015-07-09T12:14:26Z","updated_at":"2015-07-22T14:04:58Z","pushed_at":"2016-07-20T08:17:01Z","git_url":"git://github.com/AndreyBelym/testcafe-browser-natives.git","ssh_url":"git@github.com:AndreyBelym/testcafe-browser-natives.git","clone_url":"https://github.com/AndreyBelym/testcafe-browser-natives.git","svn_url":"https://github.com/AndreyBelym/testcafe-browser-natives","homepage":null,"size":576,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"DevExpress:master","ref":"master","sha":"dbd02b208ff77fed5b69cf927f7ea29cea0a4683","user":{"login":"DevExpress","id":4243232,"avatar_url":"https://avatars.githubusercontent.com/u/4243232?v=3","gravatar_id":"","url":"https://api.github.com/users/DevExpress","html_url":"https://github.com/DevExpress","followers_url":"https://api.github.com/users/DevExpress/followers","following_url":"https://api.github.com/users/DevExpress/following{/other_user}","gists_url":"https://api.github.com/users/DevExpress/gists{/gist_id}","starred_url":"https://api.github.com/users/DevExpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevExpress/subscriptions","organizations_url":"https://api.github.com/users/DevExpress/orgs","repos_url":"https://api.github.com/users/DevExpress/repos","events_url":"https://api.github.com/users/DevExpress/events{/privacy}","received_events_url":"https://api.github.com/users/DevExpress/received_events","type":"Organization","site_admin":false},"repo":{"id":38361120,"name":"testcafe-browser-natives","full_name":"DevExpress/testcafe-browser-natives","owner":{"login":"DevExpress","id":4243232,"avatar_url":"https://avatars.githubusercontent.com/u/4243232?v=3","gravatar_id":"","url":"https://api.github.com/users/DevExpress","html_url":"https://github.com/DevExpress","followers_url":"https://api.github.com/users/DevExpress/followers","following_url":"https://api.github.com/users/DevExpress/following{/other_user}","gists_url":"https://api.github.com/users/DevExpress/gists{/gist_id}","starred_url":"https://api.github.com/users/DevExpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevExpress/subscriptions","organizations_url":"https://api.github.com/users/DevExpress/orgs","repos_url":"https://api.github.com/users/DevExpress/repos","events_url":"https://api.github.com/users/DevExpress/events{/privacy}","received_events_url":"https://api.github.com/users/DevExpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DevExpress/testcafe-browser-natives","description":"","fork":false,"url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives","forks_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/forks","keys_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/teams","hooks_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/hooks","issue_events_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/issues/events{/number}","events_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/events","assignees_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/assignees{/user}","branches_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/branches{/branch}","tags_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/tags","blobs_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/git/refs{/sha}","trees_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/statuses/{sha}","languages_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/languages","stargazers_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/stargazers","contributors_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/contributors","subscribers_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/subscribers","subscription_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/subscription","commits_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/commits{/sha}","git_commits_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/git/commits{/sha}","comments_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/comments{/number}","issue_comment_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/issues/comments{/number}","contents_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/contents/{+path}","compare_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/merges","archive_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/downloads","issues_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/issues{/number}","pulls_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls{/number}","milestones_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/milestones{/number}","notifications_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/labels{/name}","releases_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/releases{/id}","deployments_url":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/deployments","created_at":"2015-07-01T09:06:41Z","updated_at":"2016-01-15T12:51:44Z","pushed_at":"2016-07-20T08:17:02Z","git_url":"git://github.com/DevExpress/testcafe-browser-natives.git","ssh_url":"git@github.com:DevExpress/testcafe-browser-natives.git","clone_url":"https://github.com/DevExpress/testcafe-browser-natives.git","svn_url":"https://github.com/DevExpress/testcafe-browser-natives","homepage":null,"size":291,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":12,"forks":8,"open_issues":12,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/88"},"html":{"href":"https://github.com/DevExpress/testcafe-browser-natives/pull/88"},"issue":{"href":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/issues/88"},"comments":{"href":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/DevExpress/testcafe-browser-natives/statuses/78ce8c82fd7be987f8b7b8bcac3e77943bd6e341"}}}}
{"actor":{"display_login":"VasilyStrelyaev"}}