{"action":"created","comment":{"url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/comments/74542088","id":74542088,"diff_hunk":"@@ -84,4 +98,21 @@ defmodule AssembleTheMinions.Minion do\n     {:noreply, new_state}\n   end\n \n+  # count basic arithmetic\n+  def handle_cast({:add, n}, state) when is_integer(n) and n >= 0 do","path":"lib/minion.ex","position":26,"original_position":26,"commit_id":"db523001a73698875eeea1ebe7dc403f1988f2a2","original_commit_id":"db523001a73698875eeea1ebe7dc403f1988f2a2","user":{"login":"DuBistKomisch","id":703055,"avatar_url":"https://avatars.githubusercontent.com/u/703055?v=3","gravatar_id":"","url":"https://api.github.com/users/DuBistKomisch","html_url":"https://github.com/DuBistKomisch","followers_url":"https://api.github.com/users/DuBistKomisch/followers","following_url":"https://api.github.com/users/DuBistKomisch/following{/other_user}","gists_url":"https://api.github.com/users/DuBistKomisch/gists{/gist_id}","starred_url":"https://api.github.com/users/DuBistKomisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuBistKomisch/subscriptions","organizations_url":"https://api.github.com/users/DuBistKomisch/orgs","repos_url":"https://api.github.com/users/DuBistKomisch/repos","events_url":"https://api.github.com/users/DuBistKomisch/events{/privacy}","received_events_url":"https://api.github.com/users/DuBistKomisch/received_events","type":"User","site_admin":false},"body":"Yeah, just figured it's possible to bypass that and call it directly, but I dunno.","created_at":"2016-08-12T05:09:02Z","updated_at":"2016-08-12T05:09:02Z","html_url":"https://github.com/ElixirStudyGroup/assemble_the_minions/pull/1#discussion_r74542088","pull_request_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/comments/74542088"},"html":{"href":"https://github.com/ElixirStudyGroup/assemble_the_minions/pull/1#discussion_r74542088"},"pull_request":{"href":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/1","id":80966724,"html_url":"https://github.com/ElixirStudyGroup/assemble_the_minions/pull/1","diff_url":"https://github.com/ElixirStudyGroup/assemble_the_minions/pull/1.diff","patch_url":"https://github.com/ElixirStudyGroup/assemble_the_minions/pull/1.patch","issue_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/issues/1","number":1,"state":"open","locked":false,"title":"Implement count basic arithmetic","user":{"login":"DuBistKomisch","id":703055,"avatar_url":"https://avatars.githubusercontent.com/u/703055?v=3","gravatar_id":"","url":"https://api.github.com/users/DuBistKomisch","html_url":"https://github.com/DuBistKomisch","followers_url":"https://api.github.com/users/DuBistKomisch/followers","following_url":"https://api.github.com/users/DuBistKomisch/following{/other_user}","gists_url":"https://api.github.com/users/DuBistKomisch/gists{/gist_id}","starred_url":"https://api.github.com/users/DuBistKomisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuBistKomisch/subscriptions","organizations_url":"https://api.github.com/users/DuBistKomisch/orgs","repos_url":"https://api.github.com/users/DuBistKomisch/repos","events_url":"https://api.github.com/users/DuBistKomisch/events{/privacy}","received_events_url":"https://api.github.com/users/DuBistKomisch/received_events","type":"User","site_admin":false},"body":"Since it's \"counting\", I assumed only non-negative integers arithmetic was valid.\r\n\r\nTesting with `catch_error` (or `assert_raise`) doesn't seem to work when only putting the guard clauses on the `handle_cast`, since it's done async, so I put them on both the send and receive side to be safe.\r\n\r\nI've only skimmed the GenServer docs, so I'm not sure if I'm doing anything horribly wrong, but it seems to work!","created_at":"2016-08-11T14:25:18Z","updated_at":"2016-08-12T05:09:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61e14743c28d6b4097b4a6bd16deec01f11d4107","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/issues/1/comments","statuses_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/statuses/db523001a73698875eeea1ebe7dc403f1988f2a2","head":{"label":"DuBistKomisch:jake4prez","ref":"jake4prez","sha":"db523001a73698875eeea1ebe7dc403f1988f2a2","user":{"login":"DuBistKomisch","id":703055,"avatar_url":"https://avatars.githubusercontent.com/u/703055?v=3","gravatar_id":"","url":"https://api.github.com/users/DuBistKomisch","html_url":"https://github.com/DuBistKomisch","followers_url":"https://api.github.com/users/DuBistKomisch/followers","following_url":"https://api.github.com/users/DuBistKomisch/following{/other_user}","gists_url":"https://api.github.com/users/DuBistKomisch/gists{/gist_id}","starred_url":"https://api.github.com/users/DuBistKomisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuBistKomisch/subscriptions","organizations_url":"https://api.github.com/users/DuBistKomisch/orgs","repos_url":"https://api.github.com/users/DuBistKomisch/repos","events_url":"https://api.github.com/users/DuBistKomisch/events{/privacy}","received_events_url":"https://api.github.com/users/DuBistKomisch/received_events","type":"User","site_admin":false},"repo":{"id":65469663,"name":"assemble_the_minions","full_name":"DuBistKomisch/assemble_the_minions","owner":{"login":"DuBistKomisch","id":703055,"avatar_url":"https://avatars.githubusercontent.com/u/703055?v=3","gravatar_id":"","url":"https://api.github.com/users/DuBistKomisch","html_url":"https://github.com/DuBistKomisch","followers_url":"https://api.github.com/users/DuBistKomisch/followers","following_url":"https://api.github.com/users/DuBistKomisch/following{/other_user}","gists_url":"https://api.github.com/users/DuBistKomisch/gists{/gist_id}","starred_url":"https://api.github.com/users/DuBistKomisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuBistKomisch/subscriptions","organizations_url":"https://api.github.com/users/DuBistKomisch/orgs","repos_url":"https://api.github.com/users/DuBistKomisch/repos","events_url":"https://api.github.com/users/DuBistKomisch/events{/privacy}","received_events_url":"https://api.github.com/users/DuBistKomisch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DuBistKomisch/assemble_the_minions","description":"A playground for creating an army minions to do our bidding","fork":true,"url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions","forks_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/forks","keys_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/teams","hooks_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/hooks","issue_events_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/issues/events{/number}","events_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/events","assignees_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/assignees{/user}","branches_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/branches{/branch}","tags_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/tags","blobs_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/git/refs{/sha}","trees_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/statuses/{sha}","languages_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/languages","stargazers_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/stargazers","contributors_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/contributors","subscribers_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/subscribers","subscription_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/subscription","commits_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/commits{/sha}","git_commits_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/git/commits{/sha}","comments_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/comments{/number}","issue_comment_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/issues/comments{/number}","contents_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/contents/{+path}","compare_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/merges","archive_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/downloads","issues_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/issues{/number}","pulls_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/pulls{/number}","milestones_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/milestones{/number}","notifications_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/labels{/name}","releases_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/releases{/id}","deployments_url":"https://api.github.com/repos/DuBistKomisch/assemble_the_minions/deployments","created_at":"2016-08-11T13:00:19Z","updated_at":"2016-08-11T13:00:20Z","pushed_at":"2016-08-11T14:20:33Z","git_url":"git://github.com/DuBistKomisch/assemble_the_minions.git","ssh_url":"git@github.com:DuBistKomisch/assemble_the_minions.git","clone_url":"https://github.com/DuBistKomisch/assemble_the_minions.git","svn_url":"https://github.com/DuBistKomisch/assemble_the_minions","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":"Elixir","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":"ElixirStudyGroup:master","ref":"master","sha":"07a71f3ae8214ff85cee94751364be2cdd7e5ed6","user":{"login":"ElixirStudyGroup","id":20876129,"avatar_url":"https://avatars.githubusercontent.com/u/20876129?v=3","gravatar_id":"","url":"https://api.github.com/users/ElixirStudyGroup","html_url":"https://github.com/ElixirStudyGroup","followers_url":"https://api.github.com/users/ElixirStudyGroup/followers","following_url":"https://api.github.com/users/ElixirStudyGroup/following{/other_user}","gists_url":"https://api.github.com/users/ElixirStudyGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/ElixirStudyGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElixirStudyGroup/subscriptions","organizations_url":"https://api.github.com/users/ElixirStudyGroup/orgs","repos_url":"https://api.github.com/users/ElixirStudyGroup/repos","events_url":"https://api.github.com/users/ElixirStudyGroup/events{/privacy}","received_events_url":"https://api.github.com/users/ElixirStudyGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":65132855,"name":"assemble_the_minions","full_name":"ElixirStudyGroup/assemble_the_minions","owner":{"login":"ElixirStudyGroup","id":20876129,"avatar_url":"https://avatars.githubusercontent.com/u/20876129?v=3","gravatar_id":"","url":"https://api.github.com/users/ElixirStudyGroup","html_url":"https://github.com/ElixirStudyGroup","followers_url":"https://api.github.com/users/ElixirStudyGroup/followers","following_url":"https://api.github.com/users/ElixirStudyGroup/following{/other_user}","gists_url":"https://api.github.com/users/ElixirStudyGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/ElixirStudyGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElixirStudyGroup/subscriptions","organizations_url":"https://api.github.com/users/ElixirStudyGroup/orgs","repos_url":"https://api.github.com/users/ElixirStudyGroup/repos","events_url":"https://api.github.com/users/ElixirStudyGroup/events{/privacy}","received_events_url":"https://api.github.com/users/ElixirStudyGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ElixirStudyGroup/assemble_the_minions","description":"A playground for creating an army minions to do our bidding","fork":false,"url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions","forks_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/forks","keys_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/teams","hooks_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/hooks","issue_events_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/issues/events{/number}","events_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/events","assignees_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/assignees{/user}","branches_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/branches{/branch}","tags_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/tags","blobs_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/git/refs{/sha}","trees_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/statuses/{sha}","languages_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/languages","stargazers_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/stargazers","contributors_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/contributors","subscribers_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/subscribers","subscription_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/subscription","commits_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/commits{/sha}","git_commits_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/git/commits{/sha}","comments_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/comments{/number}","issue_comment_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/issues/comments{/number}","contents_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/contents/{+path}","compare_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/merges","archive_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/downloads","issues_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/issues{/number}","pulls_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls{/number}","milestones_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/milestones{/number}","notifications_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/labels{/name}","releases_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/releases{/id}","deployments_url":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/deployments","created_at":"2016-08-07T12:49:23Z","updated_at":"2016-08-07T12:49:52Z","pushed_at":"2016-08-11T14:25:18Z","git_url":"git://github.com/ElixirStudyGroup/assemble_the_minions.git","ssh_url":"git@github.com:ElixirStudyGroup/assemble_the_minions.git","clone_url":"https://github.com/ElixirStudyGroup/assemble_the_minions.git","svn_url":"https://github.com/ElixirStudyGroup/assemble_the_minions","homepage":null,"size":6,"stargazers_count":0,"watchers_count":0,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/1"},"html":{"href":"https://github.com/ElixirStudyGroup/assemble_the_minions/pull/1"},"issue":{"href":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/issues/1"},"comments":{"href":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ElixirStudyGroup/assemble_the_minions/statuses/db523001a73698875eeea1ebe7dc403f1988f2a2"}}}}
{"actor":{"display_login":"DuBistKomisch"}}