{"action":"created","comment":{"url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/comments/60405161","id":60405161,"diff_hunk":"@@ -1,9 +1,33 @@\n class Gif < ActiveRecord::Base\n   belongs_to :user\n   has_many :votes\n+  attachment :gif_image, content_type: \"image/gif\"\n+  validate :has_at_least_one_image\n \n-  validates :url, presence: true,\n-                  format: { with: URI.regexp, message: 'must be a valid URL like http://media.giphy.com/media/tlpVdqCrewXFC/giphy.gif'}, if: Proc.new { |a| a.url.present? }\n-  validates :url, format: { with: %r{.(gif)\\Z}i, message: 'must be a GIF like http://media.giphy.com/media/tlpVdqCrewXFC/giphy.gif.' }\n+  ex_url = \"http://media.giphy.com/media/tlpVdqCrewXFC/giphy.gif\"\n+  validates :url, format: { with: URI.regexp,\n+                            message: \"must be a valid URL like #{ex_url}\"},\n+                            if: Proc.new { |a| a.url.present? }","path":"app/models/gif.rb","position":13,"original_position":13,"commit_id":"a880cc365089715ada87435c3de853c24678f3cb","original_commit_id":"a880cc365089715ada87435c3de853c24678f3cb","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Align the elements of a hash literal if they span more than one line.<br>Use `proc` instead of `Proc.new`.","created_at":"2016-04-20T13:21:25Z","updated_at":"2016-04-20T13:21:25Z","html_url":"https://github.com/tiy-indy-bee-ror-feb16/Practicalgifs/pull/30#discussion_r60405161","pull_request_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/comments/60405161"},"html":{"href":"https://github.com/tiy-indy-bee-ror-feb16/Practicalgifs/pull/30#discussion_r60405161"},"pull_request":{"href":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/30","id":67185268,"html_url":"https://github.com/tiy-indy-bee-ror-feb16/Practicalgifs/pull/30","diff_url":"https://github.com/tiy-indy-bee-ror-feb16/Practicalgifs/pull/30.diff","patch_url":"https://github.com/tiy-indy-bee-ror-feb16/Practicalgifs/pull/30.patch","issue_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/issues/30","number":30,"state":"open","locked":false,"title":"File upload","user":{"login":"jajajames","id":17484767,"avatar_url":"https://avatars.githubusercontent.com/u/17484767?v=3","gravatar_id":"","url":"https://api.github.com/users/jajajames","html_url":"https://github.com/jajajames","followers_url":"https://api.github.com/users/jajajames/followers","following_url":"https://api.github.com/users/jajajames/following{/other_user}","gists_url":"https://api.github.com/users/jajajames/gists{/gist_id}","starred_url":"https://api.github.com/users/jajajames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jajajames/subscriptions","organizations_url":"https://api.github.com/users/jajajames/orgs","repos_url":"https://api.github.com/users/jajajames/repos","events_url":"https://api.github.com/users/jajajames/events{/privacy}","received_events_url":"https://api.github.com/users/jajajames/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-20T13:21:10Z","updated_at":"2016-04-20T13:21:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d109cd2cad6fca4398378ebe91804b0e505e167","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/30/commits","review_comments_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/30/comments","review_comment_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/issues/30/comments","statuses_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/statuses/a880cc365089715ada87435c3de853c24678f3cb","head":{"label":"jajajames:file-upload","ref":"file-upload","sha":"a880cc365089715ada87435c3de853c24678f3cb","user":{"login":"jajajames","id":17484767,"avatar_url":"https://avatars.githubusercontent.com/u/17484767?v=3","gravatar_id":"","url":"https://api.github.com/users/jajajames","html_url":"https://github.com/jajajames","followers_url":"https://api.github.com/users/jajajames/followers","following_url":"https://api.github.com/users/jajajames/following{/other_user}","gists_url":"https://api.github.com/users/jajajames/gists{/gist_id}","starred_url":"https://api.github.com/users/jajajames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jajajames/subscriptions","organizations_url":"https://api.github.com/users/jajajames/orgs","repos_url":"https://api.github.com/users/jajajames/repos","events_url":"https://api.github.com/users/jajajames/events{/privacy}","received_events_url":"https://api.github.com/users/jajajames/received_events","type":"User","site_admin":false},"repo":{"id":56256977,"name":"Practicalgifs","full_name":"jajajames/Practicalgifs","owner":{"login":"jajajames","id":17484767,"avatar_url":"https://avatars.githubusercontent.com/u/17484767?v=3","gravatar_id":"","url":"https://api.github.com/users/jajajames","html_url":"https://github.com/jajajames","followers_url":"https://api.github.com/users/jajajames/followers","following_url":"https://api.github.com/users/jajajames/following{/other_user}","gists_url":"https://api.github.com/users/jajajames/gists{/gist_id}","starred_url":"https://api.github.com/users/jajajames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jajajames/subscriptions","organizations_url":"https://api.github.com/users/jajajames/orgs","repos_url":"https://api.github.com/users/jajajames/repos","events_url":"https://api.github.com/users/jajajames/events{/privacy}","received_events_url":"https://api.github.com/users/jajajames/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jajajames/Practicalgifs","description":"","fork":true,"url":"https://api.github.com/repos/jajajames/Practicalgifs","forks_url":"https://api.github.com/repos/jajajames/Practicalgifs/forks","keys_url":"https://api.github.com/repos/jajajames/Practicalgifs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jajajames/Practicalgifs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jajajames/Practicalgifs/teams","hooks_url":"https://api.github.com/repos/jajajames/Practicalgifs/hooks","issue_events_url":"https://api.github.com/repos/jajajames/Practicalgifs/issues/events{/number}","events_url":"https://api.github.com/repos/jajajames/Practicalgifs/events","assignees_url":"https://api.github.com/repos/jajajames/Practicalgifs/assignees{/user}","branches_url":"https://api.github.com/repos/jajajames/Practicalgifs/branches{/branch}","tags_url":"https://api.github.com/repos/jajajames/Practicalgifs/tags","blobs_url":"https://api.github.com/repos/jajajames/Practicalgifs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jajajames/Practicalgifs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jajajames/Practicalgifs/git/refs{/sha}","trees_url":"https://api.github.com/repos/jajajames/Practicalgifs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jajajames/Practicalgifs/statuses/{sha}","languages_url":"https://api.github.com/repos/jajajames/Practicalgifs/languages","stargazers_url":"https://api.github.com/repos/jajajames/Practicalgifs/stargazers","contributors_url":"https://api.github.com/repos/jajajames/Practicalgifs/contributors","subscribers_url":"https://api.github.com/repos/jajajames/Practicalgifs/subscribers","subscription_url":"https://api.github.com/repos/jajajames/Practicalgifs/subscription","commits_url":"https://api.github.com/repos/jajajames/Practicalgifs/commits{/sha}","git_commits_url":"https://api.github.com/repos/jajajames/Practicalgifs/git/commits{/sha}","comments_url":"https://api.github.com/repos/jajajames/Practicalgifs/comments{/number}","issue_comment_url":"https://api.github.com/repos/jajajames/Practicalgifs/issues/comments{/number}","contents_url":"https://api.github.com/repos/jajajames/Practicalgifs/contents/{+path}","compare_url":"https://api.github.com/repos/jajajames/Practicalgifs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jajajames/Practicalgifs/merges","archive_url":"https://api.github.com/repos/jajajames/Practicalgifs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jajajames/Practicalgifs/downloads","issues_url":"https://api.github.com/repos/jajajames/Practicalgifs/issues{/number}","pulls_url":"https://api.github.com/repos/jajajames/Practicalgifs/pulls{/number}","milestones_url":"https://api.github.com/repos/jajajames/Practicalgifs/milestones{/number}","notifications_url":"https://api.github.com/repos/jajajames/Practicalgifs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jajajames/Practicalgifs/labels{/name}","releases_url":"https://api.github.com/repos/jajajames/Practicalgifs/releases{/id}","deployments_url":"https://api.github.com/repos/jajajames/Practicalgifs/deployments","created_at":"2016-04-14T17:28:19Z","updated_at":"2016-04-14T17:17:10Z","pushed_at":"2016-04-20T13:19:25Z","git_url":"git://github.com/jajajames/Practicalgifs.git","ssh_url":"git@github.com:jajajames/Practicalgifs.git","clone_url":"https://github.com/jajajames/Practicalgifs.git","svn_url":"https://github.com/jajajames/Practicalgifs","homepage":null,"size":110,"stargazers_count":0,"watchers_count":0,"language":null,"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":"tiy-indy-bee-ror-feb16:master","ref":"master","sha":"9e6d1914edc84373bbcbbdfb9e2981ab053f9690","user":{"login":"tiy-indy-bee-ror-feb16","id":16339043,"avatar_url":"https://avatars.githubusercontent.com/u/16339043?v=3","gravatar_id":"","url":"https://api.github.com/users/tiy-indy-bee-ror-feb16","html_url":"https://github.com/tiy-indy-bee-ror-feb16","followers_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/followers","following_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/following{/other_user}","gists_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/gists{/gist_id}","starred_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/subscriptions","organizations_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/orgs","repos_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/repos","events_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/events{/privacy}","received_events_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/received_events","type":"Organization","site_admin":false},"repo":{"id":56256254,"name":"Practicalgifs","full_name":"tiy-indy-bee-ror-feb16/Practicalgifs","owner":{"login":"tiy-indy-bee-ror-feb16","id":16339043,"avatar_url":"https://avatars.githubusercontent.com/u/16339043?v=3","gravatar_id":"","url":"https://api.github.com/users/tiy-indy-bee-ror-feb16","html_url":"https://github.com/tiy-indy-bee-ror-feb16","followers_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/followers","following_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/following{/other_user}","gists_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/gists{/gist_id}","starred_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/subscriptions","organizations_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/orgs","repos_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/repos","events_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/events{/privacy}","received_events_url":"https://api.github.com/users/tiy-indy-bee-ror-feb16/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tiy-indy-bee-ror-feb16/Practicalgifs","description":"","fork":false,"url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs","forks_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/forks","keys_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/teams","hooks_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/hooks","issue_events_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/issues/events{/number}","events_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/events","assignees_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/assignees{/user}","branches_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/branches{/branch}","tags_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/tags","blobs_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/git/refs{/sha}","trees_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/statuses/{sha}","languages_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/languages","stargazers_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/stargazers","contributors_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/contributors","subscribers_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/subscribers","subscription_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/subscription","commits_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/commits{/sha}","git_commits_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/git/commits{/sha}","comments_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/comments{/number}","issue_comment_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/issues/comments{/number}","contents_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/contents/{+path}","compare_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/merges","archive_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/downloads","issues_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/issues{/number}","pulls_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls{/number}","milestones_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/milestones{/number}","notifications_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/labels{/name}","releases_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/releases{/id}","deployments_url":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/deployments","created_at":"2016-04-14T17:17:10Z","updated_at":"2016-04-14T18:12:24Z","pushed_at":"2016-04-20T13:21:11Z","git_url":"git://github.com/tiy-indy-bee-ror-feb16/Practicalgifs.git","ssh_url":"git@github.com:tiy-indy-bee-ror-feb16/Practicalgifs.git","clone_url":"https://github.com/tiy-indy-bee-ror-feb16/Practicalgifs.git","svn_url":"https://github.com/tiy-indy-bee-ror-feb16/Practicalgifs","homepage":null,"size":99,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/30"},"html":{"href":"https://github.com/tiy-indy-bee-ror-feb16/Practicalgifs/pull/30"},"issue":{"href":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/issues/30"},"comments":{"href":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/tiy-indy-bee-ror-feb16/Practicalgifs/statuses/a880cc365089715ada87435c3de853c24678f3cb"}}}}