{"action":"created","comment":{"url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments/44001976","id":44001976,"diff_hunk":"@@ -26,6 +26,22 @@ class Competition < ActiveRecord::Base\n   validates :venue, format: { with: PATTERN_TEXT_WITH_LINKS_RE }\n   validates :website, format: { with: /\\Ahttps?:\\/\\/.*\\z/ }, allow_blank: true\n \n+  def self.NEARBY_DISTANCE_KM_WARNING","path":"WcaOnRails/app/models/competition.rb","position":4,"original_position":4,"commit_id":"5cbef73fa89d95d11f1c06bbf1b1b999148da6de","original_commit_id":"5cbef73fa89d95d11f1c06bbf1b1b999148da6de","user":{"login":"timhabermaas","id":96054,"avatar_url":"https://avatars.githubusercontent.com/u/96054?v=3","gravatar_id":"","url":"https://api.github.com/users/timhabermaas","html_url":"https://github.com/timhabermaas","followers_url":"https://api.github.com/users/timhabermaas/followers","following_url":"https://api.github.com/users/timhabermaas/following{/other_user}","gists_url":"https://api.github.com/users/timhabermaas/gists{/gist_id}","starred_url":"https://api.github.com/users/timhabermaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timhabermaas/subscriptions","organizations_url":"https://api.github.com/users/timhabermaas/orgs","repos_url":"https://api.github.com/users/timhabermaas/repos","events_url":"https://api.github.com/users/timhabermaas/events{/privacy}","received_events_url":"https://api.github.com/users/timhabermaas/received_events","type":"User","site_admin":false},"body":"These are class methods, you can define and use constants like so and save the method invocation overhead:\r\n\r\n```ruby\r\nclass Foo\r\n  NEARBY_DISTANCE_KM_DANGER = 200\r\n\r\n  def some_calculation\r\n    NEARBY_DISTANCE_KM_DANGER * 10\r\n  end\r\nend\r\n\r\nputs Foo:: NEARBY_DISTANCE_KM_DANGER\r\n```\r\n","created_at":"2015-11-05T11:33:12Z","updated_at":"2015-11-05T11:33:12Z","html_url":"https://github.com/cubing/worldcubeassociation.org/pull/206#discussion_r44001976","pull_request_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/206","_links":{"self":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments/44001976"},"html":{"href":"https://github.com/cubing/worldcubeassociation.org/pull/206#discussion_r44001976"},"pull_request":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/206"}}},"pull_request":{"url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/206","id":49771139,"html_url":"https://github.com/cubing/worldcubeassociation.org/pull/206","diff_url":"https://github.com/cubing/worldcubeassociation.org/pull/206.diff","patch_url":"https://github.com/cubing/worldcubeassociation.org/pull/206.patch","issue_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/206","number":206,"state":"open","locked":false,"title":"Issue #182: Inform Board of nearby competitions before announcing","user":{"login":"pedrosino","id":1881933,"avatar_url":"https://avatars.githubusercontent.com/u/1881933?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrosino","html_url":"https://github.com/pedrosino","followers_url":"https://api.github.com/users/pedrosino/followers","following_url":"https://api.github.com/users/pedrosino/following{/other_user}","gists_url":"https://api.github.com/users/pedrosino/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrosino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrosino/subscriptions","organizations_url":"https://api.github.com/users/pedrosino/orgs","repos_url":"https://api.github.com/users/pedrosino/repos","events_url":"https://api.github.com/users/pedrosino/events{/privacy}","received_events_url":"https://api.github.com/users/pedrosino/received_events","type":"User","site_admin":false},"body":"Maybe extend to delegates?\r\nGoogle map the other competitions?","created_at":"2015-11-05T01:25:50Z","updated_at":"2015-11-05T11:33:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec401b836b68782ea02d3f4d8de1f515115aa4d8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/206/commits","review_comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/206/comments","review_comment_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/206/comments","statuses_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/5cbef73fa89d95d11f1c06bbf1b1b999148da6de","head":{"label":"pedrosino:master","ref":"master","sha":"5cbef73fa89d95d11f1c06bbf1b1b999148da6de","user":{"login":"pedrosino","id":1881933,"avatar_url":"https://avatars.githubusercontent.com/u/1881933?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrosino","html_url":"https://github.com/pedrosino","followers_url":"https://api.github.com/users/pedrosino/followers","following_url":"https://api.github.com/users/pedrosino/following{/other_user}","gists_url":"https://api.github.com/users/pedrosino/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrosino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrosino/subscriptions","organizations_url":"https://api.github.com/users/pedrosino/orgs","repos_url":"https://api.github.com/users/pedrosino/repos","events_url":"https://api.github.com/users/pedrosino/events{/privacy}","received_events_url":"https://api.github.com/users/pedrosino/received_events","type":"User","site_admin":false},"repo":{"id":45578783,"name":"worldcubeassociation.org","full_name":"pedrosino/worldcubeassociation.org","owner":{"login":"pedrosino","id":1881933,"avatar_url":"https://avatars.githubusercontent.com/u/1881933?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrosino","html_url":"https://github.com/pedrosino","followers_url":"https://api.github.com/users/pedrosino/followers","following_url":"https://api.github.com/users/pedrosino/following{/other_user}","gists_url":"https://api.github.com/users/pedrosino/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrosino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrosino/subscriptions","organizations_url":"https://api.github.com/users/pedrosino/orgs","repos_url":"https://api.github.com/users/pedrosino/repos","events_url":"https://api.github.com/users/pedrosino/events{/privacy}","received_events_url":"https://api.github.com/users/pedrosino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pedrosino/worldcubeassociation.org","description":"[WCA Project] All of the code that runs on worldcubeassociation.org","fork":true,"url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org","forks_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/forks","keys_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/teams","hooks_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/hooks","issue_events_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/issues/events{/number}","events_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/events","assignees_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/assignees{/user}","branches_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/branches{/branch}","tags_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/tags","blobs_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/statuses/{sha}","languages_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/languages","stargazers_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/stargazers","contributors_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/contributors","subscribers_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/subscribers","subscription_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/subscription","commits_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/contents/{+path}","compare_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/merges","archive_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/downloads","issues_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/issues{/number}","pulls_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/pulls{/number}","milestones_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/milestones{/number}","notifications_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/labels{/name}","releases_url":"https://api.github.com/repos/pedrosino/worldcubeassociation.org/releases{/id}","created_at":"2015-11-05T01:22:31Z","updated_at":"2015-11-05T01:22:39Z","pushed_at":"2015-11-05T01:24:47Z","git_url":"git://github.com/pedrosino/worldcubeassociation.org.git","ssh_url":"git@github.com:pedrosino/worldcubeassociation.org.git","clone_url":"https://github.com/pedrosino/worldcubeassociation.org.git","svn_url":"https://github.com/pedrosino/worldcubeassociation.org","homepage":"https://www.worldcubeassociation.org/","size":49165,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"cubing:master","ref":"master","sha":"6312d779a1123fa082962d61d2669cfc587607b1","user":{"login":"cubing","id":1092267,"avatar_url":"https://avatars.githubusercontent.com/u/1092267?v=3","gravatar_id":"","url":"https://api.github.com/users/cubing","html_url":"https://github.com/cubing","followers_url":"https://api.github.com/users/cubing/followers","following_url":"https://api.github.com/users/cubing/following{/other_user}","gists_url":"https://api.github.com/users/cubing/gists{/gist_id}","starred_url":"https://api.github.com/users/cubing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cubing/subscriptions","organizations_url":"https://api.github.com/users/cubing/orgs","repos_url":"https://api.github.com/users/cubing/repos","events_url":"https://api.github.com/users/cubing/events{/privacy}","received_events_url":"https://api.github.com/users/cubing/received_events","type":"Organization","site_admin":false},"repo":{"id":34161579,"name":"worldcubeassociation.org","full_name":"cubing/worldcubeassociation.org","owner":{"login":"cubing","id":1092267,"avatar_url":"https://avatars.githubusercontent.com/u/1092267?v=3","gravatar_id":"","url":"https://api.github.com/users/cubing","html_url":"https://github.com/cubing","followers_url":"https://api.github.com/users/cubing/followers","following_url":"https://api.github.com/users/cubing/following{/other_user}","gists_url":"https://api.github.com/users/cubing/gists{/gist_id}","starred_url":"https://api.github.com/users/cubing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cubing/subscriptions","organizations_url":"https://api.github.com/users/cubing/orgs","repos_url":"https://api.github.com/users/cubing/repos","events_url":"https://api.github.com/users/cubing/events{/privacy}","received_events_url":"https://api.github.com/users/cubing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cubing/worldcubeassociation.org","description":"[WCA Project] All of the code that runs on worldcubeassociation.org","fork":false,"url":"https://api.github.com/repos/cubing/worldcubeassociation.org","forks_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/forks","keys_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/teams","hooks_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/hooks","issue_events_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/events{/number}","events_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/events","assignees_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/assignees{/user}","branches_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/branches{/branch}","tags_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/tags","blobs_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/{sha}","languages_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/languages","stargazers_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/stargazers","contributors_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/contributors","subscribers_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/subscribers","subscription_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/subscription","commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/contents/{+path}","compare_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/merges","archive_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/downloads","issues_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues{/number}","pulls_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls{/number}","milestones_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/milestones{/number}","notifications_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/labels{/name}","releases_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/releases{/id}","created_at":"2015-04-18T10:21:53Z","updated_at":"2015-08-17T19:53:55Z","pushed_at":"2015-11-05T10:35:51Z","git_url":"git://github.com/cubing/worldcubeassociation.org.git","ssh_url":"git@github.com:cubing/worldcubeassociation.org.git","clone_url":"https://github.com/cubing/worldcubeassociation.org.git","svn_url":"https://github.com/cubing/worldcubeassociation.org","homepage":"https://www.worldcubeassociation.org/","size":49165,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":82,"forks":14,"open_issues":82,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/206"},"html":{"href":"https://github.com/cubing/worldcubeassociation.org/pull/206"},"issue":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/206"},"comments":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/206/comments"},"review_comments":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/206/comments"},"review_comment":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/206/commits"},"statuses":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/5cbef73fa89d95d11f1c06bbf1b1b999148da6de"}}}}