{"action":"created","comment":{"url":"https://api.github.com/repos/toptal/crystalball/pulls/comments/157483340","pull_request_review_id":84131179,"id":157483340,"diff_hunk":"@@ -4,30 +4,57 @@ module Crystalball\n   class MapGenerator\n     # Basic map object for storing execution maps to storage\n     class SimpleMap\n-      def initialize(storage)\n-        @storage = storage\n-        @raw_map = {}\n+      extend Forwardable\n+\n+      # Simple data object for map metadata\n+      class Metadata\n+        attr_accessor :commit, :type\n+\n+        def initialize(commit: nil, type: nil)\n+          @commit = commit\n+          @type = type\n+        end\n+\n+        def to_h\n+          {type: type, commit: commit}\n+        end\n       end\n \n-      def load\n-        self.raw_map = storage.load\n+      attr_reader :cases, :metadata\n+\n+      delegate %i[commit commit=] => :metadata\n+\n+      def initialize(storage, metadata: nil, cases: {})\n+        @storage = storage\n+        @cases = cases\n+        @metadata = Metadata.new(metadata || {type: self.class.name})\n       end\n \n       def stash(case_map)\n-        raw_map[case_map.case_uid] = case_map.coverage\n+        cases[case_map.case_uid] = case_map.coverage\n       end\n \n       def dump","path":"lib/crystalball/map_generator/simple_map.rb","position":40,"original_position":40,"commit_id":"e28085db74b6c62b1e8788563aa7ee7b10703c8e","original_commit_id":"e28085db74b6c62b1e8788563aa7ee7b10703c8e","user":{"login":"pluff","id":790802,"avatar_url":"https://avatars2.githubusercontent.com/u/790802?v=4","gravatar_id":"","url":"https://api.github.com/users/pluff","html_url":"https://github.com/pluff","followers_url":"https://api.github.com/users/pluff/followers","following_url":"https://api.github.com/users/pluff/following{/other_user}","gists_url":"https://api.github.com/users/pluff/gists{/gist_id}","starred_url":"https://api.github.com/users/pluff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pluff/subscriptions","organizations_url":"https://api.github.com/users/pluff/orgs","repos_url":"https://api.github.com/users/pluff/repos","events_url":"https://api.github.com/users/pluff/events{/privacy}","received_events_url":"https://api.github.com/users/pluff/received_events","type":"User","site_admin":false},"body":"I think we need separate ticket for that. I'll create one","created_at":"2017-12-18T13:28:10Z","updated_at":"2017-12-18T13:28:10Z","html_url":"https://github.com/toptal/crystalball/pull/16#discussion_r157483340","pull_request_url":"https://api.github.com/repos/toptal/crystalball/pulls/16","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/toptal/crystalball/pulls/comments/157483340"},"html":{"href":"https://github.com/toptal/crystalball/pull/16#discussion_r157483340"},"pull_request":{"href":"https://api.github.com/repos/toptal/crystalball/pulls/16"}},"in_reply_to_id":157470140},"pull_request":{"url":"https://api.github.com/repos/toptal/crystalball/pulls/16","id":158877476,"html_url":"https://github.com/toptal/crystalball/pull/16","diff_url":"https://github.com/toptal/crystalball/pull/16.diff","patch_url":"https://github.com/toptal/crystalball/pull/16.patch","issue_url":"https://api.github.com/repos/toptal/crystalball/issues/16","number":16,"state":"open","locked":false,"title":"[CB-11] Store commit information in execution map file","user":{"login":"pluff","id":790802,"avatar_url":"https://avatars2.githubusercontent.com/u/790802?v=4","gravatar_id":"","url":"https://api.github.com/users/pluff","html_url":"https://github.com/pluff","followers_url":"https://api.github.com/users/pluff/followers","following_url":"https://api.github.com/users/pluff/following{/other_user}","gists_url":"https://api.github.com/users/pluff/gists{/gist_id}","starred_url":"https://api.github.com/users/pluff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pluff/subscriptions","organizations_url":"https://api.github.com/users/pluff/orgs","repos_url":"https://api.github.com/users/pluff/repos","events_url":"https://api.github.com/users/pluff/events{/privacy}","received_events_url":"https://api.github.com/users/pluff/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-18T10:28:01Z","updated_at":"2017-12-18T13:28:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"057b654a743d27dbd6c7be195bc1b79fadcf9322","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/toptal/crystalball/pulls/16/commits","review_comments_url":"https://api.github.com/repos/toptal/crystalball/pulls/16/comments","review_comment_url":"https://api.github.com/repos/toptal/crystalball/pulls/comments{/number}","comments_url":"https://api.github.com/repos/toptal/crystalball/issues/16/comments","statuses_url":"https://api.github.com/repos/toptal/crystalball/statuses/e28085db74b6c62b1e8788563aa7ee7b10703c8e","head":{"label":"toptal:cb-11-store-commit-information-in-execution-map","ref":"cb-11-store-commit-information-in-execution-map","sha":"e28085db74b6c62b1e8788563aa7ee7b10703c8e","user":{"login":"toptal","id":4004158,"avatar_url":"https://avatars1.githubusercontent.com/u/4004158?v=4","gravatar_id":"","url":"https://api.github.com/users/toptal","html_url":"https://github.com/toptal","followers_url":"https://api.github.com/users/toptal/followers","following_url":"https://api.github.com/users/toptal/following{/other_user}","gists_url":"https://api.github.com/users/toptal/gists{/gist_id}","starred_url":"https://api.github.com/users/toptal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toptal/subscriptions","organizations_url":"https://api.github.com/users/toptal/orgs","repos_url":"https://api.github.com/users/toptal/repos","events_url":"https://api.github.com/users/toptal/events{/privacy}","received_events_url":"https://api.github.com/users/toptal/received_events","type":"Organization","site_admin":false},"repo":{"id":87081635,"name":"crystalball","full_name":"toptal/crystalball","owner":{"login":"toptal","id":4004158,"avatar_url":"https://avatars1.githubusercontent.com/u/4004158?v=4","gravatar_id":"","url":"https://api.github.com/users/toptal","html_url":"https://github.com/toptal","followers_url":"https://api.github.com/users/toptal/followers","following_url":"https://api.github.com/users/toptal/following{/other_user}","gists_url":"https://api.github.com/users/toptal/gists{/gist_id}","starred_url":"https://api.github.com/users/toptal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toptal/subscriptions","organizations_url":"https://api.github.com/users/toptal/orgs","repos_url":"https://api.github.com/users/toptal/repos","events_url":"https://api.github.com/users/toptal/events{/privacy}","received_events_url":"https://api.github.com/users/toptal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/toptal/crystalball","description":"Regression Test Selection library for your Ruby test suite","fork":false,"url":"https://api.github.com/repos/toptal/crystalball","forks_url":"https://api.github.com/repos/toptal/crystalball/forks","keys_url":"https://api.github.com/repos/toptal/crystalball/keys{/key_id}","collaborators_url":"https://api.github.com/repos/toptal/crystalball/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/toptal/crystalball/teams","hooks_url":"https://api.github.com/repos/toptal/crystalball/hooks","issue_events_url":"https://api.github.com/repos/toptal/crystalball/issues/events{/number}","events_url":"https://api.github.com/repos/toptal/crystalball/events","assignees_url":"https://api.github.com/repos/toptal/crystalball/assignees{/user}","branches_url":"https://api.github.com/repos/toptal/crystalball/branches{/branch}","tags_url":"https://api.github.com/repos/toptal/crystalball/tags","blobs_url":"https://api.github.com/repos/toptal/crystalball/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/toptal/crystalball/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/toptal/crystalball/git/refs{/sha}","trees_url":"https://api.github.com/repos/toptal/crystalball/git/trees{/sha}","statuses_url":"https://api.github.com/repos/toptal/crystalball/statuses/{sha}","languages_url":"https://api.github.com/repos/toptal/crystalball/languages","stargazers_url":"https://api.github.com/repos/toptal/crystalball/stargazers","contributors_url":"https://api.github.com/repos/toptal/crystalball/contributors","subscribers_url":"https://api.github.com/repos/toptal/crystalball/subscribers","subscription_url":"https://api.github.com/repos/toptal/crystalball/subscription","commits_url":"https://api.github.com/repos/toptal/crystalball/commits{/sha}","git_commits_url":"https://api.github.com/repos/toptal/crystalball/git/commits{/sha}","comments_url":"https://api.github.com/repos/toptal/crystalball/comments{/number}","issue_comment_url":"https://api.github.com/repos/toptal/crystalball/issues/comments{/number}","contents_url":"https://api.github.com/repos/toptal/crystalball/contents/{+path}","compare_url":"https://api.github.com/repos/toptal/crystalball/compare/{base}...{head}","merges_url":"https://api.github.com/repos/toptal/crystalball/merges","archive_url":"https://api.github.com/repos/toptal/crystalball/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/toptal/crystalball/downloads","issues_url":"https://api.github.com/repos/toptal/crystalball/issues{/number}","pulls_url":"https://api.github.com/repos/toptal/crystalball/pulls{/number}","milestones_url":"https://api.github.com/repos/toptal/crystalball/milestones{/number}","notifications_url":"https://api.github.com/repos/toptal/crystalball/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/toptal/crystalball/labels{/name}","releases_url":"https://api.github.com/repos/toptal/crystalball/releases{/id}","deployments_url":"https://api.github.com/repos/toptal/crystalball/deployments","created_at":"2017-04-03T14:10:50Z","updated_at":"2017-12-11T19:52:37Z","pushed_at":"2017-12-18T13:24:35Z","git_url":"git://github.com/toptal/crystalball.git","ssh_url":"git@github.com:toptal/crystalball.git","clone_url":"https://github.com/toptal/crystalball.git","svn_url":"https://github.com/toptal/crystalball","homepage":null,"size":65,"stargazers_count":16,"watchers_count":16,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":2,"open_issues":3,"watchers":16,"default_branch":"master"}},"base":{"label":"toptal:master","ref":"master","sha":"0c706c499e65a5840a37a573ad6f9f1bf4501f5c","user":{"login":"toptal","id":4004158,"avatar_url":"https://avatars1.githubusercontent.com/u/4004158?v=4","gravatar_id":"","url":"https://api.github.com/users/toptal","html_url":"https://github.com/toptal","followers_url":"https://api.github.com/users/toptal/followers","following_url":"https://api.github.com/users/toptal/following{/other_user}","gists_url":"https://api.github.com/users/toptal/gists{/gist_id}","starred_url":"https://api.github.com/users/toptal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toptal/subscriptions","organizations_url":"https://api.github.com/users/toptal/orgs","repos_url":"https://api.github.com/users/toptal/repos","events_url":"https://api.github.com/users/toptal/events{/privacy}","received_events_url":"https://api.github.com/users/toptal/received_events","type":"Organization","site_admin":false},"repo":{"id":87081635,"name":"crystalball","full_name":"toptal/crystalball","owner":{"login":"toptal","id":4004158,"avatar_url":"https://avatars1.githubusercontent.com/u/4004158?v=4","gravatar_id":"","url":"https://api.github.com/users/toptal","html_url":"https://github.com/toptal","followers_url":"https://api.github.com/users/toptal/followers","following_url":"https://api.github.com/users/toptal/following{/other_user}","gists_url":"https://api.github.com/users/toptal/gists{/gist_id}","starred_url":"https://api.github.com/users/toptal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toptal/subscriptions","organizations_url":"https://api.github.com/users/toptal/orgs","repos_url":"https://api.github.com/users/toptal/repos","events_url":"https://api.github.com/users/toptal/events{/privacy}","received_events_url":"https://api.github.com/users/toptal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/toptal/crystalball","description":"Regression Test Selection library for your Ruby test suite","fork":false,"url":"https://api.github.com/repos/toptal/crystalball","forks_url":"https://api.github.com/repos/toptal/crystalball/forks","keys_url":"https://api.github.com/repos/toptal/crystalball/keys{/key_id}","collaborators_url":"https://api.github.com/repos/toptal/crystalball/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/toptal/crystalball/teams","hooks_url":"https://api.github.com/repos/toptal/crystalball/hooks","issue_events_url":"https://api.github.com/repos/toptal/crystalball/issues/events{/number}","events_url":"https://api.github.com/repos/toptal/crystalball/events","assignees_url":"https://api.github.com/repos/toptal/crystalball/assignees{/user}","branches_url":"https://api.github.com/repos/toptal/crystalball/branches{/branch}","tags_url":"https://api.github.com/repos/toptal/crystalball/tags","blobs_url":"https://api.github.com/repos/toptal/crystalball/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/toptal/crystalball/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/toptal/crystalball/git/refs{/sha}","trees_url":"https://api.github.com/repos/toptal/crystalball/git/trees{/sha}","statuses_url":"https://api.github.com/repos/toptal/crystalball/statuses/{sha}","languages_url":"https://api.github.com/repos/toptal/crystalball/languages","stargazers_url":"https://api.github.com/repos/toptal/crystalball/stargazers","contributors_url":"https://api.github.com/repos/toptal/crystalball/contributors","subscribers_url":"https://api.github.com/repos/toptal/crystalball/subscribers","subscription_url":"https://api.github.com/repos/toptal/crystalball/subscription","commits_url":"https://api.github.com/repos/toptal/crystalball/commits{/sha}","git_commits_url":"https://api.github.com/repos/toptal/crystalball/git/commits{/sha}","comments_url":"https://api.github.com/repos/toptal/crystalball/comments{/number}","issue_comment_url":"https://api.github.com/repos/toptal/crystalball/issues/comments{/number}","contents_url":"https://api.github.com/repos/toptal/crystalball/contents/{+path}","compare_url":"https://api.github.com/repos/toptal/crystalball/compare/{base}...{head}","merges_url":"https://api.github.com/repos/toptal/crystalball/merges","archive_url":"https://api.github.com/repos/toptal/crystalball/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/toptal/crystalball/downloads","issues_url":"https://api.github.com/repos/toptal/crystalball/issues{/number}","pulls_url":"https://api.github.com/repos/toptal/crystalball/pulls{/number}","milestones_url":"https://api.github.com/repos/toptal/crystalball/milestones{/number}","notifications_url":"https://api.github.com/repos/toptal/crystalball/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/toptal/crystalball/labels{/name}","releases_url":"https://api.github.com/repos/toptal/crystalball/releases{/id}","deployments_url":"https://api.github.com/repos/toptal/crystalball/deployments","created_at":"2017-04-03T14:10:50Z","updated_at":"2017-12-11T19:52:37Z","pushed_at":"2017-12-18T13:24:35Z","git_url":"git://github.com/toptal/crystalball.git","ssh_url":"git@github.com:toptal/crystalball.git","clone_url":"https://github.com/toptal/crystalball.git","svn_url":"https://github.com/toptal/crystalball","homepage":null,"size":65,"stargazers_count":16,"watchers_count":16,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":2,"open_issues":3,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/toptal/crystalball/pulls/16"},"html":{"href":"https://github.com/toptal/crystalball/pull/16"},"issue":{"href":"https://api.github.com/repos/toptal/crystalball/issues/16"},"comments":{"href":"https://api.github.com/repos/toptal/crystalball/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/toptal/crystalball/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/toptal/crystalball/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/toptal/crystalball/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/toptal/crystalball/statuses/e28085db74b6c62b1e8788563aa7ee7b10703c8e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"pluff"}}