{"action":"created","comment":{"url":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/comments/75585851","id":75585851,"diff_hunk":"@@ -11,44 +11,36 @@ def initialize(contents)\n \n   def add_item(params)\n     contents[params[:property_id].to_s] = { starting_date: params[:starting_date],\n-                                            end_date: params[:end_date],\n-                                            occupancy: params[:occupancy] }\n-  end\n+      end_date: params[:end_date],\n+      occupancy: params[:occupancy] }\n+    end\n \n-  def count_of(item_id)\n-    contents[item_id.to_s]\n-  end\n+    def count_of(item_id)\n+      contents[item_id.to_s]\n+    end\n \n-  def total\n-    contents.keys.count\n-  end\n+    def total\n+      contents.keys.count\n+    end\n \n-  def find_items\n-    contents.map do |id, data|\n-      CartItem.new(id, data[\"occupancy\"], data[\"starting_date\"], data[\"end_date\"])\n+    def find_items\n+      contents.map do |id, data|\n+        CartItem.new(id, data[\"occupancy\"], data[\"starting_date\"], data[\"end_date\"])\n+      end\n     end\n-  end\n \n-  # def find_items\n-  #   contents.keys.map do |id|\n-  #     Property.find(id)\n-  #   end\n-  # end\n-\n-  def total_price\n-    contents.map do |id, quantity|\n-      item = Property.find(id)\n-      item.price * quantity\n-    end.sum.to_f\n-  end\n+    def total_price\n+      find_items.map do |cart_item|\n+        cart_item.subtotal\n+      end.sum\n+    end\n \n-  def delete_item(item_id)\n-    contents[item_id.to_s] -= 1\n-    contents.delete_if { |id, quantity| quantity == 0 }\n-  end\n+    def delete_item(item_id)\n+      contents[item_id.to_s] -= 1\n+      contents.delete_if { |id, quantity| quantity == 0 }\n+    end\n \n-  def increment_quantity_by\n-    content[item_id.to_s] += update\n+    def increment_quantity_by","path":"app/models/cart.rb","position":64,"original_position":64,"commit_id":"690a7afc179d6985c1fe757068c728a78461e254","original_commit_id":"690a7afc179d6985c1fe757068c728a78461e254","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":"Inconsistent indentation detected.","created_at":"2016-08-20T22:35:25Z","updated_at":"2016-08-20T22:35:25Z","html_url":"https://github.com/Yoyo2Code/the_pivot/pull/48#discussion_r75585851","pull_request_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/comments/75585851"},"html":{"href":"https://github.com/Yoyo2Code/the_pivot/pull/48#discussion_r75585851"},"pull_request":{"href":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/48","id":82091424,"html_url":"https://github.com/Yoyo2Code/the_pivot/pull/48","diff_url":"https://github.com/Yoyo2Code/the_pivot/pull/48.diff","patch_url":"https://github.com/Yoyo2Code/the_pivot/pull/48.patch","issue_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/issues/48","number":48,"state":"open","locked":false,"title":"closes #10","user":{"login":"Automatic365","id":10931097,"avatar_url":"https://avatars.githubusercontent.com/u/10931097?v=3","gravatar_id":"","url":"https://api.github.com/users/Automatic365","html_url":"https://github.com/Automatic365","followers_url":"https://api.github.com/users/Automatic365/followers","following_url":"https://api.github.com/users/Automatic365/following{/other_user}","gists_url":"https://api.github.com/users/Automatic365/gists{/gist_id}","starred_url":"https://api.github.com/users/Automatic365/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automatic365/subscriptions","organizations_url":"https://api.github.com/users/Automatic365/orgs","repos_url":"https://api.github.com/users/Automatic365/repos","events_url":"https://api.github.com/users/Automatic365/events{/privacy}","received_events_url":"https://api.github.com/users/Automatic365/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-08-20T22:35:19Z","updated_at":"2016-08-20T22:35:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1100640fe3c2cb9d78776cb8e61348f61b2f8bf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/48/commits","review_comments_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/48/comments","review_comment_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/issues/48/comments","statuses_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/statuses/690a7afc179d6985c1fe757068c728a78461e254","head":{"label":"Yoyo2Code:visitor_can_add_multiple_items_to_cart","ref":"visitor_can_add_multiple_items_to_cart","sha":"690a7afc179d6985c1fe757068c728a78461e254","user":{"login":"Yoyo2Code","id":16968035,"avatar_url":"https://avatars.githubusercontent.com/u/16968035?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoyo2Code","html_url":"https://github.com/Yoyo2Code","followers_url":"https://api.github.com/users/Yoyo2Code/followers","following_url":"https://api.github.com/users/Yoyo2Code/following{/other_user}","gists_url":"https://api.github.com/users/Yoyo2Code/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoyo2Code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoyo2Code/subscriptions","organizations_url":"https://api.github.com/users/Yoyo2Code/orgs","repos_url":"https://api.github.com/users/Yoyo2Code/repos","events_url":"https://api.github.com/users/Yoyo2Code/events{/privacy}","received_events_url":"https://api.github.com/users/Yoyo2Code/received_events","type":"User","site_admin":false},"repo":{"id":65760106,"name":"the_pivot","full_name":"Yoyo2Code/the_pivot","owner":{"login":"Yoyo2Code","id":16968035,"avatar_url":"https://avatars.githubusercontent.com/u/16968035?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoyo2Code","html_url":"https://github.com/Yoyo2Code","followers_url":"https://api.github.com/users/Yoyo2Code/followers","following_url":"https://api.github.com/users/Yoyo2Code/following{/other_user}","gists_url":"https://api.github.com/users/Yoyo2Code/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoyo2Code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoyo2Code/subscriptions","organizations_url":"https://api.github.com/users/Yoyo2Code/orgs","repos_url":"https://api.github.com/users/Yoyo2Code/repos","events_url":"https://api.github.com/users/Yoyo2Code/events{/privacy}","received_events_url":"https://api.github.com/users/Yoyo2Code/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Yoyo2Code/the_pivot","description":null,"fork":false,"url":"https://api.github.com/repos/Yoyo2Code/the_pivot","forks_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/forks","keys_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/teams","hooks_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/hooks","issue_events_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/issues/events{/number}","events_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/events","assignees_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/assignees{/user}","branches_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/branches{/branch}","tags_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/tags","blobs_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/statuses/{sha}","languages_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/languages","stargazers_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/stargazers","contributors_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/contributors","subscribers_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/subscribers","subscription_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/subscription","commits_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/contents/{+path}","compare_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/merges","archive_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/downloads","issues_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/issues{/number}","pulls_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls{/number}","milestones_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/milestones{/number}","notifications_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/labels{/name}","releases_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/releases{/id}","deployments_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/deployments","created_at":"2016-08-15T19:47:19Z","updated_at":"2016-08-18T16:12:17Z","pushed_at":"2016-08-20T22:35:19Z","git_url":"git://github.com/Yoyo2Code/the_pivot.git","ssh_url":"git@github.com:Yoyo2Code/the_pivot.git","clone_url":"https://github.com/Yoyo2Code/the_pivot.git","svn_url":"https://github.com/Yoyo2Code/the_pivot","homepage":null,"size":1880,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":24,"forks":0,"open_issues":24,"watchers":0,"default_branch":"master"}},"base":{"label":"Yoyo2Code:development","ref":"development","sha":"7cb9d637a009e2b85cb7d0b8c7a1a166e161bd16","user":{"login":"Yoyo2Code","id":16968035,"avatar_url":"https://avatars.githubusercontent.com/u/16968035?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoyo2Code","html_url":"https://github.com/Yoyo2Code","followers_url":"https://api.github.com/users/Yoyo2Code/followers","following_url":"https://api.github.com/users/Yoyo2Code/following{/other_user}","gists_url":"https://api.github.com/users/Yoyo2Code/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoyo2Code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoyo2Code/subscriptions","organizations_url":"https://api.github.com/users/Yoyo2Code/orgs","repos_url":"https://api.github.com/users/Yoyo2Code/repos","events_url":"https://api.github.com/users/Yoyo2Code/events{/privacy}","received_events_url":"https://api.github.com/users/Yoyo2Code/received_events","type":"User","site_admin":false},"repo":{"id":65760106,"name":"the_pivot","full_name":"Yoyo2Code/the_pivot","owner":{"login":"Yoyo2Code","id":16968035,"avatar_url":"https://avatars.githubusercontent.com/u/16968035?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoyo2Code","html_url":"https://github.com/Yoyo2Code","followers_url":"https://api.github.com/users/Yoyo2Code/followers","following_url":"https://api.github.com/users/Yoyo2Code/following{/other_user}","gists_url":"https://api.github.com/users/Yoyo2Code/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoyo2Code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoyo2Code/subscriptions","organizations_url":"https://api.github.com/users/Yoyo2Code/orgs","repos_url":"https://api.github.com/users/Yoyo2Code/repos","events_url":"https://api.github.com/users/Yoyo2Code/events{/privacy}","received_events_url":"https://api.github.com/users/Yoyo2Code/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Yoyo2Code/the_pivot","description":null,"fork":false,"url":"https://api.github.com/repos/Yoyo2Code/the_pivot","forks_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/forks","keys_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/teams","hooks_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/hooks","issue_events_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/issues/events{/number}","events_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/events","assignees_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/assignees{/user}","branches_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/branches{/branch}","tags_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/tags","blobs_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/statuses/{sha}","languages_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/languages","stargazers_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/stargazers","contributors_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/contributors","subscribers_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/subscribers","subscription_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/subscription","commits_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/contents/{+path}","compare_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/merges","archive_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/downloads","issues_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/issues{/number}","pulls_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls{/number}","milestones_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/milestones{/number}","notifications_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/labels{/name}","releases_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/releases{/id}","deployments_url":"https://api.github.com/repos/Yoyo2Code/the_pivot/deployments","created_at":"2016-08-15T19:47:19Z","updated_at":"2016-08-18T16:12:17Z","pushed_at":"2016-08-20T22:35:19Z","git_url":"git://github.com/Yoyo2Code/the_pivot.git","ssh_url":"git@github.com:Yoyo2Code/the_pivot.git","clone_url":"https://github.com/Yoyo2Code/the_pivot.git","svn_url":"https://github.com/Yoyo2Code/the_pivot","homepage":null,"size":1880,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":24,"forks":0,"open_issues":24,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/48"},"html":{"href":"https://github.com/Yoyo2Code/the_pivot/pull/48"},"issue":{"href":"https://api.github.com/repos/Yoyo2Code/the_pivot/issues/48"},"comments":{"href":"https://api.github.com/repos/Yoyo2Code/the_pivot/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Yoyo2Code/the_pivot/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/Yoyo2Code/the_pivot/statuses/690a7afc179d6985c1fe757068c728a78461e254"}}}}
{"actor":{"display_login":"houndci-bot"}}