{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/comments/30594044","id":30594044,"diff_hunk":"@@ -0,0 +1,55 @@\n+require 'sinatra/base'\n+require_relative 'rps'\n+\n+#file should be called server.rb??\n+\n+class RpsWeb < Sinatra::Base\n+\n+  enable :sessions\n+\n+  #set the root relative to where this current file.\n+  #set :root, File.dirname(__FILE__,'..')  #__FILE__ is the location of current file\n+\n+  set :views, Proc.new { File.join(root, \"..\", \"views\") }\n+  # why do we need to tell sinatra where the views are, we didn't need this for the cat?\n+\n+  get '/' do\n+    erb :index\n+  end\n+\n+  post '/' do\n+    params[:player1].nil? ? @player1 = \"\" : @player1 = params[:player1]\n+    if @player1.length > 2\n+      session['player'] = @player1\n+      erb :gamepage\n+      redirect \"/gamepage\"\n+    else\n+      @errormsg = true\n+      erb :index\n+    end\n+  end\n+\n+  get '/gamepage' do\n+    @player1 = session['player']\n+    session['human'] = 0\n+    session['computer'] = 0\n+    @publish_result = false\n+    erb :gamepage\n+  end\n+\n+  post '/gamepage' do\n+    @game = RPS.new\n+    @computer, @winner = @game.play_round(params[:human_choice])\n+    @publish_result = true\n+    @winner = session['player'] if @winner == \"human\"\n+    @winner = \"no one\" if @winner == \"draw\"\n+    session['human'] += 1 if @winner == \"human\"\n+    session['computer'] += 1 if @winner == \"computer\"\n+\n+    erb :gamepage\n+  end\n+\n+","path":"lib/RpsWeb.rb","position":52,"original_position":52,"commit_id":"6e87138f37c7cf67c10167e0b2b8f56fda3b7c82","original_commit_id":"6e87138f37c7cf67c10167e0b2b8f56fda3b7c82","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Extra blank line detected.","created_at":"2015-05-19T12:36:19Z","updated_at":"2015-05-19T12:36:19Z","html_url":"https://github.com/makersacademy/rps-challenge/pull/71#discussion_r30594044","pull_request_url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/comments/30594044"},"html":{"href":"https://github.com/makersacademy/rps-challenge/pull/71#discussion_r30594044"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/71","id":35725136,"html_url":"https://github.com/makersacademy/rps-challenge/pull/71","diff_url":"https://github.com/makersacademy/rps-challenge/pull/71.diff","patch_url":"https://github.com/makersacademy/rps-challenge/pull/71.patch","issue_url":"https://api.github.com/repos/makersacademy/rps-challenge/issues/71","number":71,"state":"open","locked":false,"title":"Tim's rps-challenge submission","user":{"login":"timoxman","id":11789455,"avatar_url":"https://avatars.githubusercontent.com/u/11789455?v=3","gravatar_id":"","url":"https://api.github.com/users/timoxman","html_url":"https://github.com/timoxman","followers_url":"https://api.github.com/users/timoxman/followers","following_url":"https://api.github.com/users/timoxman/following{/other_user}","gists_url":"https://api.github.com/users/timoxman/gists{/gist_id}","starred_url":"https://api.github.com/users/timoxman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timoxman/subscriptions","organizations_url":"https://api.github.com/users/timoxman/orgs","repos_url":"https://api.github.com/users/timoxman/repos","events_url":"https://api.github.com/users/timoxman/events{/privacy}","received_events_url":"https://api.github.com/users/timoxman/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-19T12:36:12Z","updated_at":"2015-05-19T12:36:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20550d9e5493f8fffc3bd966bc4a2168c0fc82eb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/71/commits","review_comments_url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/71/comments","review_comment_url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/makersacademy/rps-challenge/issues/71/comments","statuses_url":"https://api.github.com/repos/makersacademy/rps-challenge/statuses/6e87138f37c7cf67c10167e0b2b8f56fda3b7c82","head":{"label":"timoxman:master","ref":"master","sha":"6e87138f37c7cf67c10167e0b2b8f56fda3b7c82","user":{"login":"timoxman","id":11789455,"avatar_url":"https://avatars.githubusercontent.com/u/11789455?v=3","gravatar_id":"","url":"https://api.github.com/users/timoxman","html_url":"https://github.com/timoxman","followers_url":"https://api.github.com/users/timoxman/followers","following_url":"https://api.github.com/users/timoxman/following{/other_user}","gists_url":"https://api.github.com/users/timoxman/gists{/gist_id}","starred_url":"https://api.github.com/users/timoxman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timoxman/subscriptions","organizations_url":"https://api.github.com/users/timoxman/orgs","repos_url":"https://api.github.com/users/timoxman/repos","events_url":"https://api.github.com/users/timoxman/events{/privacy}","received_events_url":"https://api.github.com/users/timoxman/received_events","type":"User","site_admin":false},"repo":{"id":35880968,"name":"rps-challenge","full_name":"timoxman/rps-challenge","owner":{"login":"timoxman","id":11789455,"avatar_url":"https://avatars.githubusercontent.com/u/11789455?v=3","gravatar_id":"","url":"https://api.github.com/users/timoxman","html_url":"https://github.com/timoxman","followers_url":"https://api.github.com/users/timoxman/followers","following_url":"https://api.github.com/users/timoxman/following{/other_user}","gists_url":"https://api.github.com/users/timoxman/gists{/gist_id}","starred_url":"https://api.github.com/users/timoxman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timoxman/subscriptions","organizations_url":"https://api.github.com/users/timoxman/orgs","repos_url":"https://api.github.com/users/timoxman/repos","events_url":"https://api.github.com/users/timoxman/events{/privacy}","received_events_url":"https://api.github.com/users/timoxman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timoxman/rps-challenge","description":"Create the Rock Paper Scissors Game","fork":true,"url":"https://api.github.com/repos/timoxman/rps-challenge","forks_url":"https://api.github.com/repos/timoxman/rps-challenge/forks","keys_url":"https://api.github.com/repos/timoxman/rps-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timoxman/rps-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timoxman/rps-challenge/teams","hooks_url":"https://api.github.com/repos/timoxman/rps-challenge/hooks","issue_events_url":"https://api.github.com/repos/timoxman/rps-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/timoxman/rps-challenge/events","assignees_url":"https://api.github.com/repos/timoxman/rps-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/timoxman/rps-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/timoxman/rps-challenge/tags","blobs_url":"https://api.github.com/repos/timoxman/rps-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timoxman/rps-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timoxman/rps-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/timoxman/rps-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timoxman/rps-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/timoxman/rps-challenge/languages","stargazers_url":"https://api.github.com/repos/timoxman/rps-challenge/stargazers","contributors_url":"https://api.github.com/repos/timoxman/rps-challenge/contributors","subscribers_url":"https://api.github.com/repos/timoxman/rps-challenge/subscribers","subscription_url":"https://api.github.com/repos/timoxman/rps-challenge/subscription","commits_url":"https://api.github.com/repos/timoxman/rps-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/timoxman/rps-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/timoxman/rps-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/timoxman/rps-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/timoxman/rps-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/timoxman/rps-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timoxman/rps-challenge/merges","archive_url":"https://api.github.com/repos/timoxman/rps-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timoxman/rps-challenge/downloads","issues_url":"https://api.github.com/repos/timoxman/rps-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/timoxman/rps-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/timoxman/rps-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/timoxman/rps-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timoxman/rps-challenge/labels{/name}","releases_url":"https://api.github.com/repos/timoxman/rps-challenge/releases{/id}","created_at":"2015-05-19T12:34:46Z","updated_at":"2015-05-19T12:34:46Z","pushed_at":"2015-05-19T12:35:19Z","git_url":"git://github.com/timoxman/rps-challenge.git","ssh_url":"git@github.com:timoxman/rps-challenge.git","clone_url":"https://github.com/timoxman/rps-challenge.git","svn_url":"https://github.com/timoxman/rps-challenge","homepage":null,"size":34819,"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":"makersacademy:master","ref":"master","sha":"a11d2128e9605c16587bc9377cdee2684f2ed4ae","user":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"repo":{"id":27006066,"name":"rps-challenge","full_name":"makersacademy/rps-challenge","owner":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/makersacademy/rps-challenge","description":"Create the Rock Paper Scissors Game","fork":false,"url":"https://api.github.com/repos/makersacademy/rps-challenge","forks_url":"https://api.github.com/repos/makersacademy/rps-challenge/forks","keys_url":"https://api.github.com/repos/makersacademy/rps-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/makersacademy/rps-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/makersacademy/rps-challenge/teams","hooks_url":"https://api.github.com/repos/makersacademy/rps-challenge/hooks","issue_events_url":"https://api.github.com/repos/makersacademy/rps-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/makersacademy/rps-challenge/events","assignees_url":"https://api.github.com/repos/makersacademy/rps-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/makersacademy/rps-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/makersacademy/rps-challenge/tags","blobs_url":"https://api.github.com/repos/makersacademy/rps-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/makersacademy/rps-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/makersacademy/rps-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/makersacademy/rps-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/makersacademy/rps-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/makersacademy/rps-challenge/languages","stargazers_url":"https://api.github.com/repos/makersacademy/rps-challenge/stargazers","contributors_url":"https://api.github.com/repos/makersacademy/rps-challenge/contributors","subscribers_url":"https://api.github.com/repos/makersacademy/rps-challenge/subscribers","subscription_url":"https://api.github.com/repos/makersacademy/rps-challenge/subscription","commits_url":"https://api.github.com/repos/makersacademy/rps-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/makersacademy/rps-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/makersacademy/rps-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/makersacademy/rps-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/makersacademy/rps-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/makersacademy/rps-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/makersacademy/rps-challenge/merges","archive_url":"https://api.github.com/repos/makersacademy/rps-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/makersacademy/rps-challenge/downloads","issues_url":"https://api.github.com/repos/makersacademy/rps-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/makersacademy/rps-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/makersacademy/rps-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/makersacademy/rps-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/makersacademy/rps-challenge/labels{/name}","releases_url":"https://api.github.com/repos/makersacademy/rps-challenge/releases{/id}","created_at":"2014-11-22T17:15:17Z","updated_at":"2015-04-02T19:30:46Z","pushed_at":"2015-05-19T12:36:13Z","git_url":"git://github.com/makersacademy/rps-challenge.git","ssh_url":"git@github.com:makersacademy/rps-challenge.git","clone_url":"https://github.com/makersacademy/rps-challenge.git","svn_url":"https://github.com/makersacademy/rps-challenge","homepage":null,"size":34819,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":76,"mirror_url":null,"open_issues_count":10,"forks":76,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/71"},"html":{"href":"https://github.com/makersacademy/rps-challenge/pull/71"},"issue":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/issues/71"},"comments":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/rps-challenge/statuses/6e87138f37c7cf67c10167e0b2b8f56fda3b7c82"}}}}