{"action":"created","comment":{"url":"https://api.github.com/repos/sehardy/cherry_silt/pulls/comments/46916780","id":46916780,"diff_hunk":"@@ -56,24 +52,29 @@ def receive_data(data)\n   end\n \n   def unbind\n+    puts 'Bye Bye'\n+    # this doesn't seem to be dropping connection\n     @server.connections.delete(self)\n   end\n \n   def fetch_user(name)\n-    @user_data = @mongo_client[:users].find(name: name).first\n-    @user_data = {name: 'unknown_user', password: 1} if @user_data.nil?\n+    p = @client[:player].find(name: name).first\n+    begin\n+      @player = CherrySilt::Player.from_h p\n+    rescue\n+      @player = CherrySilt::Player.new 'unknown_user' if @player.nil?","path":"lib/cherry_silt/connection.rb","position":66,"original_position":66,"commit_id":"c7eeb47408507452ba97f086fe835bec1ada2dbb","original_commit_id":"c7eeb47408507452ba97f086fe835bec1ada2dbb","user":{"login":"sehardy","id":8866021,"avatar_url":"https://avatars.githubusercontent.com/u/8866021?v=3","gravatar_id":"","url":"https://api.github.com/users/sehardy","html_url":"https://github.com/sehardy","followers_url":"https://api.github.com/users/sehardy/followers","following_url":"https://api.github.com/users/sehardy/following{/other_user}","gists_url":"https://api.github.com/users/sehardy/gists{/gist_id}","starred_url":"https://api.github.com/users/sehardy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sehardy/subscriptions","organizations_url":"https://api.github.com/users/sehardy/orgs","repos_url":"https://api.github.com/users/sehardy/repos","events_url":"https://api.github.com/users/sehardy/events{/privacy}","received_events_url":"https://api.github.com/users/sehardy/received_events","type":"User","site_admin":false},"body":"Is 'unknown_user' a placeholder for now?  If the name is not found in the rescue block we should probably move to a character creation method(s).","created_at":"2015-12-08T05:36:58Z","updated_at":"2015-12-08T05:36:58Z","html_url":"https://github.com/sehardy/cherry_silt/pull/4#discussion_r46916780","pull_request_url":"https://api.github.com/repos/sehardy/cherry_silt/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/sehardy/cherry_silt/pulls/comments/46916780"},"html":{"href":"https://github.com/sehardy/cherry_silt/pull/4#discussion_r46916780"},"pull_request":{"href":"https://api.github.com/repos/sehardy/cherry_silt/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/sehardy/cherry_silt/pulls/4","id":52932245,"html_url":"https://github.com/sehardy/cherry_silt/pull/4","diff_url":"https://github.com/sehardy/cherry_silt/pull/4.diff","patch_url":"https://github.com/sehardy/cherry_silt/pull/4.patch","issue_url":"https://api.github.com/repos/sehardy/cherry_silt/issues/4","number":4,"state":"closed","locked":false,"title":"authentication works..sort of","user":{"login":"joseph-jones","id":749186,"avatar_url":"https://avatars.githubusercontent.com/u/749186?v=3","gravatar_id":"","url":"https://api.github.com/users/joseph-jones","html_url":"https://github.com/joseph-jones","followers_url":"https://api.github.com/users/joseph-jones/followers","following_url":"https://api.github.com/users/joseph-jones/following{/other_user}","gists_url":"https://api.github.com/users/joseph-jones/gists{/gist_id}","starred_url":"https://api.github.com/users/joseph-jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseph-jones/subscriptions","organizations_url":"https://api.github.com/users/joseph-jones/orgs","repos_url":"https://api.github.com/users/joseph-jones/repos","events_url":"https://api.github.com/users/joseph-jones/events{/privacy}","received_events_url":"https://api.github.com/users/joseph-jones/received_events","type":"User","site_admin":false},"body":"This is a rough attempt to get authentication working. I don't think the class organization is the created nor do I think how the program flow in Connection is.\r\n\r\nThis should get us further along, but it's going to take some refactoring","created_at":"2015-12-08T02:52:57Z","updated_at":"2015-12-08T05:36:58Z","closed_at":"2015-12-08T03:24:14Z","merged_at":"2015-12-08T03:24:14Z","merge_commit_sha":"c45430859c36626c07f41a51f9a6ffc2e6142bba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sehardy/cherry_silt/pulls/4/commits","review_comments_url":"https://api.github.com/repos/sehardy/cherry_silt/pulls/4/comments","review_comment_url":"https://api.github.com/repos/sehardy/cherry_silt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sehardy/cherry_silt/issues/4/comments","statuses_url":"https://api.github.com/repos/sehardy/cherry_silt/statuses/c7eeb47408507452ba97f086fe835bec1ada2dbb","head":{"label":"joseph-jones:authentication","ref":"authentication","sha":"c7eeb47408507452ba97f086fe835bec1ada2dbb","user":{"login":"joseph-jones","id":749186,"avatar_url":"https://avatars.githubusercontent.com/u/749186?v=3","gravatar_id":"","url":"https://api.github.com/users/joseph-jones","html_url":"https://github.com/joseph-jones","followers_url":"https://api.github.com/users/joseph-jones/followers","following_url":"https://api.github.com/users/joseph-jones/following{/other_user}","gists_url":"https://api.github.com/users/joseph-jones/gists{/gist_id}","starred_url":"https://api.github.com/users/joseph-jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseph-jones/subscriptions","organizations_url":"https://api.github.com/users/joseph-jones/orgs","repos_url":"https://api.github.com/users/joseph-jones/repos","events_url":"https://api.github.com/users/joseph-jones/events{/privacy}","received_events_url":"https://api.github.com/users/joseph-jones/received_events","type":"User","site_admin":false},"repo":{"id":45888020,"name":"cherry_silt","full_name":"joseph-jones/cherry_silt","owner":{"login":"joseph-jones","id":749186,"avatar_url":"https://avatars.githubusercontent.com/u/749186?v=3","gravatar_id":"","url":"https://api.github.com/users/joseph-jones","html_url":"https://github.com/joseph-jones","followers_url":"https://api.github.com/users/joseph-jones/followers","following_url":"https://api.github.com/users/joseph-jones/following{/other_user}","gists_url":"https://api.github.com/users/joseph-jones/gists{/gist_id}","starred_url":"https://api.github.com/users/joseph-jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseph-jones/subscriptions","organizations_url":"https://api.github.com/users/joseph-jones/orgs","repos_url":"https://api.github.com/users/joseph-jones/repos","events_url":"https://api.github.com/users/joseph-jones/events{/privacy}","received_events_url":"https://api.github.com/users/joseph-jones/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joseph-jones/cherry_silt","description":"","fork":true,"url":"https://api.github.com/repos/joseph-jones/cherry_silt","forks_url":"https://api.github.com/repos/joseph-jones/cherry_silt/forks","keys_url":"https://api.github.com/repos/joseph-jones/cherry_silt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joseph-jones/cherry_silt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joseph-jones/cherry_silt/teams","hooks_url":"https://api.github.com/repos/joseph-jones/cherry_silt/hooks","issue_events_url":"https://api.github.com/repos/joseph-jones/cherry_silt/issues/events{/number}","events_url":"https://api.github.com/repos/joseph-jones/cherry_silt/events","assignees_url":"https://api.github.com/repos/joseph-jones/cherry_silt/assignees{/user}","branches_url":"https://api.github.com/repos/joseph-jones/cherry_silt/branches{/branch}","tags_url":"https://api.github.com/repos/joseph-jones/cherry_silt/tags","blobs_url":"https://api.github.com/repos/joseph-jones/cherry_silt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joseph-jones/cherry_silt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joseph-jones/cherry_silt/git/refs{/sha}","trees_url":"https://api.github.com/repos/joseph-jones/cherry_silt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joseph-jones/cherry_silt/statuses/{sha}","languages_url":"https://api.github.com/repos/joseph-jones/cherry_silt/languages","stargazers_url":"https://api.github.com/repos/joseph-jones/cherry_silt/stargazers","contributors_url":"https://api.github.com/repos/joseph-jones/cherry_silt/contributors","subscribers_url":"https://api.github.com/repos/joseph-jones/cherry_silt/subscribers","subscription_url":"https://api.github.com/repos/joseph-jones/cherry_silt/subscription","commits_url":"https://api.github.com/repos/joseph-jones/cherry_silt/commits{/sha}","git_commits_url":"https://api.github.com/repos/joseph-jones/cherry_silt/git/commits{/sha}","comments_url":"https://api.github.com/repos/joseph-jones/cherry_silt/comments{/number}","issue_comment_url":"https://api.github.com/repos/joseph-jones/cherry_silt/issues/comments{/number}","contents_url":"https://api.github.com/repos/joseph-jones/cherry_silt/contents/{+path}","compare_url":"https://api.github.com/repos/joseph-jones/cherry_silt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joseph-jones/cherry_silt/merges","archive_url":"https://api.github.com/repos/joseph-jones/cherry_silt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joseph-jones/cherry_silt/downloads","issues_url":"https://api.github.com/repos/joseph-jones/cherry_silt/issues{/number}","pulls_url":"https://api.github.com/repos/joseph-jones/cherry_silt/pulls{/number}","milestones_url":"https://api.github.com/repos/joseph-jones/cherry_silt/milestones{/number}","notifications_url":"https://api.github.com/repos/joseph-jones/cherry_silt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joseph-jones/cherry_silt/labels{/name}","releases_url":"https://api.github.com/repos/joseph-jones/cherry_silt/releases{/id}","created_at":"2015-11-10T04:48:52Z","updated_at":"2015-11-10T04:51:54Z","pushed_at":"2015-12-08T02:50:44Z","git_url":"git://github.com/joseph-jones/cherry_silt.git","ssh_url":"git@github.com:joseph-jones/cherry_silt.git","clone_url":"https://github.com/joseph-jones/cherry_silt.git","svn_url":"https://github.com/joseph-jones/cherry_silt","homepage":"","size":48,"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":"sehardy:master","ref":"master","sha":"e113712343672b1c61859f7a03542c174392d463","user":{"login":"sehardy","id":8866021,"avatar_url":"https://avatars.githubusercontent.com/u/8866021?v=3","gravatar_id":"","url":"https://api.github.com/users/sehardy","html_url":"https://github.com/sehardy","followers_url":"https://api.github.com/users/sehardy/followers","following_url":"https://api.github.com/users/sehardy/following{/other_user}","gists_url":"https://api.github.com/users/sehardy/gists{/gist_id}","starred_url":"https://api.github.com/users/sehardy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sehardy/subscriptions","organizations_url":"https://api.github.com/users/sehardy/orgs","repos_url":"https://api.github.com/users/sehardy/repos","events_url":"https://api.github.com/users/sehardy/events{/privacy}","received_events_url":"https://api.github.com/users/sehardy/received_events","type":"User","site_admin":false},"repo":{"id":40662778,"name":"cherry_silt","full_name":"sehardy/cherry_silt","owner":{"login":"sehardy","id":8866021,"avatar_url":"https://avatars.githubusercontent.com/u/8866021?v=3","gravatar_id":"","url":"https://api.github.com/users/sehardy","html_url":"https://github.com/sehardy","followers_url":"https://api.github.com/users/sehardy/followers","following_url":"https://api.github.com/users/sehardy/following{/other_user}","gists_url":"https://api.github.com/users/sehardy/gists{/gist_id}","starred_url":"https://api.github.com/users/sehardy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sehardy/subscriptions","organizations_url":"https://api.github.com/users/sehardy/orgs","repos_url":"https://api.github.com/users/sehardy/repos","events_url":"https://api.github.com/users/sehardy/events{/privacy}","received_events_url":"https://api.github.com/users/sehardy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sehardy/cherry_silt","description":"","fork":false,"url":"https://api.github.com/repos/sehardy/cherry_silt","forks_url":"https://api.github.com/repos/sehardy/cherry_silt/forks","keys_url":"https://api.github.com/repos/sehardy/cherry_silt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sehardy/cherry_silt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sehardy/cherry_silt/teams","hooks_url":"https://api.github.com/repos/sehardy/cherry_silt/hooks","issue_events_url":"https://api.github.com/repos/sehardy/cherry_silt/issues/events{/number}","events_url":"https://api.github.com/repos/sehardy/cherry_silt/events","assignees_url":"https://api.github.com/repos/sehardy/cherry_silt/assignees{/user}","branches_url":"https://api.github.com/repos/sehardy/cherry_silt/branches{/branch}","tags_url":"https://api.github.com/repos/sehardy/cherry_silt/tags","blobs_url":"https://api.github.com/repos/sehardy/cherry_silt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sehardy/cherry_silt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sehardy/cherry_silt/git/refs{/sha}","trees_url":"https://api.github.com/repos/sehardy/cherry_silt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sehardy/cherry_silt/statuses/{sha}","languages_url":"https://api.github.com/repos/sehardy/cherry_silt/languages","stargazers_url":"https://api.github.com/repos/sehardy/cherry_silt/stargazers","contributors_url":"https://api.github.com/repos/sehardy/cherry_silt/contributors","subscribers_url":"https://api.github.com/repos/sehardy/cherry_silt/subscribers","subscription_url":"https://api.github.com/repos/sehardy/cherry_silt/subscription","commits_url":"https://api.github.com/repos/sehardy/cherry_silt/commits{/sha}","git_commits_url":"https://api.github.com/repos/sehardy/cherry_silt/git/commits{/sha}","comments_url":"https://api.github.com/repos/sehardy/cherry_silt/comments{/number}","issue_comment_url":"https://api.github.com/repos/sehardy/cherry_silt/issues/comments{/number}","contents_url":"https://api.github.com/repos/sehardy/cherry_silt/contents/{+path}","compare_url":"https://api.github.com/repos/sehardy/cherry_silt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sehardy/cherry_silt/merges","archive_url":"https://api.github.com/repos/sehardy/cherry_silt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sehardy/cherry_silt/downloads","issues_url":"https://api.github.com/repos/sehardy/cherry_silt/issues{/number}","pulls_url":"https://api.github.com/repos/sehardy/cherry_silt/pulls{/number}","milestones_url":"https://api.github.com/repos/sehardy/cherry_silt/milestones{/number}","notifications_url":"https://api.github.com/repos/sehardy/cherry_silt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sehardy/cherry_silt/labels{/name}","releases_url":"https://api.github.com/repos/sehardy/cherry_silt/releases{/id}","created_at":"2015-08-13T14:21:02Z","updated_at":"2015-11-14T08:13:26Z","pushed_at":"2015-12-08T03:24:15Z","git_url":"git://github.com/sehardy/cherry_silt.git","ssh_url":"git@github.com:sehardy/cherry_silt.git","clone_url":"https://github.com/sehardy/cherry_silt.git","svn_url":"https://github.com/sehardy/cherry_silt","homepage":null,"size":47,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sehardy/cherry_silt/pulls/4"},"html":{"href":"https://github.com/sehardy/cherry_silt/pull/4"},"issue":{"href":"https://api.github.com/repos/sehardy/cherry_silt/issues/4"},"comments":{"href":"https://api.github.com/repos/sehardy/cherry_silt/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/sehardy/cherry_silt/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/sehardy/cherry_silt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sehardy/cherry_silt/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/sehardy/cherry_silt/statuses/c7eeb47408507452ba97f086fe835bec1ada2dbb"}}}}