{"action":"created","comment":{"url":"https://api.github.com/repos/oorion/jet_fuel/pulls/comments/27359466","id":27359466,"diff_hunk":"@@ -2,8 +2,14 @@ class Url < ActiveRecord::Base\n   validates :count, presence: true\n   validates :original, uniqueness: true\n \n-  def shorten\n-    digest = Digest::SHA256.hexdigest(original)[0..5]\n+  def shorten(host)\n+    #digest = Digest::SHA256.hexdigest(original)[0..5]\n+    #while Url.find_by(shortened: digest)\n+      #digest += Random.rand(0..9).to_s\n+    #end","path":"app/models/url.rb","position":10,"original_position":10,"commit_id":"9e7a12f257ce59106da2c06950dd0b18c2adc302","original_commit_id":"9e7a12f257ce59106da2c06950dd0b18c2adc302","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","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":"Missing space after #.","created_at":"2015-03-29T21:41:19Z","updated_at":"2015-03-29T21:41:19Z","html_url":"https://github.com/oorion/jet_fuel/pull/6#discussion_r27359466","pull_request_url":"https://api.github.com/repos/oorion/jet_fuel/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/oorion/jet_fuel/pulls/comments/27359466"},"html":{"href":"https://github.com/oorion/jet_fuel/pull/6#discussion_r27359466"},"pull_request":{"href":"https://api.github.com/repos/oorion/jet_fuel/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/oorion/jet_fuel/pulls/6","id":32188648,"html_url":"https://github.com/oorion/jet_fuel/pull/6","diff_url":"https://github.com/oorion/jet_fuel/pull/6.diff","patch_url":"https://github.com/oorion/jet_fuel/pull/6.patch","issue_url":"https://api.github.com/repos/oorion/jet_fuel/issues/6","number":6,"state":"open","locked":false,"title":"created external shorten_url gem and updated implementation and tests to...","user":{"login":"oorion","id":869456,"avatar_url":"https://avatars.githubusercontent.com/u/869456?v=3","gravatar_id":"","url":"https://api.github.com/users/oorion","html_url":"https://github.com/oorion","followers_url":"https://api.github.com/users/oorion/followers","following_url":"https://api.github.com/users/oorion/following{/other_user}","gists_url":"https://api.github.com/users/oorion/gists{/gist_id}","starred_url":"https://api.github.com/users/oorion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oorion/subscriptions","organizations_url":"https://api.github.com/users/oorion/orgs","repos_url":"https://api.github.com/users/oorion/repos","events_url":"https://api.github.com/users/oorion/events{/privacy}","received_events_url":"https://api.github.com/users/oorion/received_events","type":"User","site_admin":false},"body":"... use it","created_at":"2015-03-29T21:41:15Z","updated_at":"2015-03-29T21:41:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0213b329af7c4c5be94cab9d25df055b04d5860","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/oorion/jet_fuel/pulls/6/commits","review_comments_url":"https://api.github.com/repos/oorion/jet_fuel/pulls/6/comments","review_comment_url":"https://api.github.com/repos/oorion/jet_fuel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oorion/jet_fuel/issues/6/comments","statuses_url":"https://api.github.com/repos/oorion/jet_fuel/statuses/9e7a12f257ce59106da2c06950dd0b18c2adc302","head":{"label":"oorion:second_attempt_at_creating_gem","ref":"second_attempt_at_creating_gem","sha":"9e7a12f257ce59106da2c06950dd0b18c2adc302","user":{"login":"oorion","id":869456,"avatar_url":"https://avatars.githubusercontent.com/u/869456?v=3","gravatar_id":"","url":"https://api.github.com/users/oorion","html_url":"https://github.com/oorion","followers_url":"https://api.github.com/users/oorion/followers","following_url":"https://api.github.com/users/oorion/following{/other_user}","gists_url":"https://api.github.com/users/oorion/gists{/gist_id}","starred_url":"https://api.github.com/users/oorion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oorion/subscriptions","organizations_url":"https://api.github.com/users/oorion/orgs","repos_url":"https://api.github.com/users/oorion/repos","events_url":"https://api.github.com/users/oorion/events{/privacy}","received_events_url":"https://api.github.com/users/oorion/received_events","type":"User","site_admin":false},"repo":{"id":32701010,"name":"jet_fuel","full_name":"oorion/jet_fuel","owner":{"login":"oorion","id":869456,"avatar_url":"https://avatars.githubusercontent.com/u/869456?v=3","gravatar_id":"","url":"https://api.github.com/users/oorion","html_url":"https://github.com/oorion","followers_url":"https://api.github.com/users/oorion/followers","following_url":"https://api.github.com/users/oorion/following{/other_user}","gists_url":"https://api.github.com/users/oorion/gists{/gist_id}","starred_url":"https://api.github.com/users/oorion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oorion/subscriptions","organizations_url":"https://api.github.com/users/oorion/orgs","repos_url":"https://api.github.com/users/oorion/repos","events_url":"https://api.github.com/users/oorion/events{/privacy}","received_events_url":"https://api.github.com/users/oorion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oorion/jet_fuel","description":"","fork":false,"url":"https://api.github.com/repos/oorion/jet_fuel","forks_url":"https://api.github.com/repos/oorion/jet_fuel/forks","keys_url":"https://api.github.com/repos/oorion/jet_fuel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oorion/jet_fuel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oorion/jet_fuel/teams","hooks_url":"https://api.github.com/repos/oorion/jet_fuel/hooks","issue_events_url":"https://api.github.com/repos/oorion/jet_fuel/issues/events{/number}","events_url":"https://api.github.com/repos/oorion/jet_fuel/events","assignees_url":"https://api.github.com/repos/oorion/jet_fuel/assignees{/user}","branches_url":"https://api.github.com/repos/oorion/jet_fuel/branches{/branch}","tags_url":"https://api.github.com/repos/oorion/jet_fuel/tags","blobs_url":"https://api.github.com/repos/oorion/jet_fuel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oorion/jet_fuel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oorion/jet_fuel/git/refs{/sha}","trees_url":"https://api.github.com/repos/oorion/jet_fuel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oorion/jet_fuel/statuses/{sha}","languages_url":"https://api.github.com/repos/oorion/jet_fuel/languages","stargazers_url":"https://api.github.com/repos/oorion/jet_fuel/stargazers","contributors_url":"https://api.github.com/repos/oorion/jet_fuel/contributors","subscribers_url":"https://api.github.com/repos/oorion/jet_fuel/subscribers","subscription_url":"https://api.github.com/repos/oorion/jet_fuel/subscription","commits_url":"https://api.github.com/repos/oorion/jet_fuel/commits{/sha}","git_commits_url":"https://api.github.com/repos/oorion/jet_fuel/git/commits{/sha}","comments_url":"https://api.github.com/repos/oorion/jet_fuel/comments{/number}","issue_comment_url":"https://api.github.com/repos/oorion/jet_fuel/issues/comments{/number}","contents_url":"https://api.github.com/repos/oorion/jet_fuel/contents/{+path}","compare_url":"https://api.github.com/repos/oorion/jet_fuel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oorion/jet_fuel/merges","archive_url":"https://api.github.com/repos/oorion/jet_fuel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oorion/jet_fuel/downloads","issues_url":"https://api.github.com/repos/oorion/jet_fuel/issues{/number}","pulls_url":"https://api.github.com/repos/oorion/jet_fuel/pulls{/number}","milestones_url":"https://api.github.com/repos/oorion/jet_fuel/milestones{/number}","notifications_url":"https://api.github.com/repos/oorion/jet_fuel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oorion/jet_fuel/labels{/name}","releases_url":"https://api.github.com/repos/oorion/jet_fuel/releases{/id}","created_at":"2015-03-22T23:25:43Z","updated_at":"2015-03-27T20:52:00Z","pushed_at":"2015-03-29T21:41:16Z","git_url":"git://github.com/oorion/jet_fuel.git","ssh_url":"git@github.com:oorion/jet_fuel.git","clone_url":"https://github.com/oorion/jet_fuel.git","svn_url":"https://github.com/oorion/jet_fuel","homepage":null,"size":0,"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":"oorion:master","ref":"master","sha":"8d26d9fb677c4f0f03c6afa3eb44e0d08683a714","user":{"login":"oorion","id":869456,"avatar_url":"https://avatars.githubusercontent.com/u/869456?v=3","gravatar_id":"","url":"https://api.github.com/users/oorion","html_url":"https://github.com/oorion","followers_url":"https://api.github.com/users/oorion/followers","following_url":"https://api.github.com/users/oorion/following{/other_user}","gists_url":"https://api.github.com/users/oorion/gists{/gist_id}","starred_url":"https://api.github.com/users/oorion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oorion/subscriptions","organizations_url":"https://api.github.com/users/oorion/orgs","repos_url":"https://api.github.com/users/oorion/repos","events_url":"https://api.github.com/users/oorion/events{/privacy}","received_events_url":"https://api.github.com/users/oorion/received_events","type":"User","site_admin":false},"repo":{"id":32701010,"name":"jet_fuel","full_name":"oorion/jet_fuel","owner":{"login":"oorion","id":869456,"avatar_url":"https://avatars.githubusercontent.com/u/869456?v=3","gravatar_id":"","url":"https://api.github.com/users/oorion","html_url":"https://github.com/oorion","followers_url":"https://api.github.com/users/oorion/followers","following_url":"https://api.github.com/users/oorion/following{/other_user}","gists_url":"https://api.github.com/users/oorion/gists{/gist_id}","starred_url":"https://api.github.com/users/oorion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oorion/subscriptions","organizations_url":"https://api.github.com/users/oorion/orgs","repos_url":"https://api.github.com/users/oorion/repos","events_url":"https://api.github.com/users/oorion/events{/privacy}","received_events_url":"https://api.github.com/users/oorion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oorion/jet_fuel","description":"","fork":false,"url":"https://api.github.com/repos/oorion/jet_fuel","forks_url":"https://api.github.com/repos/oorion/jet_fuel/forks","keys_url":"https://api.github.com/repos/oorion/jet_fuel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oorion/jet_fuel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oorion/jet_fuel/teams","hooks_url":"https://api.github.com/repos/oorion/jet_fuel/hooks","issue_events_url":"https://api.github.com/repos/oorion/jet_fuel/issues/events{/number}","events_url":"https://api.github.com/repos/oorion/jet_fuel/events","assignees_url":"https://api.github.com/repos/oorion/jet_fuel/assignees{/user}","branches_url":"https://api.github.com/repos/oorion/jet_fuel/branches{/branch}","tags_url":"https://api.github.com/repos/oorion/jet_fuel/tags","blobs_url":"https://api.github.com/repos/oorion/jet_fuel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oorion/jet_fuel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oorion/jet_fuel/git/refs{/sha}","trees_url":"https://api.github.com/repos/oorion/jet_fuel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oorion/jet_fuel/statuses/{sha}","languages_url":"https://api.github.com/repos/oorion/jet_fuel/languages","stargazers_url":"https://api.github.com/repos/oorion/jet_fuel/stargazers","contributors_url":"https://api.github.com/repos/oorion/jet_fuel/contributors","subscribers_url":"https://api.github.com/repos/oorion/jet_fuel/subscribers","subscription_url":"https://api.github.com/repos/oorion/jet_fuel/subscription","commits_url":"https://api.github.com/repos/oorion/jet_fuel/commits{/sha}","git_commits_url":"https://api.github.com/repos/oorion/jet_fuel/git/commits{/sha}","comments_url":"https://api.github.com/repos/oorion/jet_fuel/comments{/number}","issue_comment_url":"https://api.github.com/repos/oorion/jet_fuel/issues/comments{/number}","contents_url":"https://api.github.com/repos/oorion/jet_fuel/contents/{+path}","compare_url":"https://api.github.com/repos/oorion/jet_fuel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oorion/jet_fuel/merges","archive_url":"https://api.github.com/repos/oorion/jet_fuel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oorion/jet_fuel/downloads","issues_url":"https://api.github.com/repos/oorion/jet_fuel/issues{/number}","pulls_url":"https://api.github.com/repos/oorion/jet_fuel/pulls{/number}","milestones_url":"https://api.github.com/repos/oorion/jet_fuel/milestones{/number}","notifications_url":"https://api.github.com/repos/oorion/jet_fuel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oorion/jet_fuel/labels{/name}","releases_url":"https://api.github.com/repos/oorion/jet_fuel/releases{/id}","created_at":"2015-03-22T23:25:43Z","updated_at":"2015-03-27T20:52:00Z","pushed_at":"2015-03-29T21:41:16Z","git_url":"git://github.com/oorion/jet_fuel.git","ssh_url":"git@github.com:oorion/jet_fuel.git","clone_url":"https://github.com/oorion/jet_fuel.git","svn_url":"https://github.com/oorion/jet_fuel","homepage":null,"size":0,"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/oorion/jet_fuel/pulls/6"},"html":{"href":"https://github.com/oorion/jet_fuel/pull/6"},"issue":{"href":"https://api.github.com/repos/oorion/jet_fuel/issues/6"},"comments":{"href":"https://api.github.com/repos/oorion/jet_fuel/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/oorion/jet_fuel/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/oorion/jet_fuel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oorion/jet_fuel/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/oorion/jet_fuel/statuses/9e7a12f257ce59106da2c06950dd0b18c2adc302"}}}}