{"action":"created","comment":{"url":"https://api.github.com/repos/bkmz/cropio_test/pulls/comments/36016036","id":36016036,"diff_hunk":"@@ -1,2 +1,12 @@\n class Field < ActiveRecord::Base\n+  validates :name, :shape, presence: true\n+  validate :shape_is_valid?, unless: -> { shape.nil? }\n+\n+  private\n+\n+  def shape_is_valid?\n+    unless shape.as_text.include? \"MULTIPOLYGON\"\n+      errors.add(:shape, \"geometry type is not multipolygon\")\n+    end ","path":"app/models/field.rb","position":10,"original_position":10,"commit_id":"1b9baeba886b36a6a2e9487622c3a9dddaa192f5","original_commit_id":"1b9baeba886b36a6a2e9487622c3a9dddaa192f5","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":"Trailing whitespace detected.","created_at":"2015-07-31T21:01:23Z","updated_at":"2015-07-31T21:01:23Z","html_url":"https://github.com/bkmz/cropio_test/pull/2#discussion_r36016036","pull_request_url":"https://api.github.com/repos/bkmz/cropio_test/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/bkmz/cropio_test/pulls/comments/36016036"},"html":{"href":"https://github.com/bkmz/cropio_test/pull/2#discussion_r36016036"},"pull_request":{"href":"https://api.github.com/repos/bkmz/cropio_test/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/bkmz/cropio_test/pulls/2","id":41180120,"html_url":"https://github.com/bkmz/cropio_test/pull/2","diff_url":"https://github.com/bkmz/cropio_test/pull/2.diff","patch_url":"https://github.com/bkmz/cropio_test/pull/2.patch","issue_url":"https://api.github.com/repos/bkmz/cropio_test/issues/2","number":2,"state":"open","locked":false,"title":"Add fields controller and actions","user":{"login":"bkmz","id":699744,"avatar_url":"https://avatars.githubusercontent.com/u/699744?v=3","gravatar_id":"","url":"https://api.github.com/users/bkmz","html_url":"https://github.com/bkmz","followers_url":"https://api.github.com/users/bkmz/followers","following_url":"https://api.github.com/users/bkmz/following{/other_user}","gists_url":"https://api.github.com/users/bkmz/gists{/gist_id}","starred_url":"https://api.github.com/users/bkmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkmz/subscriptions","organizations_url":"https://api.github.com/users/bkmz/orgs","repos_url":"https://api.github.com/users/bkmz/repos","events_url":"https://api.github.com/users/bkmz/events{/privacy}","received_events_url":"https://api.github.com/users/bkmz/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-29T22:32:41Z","updated_at":"2015-07-31T21:01:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f0335cebf47535e3312bfed98732992e6c095fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bkmz/cropio_test/pulls/2/commits","review_comments_url":"https://api.github.com/repos/bkmz/cropio_test/pulls/2/comments","review_comment_url":"https://api.github.com/repos/bkmz/cropio_test/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bkmz/cropio_test/issues/2/comments","statuses_url":"https://api.github.com/repos/bkmz/cropio_test/statuses/1b9baeba886b36a6a2e9487622c3a9dddaa192f5","head":{"label":"bkmz:ii-add-fields-controller","ref":"ii-add-fields-controller","sha":"1b9baeba886b36a6a2e9487622c3a9dddaa192f5","user":{"login":"bkmz","id":699744,"avatar_url":"https://avatars.githubusercontent.com/u/699744?v=3","gravatar_id":"","url":"https://api.github.com/users/bkmz","html_url":"https://github.com/bkmz","followers_url":"https://api.github.com/users/bkmz/followers","following_url":"https://api.github.com/users/bkmz/following{/other_user}","gists_url":"https://api.github.com/users/bkmz/gists{/gist_id}","starred_url":"https://api.github.com/users/bkmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkmz/subscriptions","organizations_url":"https://api.github.com/users/bkmz/orgs","repos_url":"https://api.github.com/users/bkmz/repos","events_url":"https://api.github.com/users/bkmz/events{/privacy}","received_events_url":"https://api.github.com/users/bkmz/received_events","type":"User","site_admin":false},"repo":{"id":39856082,"name":"cropio_test","full_name":"bkmz/cropio_test","owner":{"login":"bkmz","id":699744,"avatar_url":"https://avatars.githubusercontent.com/u/699744?v=3","gravatar_id":"","url":"https://api.github.com/users/bkmz","html_url":"https://github.com/bkmz","followers_url":"https://api.github.com/users/bkmz/followers","following_url":"https://api.github.com/users/bkmz/following{/other_user}","gists_url":"https://api.github.com/users/bkmz/gists{/gist_id}","starred_url":"https://api.github.com/users/bkmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkmz/subscriptions","organizations_url":"https://api.github.com/users/bkmz/orgs","repos_url":"https://api.github.com/users/bkmz/repos","events_url":"https://api.github.com/users/bkmz/events{/privacy}","received_events_url":"https://api.github.com/users/bkmz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bkmz/cropio_test","description":"","fork":false,"url":"https://api.github.com/repos/bkmz/cropio_test","forks_url":"https://api.github.com/repos/bkmz/cropio_test/forks","keys_url":"https://api.github.com/repos/bkmz/cropio_test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bkmz/cropio_test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bkmz/cropio_test/teams","hooks_url":"https://api.github.com/repos/bkmz/cropio_test/hooks","issue_events_url":"https://api.github.com/repos/bkmz/cropio_test/issues/events{/number}","events_url":"https://api.github.com/repos/bkmz/cropio_test/events","assignees_url":"https://api.github.com/repos/bkmz/cropio_test/assignees{/user}","branches_url":"https://api.github.com/repos/bkmz/cropio_test/branches{/branch}","tags_url":"https://api.github.com/repos/bkmz/cropio_test/tags","blobs_url":"https://api.github.com/repos/bkmz/cropio_test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bkmz/cropio_test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bkmz/cropio_test/git/refs{/sha}","trees_url":"https://api.github.com/repos/bkmz/cropio_test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bkmz/cropio_test/statuses/{sha}","languages_url":"https://api.github.com/repos/bkmz/cropio_test/languages","stargazers_url":"https://api.github.com/repos/bkmz/cropio_test/stargazers","contributors_url":"https://api.github.com/repos/bkmz/cropio_test/contributors","subscribers_url":"https://api.github.com/repos/bkmz/cropio_test/subscribers","subscription_url":"https://api.github.com/repos/bkmz/cropio_test/subscription","commits_url":"https://api.github.com/repos/bkmz/cropio_test/commits{/sha}","git_commits_url":"https://api.github.com/repos/bkmz/cropio_test/git/commits{/sha}","comments_url":"https://api.github.com/repos/bkmz/cropio_test/comments{/number}","issue_comment_url":"https://api.github.com/repos/bkmz/cropio_test/issues/comments{/number}","contents_url":"https://api.github.com/repos/bkmz/cropio_test/contents/{+path}","compare_url":"https://api.github.com/repos/bkmz/cropio_test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bkmz/cropio_test/merges","archive_url":"https://api.github.com/repos/bkmz/cropio_test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bkmz/cropio_test/downloads","issues_url":"https://api.github.com/repos/bkmz/cropio_test/issues{/number}","pulls_url":"https://api.github.com/repos/bkmz/cropio_test/pulls{/number}","milestones_url":"https://api.github.com/repos/bkmz/cropio_test/milestones{/number}","notifications_url":"https://api.github.com/repos/bkmz/cropio_test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bkmz/cropio_test/labels{/name}","releases_url":"https://api.github.com/repos/bkmz/cropio_test/releases{/id}","created_at":"2015-07-28T20:26:32Z","updated_at":"2015-07-28T20:28:09Z","pushed_at":"2015-07-31T21:00:24Z","git_url":"git://github.com/bkmz/cropio_test.git","ssh_url":"git@github.com:bkmz/cropio_test.git","clone_url":"https://github.com/bkmz/cropio_test.git","svn_url":"https://github.com/bkmz/cropio_test","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":"bkmz:master","ref":"master","sha":"6c6dfdf937c8441cd333c136df07366bf23df886","user":{"login":"bkmz","id":699744,"avatar_url":"https://avatars.githubusercontent.com/u/699744?v=3","gravatar_id":"","url":"https://api.github.com/users/bkmz","html_url":"https://github.com/bkmz","followers_url":"https://api.github.com/users/bkmz/followers","following_url":"https://api.github.com/users/bkmz/following{/other_user}","gists_url":"https://api.github.com/users/bkmz/gists{/gist_id}","starred_url":"https://api.github.com/users/bkmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkmz/subscriptions","organizations_url":"https://api.github.com/users/bkmz/orgs","repos_url":"https://api.github.com/users/bkmz/repos","events_url":"https://api.github.com/users/bkmz/events{/privacy}","received_events_url":"https://api.github.com/users/bkmz/received_events","type":"User","site_admin":false},"repo":{"id":39856082,"name":"cropio_test","full_name":"bkmz/cropio_test","owner":{"login":"bkmz","id":699744,"avatar_url":"https://avatars.githubusercontent.com/u/699744?v=3","gravatar_id":"","url":"https://api.github.com/users/bkmz","html_url":"https://github.com/bkmz","followers_url":"https://api.github.com/users/bkmz/followers","following_url":"https://api.github.com/users/bkmz/following{/other_user}","gists_url":"https://api.github.com/users/bkmz/gists{/gist_id}","starred_url":"https://api.github.com/users/bkmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkmz/subscriptions","organizations_url":"https://api.github.com/users/bkmz/orgs","repos_url":"https://api.github.com/users/bkmz/repos","events_url":"https://api.github.com/users/bkmz/events{/privacy}","received_events_url":"https://api.github.com/users/bkmz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bkmz/cropio_test","description":"","fork":false,"url":"https://api.github.com/repos/bkmz/cropio_test","forks_url":"https://api.github.com/repos/bkmz/cropio_test/forks","keys_url":"https://api.github.com/repos/bkmz/cropio_test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bkmz/cropio_test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bkmz/cropio_test/teams","hooks_url":"https://api.github.com/repos/bkmz/cropio_test/hooks","issue_events_url":"https://api.github.com/repos/bkmz/cropio_test/issues/events{/number}","events_url":"https://api.github.com/repos/bkmz/cropio_test/events","assignees_url":"https://api.github.com/repos/bkmz/cropio_test/assignees{/user}","branches_url":"https://api.github.com/repos/bkmz/cropio_test/branches{/branch}","tags_url":"https://api.github.com/repos/bkmz/cropio_test/tags","blobs_url":"https://api.github.com/repos/bkmz/cropio_test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bkmz/cropio_test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bkmz/cropio_test/git/refs{/sha}","trees_url":"https://api.github.com/repos/bkmz/cropio_test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bkmz/cropio_test/statuses/{sha}","languages_url":"https://api.github.com/repos/bkmz/cropio_test/languages","stargazers_url":"https://api.github.com/repos/bkmz/cropio_test/stargazers","contributors_url":"https://api.github.com/repos/bkmz/cropio_test/contributors","subscribers_url":"https://api.github.com/repos/bkmz/cropio_test/subscribers","subscription_url":"https://api.github.com/repos/bkmz/cropio_test/subscription","commits_url":"https://api.github.com/repos/bkmz/cropio_test/commits{/sha}","git_commits_url":"https://api.github.com/repos/bkmz/cropio_test/git/commits{/sha}","comments_url":"https://api.github.com/repos/bkmz/cropio_test/comments{/number}","issue_comment_url":"https://api.github.com/repos/bkmz/cropio_test/issues/comments{/number}","contents_url":"https://api.github.com/repos/bkmz/cropio_test/contents/{+path}","compare_url":"https://api.github.com/repos/bkmz/cropio_test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bkmz/cropio_test/merges","archive_url":"https://api.github.com/repos/bkmz/cropio_test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bkmz/cropio_test/downloads","issues_url":"https://api.github.com/repos/bkmz/cropio_test/issues{/number}","pulls_url":"https://api.github.com/repos/bkmz/cropio_test/pulls{/number}","milestones_url":"https://api.github.com/repos/bkmz/cropio_test/milestones{/number}","notifications_url":"https://api.github.com/repos/bkmz/cropio_test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bkmz/cropio_test/labels{/name}","releases_url":"https://api.github.com/repos/bkmz/cropio_test/releases{/id}","created_at":"2015-07-28T20:26:32Z","updated_at":"2015-07-28T20:28:09Z","pushed_at":"2015-07-31T21:00:24Z","git_url":"git://github.com/bkmz/cropio_test.git","ssh_url":"git@github.com:bkmz/cropio_test.git","clone_url":"https://github.com/bkmz/cropio_test.git","svn_url":"https://github.com/bkmz/cropio_test","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/bkmz/cropio_test/pulls/2"},"html":{"href":"https://github.com/bkmz/cropio_test/pull/2"},"issue":{"href":"https://api.github.com/repos/bkmz/cropio_test/issues/2"},"comments":{"href":"https://api.github.com/repos/bkmz/cropio_test/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/bkmz/cropio_test/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/bkmz/cropio_test/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bkmz/cropio_test/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/bkmz/cropio_test/statuses/1b9baeba886b36a6a2e9487622c3a9dddaa192f5"}}}}