{"action":"created","comment":{"url":"https://api.github.com/repos/neverovda/simpler/pulls/comments/237927002","pull_request_review_id":180352723,"id":237927002,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzkyNzAwMg==","diff_hunk":"@@ -14,25 +14,27 @@ def initialize(env)\n     def make_response(action)\n       @request.env['simpler.controller'] = self\n       @request.env['simpler.action'] = action\n-      param = @request.env['PATH_PARAM']\n-      @request.params[param[:name]] = param[:value]\n-\n-      set_default_headers\n+      \n       send(action)\n       write_response\n \n-      add_header 'Template', @request.env['simpler.template']\n-      add_header 'Parameters', params.map { |k,v| [k.to_s, v] }.to_h\n-      add_header 'Handler', \"#{self.class.name}##{action}\"\n+      @request.env['simpler.parameters'] = params.map { |k,v| [k.to_s, v] }.to_h\n+      @request.env['simpler.handler'] = \"#{self.class.name}##{action}\"\n \n+      set_headers\n       @response.finish\n     end\n \n-    def not_found\n-      set_default_headers\n-      status 404\n-      @response.write File.read(Simpler.root.join('public/404.html'))\n-      @response.finish\n+    def self.not_found\n+      response = Rack::Response.new","path":"lib/simpler/controller.rb","position":18,"original_position":28,"commit_id":"03ca81259de712bb4173d4a77d3037ebd412c7ca","original_commit_id":"03ca81259de712bb4173d4a77d3037ebd412c7ca","user":{"login":"iBublik","id":11278497,"node_id":"MDQ6VXNlcjExMjc4NDk3","avatar_url":"https://avatars1.githubusercontent.com/u/11278497?v=4","gravatar_id":"","url":"https://api.github.com/users/iBublik","html_url":"https://github.com/iBublik","followers_url":"https://api.github.com/users/iBublik/followers","following_url":"https://api.github.com/users/iBublik/following{/other_user}","gists_url":"https://api.github.com/users/iBublik/gists{/gist_id}","starred_url":"https://api.github.com/users/iBublik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iBublik/subscriptions","organizations_url":"https://api.github.com/users/iBublik/orgs","repos_url":"https://api.github.com/users/iBublik/repos","events_url":"https://api.github.com/users/iBublik/events{/privacy}","received_events_url":"https://api.github.com/users/iBublik/received_events","type":"User","site_admin":false},"body":"Не обязательно использовать Rack::Response, когда ответ примитивный. Можно обычный rack-совместимый массив отдать","created_at":"2018-11-30T16:49:40Z","updated_at":"2018-11-30T16:59:16Z","html_url":"https://github.com/neverovda/simpler/pull/1#discussion_r237927002","pull_request_url":"https://api.github.com/repos/neverovda/simpler/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/neverovda/simpler/pulls/comments/237927002"},"html":{"href":"https://github.com/neverovda/simpler/pull/1#discussion_r237927002"},"pull_request":{"href":"https://api.github.com/repos/neverovda/simpler/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/neverovda/simpler/pulls/1","id":234114409,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0MTE0NDA5","html_url":"https://github.com/neverovda/simpler/pull/1","diff_url":"https://github.com/neverovda/simpler/pull/1.diff","patch_url":"https://github.com/neverovda/simpler/pull/1.patch","issue_url":"https://api.github.com/repos/neverovda/simpler/issues/1","number":1,"state":"open","locked":false,"title":"Tasks","user":{"login":"neverovda","id":41317348,"node_id":"MDQ6VXNlcjQxMzE3MzQ4","avatar_url":"https://avatars0.githubusercontent.com/u/41317348?v=4","gravatar_id":"","url":"https://api.github.com/users/neverovda","html_url":"https://github.com/neverovda","followers_url":"https://api.github.com/users/neverovda/followers","following_url":"https://api.github.com/users/neverovda/following{/other_user}","gists_url":"https://api.github.com/users/neverovda/gists{/gist_id}","starred_url":"https://api.github.com/users/neverovda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neverovda/subscriptions","organizations_url":"https://api.github.com/users/neverovda/orgs","repos_url":"https://api.github.com/users/neverovda/repos","events_url":"https://api.github.com/users/neverovda/events{/privacy}","received_events_url":"https://api.github.com/users/neverovda/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-28T01:07:37Z","updated_at":"2018-11-30T16:59:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfaa18579d0ad9e105150f1fc269a9de9fa8204d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/neverovda/simpler/pulls/1/commits","review_comments_url":"https://api.github.com/repos/neverovda/simpler/pulls/1/comments","review_comment_url":"https://api.github.com/repos/neverovda/simpler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neverovda/simpler/issues/1/comments","statuses_url":"https://api.github.com/repos/neverovda/simpler/statuses/03ca81259de712bb4173d4a77d3037ebd412c7ca","head":{"label":"neverovda:task","ref":"task","sha":"03ca81259de712bb4173d4a77d3037ebd412c7ca","user":{"login":"neverovda","id":41317348,"node_id":"MDQ6VXNlcjQxMzE3MzQ4","avatar_url":"https://avatars0.githubusercontent.com/u/41317348?v=4","gravatar_id":"","url":"https://api.github.com/users/neverovda","html_url":"https://github.com/neverovda","followers_url":"https://api.github.com/users/neverovda/followers","following_url":"https://api.github.com/users/neverovda/following{/other_user}","gists_url":"https://api.github.com/users/neverovda/gists{/gist_id}","starred_url":"https://api.github.com/users/neverovda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neverovda/subscriptions","organizations_url":"https://api.github.com/users/neverovda/orgs","repos_url":"https://api.github.com/users/neverovda/repos","events_url":"https://api.github.com/users/neverovda/events{/privacy}","received_events_url":"https://api.github.com/users/neverovda/received_events","type":"User","site_admin":false},"repo":{"id":157188459,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcxODg0NTk=","name":"simpler","full_name":"neverovda/simpler","private":false,"owner":{"login":"neverovda","id":41317348,"node_id":"MDQ6VXNlcjQxMzE3MzQ4","avatar_url":"https://avatars0.githubusercontent.com/u/41317348?v=4","gravatar_id":"","url":"https://api.github.com/users/neverovda","html_url":"https://github.com/neverovda","followers_url":"https://api.github.com/users/neverovda/followers","following_url":"https://api.github.com/users/neverovda/following{/other_user}","gists_url":"https://api.github.com/users/neverovda/gists{/gist_id}","starred_url":"https://api.github.com/users/neverovda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neverovda/subscriptions","organizations_url":"https://api.github.com/users/neverovda/orgs","repos_url":"https://api.github.com/users/neverovda/repos","events_url":"https://api.github.com/users/neverovda/events{/privacy}","received_events_url":"https://api.github.com/users/neverovda/received_events","type":"User","site_admin":false},"html_url":"https://github.com/neverovda/simpler","description":null,"fork":true,"url":"https://api.github.com/repos/neverovda/simpler","forks_url":"https://api.github.com/repos/neverovda/simpler/forks","keys_url":"https://api.github.com/repos/neverovda/simpler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neverovda/simpler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neverovda/simpler/teams","hooks_url":"https://api.github.com/repos/neverovda/simpler/hooks","issue_events_url":"https://api.github.com/repos/neverovda/simpler/issues/events{/number}","events_url":"https://api.github.com/repos/neverovda/simpler/events","assignees_url":"https://api.github.com/repos/neverovda/simpler/assignees{/user}","branches_url":"https://api.github.com/repos/neverovda/simpler/branches{/branch}","tags_url":"https://api.github.com/repos/neverovda/simpler/tags","blobs_url":"https://api.github.com/repos/neverovda/simpler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neverovda/simpler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neverovda/simpler/git/refs{/sha}","trees_url":"https://api.github.com/repos/neverovda/simpler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neverovda/simpler/statuses/{sha}","languages_url":"https://api.github.com/repos/neverovda/simpler/languages","stargazers_url":"https://api.github.com/repos/neverovda/simpler/stargazers","contributors_url":"https://api.github.com/repos/neverovda/simpler/contributors","subscribers_url":"https://api.github.com/repos/neverovda/simpler/subscribers","subscription_url":"https://api.github.com/repos/neverovda/simpler/subscription","commits_url":"https://api.github.com/repos/neverovda/simpler/commits{/sha}","git_commits_url":"https://api.github.com/repos/neverovda/simpler/git/commits{/sha}","comments_url":"https://api.github.com/repos/neverovda/simpler/comments{/number}","issue_comment_url":"https://api.github.com/repos/neverovda/simpler/issues/comments{/number}","contents_url":"https://api.github.com/repos/neverovda/simpler/contents/{+path}","compare_url":"https://api.github.com/repos/neverovda/simpler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neverovda/simpler/merges","archive_url":"https://api.github.com/repos/neverovda/simpler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neverovda/simpler/downloads","issues_url":"https://api.github.com/repos/neverovda/simpler/issues{/number}","pulls_url":"https://api.github.com/repos/neverovda/simpler/pulls{/number}","milestones_url":"https://api.github.com/repos/neverovda/simpler/milestones{/number}","notifications_url":"https://api.github.com/repos/neverovda/simpler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neverovda/simpler/labels{/name}","releases_url":"https://api.github.com/repos/neverovda/simpler/releases{/id}","deployments_url":"https://api.github.com/repos/neverovda/simpler/deployments","created_at":"2018-11-12T09:29:40Z","updated_at":"2018-11-12T09:29:42Z","pushed_at":"2018-11-30T13:38:57Z","git_url":"git://github.com/neverovda/simpler.git","ssh_url":"git@github.com:neverovda/simpler.git","clone_url":"https://github.com/neverovda/simpler.git","svn_url":"https://github.com/neverovda/simpler","homepage":null,"size":16,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"neverovda:master","ref":"master","sha":"c3d0a7863d0ef1e6a21bae73fe055ff130a045fa","user":{"login":"neverovda","id":41317348,"node_id":"MDQ6VXNlcjQxMzE3MzQ4","avatar_url":"https://avatars0.githubusercontent.com/u/41317348?v=4","gravatar_id":"","url":"https://api.github.com/users/neverovda","html_url":"https://github.com/neverovda","followers_url":"https://api.github.com/users/neverovda/followers","following_url":"https://api.github.com/users/neverovda/following{/other_user}","gists_url":"https://api.github.com/users/neverovda/gists{/gist_id}","starred_url":"https://api.github.com/users/neverovda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neverovda/subscriptions","organizations_url":"https://api.github.com/users/neverovda/orgs","repos_url":"https://api.github.com/users/neverovda/repos","events_url":"https://api.github.com/users/neverovda/events{/privacy}","received_events_url":"https://api.github.com/users/neverovda/received_events","type":"User","site_admin":false},"repo":{"id":157188459,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcxODg0NTk=","name":"simpler","full_name":"neverovda/simpler","private":false,"owner":{"login":"neverovda","id":41317348,"node_id":"MDQ6VXNlcjQxMzE3MzQ4","avatar_url":"https://avatars0.githubusercontent.com/u/41317348?v=4","gravatar_id":"","url":"https://api.github.com/users/neverovda","html_url":"https://github.com/neverovda","followers_url":"https://api.github.com/users/neverovda/followers","following_url":"https://api.github.com/users/neverovda/following{/other_user}","gists_url":"https://api.github.com/users/neverovda/gists{/gist_id}","starred_url":"https://api.github.com/users/neverovda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neverovda/subscriptions","organizations_url":"https://api.github.com/users/neverovda/orgs","repos_url":"https://api.github.com/users/neverovda/repos","events_url":"https://api.github.com/users/neverovda/events{/privacy}","received_events_url":"https://api.github.com/users/neverovda/received_events","type":"User","site_admin":false},"html_url":"https://github.com/neverovda/simpler","description":null,"fork":true,"url":"https://api.github.com/repos/neverovda/simpler","forks_url":"https://api.github.com/repos/neverovda/simpler/forks","keys_url":"https://api.github.com/repos/neverovda/simpler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neverovda/simpler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neverovda/simpler/teams","hooks_url":"https://api.github.com/repos/neverovda/simpler/hooks","issue_events_url":"https://api.github.com/repos/neverovda/simpler/issues/events{/number}","events_url":"https://api.github.com/repos/neverovda/simpler/events","assignees_url":"https://api.github.com/repos/neverovda/simpler/assignees{/user}","branches_url":"https://api.github.com/repos/neverovda/simpler/branches{/branch}","tags_url":"https://api.github.com/repos/neverovda/simpler/tags","blobs_url":"https://api.github.com/repos/neverovda/simpler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neverovda/simpler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neverovda/simpler/git/refs{/sha}","trees_url":"https://api.github.com/repos/neverovda/simpler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neverovda/simpler/statuses/{sha}","languages_url":"https://api.github.com/repos/neverovda/simpler/languages","stargazers_url":"https://api.github.com/repos/neverovda/simpler/stargazers","contributors_url":"https://api.github.com/repos/neverovda/simpler/contributors","subscribers_url":"https://api.github.com/repos/neverovda/simpler/subscribers","subscription_url":"https://api.github.com/repos/neverovda/simpler/subscription","commits_url":"https://api.github.com/repos/neverovda/simpler/commits{/sha}","git_commits_url":"https://api.github.com/repos/neverovda/simpler/git/commits{/sha}","comments_url":"https://api.github.com/repos/neverovda/simpler/comments{/number}","issue_comment_url":"https://api.github.com/repos/neverovda/simpler/issues/comments{/number}","contents_url":"https://api.github.com/repos/neverovda/simpler/contents/{+path}","compare_url":"https://api.github.com/repos/neverovda/simpler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neverovda/simpler/merges","archive_url":"https://api.github.com/repos/neverovda/simpler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neverovda/simpler/downloads","issues_url":"https://api.github.com/repos/neverovda/simpler/issues{/number}","pulls_url":"https://api.github.com/repos/neverovda/simpler/pulls{/number}","milestones_url":"https://api.github.com/repos/neverovda/simpler/milestones{/number}","notifications_url":"https://api.github.com/repos/neverovda/simpler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neverovda/simpler/labels{/name}","releases_url":"https://api.github.com/repos/neverovda/simpler/releases{/id}","deployments_url":"https://api.github.com/repos/neverovda/simpler/deployments","created_at":"2018-11-12T09:29:40Z","updated_at":"2018-11-12T09:29:42Z","pushed_at":"2018-11-30T13:38:57Z","git_url":"git://github.com/neverovda/simpler.git","ssh_url":"git@github.com:neverovda/simpler.git","clone_url":"https://github.com/neverovda/simpler.git","svn_url":"https://github.com/neverovda/simpler","homepage":null,"size":16,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neverovda/simpler/pulls/1"},"html":{"href":"https://github.com/neverovda/simpler/pull/1"},"issue":{"href":"https://api.github.com/repos/neverovda/simpler/issues/1"},"comments":{"href":"https://api.github.com/repos/neverovda/simpler/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/neverovda/simpler/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/neverovda/simpler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neverovda/simpler/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/neverovda/simpler/statuses/03ca81259de712bb4173d4a77d3037ebd412c7ca"}},"author_association":"OWNER"}}
{"actor":{"display_login":"iBublik"}}