{"action":"created","comment":{"url":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/comments/54923420","id":54923420,"diff_hunk":"@@ -118,13 +118,21 @@ def each(&block)\n       synchronized do\n         return if @files.empty?\n \n+        quitting = false\n         file_deleteable = []\n         # creates this array just once\n         watched_files = @files.values\n \n+        quit_proc = lambda do\n+          quitting.tap do |flag|\n+            file_deleteable.each {|f| @files.delete(f)} if flag","path":"lib/filewatch/watch.rb","position":11,"original_position":11,"commit_id":"e4033e1c802a2a1daaab1b33d2ba182f476a3ff4","original_commit_id":"e4033e1c802a2a1daaab1b33d2ba182f476a3ff4","user":{"login":"jordansissel","id":131818,"avatar_url":"https://avatars.githubusercontent.com/u/131818?v=3","gravatar_id":"","url":"https://api.github.com/users/jordansissel","html_url":"https://github.com/jordansissel","followers_url":"https://api.github.com/users/jordansissel/followers","following_url":"https://api.github.com/users/jordansissel/following{/other_user}","gists_url":"https://api.github.com/users/jordansissel/gists{/gist_id}","starred_url":"https://api.github.com/users/jordansissel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordansissel/subscriptions","organizations_url":"https://api.github.com/users/jordansissel/orgs","repos_url":"https://api.github.com/users/jordansissel/repos","events_url":"https://api.github.com/users/jordansissel/events{/privacy}","received_events_url":"https://api.github.com/users/jordansissel/received_events","type":"User","site_admin":false},"body":"oh I see, further down you use quit_proc as a \"should we quit, and also do cleanup if we are quitting\" Kind of thing. right?","created_at":"2016-03-03T18:26:04Z","updated_at":"2016-03-03T18:26:04Z","html_url":"https://github.com/jordansissel/ruby-filewatch/pull/78#discussion_r54923420","pull_request_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/comments/54923420"},"html":{"href":"https://github.com/jordansissel/ruby-filewatch/pull/78#discussion_r54923420"},"pull_request":{"href":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/78","id":61594284,"html_url":"https://github.com/jordansissel/ruby-filewatch/pull/78","diff_url":"https://github.com/jordansissel/ruby-filewatch/pull/78.diff","patch_url":"https://github.com/jordansissel/ruby-filewatch/pull/78.patch","issue_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/issues/78","number":78,"state":"open","locked":false,"title":"fix 76 - change the way that target is created; rework response to quit","user":{"login":"guyboertje","id":84912,"avatar_url":"https://avatars.githubusercontent.com/u/84912?v=3","gravatar_id":"","url":"https://api.github.com/users/guyboertje","html_url":"https://github.com/guyboertje","followers_url":"https://api.github.com/users/guyboertje/followers","following_url":"https://api.github.com/users/guyboertje/following{/other_user}","gists_url":"https://api.github.com/users/guyboertje/gists{/gist_id}","starred_url":"https://api.github.com/users/guyboertje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyboertje/subscriptions","organizations_url":"https://api.github.com/users/guyboertje/orgs","repos_url":"https://api.github.com/users/guyboertje/repos","events_url":"https://api.github.com/users/guyboertje/events{/privacy}","received_events_url":"https://api.github.com/users/guyboertje/received_events","type":"User","site_admin":false},"body":"and timing of sincedb write.","created_at":"2016-03-03T17:24:35Z","updated_at":"2016-03-03T18:26:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4912b3bf374e35cdf769ad2434687c173be66a50","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/78/commits","review_comments_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/78/comments","review_comment_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/issues/78/comments","statuses_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/statuses/e4033e1c802a2a1daaab1b33d2ba182f476a3ff4","head":{"label":"guyboertje:fix/76","ref":"fix/76","sha":"e4033e1c802a2a1daaab1b33d2ba182f476a3ff4","user":{"login":"guyboertje","id":84912,"avatar_url":"https://avatars.githubusercontent.com/u/84912?v=3","gravatar_id":"","url":"https://api.github.com/users/guyboertje","html_url":"https://github.com/guyboertje","followers_url":"https://api.github.com/users/guyboertje/followers","following_url":"https://api.github.com/users/guyboertje/following{/other_user}","gists_url":"https://api.github.com/users/guyboertje/gists{/gist_id}","starred_url":"https://api.github.com/users/guyboertje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyboertje/subscriptions","organizations_url":"https://api.github.com/users/guyboertje/orgs","repos_url":"https://api.github.com/users/guyboertje/repos","events_url":"https://api.github.com/users/guyboertje/events{/privacy}","received_events_url":"https://api.github.com/users/guyboertje/received_events","type":"User","site_admin":false},"repo":{"id":46736131,"name":"ruby-filewatch","full_name":"guyboertje/ruby-filewatch","owner":{"login":"guyboertje","id":84912,"avatar_url":"https://avatars.githubusercontent.com/u/84912?v=3","gravatar_id":"","url":"https://api.github.com/users/guyboertje","html_url":"https://github.com/guyboertje","followers_url":"https://api.github.com/users/guyboertje/followers","following_url":"https://api.github.com/users/guyboertje/following{/other_user}","gists_url":"https://api.github.com/users/guyboertje/gists{/gist_id}","starred_url":"https://api.github.com/users/guyboertje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyboertje/subscriptions","organizations_url":"https://api.github.com/users/guyboertje/orgs","repos_url":"https://api.github.com/users/guyboertje/repos","events_url":"https://api.github.com/users/guyboertje/events{/privacy}","received_events_url":"https://api.github.com/users/guyboertje/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guyboertje/ruby-filewatch","description":"ruby api for file watching and tailing.","fork":true,"url":"https://api.github.com/repos/guyboertje/ruby-filewatch","forks_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/forks","keys_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/teams","hooks_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/hooks","issue_events_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/issues/events{/number}","events_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/events","assignees_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/assignees{/user}","branches_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/branches{/branch}","tags_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/tags","blobs_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/statuses/{sha}","languages_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/languages","stargazers_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/stargazers","contributors_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/contributors","subscribers_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/subscribers","subscription_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/subscription","commits_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/contents/{+path}","compare_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/merges","archive_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/downloads","issues_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/issues{/number}","pulls_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/pulls{/number}","milestones_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/milestones{/number}","notifications_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/labels{/name}","releases_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/releases{/id}","deployments_url":"https://api.github.com/repos/guyboertje/ruby-filewatch/deployments","created_at":"2015-11-23T17:18:10Z","updated_at":"2016-01-27T20:03:12Z","pushed_at":"2016-03-03T18:09:49Z","git_url":"git://github.com/guyboertje/ruby-filewatch.git","ssh_url":"git@github.com:guyboertje/ruby-filewatch.git","clone_url":"https://github.com/guyboertje/ruby-filewatch.git","svn_url":"https://github.com/guyboertje/ruby-filewatch","homepage":"","size":247,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"jordansissel:master","ref":"master","sha":"cf60cb421d447581549c5a2f8f736e3c96d74483","user":{"login":"jordansissel","id":131818,"avatar_url":"https://avatars.githubusercontent.com/u/131818?v=3","gravatar_id":"","url":"https://api.github.com/users/jordansissel","html_url":"https://github.com/jordansissel","followers_url":"https://api.github.com/users/jordansissel/followers","following_url":"https://api.github.com/users/jordansissel/following{/other_user}","gists_url":"https://api.github.com/users/jordansissel/gists{/gist_id}","starred_url":"https://api.github.com/users/jordansissel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordansissel/subscriptions","organizations_url":"https://api.github.com/users/jordansissel/orgs","repos_url":"https://api.github.com/users/jordansissel/repos","events_url":"https://api.github.com/users/jordansissel/events{/privacy}","received_events_url":"https://api.github.com/users/jordansissel/received_events","type":"User","site_admin":false},"repo":{"id":1442359,"name":"ruby-filewatch","full_name":"jordansissel/ruby-filewatch","owner":{"login":"jordansissel","id":131818,"avatar_url":"https://avatars.githubusercontent.com/u/131818?v=3","gravatar_id":"","url":"https://api.github.com/users/jordansissel","html_url":"https://github.com/jordansissel","followers_url":"https://api.github.com/users/jordansissel/followers","following_url":"https://api.github.com/users/jordansissel/following{/other_user}","gists_url":"https://api.github.com/users/jordansissel/gists{/gist_id}","starred_url":"https://api.github.com/users/jordansissel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordansissel/subscriptions","organizations_url":"https://api.github.com/users/jordansissel/orgs","repos_url":"https://api.github.com/users/jordansissel/repos","events_url":"https://api.github.com/users/jordansissel/events{/privacy}","received_events_url":"https://api.github.com/users/jordansissel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jordansissel/ruby-filewatch","description":"ruby api for file watching and tailing.","fork":false,"url":"https://api.github.com/repos/jordansissel/ruby-filewatch","forks_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/forks","keys_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/teams","hooks_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/hooks","issue_events_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/issues/events{/number}","events_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/events","assignees_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/assignees{/user}","branches_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/branches{/branch}","tags_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/tags","blobs_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/statuses/{sha}","languages_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/languages","stargazers_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/stargazers","contributors_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/contributors","subscribers_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/subscribers","subscription_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/subscription","commits_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/contents/{+path}","compare_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/merges","archive_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/downloads","issues_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/issues{/number}","pulls_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls{/number}","milestones_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/milestones{/number}","notifications_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/labels{/name}","releases_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/releases{/id}","deployments_url":"https://api.github.com/repos/jordansissel/ruby-filewatch/deployments","created_at":"2011-03-05T05:57:20Z","updated_at":"2016-01-15T21:40:31Z","pushed_at":"2016-03-03T18:09:49Z","git_url":"git://github.com/jordansissel/ruby-filewatch.git","ssh_url":"git@github.com:jordansissel/ruby-filewatch.git","clone_url":"https://github.com/jordansissel/ruby-filewatch.git","svn_url":"https://github.com/jordansissel/ruby-filewatch","homepage":"","size":372,"stargazers_count":68,"watchers_count":68,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":24,"forks":52,"open_issues":24,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/78"},"html":{"href":"https://github.com/jordansissel/ruby-filewatch/pull/78"},"issue":{"href":"https://api.github.com/repos/jordansissel/ruby-filewatch/issues/78"},"comments":{"href":"https://api.github.com/repos/jordansissel/ruby-filewatch/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jordansissel/ruby-filewatch/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/jordansissel/ruby-filewatch/statuses/e4033e1c802a2a1daaab1b33d2ba182f476a3ff4"}}}}