{"action":"created","comment":{"url":"https://api.github.com/repos/swipely/docker-api/pulls/comments/79394289","id":79394289,"diff_hunk":"@@ -141,15 +141,16 @@ def create_dir_tar(directory)\n \n   def create_relative_dir_tar(directory, output)\n     Gem::Package::TarWriter.new(output) do |tar|\n-      Find.find(directory) do |prefixed_file_name|\n-        stat = File.stat(prefixed_file_name)\n-        next unless stat.file?\n-\n-        unprefixed_file_name = prefixed_file_name[directory.length..-1]\n-        add_file_to_tar(\n-          tar, unprefixed_file_name, stat.mode, stat.size, stat.mtime\n-        ) do |tar_file|\n-          IO.copy_stream(File.open(prefixed_file_name, 'rb'), tar_file)\n+      Dir.chdir(directory) do","path":"lib/docker/util.rb","position":13,"original_position":13,"commit_id":"b399b278383f3933fa5d239aac3b2689a55d9732","original_commit_id":"b399b278383f3933fa5d239aac3b2689a55d9732","user":{"login":"tlunter","id":787998,"avatar_url":"https://avatars.githubusercontent.com/u/787998?v=3","gravatar_id":"","url":"https://api.github.com/users/tlunter","html_url":"https://github.com/tlunter","followers_url":"https://api.github.com/users/tlunter/followers","following_url":"https://api.github.com/users/tlunter/following{/other_user}","gists_url":"https://api.github.com/users/tlunter/gists{/gist_id}","starred_url":"https://api.github.com/users/tlunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlunter/subscriptions","organizations_url":"https://api.github.com/users/tlunter/orgs","repos_url":"https://api.github.com/users/tlunter/repos","events_url":"https://api.github.com/users/tlunter/events{/privacy}","received_events_url":"https://api.github.com/users/tlunter/received_events","type":"User","site_admin":false},"body":"`Dir.chdir` isn't threadsafe actually, which is why I went with the slicing approach.","created_at":"2016-09-19T13:48:26Z","updated_at":"2016-09-19T13:48:38Z","html_url":"https://github.com/swipely/docker-api/pull/433#discussion_r79394289","pull_request_url":"https://api.github.com/repos/swipely/docker-api/pulls/433","_links":{"self":{"href":"https://api.github.com/repos/swipely/docker-api/pulls/comments/79394289"},"html":{"href":"https://github.com/swipely/docker-api/pull/433#discussion_r79394289"},"pull_request":{"href":"https://api.github.com/repos/swipely/docker-api/pulls/433"}}},"pull_request":{"url":"https://api.github.com/repos/swipely/docker-api/pulls/433","id":81376753,"html_url":"https://github.com/swipely/docker-api/pull/433","diff_url":"https://github.com/swipely/docker-api/pull/433.diff","patch_url":"https://github.com/swipely/docker-api/pull/433.patch","issue_url":"https://api.github.com/repos/swipely/docker-api/issues/433","number":433,"state":"open","locked":false,"title":"simplify file name logic","user":{"login":"grosser","id":11367,"avatar_url":"https://avatars.githubusercontent.com/u/11367?v=3","gravatar_id":"","url":"https://api.github.com/users/grosser","html_url":"https://github.com/grosser","followers_url":"https://api.github.com/users/grosser/followers","following_url":"https://api.github.com/users/grosser/following{/other_user}","gists_url":"https://api.github.com/users/grosser/gists{/gist_id}","starred_url":"https://api.github.com/users/grosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grosser/subscriptions","organizations_url":"https://api.github.com/users/grosser/orgs","repos_url":"https://api.github.com/users/grosser/repos","events_url":"https://api.github.com/users/grosser/events{/privacy}","received_events_url":"https://api.github.com/users/grosser/received_events","type":"User","site_admin":false},"body":"@tlunter \r\n\r\navoid additional logic / overhead of slicing strings","created_at":"2016-08-15T21:15:27Z","updated_at":"2016-09-19T13:48:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab693204ed2f58a72fe717e0a1f66a37e301344d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/swipely/docker-api/pulls/433/commits","review_comments_url":"https://api.github.com/repos/swipely/docker-api/pulls/433/comments","review_comment_url":"https://api.github.com/repos/swipely/docker-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swipely/docker-api/issues/433/comments","statuses_url":"https://api.github.com/repos/swipely/docker-api/statuses/b399b278383f3933fa5d239aac3b2689a55d9732","head":{"label":"grosser:grosser/ignore","ref":"grosser/ignore","sha":"b399b278383f3933fa5d239aac3b2689a55d9732","user":{"login":"grosser","id":11367,"avatar_url":"https://avatars.githubusercontent.com/u/11367?v=3","gravatar_id":"","url":"https://api.github.com/users/grosser","html_url":"https://github.com/grosser","followers_url":"https://api.github.com/users/grosser/followers","following_url":"https://api.github.com/users/grosser/following{/other_user}","gists_url":"https://api.github.com/users/grosser/gists{/gist_id}","starred_url":"https://api.github.com/users/grosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grosser/subscriptions","organizations_url":"https://api.github.com/users/grosser/orgs","repos_url":"https://api.github.com/users/grosser/repos","events_url":"https://api.github.com/users/grosser/events{/privacy}","received_events_url":"https://api.github.com/users/grosser/received_events","type":"User","site_admin":false},"repo":{"id":65764807,"name":"docker-api","full_name":"grosser/docker-api","owner":{"login":"grosser","id":11367,"avatar_url":"https://avatars.githubusercontent.com/u/11367?v=3","gravatar_id":"","url":"https://api.github.com/users/grosser","html_url":"https://github.com/grosser","followers_url":"https://api.github.com/users/grosser/followers","following_url":"https://api.github.com/users/grosser/following{/other_user}","gists_url":"https://api.github.com/users/grosser/gists{/gist_id}","starred_url":"https://api.github.com/users/grosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grosser/subscriptions","organizations_url":"https://api.github.com/users/grosser/orgs","repos_url":"https://api.github.com/users/grosser/repos","events_url":"https://api.github.com/users/grosser/events{/privacy}","received_events_url":"https://api.github.com/users/grosser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grosser/docker-api","description":"A lightweight Ruby client for the Docker Remote API","fork":true,"url":"https://api.github.com/repos/grosser/docker-api","forks_url":"https://api.github.com/repos/grosser/docker-api/forks","keys_url":"https://api.github.com/repos/grosser/docker-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grosser/docker-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grosser/docker-api/teams","hooks_url":"https://api.github.com/repos/grosser/docker-api/hooks","issue_events_url":"https://api.github.com/repos/grosser/docker-api/issues/events{/number}","events_url":"https://api.github.com/repos/grosser/docker-api/events","assignees_url":"https://api.github.com/repos/grosser/docker-api/assignees{/user}","branches_url":"https://api.github.com/repos/grosser/docker-api/branches{/branch}","tags_url":"https://api.github.com/repos/grosser/docker-api/tags","blobs_url":"https://api.github.com/repos/grosser/docker-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grosser/docker-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grosser/docker-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/grosser/docker-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grosser/docker-api/statuses/{sha}","languages_url":"https://api.github.com/repos/grosser/docker-api/languages","stargazers_url":"https://api.github.com/repos/grosser/docker-api/stargazers","contributors_url":"https://api.github.com/repos/grosser/docker-api/contributors","subscribers_url":"https://api.github.com/repos/grosser/docker-api/subscribers","subscription_url":"https://api.github.com/repos/grosser/docker-api/subscription","commits_url":"https://api.github.com/repos/grosser/docker-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/grosser/docker-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/grosser/docker-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/grosser/docker-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/grosser/docker-api/contents/{+path}","compare_url":"https://api.github.com/repos/grosser/docker-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grosser/docker-api/merges","archive_url":"https://api.github.com/repos/grosser/docker-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grosser/docker-api/downloads","issues_url":"https://api.github.com/repos/grosser/docker-api/issues{/number}","pulls_url":"https://api.github.com/repos/grosser/docker-api/pulls{/number}","milestones_url":"https://api.github.com/repos/grosser/docker-api/milestones{/number}","notifications_url":"https://api.github.com/repos/grosser/docker-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grosser/docker-api/labels{/name}","releases_url":"https://api.github.com/repos/grosser/docker-api/releases{/id}","deployments_url":"https://api.github.com/repos/grosser/docker-api/deployments","created_at":"2016-08-15T21:02:17Z","updated_at":"2016-08-15T21:02:18Z","pushed_at":"2016-09-16T15:01:43Z","git_url":"git://github.com/grosser/docker-api.git","ssh_url":"git@github.com:grosser/docker-api.git","clone_url":"https://github.com/grosser/docker-api.git","svn_url":"https://github.com/grosser/docker-api","homepage":"","size":16383,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"swipely:master","ref":"master","sha":"c17433cd58ac2f08c4fa8d05ea58ad329bdad5d5","user":{"login":"swipely","id":58479,"avatar_url":"https://avatars.githubusercontent.com/u/58479?v=3","gravatar_id":"","url":"https://api.github.com/users/swipely","html_url":"https://github.com/swipely","followers_url":"https://api.github.com/users/swipely/followers","following_url":"https://api.github.com/users/swipely/following{/other_user}","gists_url":"https://api.github.com/users/swipely/gists{/gist_id}","starred_url":"https://api.github.com/users/swipely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swipely/subscriptions","organizations_url":"https://api.github.com/users/swipely/orgs","repos_url":"https://api.github.com/users/swipely/repos","events_url":"https://api.github.com/users/swipely/events{/privacy}","received_events_url":"https://api.github.com/users/swipely/received_events","type":"Organization","site_admin":false},"repo":{"id":10674058,"name":"docker-api","full_name":"swipely/docker-api","owner":{"login":"swipely","id":58479,"avatar_url":"https://avatars.githubusercontent.com/u/58479?v=3","gravatar_id":"","url":"https://api.github.com/users/swipely","html_url":"https://github.com/swipely","followers_url":"https://api.github.com/users/swipely/followers","following_url":"https://api.github.com/users/swipely/following{/other_user}","gists_url":"https://api.github.com/users/swipely/gists{/gist_id}","starred_url":"https://api.github.com/users/swipely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swipely/subscriptions","organizations_url":"https://api.github.com/users/swipely/orgs","repos_url":"https://api.github.com/users/swipely/repos","events_url":"https://api.github.com/users/swipely/events{/privacy}","received_events_url":"https://api.github.com/users/swipely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/swipely/docker-api","description":"A lightweight Ruby client for the Docker Remote API","fork":false,"url":"https://api.github.com/repos/swipely/docker-api","forks_url":"https://api.github.com/repos/swipely/docker-api/forks","keys_url":"https://api.github.com/repos/swipely/docker-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swipely/docker-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swipely/docker-api/teams","hooks_url":"https://api.github.com/repos/swipely/docker-api/hooks","issue_events_url":"https://api.github.com/repos/swipely/docker-api/issues/events{/number}","events_url":"https://api.github.com/repos/swipely/docker-api/events","assignees_url":"https://api.github.com/repos/swipely/docker-api/assignees{/user}","branches_url":"https://api.github.com/repos/swipely/docker-api/branches{/branch}","tags_url":"https://api.github.com/repos/swipely/docker-api/tags","blobs_url":"https://api.github.com/repos/swipely/docker-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swipely/docker-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swipely/docker-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/swipely/docker-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swipely/docker-api/statuses/{sha}","languages_url":"https://api.github.com/repos/swipely/docker-api/languages","stargazers_url":"https://api.github.com/repos/swipely/docker-api/stargazers","contributors_url":"https://api.github.com/repos/swipely/docker-api/contributors","subscribers_url":"https://api.github.com/repos/swipely/docker-api/subscribers","subscription_url":"https://api.github.com/repos/swipely/docker-api/subscription","commits_url":"https://api.github.com/repos/swipely/docker-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/swipely/docker-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/swipely/docker-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/swipely/docker-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/swipely/docker-api/contents/{+path}","compare_url":"https://api.github.com/repos/swipely/docker-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swipely/docker-api/merges","archive_url":"https://api.github.com/repos/swipely/docker-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swipely/docker-api/downloads","issues_url":"https://api.github.com/repos/swipely/docker-api/issues{/number}","pulls_url":"https://api.github.com/repos/swipely/docker-api/pulls{/number}","milestones_url":"https://api.github.com/repos/swipely/docker-api/milestones{/number}","notifications_url":"https://api.github.com/repos/swipely/docker-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swipely/docker-api/labels{/name}","releases_url":"https://api.github.com/repos/swipely/docker-api/releases{/id}","deployments_url":"https://api.github.com/repos/swipely/docker-api/deployments","created_at":"2013-06-13T19:29:58Z","updated_at":"2016-09-19T13:39:21Z","pushed_at":"2016-09-19T13:46:31Z","git_url":"git://github.com/swipely/docker-api.git","ssh_url":"git@github.com:swipely/docker-api.git","clone_url":"https://github.com/swipely/docker-api.git","svn_url":"https://github.com/swipely/docker-api","homepage":"","size":16964,"stargazers_count":695,"watchers_count":695,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":212,"mirror_url":null,"open_issues_count":42,"forks":212,"open_issues":42,"watchers":695,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swipely/docker-api/pulls/433"},"html":{"href":"https://github.com/swipely/docker-api/pull/433"},"issue":{"href":"https://api.github.com/repos/swipely/docker-api/issues/433"},"comments":{"href":"https://api.github.com/repos/swipely/docker-api/issues/433/comments"},"review_comments":{"href":"https://api.github.com/repos/swipely/docker-api/pulls/433/comments"},"review_comment":{"href":"https://api.github.com/repos/swipely/docker-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swipely/docker-api/pulls/433/commits"},"statuses":{"href":"https://api.github.com/repos/swipely/docker-api/statuses/b399b278383f3933fa5d239aac3b2689a55d9732"}}}}
{"actor":{"display_login":"tlunter"}}