{"action":"opened","number":201,"pull_request":{"url":"https://api.github.com/repos/redding/deas/pulls/201","id":51432545,"html_url":"https://github.com/redding/deas/pull/201","diff_url":"https://github.com/redding/deas/pull/201.diff","patch_url":"https://github.com/redding/deas/pull/201.patch","issue_url":"https://api.github.com/repos/redding/deas/issues/201","number":201,"state":"open","locked":false,"title":"view handler: namespace non-user-facing methods","user":{"login":"kellyredding","id":82110,"avatar_url":"https://avatars.githubusercontent.com/u/82110?v=3","gravatar_id":"","url":"https://api.github.com/users/kellyredding","html_url":"https://github.com/kellyredding","followers_url":"https://api.github.com/users/kellyredding/followers","following_url":"https://api.github.com/users/kellyredding/following{/other_user}","gists_url":"https://api.github.com/users/kellyredding/gists{/gist_id}","starred_url":"https://api.github.com/users/kellyredding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellyredding/subscriptions","organizations_url":"https://api.github.com/users/kellyredding/orgs","repos_url":"https://api.github.com/users/kellyredding/repos","events_url":"https://api.github.com/users/kellyredding/events{/privacy}","received_events_url":"https://api.github.com/users/kellyredding/received_events","type":"User","site_admin":false},"body":"Since view handlers are intended to run user code, we want to be\r\ncareful to not \"pollute\" the handler scope with our own methods\r\nthat will break in spectacular ways if the user happens to override\r\nthem.\r\n\r\nThis switches all the internal methods (ie methods not intended to\r\nbe called or used by users) to be prefixed with `deas_`.  This not\r\nonly marks them as internal \"deas\" methods but also makes it more\r\ndifficult to accidentally override in custom user handlers.\r\n\r\nIn addition, now that the methods are namespaced, I have no problem\r\nmaking the `deas_run_callback` method public.  This allows the\r\ndeas runner to call the method directly instead of instance eval\r\ncalling it (which feels unnecessarily hackish).\r\n\r\n@jcredding ready for review.","created_at":"2015-11-21T03:37:59Z","updated_at":"2015-11-21T03:37:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/redding/deas/pulls/201/commits","review_comments_url":"https://api.github.com/repos/redding/deas/pulls/201/comments","review_comment_url":"https://api.github.com/repos/redding/deas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/redding/deas/issues/201/comments","statuses_url":"https://api.github.com/repos/redding/deas/statuses/61126023346a7ba57553817007446f8472884924","head":{"label":"redding:kr-namespace-handler-meths","ref":"kr-namespace-handler-meths","sha":"61126023346a7ba57553817007446f8472884924","user":{"login":"redding","id":2427810,"avatar_url":"https://avatars.githubusercontent.com/u/2427810?v=3","gravatar_id":"","url":"https://api.github.com/users/redding","html_url":"https://github.com/redding","followers_url":"https://api.github.com/users/redding/followers","following_url":"https://api.github.com/users/redding/following{/other_user}","gists_url":"https://api.github.com/users/redding/gists{/gist_id}","starred_url":"https://api.github.com/users/redding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redding/subscriptions","organizations_url":"https://api.github.com/users/redding/orgs","repos_url":"https://api.github.com/users/redding/repos","events_url":"https://api.github.com/users/redding/events{/privacy}","received_events_url":"https://api.github.com/users/redding/received_events","type":"Organization","site_admin":false},"repo":{"id":9076443,"name":"deas","full_name":"redding/deas","owner":{"login":"redding","id":2427810,"avatar_url":"https://avatars.githubusercontent.com/u/2427810?v=3","gravatar_id":"","url":"https://api.github.com/users/redding","html_url":"https://github.com/redding","followers_url":"https://api.github.com/users/redding/followers","following_url":"https://api.github.com/users/redding/following{/other_user}","gists_url":"https://api.github.com/users/redding/gists{/gist_id}","starred_url":"https://api.github.com/users/redding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redding/subscriptions","organizations_url":"https://api.github.com/users/redding/orgs","repos_url":"https://api.github.com/users/redding/repos","events_url":"https://api.github.com/users/redding/events{/privacy}","received_events_url":"https://api.github.com/users/redding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/redding/deas","description":"\"day-us\": Handler-based web framework powered by Sinatra (for now)","fork":false,"url":"https://api.github.com/repos/redding/deas","forks_url":"https://api.github.com/repos/redding/deas/forks","keys_url":"https://api.github.com/repos/redding/deas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redding/deas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redding/deas/teams","hooks_url":"https://api.github.com/repos/redding/deas/hooks","issue_events_url":"https://api.github.com/repos/redding/deas/issues/events{/number}","events_url":"https://api.github.com/repos/redding/deas/events","assignees_url":"https://api.github.com/repos/redding/deas/assignees{/user}","branches_url":"https://api.github.com/repos/redding/deas/branches{/branch}","tags_url":"https://api.github.com/repos/redding/deas/tags","blobs_url":"https://api.github.com/repos/redding/deas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redding/deas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redding/deas/git/refs{/sha}","trees_url":"https://api.github.com/repos/redding/deas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redding/deas/statuses/{sha}","languages_url":"https://api.github.com/repos/redding/deas/languages","stargazers_url":"https://api.github.com/repos/redding/deas/stargazers","contributors_url":"https://api.github.com/repos/redding/deas/contributors","subscribers_url":"https://api.github.com/repos/redding/deas/subscribers","subscription_url":"https://api.github.com/repos/redding/deas/subscription","commits_url":"https://api.github.com/repos/redding/deas/commits{/sha}","git_commits_url":"https://api.github.com/repos/redding/deas/git/commits{/sha}","comments_url":"https://api.github.com/repos/redding/deas/comments{/number}","issue_comment_url":"https://api.github.com/repos/redding/deas/issues/comments{/number}","contents_url":"https://api.github.com/repos/redding/deas/contents/{+path}","compare_url":"https://api.github.com/repos/redding/deas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redding/deas/merges","archive_url":"https://api.github.com/repos/redding/deas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redding/deas/downloads","issues_url":"https://api.github.com/repos/redding/deas/issues{/number}","pulls_url":"https://api.github.com/repos/redding/deas/pulls{/number}","milestones_url":"https://api.github.com/repos/redding/deas/milestones{/number}","notifications_url":"https://api.github.com/repos/redding/deas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redding/deas/labels{/name}","releases_url":"https://api.github.com/repos/redding/deas/releases{/id}","created_at":"2013-03-28T12:18:52Z","updated_at":"2015-07-17T14:56:00Z","pushed_at":"2015-11-21T03:37:45Z","git_url":"git://github.com/redding/deas.git","ssh_url":"git@github.com:redding/deas.git","clone_url":"https://github.com/redding/deas.git","svn_url":"https://github.com/redding/deas","homepage":"","size":488,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":11,"forks":1,"open_issues":11,"watchers":1,"default_branch":"master"}},"base":{"label":"redding:master","ref":"master","sha":"4ba7ae7b36ebcd05932ff9e00b09654b5bbe190c","user":{"login":"redding","id":2427810,"avatar_url":"https://avatars.githubusercontent.com/u/2427810?v=3","gravatar_id":"","url":"https://api.github.com/users/redding","html_url":"https://github.com/redding","followers_url":"https://api.github.com/users/redding/followers","following_url":"https://api.github.com/users/redding/following{/other_user}","gists_url":"https://api.github.com/users/redding/gists{/gist_id}","starred_url":"https://api.github.com/users/redding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redding/subscriptions","organizations_url":"https://api.github.com/users/redding/orgs","repos_url":"https://api.github.com/users/redding/repos","events_url":"https://api.github.com/users/redding/events{/privacy}","received_events_url":"https://api.github.com/users/redding/received_events","type":"Organization","site_admin":false},"repo":{"id":9076443,"name":"deas","full_name":"redding/deas","owner":{"login":"redding","id":2427810,"avatar_url":"https://avatars.githubusercontent.com/u/2427810?v=3","gravatar_id":"","url":"https://api.github.com/users/redding","html_url":"https://github.com/redding","followers_url":"https://api.github.com/users/redding/followers","following_url":"https://api.github.com/users/redding/following{/other_user}","gists_url":"https://api.github.com/users/redding/gists{/gist_id}","starred_url":"https://api.github.com/users/redding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redding/subscriptions","organizations_url":"https://api.github.com/users/redding/orgs","repos_url":"https://api.github.com/users/redding/repos","events_url":"https://api.github.com/users/redding/events{/privacy}","received_events_url":"https://api.github.com/users/redding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/redding/deas","description":"\"day-us\": Handler-based web framework powered by Sinatra (for now)","fork":false,"url":"https://api.github.com/repos/redding/deas","forks_url":"https://api.github.com/repos/redding/deas/forks","keys_url":"https://api.github.com/repos/redding/deas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redding/deas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redding/deas/teams","hooks_url":"https://api.github.com/repos/redding/deas/hooks","issue_events_url":"https://api.github.com/repos/redding/deas/issues/events{/number}","events_url":"https://api.github.com/repos/redding/deas/events","assignees_url":"https://api.github.com/repos/redding/deas/assignees{/user}","branches_url":"https://api.github.com/repos/redding/deas/branches{/branch}","tags_url":"https://api.github.com/repos/redding/deas/tags","blobs_url":"https://api.github.com/repos/redding/deas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redding/deas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redding/deas/git/refs{/sha}","trees_url":"https://api.github.com/repos/redding/deas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redding/deas/statuses/{sha}","languages_url":"https://api.github.com/repos/redding/deas/languages","stargazers_url":"https://api.github.com/repos/redding/deas/stargazers","contributors_url":"https://api.github.com/repos/redding/deas/contributors","subscribers_url":"https://api.github.com/repos/redding/deas/subscribers","subscription_url":"https://api.github.com/repos/redding/deas/subscription","commits_url":"https://api.github.com/repos/redding/deas/commits{/sha}","git_commits_url":"https://api.github.com/repos/redding/deas/git/commits{/sha}","comments_url":"https://api.github.com/repos/redding/deas/comments{/number}","issue_comment_url":"https://api.github.com/repos/redding/deas/issues/comments{/number}","contents_url":"https://api.github.com/repos/redding/deas/contents/{+path}","compare_url":"https://api.github.com/repos/redding/deas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redding/deas/merges","archive_url":"https://api.github.com/repos/redding/deas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redding/deas/downloads","issues_url":"https://api.github.com/repos/redding/deas/issues{/number}","pulls_url":"https://api.github.com/repos/redding/deas/pulls{/number}","milestones_url":"https://api.github.com/repos/redding/deas/milestones{/number}","notifications_url":"https://api.github.com/repos/redding/deas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redding/deas/labels{/name}","releases_url":"https://api.github.com/repos/redding/deas/releases{/id}","created_at":"2013-03-28T12:18:52Z","updated_at":"2015-07-17T14:56:00Z","pushed_at":"2015-11-21T03:37:45Z","git_url":"git://github.com/redding/deas.git","ssh_url":"git@github.com:redding/deas.git","clone_url":"https://github.com/redding/deas.git","svn_url":"https://github.com/redding/deas","homepage":"","size":488,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":11,"forks":1,"open_issues":11,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/redding/deas/pulls/201"},"html":{"href":"https://github.com/redding/deas/pull/201"},"issue":{"href":"https://api.github.com/repos/redding/deas/issues/201"},"comments":{"href":"https://api.github.com/repos/redding/deas/issues/201/comments"},"review_comments":{"href":"https://api.github.com/repos/redding/deas/pulls/201/comments"},"review_comment":{"href":"https://api.github.com/repos/redding/deas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/redding/deas/pulls/201/commits"},"statuses":{"href":"https://api.github.com/repos/redding/deas/statuses/61126023346a7ba57553817007446f8472884924"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":25,"deletions":20,"changed_files":4}}