{"action":"created","comment":{"url":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/comments/36580236","id":36580236,"diff_hunk":"@@ -1,6 +1,18 @@\n class User < ActiveRecord::Base\n   has_secure_password\n \n+  before_validation :strip_whitespace\n   validates :first_name, :last_name, :email, presence: true\n   validates :email, uniqueness: true\n+  validates :password, length: { minimum: 8 }\n+  validates_format_of :email,\n+    with: /\\A([^@\\s]+)@((?:[-a-z0-9]+\\.)+[a-z]{2,})\\Z/i\n+\n+  private\n+\n+  def strip_whitespace\n+    self.first_name = self.first_name.strip if self.first_name\n+    self.last_name = self.last_name.strip if self.last_name\n+    self.email = self.email.strip if self.email","path":"app/models/user.rb","position":16,"original_position":16,"commit_id":"9a92345ec8ce758a17307d544dfa3c46093ba2b8","original_commit_id":"9a92345ec8ce758a17307d544dfa3c46093ba2b8","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":"Redundant `self` detected.","created_at":"2015-08-08T17:44:19Z","updated_at":"2015-08-08T17:44:19Z","html_url":"https://github.com/michael-reeves/redrum_nursery/pull/40#discussion_r36580236","pull_request_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/comments/36580236"},"html":{"href":"https://github.com/michael-reeves/redrum_nursery/pull/40#discussion_r36580236"},"pull_request":{"href":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/40","id":41957639,"html_url":"https://github.com/michael-reeves/redrum_nursery/pull/40","diff_url":"https://github.com/michael-reeves/redrum_nursery/pull/40.diff","patch_url":"https://github.com/michael-reeves/redrum_nursery/pull/40.patch","issue_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/issues/40","number":40,"state":"open","locked":false,"title":"Add User data scrubbing and validation checks","user":{"login":"imwithsam","id":1934074,"avatar_url":"https://avatars.githubusercontent.com/u/1934074?v=3","gravatar_id":"","url":"https://api.github.com/users/imwithsam","html_url":"https://github.com/imwithsam","followers_url":"https://api.github.com/users/imwithsam/followers","following_url":"https://api.github.com/users/imwithsam/following{/other_user}","gists_url":"https://api.github.com/users/imwithsam/gists{/gist_id}","starred_url":"https://api.github.com/users/imwithsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imwithsam/subscriptions","organizations_url":"https://api.github.com/users/imwithsam/orgs","repos_url":"https://api.github.com/users/imwithsam/repos","events_url":"https://api.github.com/users/imwithsam/events{/privacy}","received_events_url":"https://api.github.com/users/imwithsam/received_events","type":"User","site_admin":false},"body":"Add whitespace stripping for First Name, Last Name, and Email.\r\nAdd Password minimum length (8) validation.\r\nAdd valid Email format checking.\r\nAdd corresponding Model tests.","created_at":"2015-08-08T17:44:17Z","updated_at":"2015-08-08T17:44:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e49e619496f61d0fd21630c82783c6160f0eb9bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/40/commits","review_comments_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/40/comments","review_comment_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/issues/40/comments","statuses_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/statuses/9a92345ec8ce758a17307d544dfa3c46093ba2b8","head":{"label":"michael-reeves:36-create_account_validations","ref":"36-create_account_validations","sha":"9a92345ec8ce758a17307d544dfa3c46093ba2b8","user":{"login":"michael-reeves","id":7769973,"avatar_url":"https://avatars.githubusercontent.com/u/7769973?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-reeves","html_url":"https://github.com/michael-reeves","followers_url":"https://api.github.com/users/michael-reeves/followers","following_url":"https://api.github.com/users/michael-reeves/following{/other_user}","gists_url":"https://api.github.com/users/michael-reeves/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-reeves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-reeves/subscriptions","organizations_url":"https://api.github.com/users/michael-reeves/orgs","repos_url":"https://api.github.com/users/michael-reeves/repos","events_url":"https://api.github.com/users/michael-reeves/events{/privacy}","received_events_url":"https://api.github.com/users/michael-reeves/received_events","type":"User","site_admin":false},"repo":{"id":40136626,"name":"redrum_nursery","full_name":"michael-reeves/redrum_nursery","owner":{"login":"michael-reeves","id":7769973,"avatar_url":"https://avatars.githubusercontent.com/u/7769973?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-reeves","html_url":"https://github.com/michael-reeves","followers_url":"https://api.github.com/users/michael-reeves/followers","following_url":"https://api.github.com/users/michael-reeves/following{/other_user}","gists_url":"https://api.github.com/users/michael-reeves/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-reeves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-reeves/subscriptions","organizations_url":"https://api.github.com/users/michael-reeves/orgs","repos_url":"https://api.github.com/users/michael-reeves/repos","events_url":"https://api.github.com/users/michael-reeves/events{/privacy}","received_events_url":"https://api.github.com/users/michael-reeves/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michael-reeves/redrum_nursery","description":"Carnivorous Plant Store","fork":false,"url":"https://api.github.com/repos/michael-reeves/redrum_nursery","forks_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/forks","keys_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/teams","hooks_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/hooks","issue_events_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/issues/events{/number}","events_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/events","assignees_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/assignees{/user}","branches_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/branches{/branch}","tags_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/tags","blobs_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/git/refs{/sha}","trees_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/statuses/{sha}","languages_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/languages","stargazers_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/stargazers","contributors_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/contributors","subscribers_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/subscribers","subscription_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/subscription","commits_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/commits{/sha}","git_commits_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/git/commits{/sha}","comments_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/comments{/number}","issue_comment_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/issues/comments{/number}","contents_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/contents/{+path}","compare_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/merges","archive_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/downloads","issues_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/issues{/number}","pulls_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls{/number}","milestones_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/milestones{/number}","notifications_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/labels{/name}","releases_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/releases{/id}","created_at":"2015-08-03T16:50:11Z","updated_at":"2015-08-06T19:54:54Z","pushed_at":"2015-08-08T17:44:17Z","git_url":"git://github.com/michael-reeves/redrum_nursery.git","ssh_url":"git@github.com:michael-reeves/redrum_nursery.git","clone_url":"https://github.com/michael-reeves/redrum_nursery.git","svn_url":"https://github.com/michael-reeves/redrum_nursery","homepage":null,"size":6199,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":15,"forks":1,"open_issues":15,"watchers":1,"default_branch":"master"}},"base":{"label":"michael-reeves:master","ref":"master","sha":"b32cbf60055891ad0474a23d5b7d871cec828a11","user":{"login":"michael-reeves","id":7769973,"avatar_url":"https://avatars.githubusercontent.com/u/7769973?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-reeves","html_url":"https://github.com/michael-reeves","followers_url":"https://api.github.com/users/michael-reeves/followers","following_url":"https://api.github.com/users/michael-reeves/following{/other_user}","gists_url":"https://api.github.com/users/michael-reeves/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-reeves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-reeves/subscriptions","organizations_url":"https://api.github.com/users/michael-reeves/orgs","repos_url":"https://api.github.com/users/michael-reeves/repos","events_url":"https://api.github.com/users/michael-reeves/events{/privacy}","received_events_url":"https://api.github.com/users/michael-reeves/received_events","type":"User","site_admin":false},"repo":{"id":40136626,"name":"redrum_nursery","full_name":"michael-reeves/redrum_nursery","owner":{"login":"michael-reeves","id":7769973,"avatar_url":"https://avatars.githubusercontent.com/u/7769973?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-reeves","html_url":"https://github.com/michael-reeves","followers_url":"https://api.github.com/users/michael-reeves/followers","following_url":"https://api.github.com/users/michael-reeves/following{/other_user}","gists_url":"https://api.github.com/users/michael-reeves/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-reeves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-reeves/subscriptions","organizations_url":"https://api.github.com/users/michael-reeves/orgs","repos_url":"https://api.github.com/users/michael-reeves/repos","events_url":"https://api.github.com/users/michael-reeves/events{/privacy}","received_events_url":"https://api.github.com/users/michael-reeves/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michael-reeves/redrum_nursery","description":"Carnivorous Plant Store","fork":false,"url":"https://api.github.com/repos/michael-reeves/redrum_nursery","forks_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/forks","keys_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/teams","hooks_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/hooks","issue_events_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/issues/events{/number}","events_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/events","assignees_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/assignees{/user}","branches_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/branches{/branch}","tags_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/tags","blobs_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/git/refs{/sha}","trees_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/statuses/{sha}","languages_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/languages","stargazers_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/stargazers","contributors_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/contributors","subscribers_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/subscribers","subscription_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/subscription","commits_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/commits{/sha}","git_commits_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/git/commits{/sha}","comments_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/comments{/number}","issue_comment_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/issues/comments{/number}","contents_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/contents/{+path}","compare_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/merges","archive_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/downloads","issues_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/issues{/number}","pulls_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls{/number}","milestones_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/milestones{/number}","notifications_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/labels{/name}","releases_url":"https://api.github.com/repos/michael-reeves/redrum_nursery/releases{/id}","created_at":"2015-08-03T16:50:11Z","updated_at":"2015-08-06T19:54:54Z","pushed_at":"2015-08-08T17:44:17Z","git_url":"git://github.com/michael-reeves/redrum_nursery.git","ssh_url":"git@github.com:michael-reeves/redrum_nursery.git","clone_url":"https://github.com/michael-reeves/redrum_nursery.git","svn_url":"https://github.com/michael-reeves/redrum_nursery","homepage":null,"size":6199,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":15,"forks":1,"open_issues":15,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/40"},"html":{"href":"https://github.com/michael-reeves/redrum_nursery/pull/40"},"issue":{"href":"https://api.github.com/repos/michael-reeves/redrum_nursery/issues/40"},"comments":{"href":"https://api.github.com/repos/michael-reeves/redrum_nursery/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/michael-reeves/redrum_nursery/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/michael-reeves/redrum_nursery/statuses/9a92345ec8ce758a17307d544dfa3c46093ba2b8"}}}}