{"action":"created","comment":{"url":"https://api.github.com/repos/u2i/confy/pulls/comments/70808128","id":70808128,"diff_hunk":"@@ -0,0 +1,43 @@\n+class OccupiedRangeBuilder\n+  class << self\n+    def intersection_ranges(not_free, events)\n+      events.each_with_object([]) do |event, new_not_free|\n+        not_free.each do |range|\n+          if (intersected = intersection(range, event))\n+            new_not_free << intersected\n+          end\n+        end\n+      end\n+    end\n+\n+    def occupied_ranges(rooms)\n+      not_free, first_iteration = [], true\n+      rooms.each do |_room, events|\n+        if first_iteration\n+          events.each { |n| not_free << (n.start_time..n.end_time) }\n+          first_iteration = false\n+        else\n+          break if (not_free = intersection_ranges(not_free, events)).empty?","path":"app/builders/occupied_range_builder.rb","position":20,"original_position":20,"commit_id":"1c29d538fb0843490ce50116f38d12bd8434f919","original_commit_id":"1c29d538fb0843490ce50116f38d12bd8434f919","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Convert `if` nested inside `else` to `elsif`.","created_at":"2016-07-14T13:52:45Z","updated_at":"2016-07-14T13:52:45Z","html_url":"https://github.com/u2i/confy/pull/23#discussion_r70808128","pull_request_url":"https://api.github.com/repos/u2i/confy/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/u2i/confy/pulls/comments/70808128"},"html":{"href":"https://github.com/u2i/confy/pull/23#discussion_r70808128"},"pull_request":{"href":"https://api.github.com/repos/u2i/confy/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/u2i/confy/pulls/23","id":77411897,"html_url":"https://github.com/u2i/confy/pull/23","diff_url":"https://github.com/u2i/confy/pull/23.diff","patch_url":"https://github.com/u2i/confy/pull/23.patch","issue_url":"https://api.github.com/repos/u2i/confy/issues/23","number":23,"state":"open","locked":false,"title":"Free rooms view","user":{"login":"jtkpiotr","id":11637264,"avatar_url":"https://avatars.githubusercontent.com/u/11637264?v=3","gravatar_id":"","url":"https://api.github.com/users/jtkpiotr","html_url":"https://github.com/jtkpiotr","followers_url":"https://api.github.com/users/jtkpiotr/followers","following_url":"https://api.github.com/users/jtkpiotr/following{/other_user}","gists_url":"https://api.github.com/users/jtkpiotr/gists{/gist_id}","starred_url":"https://api.github.com/users/jtkpiotr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtkpiotr/subscriptions","organizations_url":"https://api.github.com/users/jtkpiotr/orgs","repos_url":"https://api.github.com/users/jtkpiotr/repos","events_url":"https://api.github.com/users/jtkpiotr/events{/privacy}","received_events_url":"https://api.github.com/users/jtkpiotr/received_events","type":"User","site_admin":false},"body":"@pbzymek @adamzima @s1mplex @mhib @lkudyba @quirk0o ","created_at":"2016-07-14T07:35:40Z","updated_at":"2016-07-14T13:52:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ddf5f96be26e51d7d40196c914c641c0824d15b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/u2i/confy/pulls/23/commits","review_comments_url":"https://api.github.com/repos/u2i/confy/pulls/23/comments","review_comment_url":"https://api.github.com/repos/u2i/confy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/u2i/confy/issues/23/comments","statuses_url":"https://api.github.com/repos/u2i/confy/statuses/1c29d538fb0843490ce50116f38d12bd8434f919","head":{"label":"u2i:free-rooms-view","ref":"free-rooms-view","sha":"1c29d538fb0843490ce50116f38d12bd8434f919","user":{"login":"u2i","id":856377,"avatar_url":"https://avatars.githubusercontent.com/u/856377?v=3","gravatar_id":"","url":"https://api.github.com/users/u2i","html_url":"https://github.com/u2i","followers_url":"https://api.github.com/users/u2i/followers","following_url":"https://api.github.com/users/u2i/following{/other_user}","gists_url":"https://api.github.com/users/u2i/gists{/gist_id}","starred_url":"https://api.github.com/users/u2i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u2i/subscriptions","organizations_url":"https://api.github.com/users/u2i/orgs","repos_url":"https://api.github.com/users/u2i/repos","events_url":"https://api.github.com/users/u2i/events{/privacy}","received_events_url":"https://api.github.com/users/u2i/received_events","type":"Organization","site_admin":false},"repo":{"id":62560182,"name":"confy","full_name":"u2i/confy","owner":{"login":"u2i","id":856377,"avatar_url":"https://avatars.githubusercontent.com/u/856377?v=3","gravatar_id":"","url":"https://api.github.com/users/u2i","html_url":"https://github.com/u2i","followers_url":"https://api.github.com/users/u2i/followers","following_url":"https://api.github.com/users/u2i/following{/other_user}","gists_url":"https://api.github.com/users/u2i/gists{/gist_id}","starred_url":"https://api.github.com/users/u2i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u2i/subscriptions","organizations_url":"https://api.github.com/users/u2i/orgs","repos_url":"https://api.github.com/users/u2i/repos","events_url":"https://api.github.com/users/u2i/events{/privacy}","received_events_url":"https://api.github.com/users/u2i/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/u2i/confy","description":null,"fork":false,"url":"https://api.github.com/repos/u2i/confy","forks_url":"https://api.github.com/repos/u2i/confy/forks","keys_url":"https://api.github.com/repos/u2i/confy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/u2i/confy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/u2i/confy/teams","hooks_url":"https://api.github.com/repos/u2i/confy/hooks","issue_events_url":"https://api.github.com/repos/u2i/confy/issues/events{/number}","events_url":"https://api.github.com/repos/u2i/confy/events","assignees_url":"https://api.github.com/repos/u2i/confy/assignees{/user}","branches_url":"https://api.github.com/repos/u2i/confy/branches{/branch}","tags_url":"https://api.github.com/repos/u2i/confy/tags","blobs_url":"https://api.github.com/repos/u2i/confy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/u2i/confy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/u2i/confy/git/refs{/sha}","trees_url":"https://api.github.com/repos/u2i/confy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/u2i/confy/statuses/{sha}","languages_url":"https://api.github.com/repos/u2i/confy/languages","stargazers_url":"https://api.github.com/repos/u2i/confy/stargazers","contributors_url":"https://api.github.com/repos/u2i/confy/contributors","subscribers_url":"https://api.github.com/repos/u2i/confy/subscribers","subscription_url":"https://api.github.com/repos/u2i/confy/subscription","commits_url":"https://api.github.com/repos/u2i/confy/commits{/sha}","git_commits_url":"https://api.github.com/repos/u2i/confy/git/commits{/sha}","comments_url":"https://api.github.com/repos/u2i/confy/comments{/number}","issue_comment_url":"https://api.github.com/repos/u2i/confy/issues/comments{/number}","contents_url":"https://api.github.com/repos/u2i/confy/contents/{+path}","compare_url":"https://api.github.com/repos/u2i/confy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/u2i/confy/merges","archive_url":"https://api.github.com/repos/u2i/confy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/u2i/confy/downloads","issues_url":"https://api.github.com/repos/u2i/confy/issues{/number}","pulls_url":"https://api.github.com/repos/u2i/confy/pulls{/number}","milestones_url":"https://api.github.com/repos/u2i/confy/milestones{/number}","notifications_url":"https://api.github.com/repos/u2i/confy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/u2i/confy/labels{/name}","releases_url":"https://api.github.com/repos/u2i/confy/releases{/id}","deployments_url":"https://api.github.com/repos/u2i/confy/deployments","created_at":"2016-07-04T12:23:19Z","updated_at":"2016-07-04T13:24:19Z","pushed_at":"2016-07-14T13:52:11Z","git_url":"git://github.com/u2i/confy.git","ssh_url":"git@github.com:u2i/confy.git","clone_url":"https://github.com/u2i/confy.git","svn_url":"https://github.com/u2i/confy","homepage":null,"size":151,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"u2i:develop","ref":"develop","sha":"77fab82b212fd18d375092b0a3232202b1331af4","user":{"login":"u2i","id":856377,"avatar_url":"https://avatars.githubusercontent.com/u/856377?v=3","gravatar_id":"","url":"https://api.github.com/users/u2i","html_url":"https://github.com/u2i","followers_url":"https://api.github.com/users/u2i/followers","following_url":"https://api.github.com/users/u2i/following{/other_user}","gists_url":"https://api.github.com/users/u2i/gists{/gist_id}","starred_url":"https://api.github.com/users/u2i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u2i/subscriptions","organizations_url":"https://api.github.com/users/u2i/orgs","repos_url":"https://api.github.com/users/u2i/repos","events_url":"https://api.github.com/users/u2i/events{/privacy}","received_events_url":"https://api.github.com/users/u2i/received_events","type":"Organization","site_admin":false},"repo":{"id":62560182,"name":"confy","full_name":"u2i/confy","owner":{"login":"u2i","id":856377,"avatar_url":"https://avatars.githubusercontent.com/u/856377?v=3","gravatar_id":"","url":"https://api.github.com/users/u2i","html_url":"https://github.com/u2i","followers_url":"https://api.github.com/users/u2i/followers","following_url":"https://api.github.com/users/u2i/following{/other_user}","gists_url":"https://api.github.com/users/u2i/gists{/gist_id}","starred_url":"https://api.github.com/users/u2i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/u2i/subscriptions","organizations_url":"https://api.github.com/users/u2i/orgs","repos_url":"https://api.github.com/users/u2i/repos","events_url":"https://api.github.com/users/u2i/events{/privacy}","received_events_url":"https://api.github.com/users/u2i/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/u2i/confy","description":null,"fork":false,"url":"https://api.github.com/repos/u2i/confy","forks_url":"https://api.github.com/repos/u2i/confy/forks","keys_url":"https://api.github.com/repos/u2i/confy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/u2i/confy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/u2i/confy/teams","hooks_url":"https://api.github.com/repos/u2i/confy/hooks","issue_events_url":"https://api.github.com/repos/u2i/confy/issues/events{/number}","events_url":"https://api.github.com/repos/u2i/confy/events","assignees_url":"https://api.github.com/repos/u2i/confy/assignees{/user}","branches_url":"https://api.github.com/repos/u2i/confy/branches{/branch}","tags_url":"https://api.github.com/repos/u2i/confy/tags","blobs_url":"https://api.github.com/repos/u2i/confy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/u2i/confy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/u2i/confy/git/refs{/sha}","trees_url":"https://api.github.com/repos/u2i/confy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/u2i/confy/statuses/{sha}","languages_url":"https://api.github.com/repos/u2i/confy/languages","stargazers_url":"https://api.github.com/repos/u2i/confy/stargazers","contributors_url":"https://api.github.com/repos/u2i/confy/contributors","subscribers_url":"https://api.github.com/repos/u2i/confy/subscribers","subscription_url":"https://api.github.com/repos/u2i/confy/subscription","commits_url":"https://api.github.com/repos/u2i/confy/commits{/sha}","git_commits_url":"https://api.github.com/repos/u2i/confy/git/commits{/sha}","comments_url":"https://api.github.com/repos/u2i/confy/comments{/number}","issue_comment_url":"https://api.github.com/repos/u2i/confy/issues/comments{/number}","contents_url":"https://api.github.com/repos/u2i/confy/contents/{+path}","compare_url":"https://api.github.com/repos/u2i/confy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/u2i/confy/merges","archive_url":"https://api.github.com/repos/u2i/confy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/u2i/confy/downloads","issues_url":"https://api.github.com/repos/u2i/confy/issues{/number}","pulls_url":"https://api.github.com/repos/u2i/confy/pulls{/number}","milestones_url":"https://api.github.com/repos/u2i/confy/milestones{/number}","notifications_url":"https://api.github.com/repos/u2i/confy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/u2i/confy/labels{/name}","releases_url":"https://api.github.com/repos/u2i/confy/releases{/id}","deployments_url":"https://api.github.com/repos/u2i/confy/deployments","created_at":"2016-07-04T12:23:19Z","updated_at":"2016-07-04T13:24:19Z","pushed_at":"2016-07-14T13:52:11Z","git_url":"git://github.com/u2i/confy.git","ssh_url":"git@github.com:u2i/confy.git","clone_url":"https://github.com/u2i/confy.git","svn_url":"https://github.com/u2i/confy","homepage":null,"size":151,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/u2i/confy/pulls/23"},"html":{"href":"https://github.com/u2i/confy/pull/23"},"issue":{"href":"https://api.github.com/repos/u2i/confy/issues/23"},"comments":{"href":"https://api.github.com/repos/u2i/confy/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/u2i/confy/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/u2i/confy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/u2i/confy/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/u2i/confy/statuses/1c29d538fb0843490ce50116f38d12bd8434f919"}}}}
{"actor":{"display_login":"houndci-bot"}}