{"action":"created","comment":{"url":"https://api.github.com/repos/lotus/validations/pulls/comments/40170777","id":40170777,"diff_hunk":"@@ -7,6 +7,11 @@\n require 'lotus/validations/attribute'\n require 'lotus/validations/errors'\n \n+begin\n+  require 'byebug'","path":"lib/lotus/validations.rb","position":5,"original_position":5,"commit_id":"d62f7d3efe4ad4769821367589664b54ffc54d3f","original_commit_id":"d62f7d3efe4ad4769821367589664b54ffc54d3f","user":{"login":"joneslee85","id":135605,"avatar_url":"https://avatars.githubusercontent.com/u/135605?v=3","gravatar_id":"","url":"https://api.github.com/users/joneslee85","html_url":"https://github.com/joneslee85","followers_url":"https://api.github.com/users/joneslee85/followers","following_url":"https://api.github.com/users/joneslee85/following{/other_user}","gists_url":"https://api.github.com/users/joneslee85/gists{/gist_id}","starred_url":"https://api.github.com/users/joneslee85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joneslee85/subscriptions","organizations_url":"https://api.github.com/users/joneslee85/orgs","repos_url":"https://api.github.com/users/joneslee85/repos","events_url":"https://api.github.com/users/joneslee85/events{/privacy}","received_events_url":"https://api.github.com/users/joneslee85/received_events","type":"User","site_admin":false},"body":"please remove this debug","created_at":"2015-09-23T04:48:45Z","updated_at":"2015-09-23T04:48:45Z","html_url":"https://github.com/lotus/validations/pull/71#discussion_r40170777","pull_request_url":"https://api.github.com/repos/lotus/validations/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/lotus/validations/pulls/comments/40170777"},"html":{"href":"https://github.com/lotus/validations/pull/71#discussion_r40170777"},"pull_request":{"href":"https://api.github.com/repos/lotus/validations/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/lotus/validations/pulls/71","id":45714179,"html_url":"https://github.com/lotus/validations/pull/71","diff_url":"https://github.com/lotus/validations/pull/71.diff","patch_url":"https://github.com/lotus/validations/pull/71.patch","issue_url":"https://api.github.com/repos/lotus/validations/issues/71","number":71,"state":"open","locked":false,"title":"User defined validations","user":{"login":"kbredemeier","id":806020,"avatar_url":"https://avatars.githubusercontent.com/u/806020?v=3","gravatar_id":"","url":"https://api.github.com/users/kbredemeier","html_url":"https://github.com/kbredemeier","followers_url":"https://api.github.com/users/kbredemeier/followers","following_url":"https://api.github.com/users/kbredemeier/following{/other_user}","gists_url":"https://api.github.com/users/kbredemeier/gists{/gist_id}","starred_url":"https://api.github.com/users/kbredemeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbredemeier/subscriptions","organizations_url":"https://api.github.com/users/kbredemeier/orgs","repos_url":"https://api.github.com/users/kbredemeier/repos","events_url":"https://api.github.com/users/kbredemeier/events{/privacy}","received_events_url":"https://api.github.com/users/kbredemeier/received_events","type":"User","site_admin":false},"body":"I would like to define my own validations like this:\r\n\r\n```ruby\r\nclass FooBarValidator\r\n  include Lotus::Validations\r\n  attr_accessor :foo\r\n\r\n  validates :foo, :is_bar do |attribute|\r\n    attribute.value == \"bar\"\r\n  end\r\nend\r\n```\r\n \r\nThis pull request includes a first implementation and a integration test to illustrate the wanted behavior. Feedback welcome","created_at":"2015-09-22T20:42:55Z","updated_at":"2015-09-23T04:48:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"feee52abaf8ed6870cb704ac0f3f016f054bdb91","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lotus/validations/pulls/71/commits","review_comments_url":"https://api.github.com/repos/lotus/validations/pulls/71/comments","review_comment_url":"https://api.github.com/repos/lotus/validations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lotus/validations/issues/71/comments","statuses_url":"https://api.github.com/repos/lotus/validations/statuses/d62f7d3efe4ad4769821367589664b54ffc54d3f","head":{"label":"kbredemeier:user_defined_validations","ref":"user_defined_validations","sha":"d62f7d3efe4ad4769821367589664b54ffc54d3f","user":{"login":"kbredemeier","id":806020,"avatar_url":"https://avatars.githubusercontent.com/u/806020?v=3","gravatar_id":"","url":"https://api.github.com/users/kbredemeier","html_url":"https://github.com/kbredemeier","followers_url":"https://api.github.com/users/kbredemeier/followers","following_url":"https://api.github.com/users/kbredemeier/following{/other_user}","gists_url":"https://api.github.com/users/kbredemeier/gists{/gist_id}","starred_url":"https://api.github.com/users/kbredemeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbredemeier/subscriptions","organizations_url":"https://api.github.com/users/kbredemeier/orgs","repos_url":"https://api.github.com/users/kbredemeier/repos","events_url":"https://api.github.com/users/kbredemeier/events{/privacy}","received_events_url":"https://api.github.com/users/kbredemeier/received_events","type":"User","site_admin":false},"repo":{"id":42652395,"name":"validations","full_name":"kbredemeier/validations","owner":{"login":"kbredemeier","id":806020,"avatar_url":"https://avatars.githubusercontent.com/u/806020?v=3","gravatar_id":"","url":"https://api.github.com/users/kbredemeier","html_url":"https://github.com/kbredemeier","followers_url":"https://api.github.com/users/kbredemeier/followers","following_url":"https://api.github.com/users/kbredemeier/following{/other_user}","gists_url":"https://api.github.com/users/kbredemeier/gists{/gist_id}","starred_url":"https://api.github.com/users/kbredemeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbredemeier/subscriptions","organizations_url":"https://api.github.com/users/kbredemeier/orgs","repos_url":"https://api.github.com/users/kbredemeier/repos","events_url":"https://api.github.com/users/kbredemeier/events{/privacy}","received_events_url":"https://api.github.com/users/kbredemeier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kbredemeier/validations","description":"Validation mixin for Ruby objects","fork":true,"url":"https://api.github.com/repos/kbredemeier/validations","forks_url":"https://api.github.com/repos/kbredemeier/validations/forks","keys_url":"https://api.github.com/repos/kbredemeier/validations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kbredemeier/validations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kbredemeier/validations/teams","hooks_url":"https://api.github.com/repos/kbredemeier/validations/hooks","issue_events_url":"https://api.github.com/repos/kbredemeier/validations/issues/events{/number}","events_url":"https://api.github.com/repos/kbredemeier/validations/events","assignees_url":"https://api.github.com/repos/kbredemeier/validations/assignees{/user}","branches_url":"https://api.github.com/repos/kbredemeier/validations/branches{/branch}","tags_url":"https://api.github.com/repos/kbredemeier/validations/tags","blobs_url":"https://api.github.com/repos/kbredemeier/validations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kbredemeier/validations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kbredemeier/validations/git/refs{/sha}","trees_url":"https://api.github.com/repos/kbredemeier/validations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kbredemeier/validations/statuses/{sha}","languages_url":"https://api.github.com/repos/kbredemeier/validations/languages","stargazers_url":"https://api.github.com/repos/kbredemeier/validations/stargazers","contributors_url":"https://api.github.com/repos/kbredemeier/validations/contributors","subscribers_url":"https://api.github.com/repos/kbredemeier/validations/subscribers","subscription_url":"https://api.github.com/repos/kbredemeier/validations/subscription","commits_url":"https://api.github.com/repos/kbredemeier/validations/commits{/sha}","git_commits_url":"https://api.github.com/repos/kbredemeier/validations/git/commits{/sha}","comments_url":"https://api.github.com/repos/kbredemeier/validations/comments{/number}","issue_comment_url":"https://api.github.com/repos/kbredemeier/validations/issues/comments{/number}","contents_url":"https://api.github.com/repos/kbredemeier/validations/contents/{+path}","compare_url":"https://api.github.com/repos/kbredemeier/validations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kbredemeier/validations/merges","archive_url":"https://api.github.com/repos/kbredemeier/validations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kbredemeier/validations/downloads","issues_url":"https://api.github.com/repos/kbredemeier/validations/issues{/number}","pulls_url":"https://api.github.com/repos/kbredemeier/validations/pulls{/number}","milestones_url":"https://api.github.com/repos/kbredemeier/validations/milestones{/number}","notifications_url":"https://api.github.com/repos/kbredemeier/validations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kbredemeier/validations/labels{/name}","releases_url":"https://api.github.com/repos/kbredemeier/validations/releases{/id}","created_at":"2015-09-17T11:28:59Z","updated_at":"2015-09-17T11:29:00Z","pushed_at":"2015-09-22T20:49:29Z","git_url":"git://github.com/kbredemeier/validations.git","ssh_url":"git@github.com:kbredemeier/validations.git","clone_url":"https://github.com/kbredemeier/validations.git","svn_url":"https://github.com/kbredemeier/validations","homepage":"http://lotusrb.org","size":313,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"lotus:master","ref":"master","sha":"fefd9d6b4154e3333d4adf1efcbff8ddf8d7cde1","user":{"login":"lotus","id":3210273,"avatar_url":"https://avatars.githubusercontent.com/u/3210273?v=3","gravatar_id":"","url":"https://api.github.com/users/lotus","html_url":"https://github.com/lotus","followers_url":"https://api.github.com/users/lotus/followers","following_url":"https://api.github.com/users/lotus/following{/other_user}","gists_url":"https://api.github.com/users/lotus/gists{/gist_id}","starred_url":"https://api.github.com/users/lotus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lotus/subscriptions","organizations_url":"https://api.github.com/users/lotus/orgs","repos_url":"https://api.github.com/users/lotus/repos","events_url":"https://api.github.com/users/lotus/events{/privacy}","received_events_url":"https://api.github.com/users/lotus/received_events","type":"Organization","site_admin":false},"repo":{"id":22643222,"name":"validations","full_name":"lotus/validations","owner":{"login":"lotus","id":3210273,"avatar_url":"https://avatars.githubusercontent.com/u/3210273?v=3","gravatar_id":"","url":"https://api.github.com/users/lotus","html_url":"https://github.com/lotus","followers_url":"https://api.github.com/users/lotus/followers","following_url":"https://api.github.com/users/lotus/following{/other_user}","gists_url":"https://api.github.com/users/lotus/gists{/gist_id}","starred_url":"https://api.github.com/users/lotus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lotus/subscriptions","organizations_url":"https://api.github.com/users/lotus/orgs","repos_url":"https://api.github.com/users/lotus/repos","events_url":"https://api.github.com/users/lotus/events{/privacy}","received_events_url":"https://api.github.com/users/lotus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lotus/validations","description":"Validation mixin for Ruby objects","fork":false,"url":"https://api.github.com/repos/lotus/validations","forks_url":"https://api.github.com/repos/lotus/validations/forks","keys_url":"https://api.github.com/repos/lotus/validations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lotus/validations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lotus/validations/teams","hooks_url":"https://api.github.com/repos/lotus/validations/hooks","issue_events_url":"https://api.github.com/repos/lotus/validations/issues/events{/number}","events_url":"https://api.github.com/repos/lotus/validations/events","assignees_url":"https://api.github.com/repos/lotus/validations/assignees{/user}","branches_url":"https://api.github.com/repos/lotus/validations/branches{/branch}","tags_url":"https://api.github.com/repos/lotus/validations/tags","blobs_url":"https://api.github.com/repos/lotus/validations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lotus/validations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lotus/validations/git/refs{/sha}","trees_url":"https://api.github.com/repos/lotus/validations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lotus/validations/statuses/{sha}","languages_url":"https://api.github.com/repos/lotus/validations/languages","stargazers_url":"https://api.github.com/repos/lotus/validations/stargazers","contributors_url":"https://api.github.com/repos/lotus/validations/contributors","subscribers_url":"https://api.github.com/repos/lotus/validations/subscribers","subscription_url":"https://api.github.com/repos/lotus/validations/subscription","commits_url":"https://api.github.com/repos/lotus/validations/commits{/sha}","git_commits_url":"https://api.github.com/repos/lotus/validations/git/commits{/sha}","comments_url":"https://api.github.com/repos/lotus/validations/comments{/number}","issue_comment_url":"https://api.github.com/repos/lotus/validations/issues/comments{/number}","contents_url":"https://api.github.com/repos/lotus/validations/contents/{+path}","compare_url":"https://api.github.com/repos/lotus/validations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lotus/validations/merges","archive_url":"https://api.github.com/repos/lotus/validations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lotus/validations/downloads","issues_url":"https://api.github.com/repos/lotus/validations/issues{/number}","pulls_url":"https://api.github.com/repos/lotus/validations/pulls{/number}","milestones_url":"https://api.github.com/repos/lotus/validations/milestones{/number}","notifications_url":"https://api.github.com/repos/lotus/validations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lotus/validations/labels{/name}","releases_url":"https://api.github.com/repos/lotus/validations/releases{/id}","created_at":"2014-08-05T12:49:35Z","updated_at":"2015-09-21T20:46:24Z","pushed_at":"2015-09-22T20:49:30Z","git_url":"git://github.com/lotus/validations.git","ssh_url":"git@github.com:lotus/validations.git","clone_url":"https://github.com/lotus/validations.git","svn_url":"https://github.com/lotus/validations","homepage":"http://lotusrb.org","size":1020,"stargazers_count":59,"watchers_count":59,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":3,"forks":34,"open_issues":3,"watchers":59,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lotus/validations/pulls/71"},"html":{"href":"https://github.com/lotus/validations/pull/71"},"issue":{"href":"https://api.github.com/repos/lotus/validations/issues/71"},"comments":{"href":"https://api.github.com/repos/lotus/validations/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/lotus/validations/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/lotus/validations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lotus/validations/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/lotus/validations/statuses/d62f7d3efe4ad4769821367589664b54ffc54d3f"}}}}