GitHub PullRequestReviewCommentEvent at 2014-10-11 15:02:02
Repository: rulers
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/comments/18741991","id":18741991,"diff_hunk":"@@ -11,54 +11,57 @@ def initialize(env)\n       @routing_params = {}\n     end\n \n-    def env\n-      @env\n+    def get_response\n+      @response\n     end\n \n-    def self.action(act, p = {})\n-      proc {|e| self.new(e).dispatch(act, p) }\n+    def render_response(*args)\n+      response render(*args)\n     end\n \n-    def dispatch(action, routing_params = {})\n-      @routing_params = routing_params\n \n-      self.send(action)\n-      render_response action.to_sym unless get_response\n-      st, hd, rs = get_response.to_a\n-      [st, hd, [rs.body].flatten]\n+    def self.action(act, p = {})\n+      proc {|e| self.new(e).dispatch(act, p) }\n+    end\n+    def env\n+      @env\n     end\n \n-    def render(view_name, locals = {})\n-      filename = File.join 'app', 'views', controller_name, \"#{view_name}.html.erb\"\n-      ivars = instance_variables.reduce({}) {|ha, iv| ha[iv] = instance_variable_get(iv); ha }\n-      Rulers::View.new(filename, ivars, locals).result\n+    def params\n+      request.params.merge @routing_params\n+    end\n+    def request\n+      @request ||= Rack::Request.new(env)\n     end\n \n+\n     def controller_name\n       klass = self.class.to_s.gsub(/Controller$/, '')\n       Rulers.to_underscore klass\n     end\n \n-    def request\n-      @request ||= Rack::Request.new(env)\n-    end\n \n-    def params\n-      request.params.merge @routing_params\n-    end\n \n     def response(text, status = 200, headers = {})\n       raise \"Already responded!\" if @response\n       @response = Rack::Response.new([text].flatten, status, headers)\n     end\n \n-    def get_response\n-      @response\n+    def dispatch(action, routing_params = {})\n+      @routing_params = routing_params\n+\n+      self.send(action)\n+      render_response action.to_sym unless get_response\n+      st, hd, rs = get_response.to_a\n+      [st, hd, [rs.body].flatten]\n     end\n \n-    def render_response(*args)\n-      response render(*args)\n+    def render(view_name, locals = {})\n+      filename = File.join 'app', 'views', controller_name, \"#{view_name}.html.erb\"","path":"lib/rulers/controller.rb","position":74,"original_position":74,"commit_id":"3baabd95172fb292f8a7c81b88c7ba814fd00df6","original_commit_id":"3baabd95172fb292f8a7c81b88c7ba814fd00df6","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=2","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":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2014-10-11T15:02:02Z","updated_at":"2014-10-11T15:02:02Z","html_url":"https://github.com/ifyouseewendy/rulers/pull/1#discussion_r18741991","pull_request_url":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/comments/18741991"},"html":{"href":"https://github.com/ifyouseewendy/rulers/pull/1#discussion_r18741991"},"pull_request":{"href":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/1","id":22604548,"html_url":"https://github.com/ifyouseewendy/rulers/pull/1","diff_url":"https://github.com/ifyouseewendy/rulers/pull/1.diff","patch_url":"https://github.com/ifyouseewendy/rulers/pull/1.patch","issue_url":"https://api.github.com/repos/ifyouseewendy/rulers/issues/1","number":1,"state":"open","locked":false,"title":"Test for hound","user":{"login":"ifyouseewendy","id":1019171,"avatar_url":"https://avatars.githubusercontent.com/u/1019171?v=2","gravatar_id":"","url":"https://api.github.com/users/ifyouseewendy","html_url":"https://github.com/ifyouseewendy","followers_url":"https://api.github.com/users/ifyouseewendy/followers","following_url":"https://api.github.com/users/ifyouseewendy/following{/other_user}","gists_url":"https://api.github.com/users/ifyouseewendy/gists{/gist_id}","starred_url":"https://api.github.com/users/ifyouseewendy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifyouseewendy/subscriptions","organizations_url":"https://api.github.com/users/ifyouseewendy/orgs","repos_url":"https://api.github.com/users/ifyouseewendy/repos","events_url":"https://api.github.com/users/ifyouseewendy/events{/privacy}","received_events_url":"https://api.github.com/users/ifyouseewendy/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-11T15:01:58Z","updated_at":"2014-10-11T15:02:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37e915266d45b7e57fcd01d1cf0d8c74af22e769","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ifyouseewendy/rulers/issues/1/comments","statuses_url":"https://api.github.com/repos/ifyouseewendy/rulers/statuses/3baabd95172fb292f8a7c81b88c7ba814fd00df6","head":{"label":"ifyouseewendy:hound_test","ref":"hound_test","sha":"3baabd95172fb292f8a7c81b88c7ba814fd00df6","user":{"login":"ifyouseewendy","id":1019171,"avatar_url":"https://avatars.githubusercontent.com/u/1019171?v=2","gravatar_id":"","url":"https://api.github.com/users/ifyouseewendy","html_url":"https://github.com/ifyouseewendy","followers_url":"https://api.github.com/users/ifyouseewendy/followers","following_url":"https://api.github.com/users/ifyouseewendy/following{/other_user}","gists_url":"https://api.github.com/users/ifyouseewendy/gists{/gist_id}","starred_url":"https://api.github.com/users/ifyouseewendy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifyouseewendy/subscriptions","organizations_url":"https://api.github.com/users/ifyouseewendy/orgs","repos_url":"https://api.github.com/users/ifyouseewendy/repos","events_url":"https://api.github.com/users/ifyouseewendy/events{/privacy}","received_events_url":"https://api.github.com/users/ifyouseewendy/received_events","type":"User","site_admin":false},"repo":{"id":24382980,"name":"rulers","full_name":"ifyouseewendy/rulers","owner":{"login":"ifyouseewendy","id":1019171,"avatar_url":"https://avatars.githubusercontent.com/u/1019171?v=2","gravatar_id":"","url":"https://api.github.com/users/ifyouseewendy","html_url":"https://github.com/ifyouseewendy","followers_url":"https://api.github.com/users/ifyouseewendy/followers","following_url":"https://api.github.com/users/ifyouseewendy/following{/other_user}","gists_url":"https://api.github.com/users/ifyouseewendy/gists{/gist_id}","starred_url":"https://api.github.com/users/ifyouseewendy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifyouseewendy/subscriptions","organizations_url":"https://api.github.com/users/ifyouseewendy/orgs","repos_url":"https://api.github.com/users/ifyouseewendy/repos","events_url":"https://api.github.com/users/ifyouseewendy/events{/privacy}","received_events_url":"https://api.github.com/users/ifyouseewendy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ifyouseewendy/rulers","description":"demo project in Rebuilding Rails","fork":false,"url":"https://api.github.com/repos/ifyouseewendy/rulers","forks_url":"https://api.github.com/repos/ifyouseewendy/rulers/forks","keys_url":"https://api.github.com/repos/ifyouseewendy/rulers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ifyouseewendy/rulers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ifyouseewendy/rulers/teams","hooks_url":"https://api.github.com/repos/ifyouseewendy/rulers/hooks","issue_events_url":"https://api.github.com/repos/ifyouseewendy/rulers/issues/events{/number}","events_url":"https://api.github.com/repos/ifyouseewendy/rulers/events","assignees_url":"https://api.github.com/repos/ifyouseewendy/rulers/assignees{/user}","branches_url":"https://api.github.com/repos/ifyouseewendy/rulers/branches{/branch}","tags_url":"https://api.github.com/repos/ifyouseewendy/rulers/tags","blobs_url":"https://api.github.com/repos/ifyouseewendy/rulers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ifyouseewendy/rulers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ifyouseewendy/rulers/git/refs{/sha}","trees_url":"https://api.github.com/repos/ifyouseewendy/rulers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ifyouseewendy/rulers/statuses/{sha}","languages_url":"https://api.github.com/repos/ifyouseewendy/rulers/languages","stargazers_url":"https://api.github.com/repos/ifyouseewendy/rulers/stargazers","contributors_url":"https://api.github.com/repos/ifyouseewendy/rulers/contributors","subscribers_url":"https://api.github.com/repos/ifyouseewendy/rulers/subscribers","subscription_url":"https://api.github.com/repos/ifyouseewendy/rulers/subscription","commits_url":"https://api.github.com/repos/ifyouseewendy/rulers/commits{/sha}","git_commits_url":"https://api.github.com/repos/ifyouseewendy/rulers/git/commits{/sha}","comments_url":"https://api.github.com/repos/ifyouseewendy/rulers/comments{/number}","issue_comment_url":"https://api.github.com/repos/ifyouseewendy/rulers/issues/comments/{number}","contents_url":"https://api.github.com/repos/ifyouseewendy/rulers/contents/{+path}","compare_url":"https://api.github.com/repos/ifyouseewendy/rulers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ifyouseewendy/rulers/merges","archive_url":"https://api.github.com/repos/ifyouseewendy/rulers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ifyouseewendy/rulers/downloads","issues_url":"https://api.github.com/repos/ifyouseewendy/rulers/issues{/number}","pulls_url":"https://api.github.com/repos/ifyouseewendy/rulers/pulls{/number}","milestones_url":"https://api.github.com/repos/ifyouseewendy/rulers/milestones{/number}","notifications_url":"https://api.github.com/repos/ifyouseewendy/rulers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ifyouseewendy/rulers/labels{/name}","releases_url":"https://api.github.com/repos/ifyouseewendy/rulers/releases{/id}","created_at":"2014-09-23T17:56:00Z","updated_at":"2014-09-23T17:56:53Z","pushed_at":"2014-10-11T15:00:42Z","git_url":"git://github.com/ifyouseewendy/rulers.git","ssh_url":"git@github.com:ifyouseewendy/rulers.git","clone_url":"https://github.com/ifyouseewendy/rulers.git","svn_url":"https://github.com/ifyouseewendy/rulers","homepage":"http://rebuilding-rails.com/","size":136,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ifyouseewendy:master","ref":"master","sha":"23186789be4c413b9b5d2e8835c30f7113fccb44","user":{"login":"ifyouseewendy","id":1019171,"avatar_url":"https://avatars.githubusercontent.com/u/1019171?v=2","gravatar_id":"","url":"https://api.github.com/users/ifyouseewendy","html_url":"https://github.com/ifyouseewendy","followers_url":"https://api.github.com/users/ifyouseewendy/followers","following_url":"https://api.github.com/users/ifyouseewendy/following{/other_user}","gists_url":"https://api.github.com/users/ifyouseewendy/gists{/gist_id}","starred_url":"https://api.github.com/users/ifyouseewendy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifyouseewendy/subscriptions","organizations_url":"https://api.github.com/users/ifyouseewendy/orgs","repos_url":"https://api.github.com/users/ifyouseewendy/repos","events_url":"https://api.github.com/users/ifyouseewendy/events{/privacy}","received_events_url":"https://api.github.com/users/ifyouseewendy/received_events","type":"User","site_admin":false},"repo":{"id":24382980,"name":"rulers","full_name":"ifyouseewendy/rulers","owner":{"login":"ifyouseewendy","id":1019171,"avatar_url":"https://avatars.githubusercontent.com/u/1019171?v=2","gravatar_id":"","url":"https://api.github.com/users/ifyouseewendy","html_url":"https://github.com/ifyouseewendy","followers_url":"https://api.github.com/users/ifyouseewendy/followers","following_url":"https://api.github.com/users/ifyouseewendy/following{/other_user}","gists_url":"https://api.github.com/users/ifyouseewendy/gists{/gist_id}","starred_url":"https://api.github.com/users/ifyouseewendy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifyouseewendy/subscriptions","organizations_url":"https://api.github.com/users/ifyouseewendy/orgs","repos_url":"https://api.github.com/users/ifyouseewendy/repos","events_url":"https://api.github.com/users/ifyouseewendy/events{/privacy}","received_events_url":"https://api.github.com/users/ifyouseewendy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ifyouseewendy/rulers","description":"demo project in Rebuilding Rails","fork":false,"url":"https://api.github.com/repos/ifyouseewendy/rulers","forks_url":"https://api.github.com/repos/ifyouseewendy/rulers/forks","keys_url":"https://api.github.com/repos/ifyouseewendy/rulers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ifyouseewendy/rulers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ifyouseewendy/rulers/teams","hooks_url":"https://api.github.com/repos/ifyouseewendy/rulers/hooks","issue_events_url":"https://api.github.com/repos/ifyouseewendy/rulers/issues/events{/number}","events_url":"https://api.github.com/repos/ifyouseewendy/rulers/events","assignees_url":"https://api.github.com/repos/ifyouseewendy/rulers/assignees{/user}","branches_url":"https://api.github.com/repos/ifyouseewendy/rulers/branches{/branch}","tags_url":"https://api.github.com/repos/ifyouseewendy/rulers/tags","blobs_url":"https://api.github.com/repos/ifyouseewendy/rulers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ifyouseewendy/rulers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ifyouseewendy/rulers/git/refs{/sha}","trees_url":"https://api.github.com/repos/ifyouseewendy/rulers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ifyouseewendy/rulers/statuses/{sha}","languages_url":"https://api.github.com/repos/ifyouseewendy/rulers/languages","stargazers_url":"https://api.github.com/repos/ifyouseewendy/rulers/stargazers","contributors_url":"https://api.github.com/repos/ifyouseewendy/rulers/contributors","subscribers_url":"https://api.github.com/repos/ifyouseewendy/rulers/subscribers","subscription_url":"https://api.github.com/repos/ifyouseewendy/rulers/subscription","commits_url":"https://api.github.com/repos/ifyouseewendy/rulers/commits{/sha}","git_commits_url":"https://api.github.com/repos/ifyouseewendy/rulers/git/commits{/sha}","comments_url":"https://api.github.com/repos/ifyouseewendy/rulers/comments{/number}","issue_comment_url":"https://api.github.com/repos/ifyouseewendy/rulers/issues/comments/{number}","contents_url":"https://api.github.com/repos/ifyouseewendy/rulers/contents/{+path}","compare_url":"https://api.github.com/repos/ifyouseewendy/rulers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ifyouseewendy/rulers/merges","archive_url":"https://api.github.com/repos/ifyouseewendy/rulers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ifyouseewendy/rulers/downloads","issues_url":"https://api.github.com/repos/ifyouseewendy/rulers/issues{/number}","pulls_url":"https://api.github.com/repos/ifyouseewendy/rulers/pulls{/number}","milestones_url":"https://api.github.com/repos/ifyouseewendy/rulers/milestones{/number}","notifications_url":"https://api.github.com/repos/ifyouseewendy/rulers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ifyouseewendy/rulers/labels{/name}","releases_url":"https://api.github.com/repos/ifyouseewendy/rulers/releases{/id}","created_at":"2014-09-23T17:56:00Z","updated_at":"2014-09-23T17:56:53Z","pushed_at":"2014-10-11T15:00:42Z","git_url":"git://github.com/ifyouseewendy/rulers.git","ssh_url":"git@github.com:ifyouseewendy/rulers.git","clone_url":"https://github.com/ifyouseewendy/rulers.git","svn_url":"https://github.com/ifyouseewendy/rulers","homepage":"http://rebuilding-rails.com/","size":136,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/1"},"html":{"href":"https://github.com/ifyouseewendy/rulers/pull/1"},"issue":{"href":"https://api.github.com/repos/ifyouseewendy/rulers/issues/1"},"comments":{"href":"https://api.github.com/repos/ifyouseewendy/rulers/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ifyouseewendy/rulers/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ifyouseewendy/rulers/statuses/3baabd95172fb292f8a7c81b88c7ba814fd00df6"}}}}