{"action":"created","comment":{"url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/comments/54772086","id":54772086,"diff_hunk":"@@ -1,3 +1,4 @@\n class Image < ActiveRecord::Base\n-  validates :url, presence: true\n+  validates :url, presence: true, format: { with: URI.regexp, message: \"is not valid\" }\n+  validates :url, format: { with: /\\.(png|jpg|jpeg|bmp|gif|tif)$/, multiline: true, message: \"is not an image\" }","path":"app/models/image.rb","position":4,"original_position":4,"commit_id":"f907c931ce4a88940c9e18b20569954e8768064c","original_commit_id":"f907c931ce4a88940c9e18b20569954e8768064c","user":{"login":"bboe","id":48100,"avatar_url":"https://avatars.githubusercontent.com/u/48100?v=3","gravatar_id":"","url":"https://api.github.com/users/bboe","html_url":"https://github.com/bboe","followers_url":"https://api.github.com/users/bboe/followers","following_url":"https://api.github.com/users/bboe/following{/other_user}","gists_url":"https://api.github.com/users/bboe/gists{/gist_id}","starred_url":"https://api.github.com/users/bboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboe/subscriptions","organizations_url":"https://api.github.com/users/bboe/orgs","repos_url":"https://api.github.com/users/bboe/repos","events_url":"https://api.github.com/users/bboe/events{/privacy}","received_events_url":"https://api.github.com/users/bboe/received_events","type":"User","site_admin":false},"body":"Can we add an extension test with an assertion for each of these cases to ensure regressions are not added?\r\n\r\nIt might be nice to also have a test that fails when the `.` isn't just before the extension, and the extension is immediately followed by something other than the end of input. Again these are to ensure a regression isn't introduced.","created_at":"2016-03-02T18:59:32Z","updated_at":"2016-03-02T18:59:32Z","html_url":"https://github.com/AppFolioOnboarding/perkins_eidolon/pull/38#discussion_r54772086","pull_request_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/comments/54772086"},"html":{"href":"https://github.com/AppFolioOnboarding/perkins_eidolon/pull/38#discussion_r54772086"},"pull_request":{"href":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/38","id":61114465,"html_url":"https://github.com/AppFolioOnboarding/perkins_eidolon/pull/38","diff_url":"https://github.com/AppFolioOnboarding/perkins_eidolon/pull/38.diff","patch_url":"https://github.com/AppFolioOnboarding/perkins_eidolon/pull/38.patch","issue_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/issues/38","number":38,"state":"open","locked":false,"title":"Image url validation","user":{"login":"erikperkins","id":9537012,"avatar_url":"https://avatars.githubusercontent.com/u/9537012?v=3","gravatar_id":"","url":"https://api.github.com/users/erikperkins","html_url":"https://github.com/erikperkins","followers_url":"https://api.github.com/users/erikperkins/followers","following_url":"https://api.github.com/users/erikperkins/following{/other_user}","gists_url":"https://api.github.com/users/erikperkins/gists{/gist_id}","starred_url":"https://api.github.com/users/erikperkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikperkins/subscriptions","organizations_url":"https://api.github.com/users/erikperkins/orgs","repos_url":"https://api.github.com/users/erikperkins/repos","events_url":"https://api.github.com/users/erikperkins/events{/privacy}","received_events_url":"https://api.github.com/users/erikperkins/received_events","type":"User","site_admin":false},"body":"Fixes issue #6.\r\n\r\nInvalid image URLs cannot be saved, and provide a relevant error message to the user.","created_at":"2016-02-29T17:34:17Z","updated_at":"2016-03-02T18:59:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"681d3b7a65c5747214f9fc67dc55f2710b18c29d","assignee":{"login":"bboe","id":48100,"avatar_url":"https://avatars.githubusercontent.com/u/48100?v=3","gravatar_id":"","url":"https://api.github.com/users/bboe","html_url":"https://github.com/bboe","followers_url":"https://api.github.com/users/bboe/followers","following_url":"https://api.github.com/users/bboe/following{/other_user}","gists_url":"https://api.github.com/users/bboe/gists{/gist_id}","starred_url":"https://api.github.com/users/bboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboe/subscriptions","organizations_url":"https://api.github.com/users/bboe/orgs","repos_url":"https://api.github.com/users/bboe/repos","events_url":"https://api.github.com/users/bboe/events{/privacy}","received_events_url":"https://api.github.com/users/bboe/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/38/commits","review_comments_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/38/comments","review_comment_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/issues/38/comments","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/statuses/f907c931ce4a88940c9e18b20569954e8768064c","head":{"label":"AppFolioOnboarding:image_url_validation","ref":"image_url_validation","sha":"f907c931ce4a88940c9e18b20569954e8768064c","user":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"repo":{"id":51942506,"name":"perkins_eidolon","full_name":"AppFolioOnboarding/perkins_eidolon","owner":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AppFolioOnboarding/perkins_eidolon","description":"Image sharing app","fork":false,"url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon","forks_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/forks","keys_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/teams","hooks_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/hooks","issue_events_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/issues/events{/number}","events_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/events","assignees_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/assignees{/user}","branches_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/branches{/branch}","tags_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/tags","blobs_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/statuses/{sha}","languages_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/languages","stargazers_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/stargazers","contributors_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/contributors","subscribers_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/subscribers","subscription_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/subscription","commits_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/contents/{+path}","compare_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/merges","archive_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/downloads","issues_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/issues{/number}","pulls_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls{/number}","milestones_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/milestones{/number}","notifications_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/labels{/name}","releases_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/releases{/id}","deployments_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/deployments","created_at":"2016-02-17T17:48:50Z","updated_at":"2016-02-17T18:12:10Z","pushed_at":"2016-03-02T18:05:30Z","git_url":"git://github.com/AppFolioOnboarding/perkins_eidolon.git","ssh_url":"git@github.com:AppFolioOnboarding/perkins_eidolon.git","clone_url":"https://github.com/AppFolioOnboarding/perkins_eidolon.git","svn_url":"https://github.com/AppFolioOnboarding/perkins_eidolon","homepage":null,"size":413,"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":21,"forks":0,"open_issues":21,"watchers":0,"default_branch":"master"}},"base":{"label":"AppFolioOnboarding:master","ref":"master","sha":"abe6d004c459f9098b8bbf859fdd7b35f823b00e","user":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"repo":{"id":51942506,"name":"perkins_eidolon","full_name":"AppFolioOnboarding/perkins_eidolon","owner":{"login":"AppFolioOnboarding","id":16782391,"avatar_url":"https://avatars.githubusercontent.com/u/16782391?v=3","gravatar_id":"","url":"https://api.github.com/users/AppFolioOnboarding","html_url":"https://github.com/AppFolioOnboarding","followers_url":"https://api.github.com/users/AppFolioOnboarding/followers","following_url":"https://api.github.com/users/AppFolioOnboarding/following{/other_user}","gists_url":"https://api.github.com/users/AppFolioOnboarding/gists{/gist_id}","starred_url":"https://api.github.com/users/AppFolioOnboarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppFolioOnboarding/subscriptions","organizations_url":"https://api.github.com/users/AppFolioOnboarding/orgs","repos_url":"https://api.github.com/users/AppFolioOnboarding/repos","events_url":"https://api.github.com/users/AppFolioOnboarding/events{/privacy}","received_events_url":"https://api.github.com/users/AppFolioOnboarding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AppFolioOnboarding/perkins_eidolon","description":"Image sharing app","fork":false,"url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon","forks_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/forks","keys_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/teams","hooks_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/hooks","issue_events_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/issues/events{/number}","events_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/events","assignees_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/assignees{/user}","branches_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/branches{/branch}","tags_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/tags","blobs_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/statuses/{sha}","languages_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/languages","stargazers_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/stargazers","contributors_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/contributors","subscribers_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/subscribers","subscription_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/subscription","commits_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/contents/{+path}","compare_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/merges","archive_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/downloads","issues_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/issues{/number}","pulls_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls{/number}","milestones_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/milestones{/number}","notifications_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/labels{/name}","releases_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/releases{/id}","deployments_url":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/deployments","created_at":"2016-02-17T17:48:50Z","updated_at":"2016-02-17T18:12:10Z","pushed_at":"2016-03-02T18:05:30Z","git_url":"git://github.com/AppFolioOnboarding/perkins_eidolon.git","ssh_url":"git@github.com:AppFolioOnboarding/perkins_eidolon.git","clone_url":"https://github.com/AppFolioOnboarding/perkins_eidolon.git","svn_url":"https://github.com/AppFolioOnboarding/perkins_eidolon","homepage":null,"size":413,"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":21,"forks":0,"open_issues":21,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/38"},"html":{"href":"https://github.com/AppFolioOnboarding/perkins_eidolon/pull/38"},"issue":{"href":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/issues/38"},"comments":{"href":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/AppFolioOnboarding/perkins_eidolon/statuses/f907c931ce4a88940c9e18b20569954e8768064c"}}}}