{"action":"created","comment":{"url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/comments/205193177","pull_request_review_id":140415416,"id":205193177,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTE5MzE3Nw==","diff_hunk":"@@ -29,13 +29,45 @@ def find_by_name(name)\n   end \n   \n   def find_all_by_name(name)\n-    #find_all_by_name(name) - returns either [] or one or more matches which contain the supplied name fragment, case insensitive\n     @all.find_all do |object| \n       object.name.downcase.include?(name.downcase)\n     end \n   end \n+  \n+  def find_highest_id\n+    @all.max_by do |object|\n+      object.id \n+    end \n+  end \n+  \n+  def create(attributes)\n+    attributes[:id] = find_highest_id.id.to_i + 1\n+    mr = Merchant.new(attributes)\n+    @all << mr\n+    return mr \n+  end \n+  \n+  def update(id, attributes)\n+    merchant = find_by_id(id.to_s)\n+    merchant.attributes_hash[:name] = attributes[:name]\n+  end \n+  ","path":"lib/merchant_repository.rb","position":34,"original_position":34,"commit_id":"39e319c32f7979e279694ed2f759a4fabce3ee88","original_commit_id":"39e319c32f7979e279694ed2f759a4fabce3ee88","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","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":"Layout/TrailingWhitespace: Trailing whitespace detected.","created_at":"2018-07-25T17:19:40Z","updated_at":"2018-07-25T17:19:42Z","html_url":"https://github.com/KellyMarcilliat/black_thursday/pull/9#discussion_r205193177","pull_request_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/9","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/comments/205193177"},"html":{"href":"https://github.com/KellyMarcilliat/black_thursday/pull/9#discussion_r205193177"},"pull_request":{"href":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/9","id":203906810,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzOTA2ODEw","html_url":"https://github.com/KellyMarcilliat/black_thursday/pull/9","diff_url":"https://github.com/KellyMarcilliat/black_thursday/pull/9.diff","patch_url":"https://github.com/KellyMarcilliat/black_thursday/pull/9.patch","issue_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/issues/9","number":9,"state":"open","locked":false,"title":"Merchant rep 2","user":{"login":"KellyMarcilliat","id":25465205,"node_id":"MDQ6VXNlcjI1NDY1MjA1","avatar_url":"https://avatars0.githubusercontent.com/u/25465205?v=4","gravatar_id":"","url":"https://api.github.com/users/KellyMarcilliat","html_url":"https://github.com/KellyMarcilliat","followers_url":"https://api.github.com/users/KellyMarcilliat/followers","following_url":"https://api.github.com/users/KellyMarcilliat/following{/other_user}","gists_url":"https://api.github.com/users/KellyMarcilliat/gists{/gist_id}","starred_url":"https://api.github.com/users/KellyMarcilliat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KellyMarcilliat/subscriptions","organizations_url":"https://api.github.com/users/KellyMarcilliat/orgs","repos_url":"https://api.github.com/users/KellyMarcilliat/repos","events_url":"https://api.github.com/users/KellyMarcilliat/events{/privacy}","received_events_url":"https://api.github.com/users/KellyMarcilliat/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-25T17:19:31Z","updated_at":"2018-07-25T17:19:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bdad9a92a9ca5c2bd207a0c82af03fcb043194a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/9/commits","review_comments_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/9/comments","review_comment_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/issues/9/comments","statuses_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/statuses/39e319c32f7979e279694ed2f759a4fabce3ee88","head":{"label":"KellyMarcilliat:merchant_rep_2","ref":"merchant_rep_2","sha":"39e319c32f7979e279694ed2f759a4fabce3ee88","user":{"login":"KellyMarcilliat","id":25465205,"node_id":"MDQ6VXNlcjI1NDY1MjA1","avatar_url":"https://avatars0.githubusercontent.com/u/25465205?v=4","gravatar_id":"","url":"https://api.github.com/users/KellyMarcilliat","html_url":"https://github.com/KellyMarcilliat","followers_url":"https://api.github.com/users/KellyMarcilliat/followers","following_url":"https://api.github.com/users/KellyMarcilliat/following{/other_user}","gists_url":"https://api.github.com/users/KellyMarcilliat/gists{/gist_id}","starred_url":"https://api.github.com/users/KellyMarcilliat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KellyMarcilliat/subscriptions","organizations_url":"https://api.github.com/users/KellyMarcilliat/orgs","repos_url":"https://api.github.com/users/KellyMarcilliat/repos","events_url":"https://api.github.com/users/KellyMarcilliat/events{/privacy}","received_events_url":"https://api.github.com/users/KellyMarcilliat/received_events","type":"User","site_admin":false},"repo":{"id":141838293,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE4MzgyOTM=","name":"black_thursday","full_name":"KellyMarcilliat/black_thursday","owner":{"login":"KellyMarcilliat","id":25465205,"node_id":"MDQ6VXNlcjI1NDY1MjA1","avatar_url":"https://avatars0.githubusercontent.com/u/25465205?v=4","gravatar_id":"","url":"https://api.github.com/users/KellyMarcilliat","html_url":"https://github.com/KellyMarcilliat","followers_url":"https://api.github.com/users/KellyMarcilliat/followers","following_url":"https://api.github.com/users/KellyMarcilliat/following{/other_user}","gists_url":"https://api.github.com/users/KellyMarcilliat/gists{/gist_id}","starred_url":"https://api.github.com/users/KellyMarcilliat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KellyMarcilliat/subscriptions","organizations_url":"https://api.github.com/users/KellyMarcilliat/orgs","repos_url":"https://api.github.com/users/KellyMarcilliat/repos","events_url":"https://api.github.com/users/KellyMarcilliat/events{/privacy}","received_events_url":"https://api.github.com/users/KellyMarcilliat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KellyMarcilliat/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/KellyMarcilliat/black_thursday","forks_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/forks","keys_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/teams","hooks_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/events","assignees_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/tags","blobs_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/languages","stargazers_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/subscription","commits_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/merges","archive_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/downloads","issues_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/deployments","created_at":"2018-07-21T18:51:23Z","updated_at":"2018-07-25T16:44:47Z","pushed_at":"2018-07-25T17:19:31Z","git_url":"git://github.com/KellyMarcilliat/black_thursday.git","ssh_url":"git@github.com:KellyMarcilliat/black_thursday.git","clone_url":"https://github.com/KellyMarcilliat/black_thursday.git","svn_url":"https://github.com/KellyMarcilliat/black_thursday","homepage":null,"size":1696,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"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":0,"default_branch":"master"}},"base":{"label":"KellyMarcilliat:master","ref":"master","sha":"00b2b361ea9b80569fd7952ba8be4b387395e976","user":{"login":"KellyMarcilliat","id":25465205,"node_id":"MDQ6VXNlcjI1NDY1MjA1","avatar_url":"https://avatars0.githubusercontent.com/u/25465205?v=4","gravatar_id":"","url":"https://api.github.com/users/KellyMarcilliat","html_url":"https://github.com/KellyMarcilliat","followers_url":"https://api.github.com/users/KellyMarcilliat/followers","following_url":"https://api.github.com/users/KellyMarcilliat/following{/other_user}","gists_url":"https://api.github.com/users/KellyMarcilliat/gists{/gist_id}","starred_url":"https://api.github.com/users/KellyMarcilliat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KellyMarcilliat/subscriptions","organizations_url":"https://api.github.com/users/KellyMarcilliat/orgs","repos_url":"https://api.github.com/users/KellyMarcilliat/repos","events_url":"https://api.github.com/users/KellyMarcilliat/events{/privacy}","received_events_url":"https://api.github.com/users/KellyMarcilliat/received_events","type":"User","site_admin":false},"repo":{"id":141838293,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE4MzgyOTM=","name":"black_thursday","full_name":"KellyMarcilliat/black_thursday","owner":{"login":"KellyMarcilliat","id":25465205,"node_id":"MDQ6VXNlcjI1NDY1MjA1","avatar_url":"https://avatars0.githubusercontent.com/u/25465205?v=4","gravatar_id":"","url":"https://api.github.com/users/KellyMarcilliat","html_url":"https://github.com/KellyMarcilliat","followers_url":"https://api.github.com/users/KellyMarcilliat/followers","following_url":"https://api.github.com/users/KellyMarcilliat/following{/other_user}","gists_url":"https://api.github.com/users/KellyMarcilliat/gists{/gist_id}","starred_url":"https://api.github.com/users/KellyMarcilliat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KellyMarcilliat/subscriptions","organizations_url":"https://api.github.com/users/KellyMarcilliat/orgs","repos_url":"https://api.github.com/users/KellyMarcilliat/repos","events_url":"https://api.github.com/users/KellyMarcilliat/events{/privacy}","received_events_url":"https://api.github.com/users/KellyMarcilliat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KellyMarcilliat/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/KellyMarcilliat/black_thursday","forks_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/forks","keys_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/teams","hooks_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/events","assignees_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/tags","blobs_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/languages","stargazers_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/subscription","commits_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/merges","archive_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/downloads","issues_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/KellyMarcilliat/black_thursday/deployments","created_at":"2018-07-21T18:51:23Z","updated_at":"2018-07-25T16:44:47Z","pushed_at":"2018-07-25T17:19:31Z","git_url":"git://github.com/KellyMarcilliat/black_thursday.git","ssh_url":"git@github.com:KellyMarcilliat/black_thursday.git","clone_url":"https://github.com/KellyMarcilliat/black_thursday.git","svn_url":"https://github.com/KellyMarcilliat/black_thursday","homepage":null,"size":1696,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/9"},"html":{"href":"https://github.com/KellyMarcilliat/black_thursday/pull/9"},"issue":{"href":"https://api.github.com/repos/KellyMarcilliat/black_thursday/issues/9"},"comments":{"href":"https://api.github.com/repos/KellyMarcilliat/black_thursday/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KellyMarcilliat/black_thursday/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/KellyMarcilliat/black_thursday/statuses/39e319c32f7979e279694ed2f759a4fabce3ee88"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}