{"action":"closed","number":64,"pull_request":{"url":"https://api.github.com/repos/jpmcgrath/shortener/pulls/64","id":62247686,"html_url":"https://github.com/jpmcgrath/shortener/pull/64","diff_url":"https://github.com/jpmcgrath/shortener/pull/64.diff","patch_url":"https://github.com/jpmcgrath/shortener/pull/64.patch","issue_url":"https://api.github.com/repos/jpmcgrath/shortener/issues/64","number":64,"state":"closed","locked":false,"title":"Escape token extraction","user":{"login":"erikreedstrom","id":821101,"avatar_url":"https://avatars.githubusercontent.com/u/821101?v=3","gravatar_id":"","url":"https://api.github.com/users/erikreedstrom","html_url":"https://github.com/erikreedstrom","followers_url":"https://api.github.com/users/erikreedstrom/followers","following_url":"https://api.github.com/users/erikreedstrom/following{/other_user}","gists_url":"https://api.github.com/users/erikreedstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/erikreedstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikreedstrom/subscriptions","organizations_url":"https://api.github.com/users/erikreedstrom/orgs","repos_url":"https://api.github.com/users/erikreedstrom/repos","events_url":"https://api.github.com/users/erikreedstrom/events{/privacy}","received_events_url":"https://api.github.com/users/erikreedstrom/received_events","type":"User","site_admin":false},"body":"This change allows monkey-patched charsets that contain regex protected characters to be used.\r\n\r\nFor example, the following initializer declares a charset that adds `-`. As a result, any short token including the `-` will currently fail token extraction.\r\n\r\n*config/initializers/shortener.rb*\r\n``` ruby\r\nmodule Shortener\r\n  send(:remove_const, :CHARSETS) if const_defined?(:CHARSETS)\r\n\r\n  CHARSETS = {\r\n    # Exclude vowels to preclude errant creation of words\r\n    alphanumsafe: (('b'..'z').to_a + ('b'..'Z').to_a).reject { |l| l =~ /[eiou]/i } + (0..9).to_a + %w(- _),\r\n  }\r\nend\r\n\r\nShortener.default_redirect = Rails.application.secrets.web_host_share\r\nShortener.unique_key_length = 6\r\nShortener.charset = :alphanumsafe\r\n```","created_at":"2016-03-09T15:43:06Z","updated_at":"2016-03-20T10:09:28Z","closed_at":"2016-03-20T10:09:28Z","merged_at":"2016-03-20T10:09:28Z","merge_commit_sha":"4e558e3bc6c78ba0b101e46ef0af7a670432eea1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jpmcgrath/shortener/pulls/64/commits","review_comments_url":"https://api.github.com/repos/jpmcgrath/shortener/pulls/64/comments","review_comment_url":"https://api.github.com/repos/jpmcgrath/shortener/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jpmcgrath/shortener/issues/64/comments","statuses_url":"https://api.github.com/repos/jpmcgrath/shortener/statuses/3c19adee0da4008acfaddbff7054558aa7f8afb8","head":{"label":"erikreedstrom:develop","ref":"develop","sha":"3c19adee0da4008acfaddbff7054558aa7f8afb8","user":{"login":"erikreedstrom","id":821101,"avatar_url":"https://avatars.githubusercontent.com/u/821101?v=3","gravatar_id":"","url":"https://api.github.com/users/erikreedstrom","html_url":"https://github.com/erikreedstrom","followers_url":"https://api.github.com/users/erikreedstrom/followers","following_url":"https://api.github.com/users/erikreedstrom/following{/other_user}","gists_url":"https://api.github.com/users/erikreedstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/erikreedstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikreedstrom/subscriptions","organizations_url":"https://api.github.com/users/erikreedstrom/orgs","repos_url":"https://api.github.com/users/erikreedstrom/repos","events_url":"https://api.github.com/users/erikreedstrom/events{/privacy}","received_events_url":"https://api.github.com/users/erikreedstrom/received_events","type":"User","site_admin":false},"repo":{"id":53504610,"name":"shortener","full_name":"erikreedstrom/shortener","owner":{"login":"erikreedstrom","id":821101,"avatar_url":"https://avatars.githubusercontent.com/u/821101?v=3","gravatar_id":"","url":"https://api.github.com/users/erikreedstrom","html_url":"https://github.com/erikreedstrom","followers_url":"https://api.github.com/users/erikreedstrom/followers","following_url":"https://api.github.com/users/erikreedstrom/following{/other_user}","gists_url":"https://api.github.com/users/erikreedstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/erikreedstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikreedstrom/subscriptions","organizations_url":"https://api.github.com/users/erikreedstrom/orgs","repos_url":"https://api.github.com/users/erikreedstrom/repos","events_url":"https://api.github.com/users/erikreedstrom/events{/privacy}","received_events_url":"https://api.github.com/users/erikreedstrom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erikreedstrom/shortener","description":"Shortener makes it easy to create shortened URLs for your rails application.","fork":true,"url":"https://api.github.com/repos/erikreedstrom/shortener","forks_url":"https://api.github.com/repos/erikreedstrom/shortener/forks","keys_url":"https://api.github.com/repos/erikreedstrom/shortener/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erikreedstrom/shortener/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erikreedstrom/shortener/teams","hooks_url":"https://api.github.com/repos/erikreedstrom/shortener/hooks","issue_events_url":"https://api.github.com/repos/erikreedstrom/shortener/issues/events{/number}","events_url":"https://api.github.com/repos/erikreedstrom/shortener/events","assignees_url":"https://api.github.com/repos/erikreedstrom/shortener/assignees{/user}","branches_url":"https://api.github.com/repos/erikreedstrom/shortener/branches{/branch}","tags_url":"https://api.github.com/repos/erikreedstrom/shortener/tags","blobs_url":"https://api.github.com/repos/erikreedstrom/shortener/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erikreedstrom/shortener/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erikreedstrom/shortener/git/refs{/sha}","trees_url":"https://api.github.com/repos/erikreedstrom/shortener/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erikreedstrom/shortener/statuses/{sha}","languages_url":"https://api.github.com/repos/erikreedstrom/shortener/languages","stargazers_url":"https://api.github.com/repos/erikreedstrom/shortener/stargazers","contributors_url":"https://api.github.com/repos/erikreedstrom/shortener/contributors","subscribers_url":"https://api.github.com/repos/erikreedstrom/shortener/subscribers","subscription_url":"https://api.github.com/repos/erikreedstrom/shortener/subscription","commits_url":"https://api.github.com/repos/erikreedstrom/shortener/commits{/sha}","git_commits_url":"https://api.github.com/repos/erikreedstrom/shortener/git/commits{/sha}","comments_url":"https://api.github.com/repos/erikreedstrom/shortener/comments{/number}","issue_comment_url":"https://api.github.com/repos/erikreedstrom/shortener/issues/comments{/number}","contents_url":"https://api.github.com/repos/erikreedstrom/shortener/contents/{+path}","compare_url":"https://api.github.com/repos/erikreedstrom/shortener/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erikreedstrom/shortener/merges","archive_url":"https://api.github.com/repos/erikreedstrom/shortener/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erikreedstrom/shortener/downloads","issues_url":"https://api.github.com/repos/erikreedstrom/shortener/issues{/number}","pulls_url":"https://api.github.com/repos/erikreedstrom/shortener/pulls{/number}","milestones_url":"https://api.github.com/repos/erikreedstrom/shortener/milestones{/number}","notifications_url":"https://api.github.com/repos/erikreedstrom/shortener/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erikreedstrom/shortener/labels{/name}","releases_url":"https://api.github.com/repos/erikreedstrom/shortener/releases{/id}","deployments_url":"https://api.github.com/repos/erikreedstrom/shortener/deployments","created_at":"2016-03-09T14:36:19Z","updated_at":"2016-03-09T14:36:20Z","pushed_at":"2016-03-09T15:05:47Z","git_url":"git://github.com/erikreedstrom/shortener.git","ssh_url":"git@github.com:erikreedstrom/shortener.git","clone_url":"https://github.com/erikreedstrom/shortener.git","svn_url":"https://github.com/erikreedstrom/shortener","homepage":"http://jamespmcgrath.com/a-simple-link-shortener-in-rails/","size":176,"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":"develop"}},"base":{"label":"jpmcgrath:develop","ref":"develop","sha":"dcd2cb4fc0e6f97cb10803a94d6c304240b8e25d","user":{"login":"jpmcgrath","id":646327,"avatar_url":"https://avatars.githubusercontent.com/u/646327?v=3","gravatar_id":"","url":"https://api.github.com/users/jpmcgrath","html_url":"https://github.com/jpmcgrath","followers_url":"https://api.github.com/users/jpmcgrath/followers","following_url":"https://api.github.com/users/jpmcgrath/following{/other_user}","gists_url":"https://api.github.com/users/jpmcgrath/gists{/gist_id}","starred_url":"https://api.github.com/users/jpmcgrath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpmcgrath/subscriptions","organizations_url":"https://api.github.com/users/jpmcgrath/orgs","repos_url":"https://api.github.com/users/jpmcgrath/repos","events_url":"https://api.github.com/users/jpmcgrath/events{/privacy}","received_events_url":"https://api.github.com/users/jpmcgrath/received_events","type":"User","site_admin":false},"repo":{"id":2306209,"name":"shortener","full_name":"jpmcgrath/shortener","owner":{"login":"jpmcgrath","id":646327,"avatar_url":"https://avatars.githubusercontent.com/u/646327?v=3","gravatar_id":"","url":"https://api.github.com/users/jpmcgrath","html_url":"https://github.com/jpmcgrath","followers_url":"https://api.github.com/users/jpmcgrath/followers","following_url":"https://api.github.com/users/jpmcgrath/following{/other_user}","gists_url":"https://api.github.com/users/jpmcgrath/gists{/gist_id}","starred_url":"https://api.github.com/users/jpmcgrath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpmcgrath/subscriptions","organizations_url":"https://api.github.com/users/jpmcgrath/orgs","repos_url":"https://api.github.com/users/jpmcgrath/repos","events_url":"https://api.github.com/users/jpmcgrath/events{/privacy}","received_events_url":"https://api.github.com/users/jpmcgrath/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpmcgrath/shortener","description":"Shortener makes it easy to create shortened URLs for your rails application.","fork":false,"url":"https://api.github.com/repos/jpmcgrath/shortener","forks_url":"https://api.github.com/repos/jpmcgrath/shortener/forks","keys_url":"https://api.github.com/repos/jpmcgrath/shortener/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpmcgrath/shortener/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpmcgrath/shortener/teams","hooks_url":"https://api.github.com/repos/jpmcgrath/shortener/hooks","issue_events_url":"https://api.github.com/repos/jpmcgrath/shortener/issues/events{/number}","events_url":"https://api.github.com/repos/jpmcgrath/shortener/events","assignees_url":"https://api.github.com/repos/jpmcgrath/shortener/assignees{/user}","branches_url":"https://api.github.com/repos/jpmcgrath/shortener/branches{/branch}","tags_url":"https://api.github.com/repos/jpmcgrath/shortener/tags","blobs_url":"https://api.github.com/repos/jpmcgrath/shortener/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpmcgrath/shortener/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpmcgrath/shortener/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpmcgrath/shortener/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpmcgrath/shortener/statuses/{sha}","languages_url":"https://api.github.com/repos/jpmcgrath/shortener/languages","stargazers_url":"https://api.github.com/repos/jpmcgrath/shortener/stargazers","contributors_url":"https://api.github.com/repos/jpmcgrath/shortener/contributors","subscribers_url":"https://api.github.com/repos/jpmcgrath/shortener/subscribers","subscription_url":"https://api.github.com/repos/jpmcgrath/shortener/subscription","commits_url":"https://api.github.com/repos/jpmcgrath/shortener/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpmcgrath/shortener/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpmcgrath/shortener/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpmcgrath/shortener/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpmcgrath/shortener/contents/{+path}","compare_url":"https://api.github.com/repos/jpmcgrath/shortener/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpmcgrath/shortener/merges","archive_url":"https://api.github.com/repos/jpmcgrath/shortener/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpmcgrath/shortener/downloads","issues_url":"https://api.github.com/repos/jpmcgrath/shortener/issues{/number}","pulls_url":"https://api.github.com/repos/jpmcgrath/shortener/pulls{/number}","milestones_url":"https://api.github.com/repos/jpmcgrath/shortener/milestones{/number}","notifications_url":"https://api.github.com/repos/jpmcgrath/shortener/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpmcgrath/shortener/labels{/name}","releases_url":"https://api.github.com/repos/jpmcgrath/shortener/releases{/id}","deployments_url":"https://api.github.com/repos/jpmcgrath/shortener/deployments","created_at":"2011-09-01T06:15:55Z","updated_at":"2016-03-18T16:30:13Z","pushed_at":"2016-03-20T10:09:28Z","git_url":"git://github.com/jpmcgrath/shortener.git","ssh_url":"git@github.com:jpmcgrath/shortener.git","clone_url":"https://github.com/jpmcgrath/shortener.git","svn_url":"https://github.com/jpmcgrath/shortener","homepage":"http://jamespmcgrath.com/a-simple-link-shortener-in-rails/","size":238,"stargazers_count":219,"watchers_count":219,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":17,"forks":111,"open_issues":17,"watchers":219,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/jpmcgrath/shortener/pulls/64"},"html":{"href":"https://github.com/jpmcgrath/shortener/pull/64"},"issue":{"href":"https://api.github.com/repos/jpmcgrath/shortener/issues/64"},"comments":{"href":"https://api.github.com/repos/jpmcgrath/shortener/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/jpmcgrath/shortener/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/jpmcgrath/shortener/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jpmcgrath/shortener/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/jpmcgrath/shortener/statuses/3c19adee0da4008acfaddbff7054558aa7f8afb8"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"jpmcgrath","id":646327,"avatar_url":"https://avatars.githubusercontent.com/u/646327?v=3","gravatar_id":"","url":"https://api.github.com/users/jpmcgrath","html_url":"https://github.com/jpmcgrath","followers_url":"https://api.github.com/users/jpmcgrath/followers","following_url":"https://api.github.com/users/jpmcgrath/following{/other_user}","gists_url":"https://api.github.com/users/jpmcgrath/gists{/gist_id}","starred_url":"https://api.github.com/users/jpmcgrath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpmcgrath/subscriptions","organizations_url":"https://api.github.com/users/jpmcgrath/orgs","repos_url":"https://api.github.com/users/jpmcgrath/repos","events_url":"https://api.github.com/users/jpmcgrath/events{/privacy}","received_events_url":"https://api.github.com/users/jpmcgrath/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":2,"deletions":1,"changed_files":1}}