{"action":"created","comment":{"url":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/comments/60050978","id":60050978,"diff_hunk":"@@ -35,11 +37,20 @@ def initialize(dir)\n     # @param [String] uri URI\n     # @return [Pathname]  Path to the local ISO.\n     def get(uri)\n-      iso_path = @dir.join(File.basename(uri))\n-      if iso_path.exist?\n-        iso_path\n-      elsif download_to(uri, iso_path)\n-        iso_path\n+      iso_path = File.join(@dir, URI(uri).host, URI(uri).path)\n+      iso_dir = File.dirname(iso_path)\n+      if uri.include?(\"*\") || uri.include?(\"?\")\n+        # We have wildcards in the uri. So we have to remove\n+        # old ISOs before because the name could have been changed\n+        # meanwhile.\n+        Dir.entries(iso_dir).each do |filename|\n+          path = File.join(iso_dir, filename)\n+          File.delete(path) unless File.directory?(path)\n+        end","path":"lib/aytests/iso_repo.rb","position":24,"original_position":24,"commit_id":"84cb223070aec1910b5f3f8fd1841334765ecc2e","original_commit_id":"84cb223070aec1910b5f3f8fd1841334765ecc2e","user":{"login":"imobach","id":15836,"avatar_url":"https://avatars.githubusercontent.com/u/15836?v=3","gravatar_id":"","url":"https://api.github.com/users/imobach","html_url":"https://github.com/imobach","followers_url":"https://api.github.com/users/imobach/followers","following_url":"https://api.github.com/users/imobach/following{/other_user}","gists_url":"https://api.github.com/users/imobach/gists{/gist_id}","starred_url":"https://api.github.com/users/imobach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imobach/subscriptions","organizations_url":"https://api.github.com/users/imobach/orgs","repos_url":"https://api.github.com/users/imobach/repos","events_url":"https://api.github.com/users/imobach/events{/privacy}","received_events_url":"https://api.github.com/users/imobach/received_events","type":"User","site_admin":false},"body":"Oh, because `iso_path` and `iso_dir` are strings instead of pathnames:\r\n\r\n```ruby\r\niso_path = @dir.join(URI(uri).host, URI(uri).path)\r\niso_dir = iso_path.dirname\r\n```","created_at":"2016-04-18T12:46:48Z","updated_at":"2016-04-18T12:46:48Z","html_url":"https://github.com/yast/autoyast-integration-test/pull/94#discussion_r60050978","pull_request_url":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/94","_links":{"self":{"href":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/comments/60050978"},"html":{"href":"https://github.com/yast/autoyast-integration-test/pull/94#discussion_r60050978"},"pull_request":{"href":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/94"}}},"pull_request":{"url":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/94","id":66837531,"html_url":"https://github.com/yast/autoyast-integration-test/pull/94","diff_url":"https://github.com/yast/autoyast-integration-test/pull/94.diff","patch_url":"https://github.com/yast/autoyast-integration-test/pull/94.patch","issue_url":"https://api.github.com/repos/yast/autoyast-integration-test/issues/94","number":94,"state":"open","locked":false,"title":"[Review] Request from 'schubi2' @ 'yast/autoyast-integration-test/review_160418_wildcards_urls'","user":{"login":"schubi2","id":909986,"avatar_url":"https://avatars.githubusercontent.com/u/909986?v=3","gravatar_id":"","url":"https://api.github.com/users/schubi2","html_url":"https://github.com/schubi2","followers_url":"https://api.github.com/users/schubi2/followers","following_url":"https://api.github.com/users/schubi2/following{/other_user}","gists_url":"https://api.github.com/users/schubi2/gists{/gist_id}","starred_url":"https://api.github.com/users/schubi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schubi2/subscriptions","organizations_url":"https://api.github.com/users/schubi2/orgs","repos_url":"https://api.github.com/users/schubi2/repos","events_url":"https://api.github.com/users/schubi2/events{/privacy}","received_events_url":"https://api.github.com/users/schubi2/received_events","type":"User","site_admin":false},"body":"Please review the following changes:\r\n  * 84cb223 packaging\r\n  * b662003 using wildcards in pathnames\r\n\r\nAlready downloaded ISOs do not have to be checked manuallay. Wget is checking it and do not\r\ndownload if it is already existing:\r\n\r\nFile ‘dist.suse.de/install/SLE-12-SP2-UNTESTED/SLE-12-SP2-Server-DVD-x86_64-Build1415-Media1.iso’ already there; not retrieving.\r\n","created_at":"2016-04-18T11:27:14Z","updated_at":"2016-04-18T12:46:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87a0c87ac7a10c3de1a94112b4990ec40c11a0d7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/94/commits","review_comments_url":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/94/comments","review_comment_url":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yast/autoyast-integration-test/issues/94/comments","statuses_url":"https://api.github.com/repos/yast/autoyast-integration-test/statuses/84cb223070aec1910b5f3f8fd1841334765ecc2e","head":{"label":"yast:review_160418_wildcards_urls","ref":"review_160418_wildcards_urls","sha":"84cb223070aec1910b5f3f8fd1841334765ecc2e","user":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"repo":{"id":34725542,"name":"autoyast-integration-test","full_name":"yast/autoyast-integration-test","owner":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yast/autoyast-integration-test","description":"Tools for AutoYaST integration tests","fork":false,"url":"https://api.github.com/repos/yast/autoyast-integration-test","forks_url":"https://api.github.com/repos/yast/autoyast-integration-test/forks","keys_url":"https://api.github.com/repos/yast/autoyast-integration-test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/autoyast-integration-test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/autoyast-integration-test/teams","hooks_url":"https://api.github.com/repos/yast/autoyast-integration-test/hooks","issue_events_url":"https://api.github.com/repos/yast/autoyast-integration-test/issues/events{/number}","events_url":"https://api.github.com/repos/yast/autoyast-integration-test/events","assignees_url":"https://api.github.com/repos/yast/autoyast-integration-test/assignees{/user}","branches_url":"https://api.github.com/repos/yast/autoyast-integration-test/branches{/branch}","tags_url":"https://api.github.com/repos/yast/autoyast-integration-test/tags","blobs_url":"https://api.github.com/repos/yast/autoyast-integration-test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/autoyast-integration-test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/autoyast-integration-test/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/autoyast-integration-test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/autoyast-integration-test/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/autoyast-integration-test/languages","stargazers_url":"https://api.github.com/repos/yast/autoyast-integration-test/stargazers","contributors_url":"https://api.github.com/repos/yast/autoyast-integration-test/contributors","subscribers_url":"https://api.github.com/repos/yast/autoyast-integration-test/subscribers","subscription_url":"https://api.github.com/repos/yast/autoyast-integration-test/subscription","commits_url":"https://api.github.com/repos/yast/autoyast-integration-test/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/autoyast-integration-test/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/autoyast-integration-test/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/autoyast-integration-test/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/autoyast-integration-test/contents/{+path}","compare_url":"https://api.github.com/repos/yast/autoyast-integration-test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/autoyast-integration-test/merges","archive_url":"https://api.github.com/repos/yast/autoyast-integration-test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/autoyast-integration-test/downloads","issues_url":"https://api.github.com/repos/yast/autoyast-integration-test/issues{/number}","pulls_url":"https://api.github.com/repos/yast/autoyast-integration-test/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/autoyast-integration-test/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/autoyast-integration-test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/autoyast-integration-test/labels{/name}","releases_url":"https://api.github.com/repos/yast/autoyast-integration-test/releases{/id}","deployments_url":"https://api.github.com/repos/yast/autoyast-integration-test/deployments","created_at":"2015-04-28T11:02:17Z","updated_at":"2016-01-11T12:53:07Z","pushed_at":"2016-04-18T11:27:14Z","git_url":"git://github.com/yast/autoyast-integration-test.git","ssh_url":"git@github.com:yast/autoyast-integration-test.git","clone_url":"https://github.com/yast/autoyast-integration-test.git","svn_url":"https://github.com/yast/autoyast-integration-test","homepage":null,"size":926,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"yast:master","ref":"master","sha":"a7614f40d007e2e44e696401cd06efc149afe65f","user":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"repo":{"id":34725542,"name":"autoyast-integration-test","full_name":"yast/autoyast-integration-test","owner":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yast/autoyast-integration-test","description":"Tools for AutoYaST integration tests","fork":false,"url":"https://api.github.com/repos/yast/autoyast-integration-test","forks_url":"https://api.github.com/repos/yast/autoyast-integration-test/forks","keys_url":"https://api.github.com/repos/yast/autoyast-integration-test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/autoyast-integration-test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/autoyast-integration-test/teams","hooks_url":"https://api.github.com/repos/yast/autoyast-integration-test/hooks","issue_events_url":"https://api.github.com/repos/yast/autoyast-integration-test/issues/events{/number}","events_url":"https://api.github.com/repos/yast/autoyast-integration-test/events","assignees_url":"https://api.github.com/repos/yast/autoyast-integration-test/assignees{/user}","branches_url":"https://api.github.com/repos/yast/autoyast-integration-test/branches{/branch}","tags_url":"https://api.github.com/repos/yast/autoyast-integration-test/tags","blobs_url":"https://api.github.com/repos/yast/autoyast-integration-test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/autoyast-integration-test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/autoyast-integration-test/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/autoyast-integration-test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/autoyast-integration-test/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/autoyast-integration-test/languages","stargazers_url":"https://api.github.com/repos/yast/autoyast-integration-test/stargazers","contributors_url":"https://api.github.com/repos/yast/autoyast-integration-test/contributors","subscribers_url":"https://api.github.com/repos/yast/autoyast-integration-test/subscribers","subscription_url":"https://api.github.com/repos/yast/autoyast-integration-test/subscription","commits_url":"https://api.github.com/repos/yast/autoyast-integration-test/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/autoyast-integration-test/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/autoyast-integration-test/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/autoyast-integration-test/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/autoyast-integration-test/contents/{+path}","compare_url":"https://api.github.com/repos/yast/autoyast-integration-test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/autoyast-integration-test/merges","archive_url":"https://api.github.com/repos/yast/autoyast-integration-test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/autoyast-integration-test/downloads","issues_url":"https://api.github.com/repos/yast/autoyast-integration-test/issues{/number}","pulls_url":"https://api.github.com/repos/yast/autoyast-integration-test/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/autoyast-integration-test/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/autoyast-integration-test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/autoyast-integration-test/labels{/name}","releases_url":"https://api.github.com/repos/yast/autoyast-integration-test/releases{/id}","deployments_url":"https://api.github.com/repos/yast/autoyast-integration-test/deployments","created_at":"2015-04-28T11:02:17Z","updated_at":"2016-01-11T12:53:07Z","pushed_at":"2016-04-18T11:27:14Z","git_url":"git://github.com/yast/autoyast-integration-test.git","ssh_url":"git@github.com:yast/autoyast-integration-test.git","clone_url":"https://github.com/yast/autoyast-integration-test.git","svn_url":"https://github.com/yast/autoyast-integration-test","homepage":null,"size":926,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/94"},"html":{"href":"https://github.com/yast/autoyast-integration-test/pull/94"},"issue":{"href":"https://api.github.com/repos/yast/autoyast-integration-test/issues/94"},"comments":{"href":"https://api.github.com/repos/yast/autoyast-integration-test/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yast/autoyast-integration-test/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/yast/autoyast-integration-test/statuses/84cb223070aec1910b5f3f8fd1841334765ecc2e"}}}}