{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/comments/58299613","id":58299613,"diff_hunk":"@@ -28,5 +34,62 @@ def analyze_mood(words)\n   \"05/11 Yay, yay, yay! I'm having a awfuly great day.\"\n ]\n \n-puts analyze_mood(text[0])\n-puts analyze_mood(text[1])\n+# print out date + mood by calling analyze mood\n+def week_moods(array)\n+  array.each do |day|\n+    date = day[0..4]\n+    puts \"#{date} #{analyze_mood(day)}\"\n+  end\n+end\n+\n+def happy_days(array)\n+  happy = 0\n+  days = 0\n+  array.each do |day|\n+    mood = analyze_mood(day)[-3..-1]\n+    if mood == \":-)\"\n+      happy += 1\n+    end\n+    days += 1\n+    if happy == 3\n+      break\n+    end\n+  end  \n+  if happy == 3\n+    puts \"It takes #{days} entries for 3 happy days to occur\"\n+  else\n+    puts \"You are having quite a bad week.\"\n+  end\n+end","path":"mood-analysis.rb","position":61,"original_position":61,"commit_id":"76e465297bbad3605ad3f586423950f655292a1b","original_commit_id":"76e465297bbad3605ad3f586423950f655292a1b","user":{"login":"sudocrystal","id":7967247,"avatar_url":"https://avatars.githubusercontent.com/u/7967247?v=3","gravatar_id":"","url":"https://api.github.com/users/sudocrystal","html_url":"https://github.com/sudocrystal","followers_url":"https://api.github.com/users/sudocrystal/followers","following_url":"https://api.github.com/users/sudocrystal/following{/other_user}","gists_url":"https://api.github.com/users/sudocrystal/gists{/gist_id}","starred_url":"https://api.github.com/users/sudocrystal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudocrystal/subscriptions","organizations_url":"https://api.github.com/users/sudocrystal/orgs","repos_url":"https://api.github.com/users/sudocrystal/repos","events_url":"https://api.github.com/users/sudocrystal/events{/privacy}","received_events_url":"https://api.github.com/users/sudocrystal/received_events","type":"User","site_admin":false},"body":"I'd rather that this method returned just the fixnum of how many days rather than putting that inside a string. This would allow for us to do other things with that information instead of being tied to this specific use case.","created_at":"2016-04-02T20:44:20Z","updated_at":"2016-04-02T20:44:20Z","html_url":"https://github.com/Ada-C5/mood-analysis/pull/7#discussion_r58299613","pull_request_url":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/comments/58299613"},"html":{"href":"https://github.com/Ada-C5/mood-analysis/pull/7#discussion_r58299613"},"pull_request":{"href":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/7","id":64974721,"html_url":"https://github.com/Ada-C5/mood-analysis/pull/7","diff_url":"https://github.com/Ada-C5/mood-analysis/pull/7.diff","patch_url":"https://github.com/Ada-C5/mood-analysis/pull/7.patch","issue_url":"https://api.github.com/repos/Ada-C5/mood-analysis/issues/7","number":7,"state":"open","locked":false,"title":"Leah's Mood Analysis","user":{"login":"leahnp","id":13352646,"avatar_url":"https://avatars.githubusercontent.com/u/13352646?v=3","gravatar_id":"","url":"https://api.github.com/users/leahnp","html_url":"https://github.com/leahnp","followers_url":"https://api.github.com/users/leahnp/followers","following_url":"https://api.github.com/users/leahnp/following{/other_user}","gists_url":"https://api.github.com/users/leahnp/gists{/gist_id}","starred_url":"https://api.github.com/users/leahnp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leahnp/subscriptions","organizations_url":"https://api.github.com/users/leahnp/orgs","repos_url":"https://api.github.com/users/leahnp/repos","events_url":"https://api.github.com/users/leahnp/events{/privacy}","received_events_url":"https://api.github.com/users/leahnp/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-01T17:01:49Z","updated_at":"2016-04-02T20:44:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ef0bfc2b8b0c1cbde50bc9971d7d02e7857c25e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/7/commits","review_comments_url":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/7/comments","review_comment_url":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-C5/mood-analysis/issues/7/comments","statuses_url":"https://api.github.com/repos/Ada-C5/mood-analysis/statuses/76e465297bbad3605ad3f586423950f655292a1b","head":{"label":"leahnp:master","ref":"master","sha":"76e465297bbad3605ad3f586423950f655292a1b","user":{"login":"leahnp","id":13352646,"avatar_url":"https://avatars.githubusercontent.com/u/13352646?v=3","gravatar_id":"","url":"https://api.github.com/users/leahnp","html_url":"https://github.com/leahnp","followers_url":"https://api.github.com/users/leahnp/followers","following_url":"https://api.github.com/users/leahnp/following{/other_user}","gists_url":"https://api.github.com/users/leahnp/gists{/gist_id}","starred_url":"https://api.github.com/users/leahnp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leahnp/subscriptions","organizations_url":"https://api.github.com/users/leahnp/orgs","repos_url":"https://api.github.com/users/leahnp/repos","events_url":"https://api.github.com/users/leahnp/events{/privacy}","received_events_url":"https://api.github.com/users/leahnp/received_events","type":"User","site_admin":false},"repo":{"id":55188462,"name":"mood-analysis","full_name":"leahnp/mood-analysis","owner":{"login":"leahnp","id":13352646,"avatar_url":"https://avatars.githubusercontent.com/u/13352646?v=3","gravatar_id":"","url":"https://api.github.com/users/leahnp","html_url":"https://github.com/leahnp","followers_url":"https://api.github.com/users/leahnp/followers","following_url":"https://api.github.com/users/leahnp/following{/other_user}","gists_url":"https://api.github.com/users/leahnp/gists{/gist_id}","starred_url":"https://api.github.com/users/leahnp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leahnp/subscriptions","organizations_url":"https://api.github.com/users/leahnp/orgs","repos_url":"https://api.github.com/users/leahnp/repos","events_url":"https://api.github.com/users/leahnp/events{/privacy}","received_events_url":"https://api.github.com/users/leahnp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leahnp/mood-analysis","description":"Hash Practice using an NLP-like example","fork":true,"url":"https://api.github.com/repos/leahnp/mood-analysis","forks_url":"https://api.github.com/repos/leahnp/mood-analysis/forks","keys_url":"https://api.github.com/repos/leahnp/mood-analysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leahnp/mood-analysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leahnp/mood-analysis/teams","hooks_url":"https://api.github.com/repos/leahnp/mood-analysis/hooks","issue_events_url":"https://api.github.com/repos/leahnp/mood-analysis/issues/events{/number}","events_url":"https://api.github.com/repos/leahnp/mood-analysis/events","assignees_url":"https://api.github.com/repos/leahnp/mood-analysis/assignees{/user}","branches_url":"https://api.github.com/repos/leahnp/mood-analysis/branches{/branch}","tags_url":"https://api.github.com/repos/leahnp/mood-analysis/tags","blobs_url":"https://api.github.com/repos/leahnp/mood-analysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leahnp/mood-analysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leahnp/mood-analysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/leahnp/mood-analysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leahnp/mood-analysis/statuses/{sha}","languages_url":"https://api.github.com/repos/leahnp/mood-analysis/languages","stargazers_url":"https://api.github.com/repos/leahnp/mood-analysis/stargazers","contributors_url":"https://api.github.com/repos/leahnp/mood-analysis/contributors","subscribers_url":"https://api.github.com/repos/leahnp/mood-analysis/subscribers","subscription_url":"https://api.github.com/repos/leahnp/mood-analysis/subscription","commits_url":"https://api.github.com/repos/leahnp/mood-analysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/leahnp/mood-analysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/leahnp/mood-analysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/leahnp/mood-analysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/leahnp/mood-analysis/contents/{+path}","compare_url":"https://api.github.com/repos/leahnp/mood-analysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leahnp/mood-analysis/merges","archive_url":"https://api.github.com/repos/leahnp/mood-analysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leahnp/mood-analysis/downloads","issues_url":"https://api.github.com/repos/leahnp/mood-analysis/issues{/number}","pulls_url":"https://api.github.com/repos/leahnp/mood-analysis/pulls{/number}","milestones_url":"https://api.github.com/repos/leahnp/mood-analysis/milestones{/number}","notifications_url":"https://api.github.com/repos/leahnp/mood-analysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leahnp/mood-analysis/labels{/name}","releases_url":"https://api.github.com/repos/leahnp/mood-analysis/releases{/id}","deployments_url":"https://api.github.com/repos/leahnp/mood-analysis/deployments","created_at":"2016-03-31T22:59:36Z","updated_at":"2016-03-31T22:59:38Z","pushed_at":"2016-04-01T17:00:30Z","git_url":"git://github.com/leahnp/mood-analysis.git","ssh_url":"git@github.com:leahnp/mood-analysis.git","clone_url":"https://github.com/leahnp/mood-analysis.git","svn_url":"https://github.com/leahnp/mood-analysis","homepage":null,"size":6,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Ada-C5:master","ref":"master","sha":"22d4fdc1c1baceae50e2b0d302fd44913e1903a5","user":{"login":"Ada-C5","id":16655720,"avatar_url":"https://avatars.githubusercontent.com/u/16655720?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-C5","html_url":"https://github.com/Ada-C5","followers_url":"https://api.github.com/users/Ada-C5/followers","following_url":"https://api.github.com/users/Ada-C5/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C5/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C5/subscriptions","organizations_url":"https://api.github.com/users/Ada-C5/orgs","repos_url":"https://api.github.com/users/Ada-C5/repos","events_url":"https://api.github.com/users/Ada-C5/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C5/received_events","type":"Organization","site_admin":false},"repo":{"id":55122595,"name":"mood-analysis","full_name":"Ada-C5/mood-analysis","owner":{"login":"Ada-C5","id":16655720,"avatar_url":"https://avatars.githubusercontent.com/u/16655720?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-C5","html_url":"https://github.com/Ada-C5","followers_url":"https://api.github.com/users/Ada-C5/followers","following_url":"https://api.github.com/users/Ada-C5/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C5/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C5/subscriptions","organizations_url":"https://api.github.com/users/Ada-C5/orgs","repos_url":"https://api.github.com/users/Ada-C5/repos","events_url":"https://api.github.com/users/Ada-C5/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C5/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ada-C5/mood-analysis","description":"Hash Practice using an NLP-like example","fork":true,"url":"https://api.github.com/repos/Ada-C5/mood-analysis","forks_url":"https://api.github.com/repos/Ada-C5/mood-analysis/forks","keys_url":"https://api.github.com/repos/Ada-C5/mood-analysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-C5/mood-analysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-C5/mood-analysis/teams","hooks_url":"https://api.github.com/repos/Ada-C5/mood-analysis/hooks","issue_events_url":"https://api.github.com/repos/Ada-C5/mood-analysis/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-C5/mood-analysis/events","assignees_url":"https://api.github.com/repos/Ada-C5/mood-analysis/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-C5/mood-analysis/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-C5/mood-analysis/tags","blobs_url":"https://api.github.com/repos/Ada-C5/mood-analysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-C5/mood-analysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-C5/mood-analysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-C5/mood-analysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-C5/mood-analysis/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-C5/mood-analysis/languages","stargazers_url":"https://api.github.com/repos/Ada-C5/mood-analysis/stargazers","contributors_url":"https://api.github.com/repos/Ada-C5/mood-analysis/contributors","subscribers_url":"https://api.github.com/repos/Ada-C5/mood-analysis/subscribers","subscription_url":"https://api.github.com/repos/Ada-C5/mood-analysis/subscription","commits_url":"https://api.github.com/repos/Ada-C5/mood-analysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-C5/mood-analysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-C5/mood-analysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-C5/mood-analysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-C5/mood-analysis/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-C5/mood-analysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-C5/mood-analysis/merges","archive_url":"https://api.github.com/repos/Ada-C5/mood-analysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-C5/mood-analysis/downloads","issues_url":"https://api.github.com/repos/Ada-C5/mood-analysis/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-C5/mood-analysis/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-C5/mood-analysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-C5/mood-analysis/labels{/name}","releases_url":"https://api.github.com/repos/Ada-C5/mood-analysis/releases{/id}","deployments_url":"https://api.github.com/repos/Ada-C5/mood-analysis/deployments","created_at":"2016-03-31T05:23:52Z","updated_at":"2016-03-31T05:23:53Z","pushed_at":"2016-04-01T22:37:59Z","git_url":"git://github.com/Ada-C5/mood-analysis.git","ssh_url":"git@github.com:Ada-C5/mood-analysis.git","clone_url":"https://github.com/Ada-C5/mood-analysis.git","svn_url":"https://github.com/Ada-C5/mood-analysis","homepage":null,"size":68,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":20,"forks":23,"open_issues":20,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/7"},"html":{"href":"https://github.com/Ada-C5/mood-analysis/pull/7"},"issue":{"href":"https://api.github.com/repos/Ada-C5/mood-analysis/issues/7"},"comments":{"href":"https://api.github.com/repos/Ada-C5/mood-analysis/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-C5/mood-analysis/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-C5/mood-analysis/statuses/76e465297bbad3605ad3f586423950f655292a1b"}}}}