{"action":"created","comment":{"url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/comments/216508549","pull_request_review_id":154005838,"id":216508549,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjUwODU0OQ==","diff_hunk":"@@ -1,56 +1,50 @@\n require_relative './merchant'\n-class MerchantRepository\n+require_relative './repository'\n+\n+class MerchantRepository < Repository\n   def initialize(filepath)\n-    @merchants = []\n+    super()\n     load_merchants(filepath)\n   end\n \n-  def all\n-    @merchants\n-  end\n-\n-  def inspect\n-    \"#<#{self.class} #{@merchants.size} rows>\"\n-  end\n-\n   def load_merchants(filepath)\n-    CSV.foreach(filepath, headers: true, header_converters: :symbol ) do |data|\n-      @merchants << Merchant.new(data)\n+    CSV.foreach(filepath, headers: true, header_converters: :symbol ) do |datum|\n+      @data << Merchant.new(datum)\n     end\n   end\n \n   def find_by_id(id)\n-    @merchants.find do |merchant|\n-      merchant.id == id\n+    @data.find do |datum|\n+      datum.id == id\n     end\n   end\n \n   def find_by_name(name)\n-    @merchants.find_all do |merchant|\n-      merchant.name.downcase.include?(name.downcase)\n+    @data.find_all do |datum|\n+      datum.name.downcase.include?(name.downcase)\n     end\n   end\n \n   def create(new_merchant)\n-    highest_id = @merchants.max_by do |merchant|\n-      merchant.id\n+    highest_id = @data.max_by do |datum|\n+      datum.id\n     end.id\n     new_merchant_id = highest_id += 1\n     new_merchant = Merchant.new(id: new_merchant_id, name: new_merchant[:name])\n-    @merchants << new_merchant\n+    @data << new_merchant\n     return new_merchant\n   end\n-require 'pry'\n+\n   def update(id, attributes)\n-    @merchants.find do |merchant|\n-      if merchant.id == id\n-      merchant.name.gsub! merchant.name, attributes[:name]\n+    @data.find do |datum|\n+      if datum.id == id","path":"lib/merchant_repository.rb","position":63,"original_position":63,"commit_id":"71ffaef3a16be16d9f47d6c82c69345313da5c45","original_commit_id":"71ffaef3a16be16d9f47d6c82c69345313da5c45","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":"Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.","created_at":"2018-09-10T23:44:57Z","updated_at":"2018-09-10T23:44:58Z","html_url":"https://github.com/mnhollandplum/black_thursday/pull/10#discussion_r216508549","pull_request_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/10","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/comments/216508549"},"html":{"href":"https://github.com/mnhollandplum/black_thursday/pull/10#discussion_r216508549"},"pull_request":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/10","id":214474623,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NDc0NjIz","html_url":"https://github.com/mnhollandplum/black_thursday/pull/10","diff_url":"https://github.com/mnhollandplum/black_thursday/pull/10.diff","patch_url":"https://github.com/mnhollandplum/black_thursday/pull/10.patch","issue_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/10","number":10,"state":"open","locked":false,"title":"refactors merch repo to align with superclass","user":{"login":"mnhollandplum","id":39295701,"node_id":"MDQ6VXNlcjM5Mjk1NzAx","avatar_url":"https://avatars1.githubusercontent.com/u/39295701?v=4","gravatar_id":"","url":"https://api.github.com/users/mnhollandplum","html_url":"https://github.com/mnhollandplum","followers_url":"https://api.github.com/users/mnhollandplum/followers","following_url":"https://api.github.com/users/mnhollandplum/following{/other_user}","gists_url":"https://api.github.com/users/mnhollandplum/gists{/gist_id}","starred_url":"https://api.github.com/users/mnhollandplum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnhollandplum/subscriptions","organizations_url":"https://api.github.com/users/mnhollandplum/orgs","repos_url":"https://api.github.com/users/mnhollandplum/repos","events_url":"https://api.github.com/users/mnhollandplum/events{/privacy}","received_events_url":"https://api.github.com/users/mnhollandplum/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-10T23:44:48Z","updated_at":"2018-09-10T23:44:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35b46841df6eb72fcd31757786e627fd5d1cbaee","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/10/commits","review_comments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/10/comments","review_comment_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/10/comments","statuses_url":"https://api.github.com/repos/mnhollandplum/black_thursday/statuses/71ffaef3a16be16d9f47d6c82c69345313da5c45","head":{"label":"mnhollandplum:refactor_merch_repo","ref":"refactor_merch_repo","sha":"71ffaef3a16be16d9f47d6c82c69345313da5c45","user":{"login":"mnhollandplum","id":39295701,"node_id":"MDQ6VXNlcjM5Mjk1NzAx","avatar_url":"https://avatars1.githubusercontent.com/u/39295701?v=4","gravatar_id":"","url":"https://api.github.com/users/mnhollandplum","html_url":"https://github.com/mnhollandplum","followers_url":"https://api.github.com/users/mnhollandplum/followers","following_url":"https://api.github.com/users/mnhollandplum/following{/other_user}","gists_url":"https://api.github.com/users/mnhollandplum/gists{/gist_id}","starred_url":"https://api.github.com/users/mnhollandplum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnhollandplum/subscriptions","organizations_url":"https://api.github.com/users/mnhollandplum/orgs","repos_url":"https://api.github.com/users/mnhollandplum/repos","events_url":"https://api.github.com/users/mnhollandplum/events{/privacy}","received_events_url":"https://api.github.com/users/mnhollandplum/received_events","type":"User","site_admin":false},"repo":{"id":147858309,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc4NTgzMDk=","name":"black_thursday","full_name":"mnhollandplum/black_thursday","owner":{"login":"mnhollandplum","id":39295701,"node_id":"MDQ6VXNlcjM5Mjk1NzAx","avatar_url":"https://avatars1.githubusercontent.com/u/39295701?v=4","gravatar_id":"","url":"https://api.github.com/users/mnhollandplum","html_url":"https://github.com/mnhollandplum","followers_url":"https://api.github.com/users/mnhollandplum/followers","following_url":"https://api.github.com/users/mnhollandplum/following{/other_user}","gists_url":"https://api.github.com/users/mnhollandplum/gists{/gist_id}","starred_url":"https://api.github.com/users/mnhollandplum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnhollandplum/subscriptions","organizations_url":"https://api.github.com/users/mnhollandplum/orgs","repos_url":"https://api.github.com/users/mnhollandplum/repos","events_url":"https://api.github.com/users/mnhollandplum/events{/privacy}","received_events_url":"https://api.github.com/users/mnhollandplum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mnhollandplum/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/mnhollandplum/black_thursday","forks_url":"https://api.github.com/repos/mnhollandplum/black_thursday/forks","keys_url":"https://api.github.com/repos/mnhollandplum/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mnhollandplum/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mnhollandplum/black_thursday/teams","hooks_url":"https://api.github.com/repos/mnhollandplum/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/mnhollandplum/black_thursday/events","assignees_url":"https://api.github.com/repos/mnhollandplum/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/mnhollandplum/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/mnhollandplum/black_thursday/tags","blobs_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mnhollandplum/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/mnhollandplum/black_thursday/languages","stargazers_url":"https://api.github.com/repos/mnhollandplum/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/mnhollandplum/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/mnhollandplum/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/mnhollandplum/black_thursday/subscription","commits_url":"https://api.github.com/repos/mnhollandplum/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/mnhollandplum/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/mnhollandplum/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mnhollandplum/black_thursday/merges","archive_url":"https://api.github.com/repos/mnhollandplum/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mnhollandplum/black_thursday/downloads","issues_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/mnhollandplum/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/mnhollandplum/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mnhollandplum/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/mnhollandplum/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/deployments","created_at":"2018-09-07T18:05:03Z","updated_at":"2018-09-10T23:42:26Z","pushed_at":"2018-09-10T23:44:48Z","git_url":"git://github.com/mnhollandplum/black_thursday.git","ssh_url":"git@github.com:mnhollandplum/black_thursday.git","clone_url":"https://github.com/mnhollandplum/black_thursday.git","svn_url":"https://github.com/mnhollandplum/black_thursday","homepage":null,"size":1701,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"mnhollandplum:master","ref":"master","sha":"487081529e4e1d1f0d4d884a467483c287e5b964","user":{"login":"mnhollandplum","id":39295701,"node_id":"MDQ6VXNlcjM5Mjk1NzAx","avatar_url":"https://avatars1.githubusercontent.com/u/39295701?v=4","gravatar_id":"","url":"https://api.github.com/users/mnhollandplum","html_url":"https://github.com/mnhollandplum","followers_url":"https://api.github.com/users/mnhollandplum/followers","following_url":"https://api.github.com/users/mnhollandplum/following{/other_user}","gists_url":"https://api.github.com/users/mnhollandplum/gists{/gist_id}","starred_url":"https://api.github.com/users/mnhollandplum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnhollandplum/subscriptions","organizations_url":"https://api.github.com/users/mnhollandplum/orgs","repos_url":"https://api.github.com/users/mnhollandplum/repos","events_url":"https://api.github.com/users/mnhollandplum/events{/privacy}","received_events_url":"https://api.github.com/users/mnhollandplum/received_events","type":"User","site_admin":false},"repo":{"id":147858309,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc4NTgzMDk=","name":"black_thursday","full_name":"mnhollandplum/black_thursday","owner":{"login":"mnhollandplum","id":39295701,"node_id":"MDQ6VXNlcjM5Mjk1NzAx","avatar_url":"https://avatars1.githubusercontent.com/u/39295701?v=4","gravatar_id":"","url":"https://api.github.com/users/mnhollandplum","html_url":"https://github.com/mnhollandplum","followers_url":"https://api.github.com/users/mnhollandplum/followers","following_url":"https://api.github.com/users/mnhollandplum/following{/other_user}","gists_url":"https://api.github.com/users/mnhollandplum/gists{/gist_id}","starred_url":"https://api.github.com/users/mnhollandplum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnhollandplum/subscriptions","organizations_url":"https://api.github.com/users/mnhollandplum/orgs","repos_url":"https://api.github.com/users/mnhollandplum/repos","events_url":"https://api.github.com/users/mnhollandplum/events{/privacy}","received_events_url":"https://api.github.com/users/mnhollandplum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mnhollandplum/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/mnhollandplum/black_thursday","forks_url":"https://api.github.com/repos/mnhollandplum/black_thursday/forks","keys_url":"https://api.github.com/repos/mnhollandplum/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mnhollandplum/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mnhollandplum/black_thursday/teams","hooks_url":"https://api.github.com/repos/mnhollandplum/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/mnhollandplum/black_thursday/events","assignees_url":"https://api.github.com/repos/mnhollandplum/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/mnhollandplum/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/mnhollandplum/black_thursday/tags","blobs_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mnhollandplum/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/mnhollandplum/black_thursday/languages","stargazers_url":"https://api.github.com/repos/mnhollandplum/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/mnhollandplum/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/mnhollandplum/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/mnhollandplum/black_thursday/subscription","commits_url":"https://api.github.com/repos/mnhollandplum/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/mnhollandplum/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/mnhollandplum/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/mnhollandplum/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mnhollandplum/black_thursday/merges","archive_url":"https://api.github.com/repos/mnhollandplum/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mnhollandplum/black_thursday/downloads","issues_url":"https://api.github.com/repos/mnhollandplum/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/mnhollandplum/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/mnhollandplum/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mnhollandplum/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/mnhollandplum/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/mnhollandplum/black_thursday/deployments","created_at":"2018-09-07T18:05:03Z","updated_at":"2018-09-10T23:42:26Z","pushed_at":"2018-09-10T23:44:48Z","git_url":"git://github.com/mnhollandplum/black_thursday.git","ssh_url":"git@github.com:mnhollandplum/black_thursday.git","clone_url":"https://github.com/mnhollandplum/black_thursday.git","svn_url":"https://github.com/mnhollandplum/black_thursday","homepage":null,"size":1701,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/10"},"html":{"href":"https://github.com/mnhollandplum/black_thursday/pull/10"},"issue":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/10"},"comments":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/mnhollandplum/black_thursday/statuses/71ffaef3a16be16d9f47d6c82c69345313da5c45"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}