{"action":"created","comment":{"url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/comments/212269506","pull_request_review_id":148861584,"id":212269506,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjI2OTUwNg==","diff_hunk":"@@ -10,22 +10,23 @@ end\n \n require 'pg'\n \n+@hash = '0' * 64\n+\n task :setup do\n   print \"🎟 Setting up databases. Please standby...\\n\"\n \n-  ['blockchain', 'blockchain_test'].each do |database|\n+  %w[blockchain blockchain_test].each do |database|\n     con = PG.connect\n \n     con.exec(\"CREATE DATABASE #{database};\")\n \n-    con = PG.connect(dbname: \"#{database}\")\n+    con = PG.connect(dbname: database.to_s)\n \n     con.exec('CREATE TABLE blocks(id SERIAL PRIMARY KEY, sender CHAR(64), ' \\\n-             'receiver CHAR(64), value INT, previous_tx CHAR(64));')\n-    con.exec('INSERT INTO blocks(sender, receiver, value, previous_tx) VALUES' \\\n-     \"('0000000000000000000000000000000000000000000000000000000000000000',\" \\\n-     \"'0000000000000000000000000000000000000000000000000000000000000000',\" \\\n-     \"0, '0000000000000000000000000000000000000000000000000000000000000000');\")\n+             'receiver CHAR(64), value INT, hash CHAR(64), ' \\","path":"Rakefile","position":24,"original_position":24,"commit_id":"b42af4bf45235e1ebf3defca3f4161b1394da8f4","original_commit_id":"b42af4bf45235e1ebf3defca3f4161b1394da8f4","user":{"login":"dct-lau17","id":25831582,"node_id":"MDQ6VXNlcjI1ODMxNTgy","avatar_url":"https://avatars0.githubusercontent.com/u/25831582?v=4","gravatar_id":"","url":"https://api.github.com/users/dct-lau17","html_url":"https://github.com/dct-lau17","followers_url":"https://api.github.com/users/dct-lau17/followers","following_url":"https://api.github.com/users/dct-lau17/following{/other_user}","gists_url":"https://api.github.com/users/dct-lau17/gists{/gist_id}","starred_url":"https://api.github.com/users/dct-lau17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dct-lau17/subscriptions","organizations_url":"https://api.github.com/users/dct-lau17/orgs","repos_url":"https://api.github.com/users/dct-lau17/repos","events_url":"https://api.github.com/users/dct-lau17/events{/privacy}","received_events_url":"https://api.github.com/users/dct-lau17/received_events","type":"User","site_admin":false},"body":"nice refractor\r\n","created_at":"2018-08-23T11:10:57Z","updated_at":"2018-08-23T11:13:43Z","html_url":"https://github.com/archmagos/blockchain-backend-ruby/pull/9#discussion_r212269506","pull_request_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/9","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/comments/212269506"},"html":{"href":"https://github.com/archmagos/blockchain-backend-ruby/pull/9#discussion_r212269506"},"pull_request":{"href":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/9","id":210374138,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMzc0MTM4","html_url":"https://github.com/archmagos/blockchain-backend-ruby/pull/9","diff_url":"https://github.com/archmagos/blockchain-backend-ruby/pull/9.diff","patch_url":"https://github.com/archmagos/blockchain-backend-ruby/pull/9.patch","issue_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/issues/9","number":9,"state":"open","locked":false,"title":"MVP conditions met","user":{"login":"archmagos","id":38947438,"node_id":"MDQ6VXNlcjM4OTQ3NDM4","avatar_url":"https://avatars2.githubusercontent.com/u/38947438?v=4","gravatar_id":"","url":"https://api.github.com/users/archmagos","html_url":"https://github.com/archmagos","followers_url":"https://api.github.com/users/archmagos/followers","following_url":"https://api.github.com/users/archmagos/following{/other_user}","gists_url":"https://api.github.com/users/archmagos/gists{/gist_id}","starred_url":"https://api.github.com/users/archmagos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archmagos/subscriptions","organizations_url":"https://api.github.com/users/archmagos/orgs","repos_url":"https://api.github.com/users/archmagos/repos","events_url":"https://api.github.com/users/archmagos/events{/privacy}","received_events_url":"https://api.github.com/users/archmagos/received_events","type":"User","site_admin":false},"body":"All basic hashing/database functions work correctly\r\nBranch ready for merge into master, as our back-end MVP conditions have now been met","created_at":"2018-08-23T08:48:46Z","updated_at":"2018-08-23T11:13:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"830abe0656bcda449063560d8a51e8b6da98363d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/9/commits","review_comments_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/9/comments","review_comment_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/issues/9/comments","statuses_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/statuses/b42af4bf45235e1ebf3defca3f4161b1394da8f4","head":{"label":"archmagos:API/12/database-logic","ref":"API/12/database-logic","sha":"b42af4bf45235e1ebf3defca3f4161b1394da8f4","user":{"login":"archmagos","id":38947438,"node_id":"MDQ6VXNlcjM4OTQ3NDM4","avatar_url":"https://avatars2.githubusercontent.com/u/38947438?v=4","gravatar_id":"","url":"https://api.github.com/users/archmagos","html_url":"https://github.com/archmagos","followers_url":"https://api.github.com/users/archmagos/followers","following_url":"https://api.github.com/users/archmagos/following{/other_user}","gists_url":"https://api.github.com/users/archmagos/gists{/gist_id}","starred_url":"https://api.github.com/users/archmagos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archmagos/subscriptions","organizations_url":"https://api.github.com/users/archmagos/orgs","repos_url":"https://api.github.com/users/archmagos/repos","events_url":"https://api.github.com/users/archmagos/events{/privacy}","received_events_url":"https://api.github.com/users/archmagos/received_events","type":"User","site_admin":false},"repo":{"id":145553388,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU1NTMzODg=","name":"blockchain-backend-ruby","full_name":"archmagos/blockchain-backend-ruby","owner":{"login":"archmagos","id":38947438,"node_id":"MDQ6VXNlcjM4OTQ3NDM4","avatar_url":"https://avatars2.githubusercontent.com/u/38947438?v=4","gravatar_id":"","url":"https://api.github.com/users/archmagos","html_url":"https://github.com/archmagos","followers_url":"https://api.github.com/users/archmagos/followers","following_url":"https://api.github.com/users/archmagos/following{/other_user}","gists_url":"https://api.github.com/users/archmagos/gists{/gist_id}","starred_url":"https://api.github.com/users/archmagos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archmagos/subscriptions","organizations_url":"https://api.github.com/users/archmagos/orgs","repos_url":"https://api.github.com/users/archmagos/repos","events_url":"https://api.github.com/users/archmagos/events{/privacy}","received_events_url":"https://api.github.com/users/archmagos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/archmagos/blockchain-backend-ruby","description":"MA Week 11-12: Blockchain back-end for ticket purchase app (group project)","fork":false,"url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby","forks_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/forks","keys_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/teams","hooks_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/hooks","issue_events_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/events","assignees_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/tags","blobs_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/languages","stargazers_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/stargazers","contributors_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/contributors","subscribers_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/subscribers","subscription_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/subscription","commits_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/merges","archive_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/downloads","issues_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/labels{/name}","releases_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/deployments","created_at":"2018-08-21T11:17:46Z","updated_at":"2018-08-22T22:08:16Z","pushed_at":"2018-08-23T10:40:12Z","git_url":"git://github.com/archmagos/blockchain-backend-ruby.git","ssh_url":"git@github.com:archmagos/blockchain-backend-ruby.git","clone_url":"https://github.com/archmagos/blockchain-backend-ruby.git","svn_url":"https://github.com/archmagos/blockchain-backend-ruby","homepage":"","size":36,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"development"}},"base":{"label":"archmagos:development","ref":"development","sha":"3764d20f2440213b1efbc7405fb614bfd91c47ed","user":{"login":"archmagos","id":38947438,"node_id":"MDQ6VXNlcjM4OTQ3NDM4","avatar_url":"https://avatars2.githubusercontent.com/u/38947438?v=4","gravatar_id":"","url":"https://api.github.com/users/archmagos","html_url":"https://github.com/archmagos","followers_url":"https://api.github.com/users/archmagos/followers","following_url":"https://api.github.com/users/archmagos/following{/other_user}","gists_url":"https://api.github.com/users/archmagos/gists{/gist_id}","starred_url":"https://api.github.com/users/archmagos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archmagos/subscriptions","organizations_url":"https://api.github.com/users/archmagos/orgs","repos_url":"https://api.github.com/users/archmagos/repos","events_url":"https://api.github.com/users/archmagos/events{/privacy}","received_events_url":"https://api.github.com/users/archmagos/received_events","type":"User","site_admin":false},"repo":{"id":145553388,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU1NTMzODg=","name":"blockchain-backend-ruby","full_name":"archmagos/blockchain-backend-ruby","owner":{"login":"archmagos","id":38947438,"node_id":"MDQ6VXNlcjM4OTQ3NDM4","avatar_url":"https://avatars2.githubusercontent.com/u/38947438?v=4","gravatar_id":"","url":"https://api.github.com/users/archmagos","html_url":"https://github.com/archmagos","followers_url":"https://api.github.com/users/archmagos/followers","following_url":"https://api.github.com/users/archmagos/following{/other_user}","gists_url":"https://api.github.com/users/archmagos/gists{/gist_id}","starred_url":"https://api.github.com/users/archmagos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archmagos/subscriptions","organizations_url":"https://api.github.com/users/archmagos/orgs","repos_url":"https://api.github.com/users/archmagos/repos","events_url":"https://api.github.com/users/archmagos/events{/privacy}","received_events_url":"https://api.github.com/users/archmagos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/archmagos/blockchain-backend-ruby","description":"MA Week 11-12: Blockchain back-end for ticket purchase app (group project)","fork":false,"url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby","forks_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/forks","keys_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/teams","hooks_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/hooks","issue_events_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/events","assignees_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/tags","blobs_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/languages","stargazers_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/stargazers","contributors_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/contributors","subscribers_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/subscribers","subscription_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/subscription","commits_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/merges","archive_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/downloads","issues_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/labels{/name}","releases_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/deployments","created_at":"2018-08-21T11:17:46Z","updated_at":"2018-08-22T22:08:16Z","pushed_at":"2018-08-23T10:40:12Z","git_url":"git://github.com/archmagos/blockchain-backend-ruby.git","ssh_url":"git@github.com:archmagos/blockchain-backend-ruby.git","clone_url":"https://github.com/archmagos/blockchain-backend-ruby.git","svn_url":"https://github.com/archmagos/blockchain-backend-ruby","homepage":"","size":36,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/9"},"html":{"href":"https://github.com/archmagos/blockchain-backend-ruby/pull/9"},"issue":{"href":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/issues/9"},"comments":{"href":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/archmagos/blockchain-backend-ruby/statuses/b42af4bf45235e1ebf3defca3f4161b1394da8f4"}},"author_association":"OWNER"}}
{"actor":{"display_login":"dct-lau17"}}