{"action":"closed","number":250,"pull_request":{"url":"https://api.github.com/repos/BBC-News/wraith/pulls/250","id":32976441,"html_url":"https://github.com/BBC-News/wraith/pull/250","diff_url":"https://github.com/BBC-News/wraith/pull/250.diff","patch_url":"https://github.com/BBC-News/wraith/pull/250.patch","issue_url":"https://api.github.com/repos/BBC-News/wraith/issues/250","number":250,"state":"closed","locked":false,"title":"Support screenshot image filenames containing parentheses","user":{"login":"peruukki","id":1781172,"avatar_url":"https://avatars.githubusercontent.com/u/1781172?v=3","gravatar_id":"","url":"https://api.github.com/users/peruukki","html_url":"https://github.com/peruukki","followers_url":"https://api.github.com/users/peruukki/followers","following_url":"https://api.github.com/users/peruukki/following{/other_user}","gists_url":"https://api.github.com/users/peruukki/gists{/gist_id}","starred_url":"https://api.github.com/users/peruukki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peruukki/subscriptions","organizations_url":"https://api.github.com/users/peruukki/orgs","repos_url":"https://api.github.com/users/peruukki/repos","events_url":"https://api.github.com/users/peruukki/events{/privacy}","received_events_url":"https://api.github.com/users/peruukki/received_events","type":"User","site_admin":false},"body":"I have a website that has a page with parentheses in its URL. When running e.g. `wraith capture`, cropping the page’s screenshots and generating thumbnails fails with errors like these:\r\n\r\n```\r\ncropping images\r\nsh: -c: line 0: syntax error near unexpected token `('\r\nsh: -c: line 0: `convert shots/__programme__tutt(i)uus/1024__auraco.png -background none -extent 1024x3801 shots/__programme__tutt(i)uus/1024__auraco.png'\r\ncropping images\r\nsh: -c: line 0: syntax error near unexpected token `('\r\nsh: -c: line 0: `convert shots/__programme__tutt(i)uus/320__auraco.png -background none -extent 320x4202 shots/__programme__tutt(i)uus/320__auraco.png'\r\n...\r\nGenerating thumbnails\r\nsh: -c: line 0: syntax error near unexpected token `('\r\nsh: -c: line 0: `convert shots/__programme__tutt(i)uus/1024__auraco.png -thumbnail 200 -crop 200x200+0+0 shots/thumbnails/__programme__tutt(i)uus/1024__auraco.png'\r\nsh: -c: line 0: syntax error near unexpected token `('\r\nsh: -c: line 0: `convert shots/__programme__tutt(i)uus/320__auraco.png -thumbnail 200 -crop 200x200+0+0 shots/thumbnails/__programme__tutt(i)uus/320__auraco.png'\r\n```\r\n\r\nI solved this by escaping the screenshot filenames before passing them to shell execution. I started writing separate tests for this case too, but in the end I felt it resulted in too much (almost duplicate) test code. So I just test this using the existing tests with an adjusted filename.","created_at":"2015-04-09T17:15:32Z","updated_at":"2015-06-12T10:02:25Z","closed_at":"2015-06-12T10:02:25Z","merged_at":"2015-06-12T10:02:25Z","merge_commit_sha":"2408a795d739dbf8b1745911610560af57fb2c16","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BBC-News/wraith/pulls/250/commits","review_comments_url":"https://api.github.com/repos/BBC-News/wraith/pulls/250/comments","review_comment_url":"https://api.github.com/repos/BBC-News/wraith/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BBC-News/wraith/issues/250/comments","statuses_url":"https://api.github.com/repos/BBC-News/wraith/statuses/1c02cb86285a9f4bc7c1c510f7711eafad632fb1","head":{"label":"peruukki:escape-image-filenames","ref":"escape-image-filenames","sha":"1c02cb86285a9f4bc7c1c510f7711eafad632fb1","user":{"login":"peruukki","id":1781172,"avatar_url":"https://avatars.githubusercontent.com/u/1781172?v=3","gravatar_id":"","url":"https://api.github.com/users/peruukki","html_url":"https://github.com/peruukki","followers_url":"https://api.github.com/users/peruukki/followers","following_url":"https://api.github.com/users/peruukki/following{/other_user}","gists_url":"https://api.github.com/users/peruukki/gists{/gist_id}","starred_url":"https://api.github.com/users/peruukki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peruukki/subscriptions","organizations_url":"https://api.github.com/users/peruukki/orgs","repos_url":"https://api.github.com/users/peruukki/repos","events_url":"https://api.github.com/users/peruukki/events{/privacy}","received_events_url":"https://api.github.com/users/peruukki/received_events","type":"User","site_admin":false},"repo":{"id":33633887,"name":"wraith","full_name":"peruukki/wraith","owner":{"login":"peruukki","id":1781172,"avatar_url":"https://avatars.githubusercontent.com/u/1781172?v=3","gravatar_id":"","url":"https://api.github.com/users/peruukki","html_url":"https://github.com/peruukki","followers_url":"https://api.github.com/users/peruukki/followers","following_url":"https://api.github.com/users/peruukki/following{/other_user}","gists_url":"https://api.github.com/users/peruukki/gists{/gist_id}","starred_url":"https://api.github.com/users/peruukki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peruukki/subscriptions","organizations_url":"https://api.github.com/users/peruukki/orgs","repos_url":"https://api.github.com/users/peruukki/repos","events_url":"https://api.github.com/users/peruukki/events{/privacy}","received_events_url":"https://api.github.com/users/peruukki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peruukki/wraith","description":"Wraith — A responsive screenshot comparison tool","fork":true,"url":"https://api.github.com/repos/peruukki/wraith","forks_url":"https://api.github.com/repos/peruukki/wraith/forks","keys_url":"https://api.github.com/repos/peruukki/wraith/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peruukki/wraith/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peruukki/wraith/teams","hooks_url":"https://api.github.com/repos/peruukki/wraith/hooks","issue_events_url":"https://api.github.com/repos/peruukki/wraith/issues/events{/number}","events_url":"https://api.github.com/repos/peruukki/wraith/events","assignees_url":"https://api.github.com/repos/peruukki/wraith/assignees{/user}","branches_url":"https://api.github.com/repos/peruukki/wraith/branches{/branch}","tags_url":"https://api.github.com/repos/peruukki/wraith/tags","blobs_url":"https://api.github.com/repos/peruukki/wraith/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peruukki/wraith/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peruukki/wraith/git/refs{/sha}","trees_url":"https://api.github.com/repos/peruukki/wraith/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peruukki/wraith/statuses/{sha}","languages_url":"https://api.github.com/repos/peruukki/wraith/languages","stargazers_url":"https://api.github.com/repos/peruukki/wraith/stargazers","contributors_url":"https://api.github.com/repos/peruukki/wraith/contributors","subscribers_url":"https://api.github.com/repos/peruukki/wraith/subscribers","subscription_url":"https://api.github.com/repos/peruukki/wraith/subscription","commits_url":"https://api.github.com/repos/peruukki/wraith/commits{/sha}","git_commits_url":"https://api.github.com/repos/peruukki/wraith/git/commits{/sha}","comments_url":"https://api.github.com/repos/peruukki/wraith/comments{/number}","issue_comment_url":"https://api.github.com/repos/peruukki/wraith/issues/comments{/number}","contents_url":"https://api.github.com/repos/peruukki/wraith/contents/{+path}","compare_url":"https://api.github.com/repos/peruukki/wraith/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peruukki/wraith/merges","archive_url":"https://api.github.com/repos/peruukki/wraith/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peruukki/wraith/downloads","issues_url":"https://api.github.com/repos/peruukki/wraith/issues{/number}","pulls_url":"https://api.github.com/repos/peruukki/wraith/pulls{/number}","milestones_url":"https://api.github.com/repos/peruukki/wraith/milestones{/number}","notifications_url":"https://api.github.com/repos/peruukki/wraith/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peruukki/wraith/labels{/name}","releases_url":"https://api.github.com/repos/peruukki/wraith/releases{/id}","created_at":"2015-04-08T21:45:08Z","updated_at":"2015-04-12T17:34:51Z","pushed_at":"2015-05-19T21:18:41Z","git_url":"git://github.com/peruukki/wraith.git","ssh_url":"git@github.com:peruukki/wraith.git","clone_url":"https://github.com/peruukki/wraith.git","svn_url":"https://github.com/peruukki/wraith","homepage":"http://bbc-news.github.io/wraith/index.html","size":1837,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BBC-News:master","ref":"master","sha":"878660e378d79183f28b8ac1c40ec32fb4a78fa4","user":{"login":"BBC-News","id":1401475,"avatar_url":"https://avatars.githubusercontent.com/u/1401475?v=3","gravatar_id":"","url":"https://api.github.com/users/BBC-News","html_url":"https://github.com/BBC-News","followers_url":"https://api.github.com/users/BBC-News/followers","following_url":"https://api.github.com/users/BBC-News/following{/other_user}","gists_url":"https://api.github.com/users/BBC-News/gists{/gist_id}","starred_url":"https://api.github.com/users/BBC-News/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBC-News/subscriptions","organizations_url":"https://api.github.com/users/BBC-News/orgs","repos_url":"https://api.github.com/users/BBC-News/repos","events_url":"https://api.github.com/users/BBC-News/events{/privacy}","received_events_url":"https://api.github.com/users/BBC-News/received_events","type":"Organization","site_admin":false},"repo":{"id":7777332,"name":"wraith","full_name":"BBC-News/wraith","owner":{"login":"BBC-News","id":1401475,"avatar_url":"https://avatars.githubusercontent.com/u/1401475?v=3","gravatar_id":"","url":"https://api.github.com/users/BBC-News","html_url":"https://github.com/BBC-News","followers_url":"https://api.github.com/users/BBC-News/followers","following_url":"https://api.github.com/users/BBC-News/following{/other_user}","gists_url":"https://api.github.com/users/BBC-News/gists{/gist_id}","starred_url":"https://api.github.com/users/BBC-News/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBC-News/subscriptions","organizations_url":"https://api.github.com/users/BBC-News/orgs","repos_url":"https://api.github.com/users/BBC-News/repos","events_url":"https://api.github.com/users/BBC-News/events{/privacy}","received_events_url":"https://api.github.com/users/BBC-News/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BBC-News/wraith","description":"Wraith — A responsive screenshot comparison tool","fork":false,"url":"https://api.github.com/repos/BBC-News/wraith","forks_url":"https://api.github.com/repos/BBC-News/wraith/forks","keys_url":"https://api.github.com/repos/BBC-News/wraith/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BBC-News/wraith/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BBC-News/wraith/teams","hooks_url":"https://api.github.com/repos/BBC-News/wraith/hooks","issue_events_url":"https://api.github.com/repos/BBC-News/wraith/issues/events{/number}","events_url":"https://api.github.com/repos/BBC-News/wraith/events","assignees_url":"https://api.github.com/repos/BBC-News/wraith/assignees{/user}","branches_url":"https://api.github.com/repos/BBC-News/wraith/branches{/branch}","tags_url":"https://api.github.com/repos/BBC-News/wraith/tags","blobs_url":"https://api.github.com/repos/BBC-News/wraith/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BBC-News/wraith/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BBC-News/wraith/git/refs{/sha}","trees_url":"https://api.github.com/repos/BBC-News/wraith/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BBC-News/wraith/statuses/{sha}","languages_url":"https://api.github.com/repos/BBC-News/wraith/languages","stargazers_url":"https://api.github.com/repos/BBC-News/wraith/stargazers","contributors_url":"https://api.github.com/repos/BBC-News/wraith/contributors","subscribers_url":"https://api.github.com/repos/BBC-News/wraith/subscribers","subscription_url":"https://api.github.com/repos/BBC-News/wraith/subscription","commits_url":"https://api.github.com/repos/BBC-News/wraith/commits{/sha}","git_commits_url":"https://api.github.com/repos/BBC-News/wraith/git/commits{/sha}","comments_url":"https://api.github.com/repos/BBC-News/wraith/comments{/number}","issue_comment_url":"https://api.github.com/repos/BBC-News/wraith/issues/comments{/number}","contents_url":"https://api.github.com/repos/BBC-News/wraith/contents/{+path}","compare_url":"https://api.github.com/repos/BBC-News/wraith/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BBC-News/wraith/merges","archive_url":"https://api.github.com/repos/BBC-News/wraith/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BBC-News/wraith/downloads","issues_url":"https://api.github.com/repos/BBC-News/wraith/issues{/number}","pulls_url":"https://api.github.com/repos/BBC-News/wraith/pulls{/number}","milestones_url":"https://api.github.com/repos/BBC-News/wraith/milestones{/number}","notifications_url":"https://api.github.com/repos/BBC-News/wraith/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BBC-News/wraith/labels{/name}","releases_url":"https://api.github.com/repos/BBC-News/wraith/releases{/id}","created_at":"2013-01-23T15:26:31Z","updated_at":"2015-06-12T00:32:51Z","pushed_at":"2015-06-12T10:02:25Z","git_url":"git://github.com/BBC-News/wraith.git","ssh_url":"git@github.com:BBC-News/wraith.git","clone_url":"https://github.com/BBC-News/wraith.git","svn_url":"https://github.com/BBC-News/wraith","homepage":"http://bbc-news.github.io/wraith/index.html","size":116930,"stargazers_count":3001,"watchers_count":3001,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":164,"mirror_url":null,"open_issues_count":8,"forks":164,"open_issues":8,"watchers":3001,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BBC-News/wraith/pulls/250"},"html":{"href":"https://github.com/BBC-News/wraith/pull/250"},"issue":{"href":"https://api.github.com/repos/BBC-News/wraith/issues/250"},"comments":{"href":"https://api.github.com/repos/BBC-News/wraith/issues/250/comments"},"review_comments":{"href":"https://api.github.com/repos/BBC-News/wraith/pulls/250/comments"},"review_comment":{"href":"https://api.github.com/repos/BBC-News/wraith/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BBC-News/wraith/pulls/250/commits"},"statuses":{"href":"https://api.github.com/repos/BBC-News/wraith/statuses/1c02cb86285a9f4bc7c1c510f7711eafad632fb1"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"DaveBlooman","id":1492067,"avatar_url":"https://avatars.githubusercontent.com/u/1492067?v=3","gravatar_id":"","url":"https://api.github.com/users/DaveBlooman","html_url":"https://github.com/DaveBlooman","followers_url":"https://api.github.com/users/DaveBlooman/followers","following_url":"https://api.github.com/users/DaveBlooman/following{/other_user}","gists_url":"https://api.github.com/users/DaveBlooman/gists{/gist_id}","starred_url":"https://api.github.com/users/DaveBlooman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaveBlooman/subscriptions","organizations_url":"https://api.github.com/users/DaveBlooman/orgs","repos_url":"https://api.github.com/users/DaveBlooman/repos","events_url":"https://api.github.com/users/DaveBlooman/events{/privacy}","received_events_url":"https://api.github.com/users/DaveBlooman/received_events","type":"User","site_admin":false},"comments":6,"review_comments":1,"commits":1,"additions":10,"deletions":6,"changed_files":5}}