GitHub PullRequestEvent at 2014-02-05 02:30:08
Repository: kujua-sentinel
Actor: mandric
Payload: {"action":"opened","number":50,"pull_request":{"url":"https://api.github.com/repos/medic/kujua-sentinel/pulls/50","id":12207515,"html_url":"https://github.com/medic/kujua-sentinel/pull/50","diff_url":"https://github.com/medic/kujua-sentinel/pull/50.diff","patch_url":"https://github.com/medic/kujua-sentinel/pull/50.patch","issue_url":"https://api.github.com/repos/medic/kujua-sentinel/issues/50","number":50,"state":"open","title":"added support for async/custom validations kujua-lite/issues/411","user":{"login":"mandric","id":25641,"avatar_url":"https://gravatar.com/avatar/0369e4bbb9fbb7ec0182bce3d05e00c9?d=https%3A%2F%2Fidenticons.github.com%2F103c95b905e20d63a6354e5284922bd2.png&r=x","gravatar_id":"0369e4bbb9fbb7ec0182bce3d05e00c9","url":"https://api.github.com/users/mandric","html_url":"https://github.com/mandric","followers_url":"https://api.github.com/users/mandric/followers","following_url":"https://api.github.com/users/mandric/following{/other_user}","gists_url":"https://api.github.com/users/mandric/gists{/gist_id}","starred_url":"https://api.github.com/users/mandric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandric/subscriptions","organizations_url":"https://api.github.com/users/mandric/orgs","repos_url":"https://api.github.com/users/mandric/repos","events_url":"https://api.github.com/users/mandric/events{/privacy}","received_events_url":"https://api.github.com/users/mandric/received_events","type":"User","site_admin":false},"body":"added callback parameter to `lib.validation.validate()` returning errors\r\nas array in callback, empty array if no errors (since there was a test\r\nfor that). updated tests.\r\n\r\nadded `extra_validations` object to allow for custom validation function\r\nin `lib/validation.js`.\r\n\r\nModified registrations transition to support async/custom validations in\r\naddition to the synchronous Pupil validations.\r\n\r\nValidation settings may consist of Pupil.js rules and custom rules.\r\nThese cannot be combined as part of the same rule.\r\n\r\nNot OK:\r\n  rule: \"regex(\\d{5}) && unique('patient_id')\"\r\n\r\nOK:\r\n  rule: \"regex(\\d{5}) && max(11111)\"\r\n\r\nIf for example you want to validate that patient_id is 5 numbers and it\r\nis unique (or some other custom validation) you need to define two\r\nvalidation configs/separate rules in your settings. Example validation\r\nsettings:\r\n\r\n[\r\n  {\r\n    property: \"patient_id\",\r\n    rule: \"regex(\\d{5})\",\r\n    message: \"Patient ID must be 5 numbers.\"\r\n  },\r\n  {\r\n    property: \"patient_id\",\r\n    rule: \"unique('patient_id')\",\r\n    message: \"Patient ID must be unique.\"\r\n  }\r\n]\r\n\r\nOpened issue on Pupil repo for future reference:\r\nhttps://github.com/Dragory/Pupil.js/issues/5\r\n\r\nModified `pupil.validator` to ignore when a validation function does not exist in\r\nits library.\r\n\r\nExported lexer and parser modules from Pupil to allow for parsing rules\r\nfor custom/async validations.\r\n\r\nTODO finish custom `unique` validation function and add some tests\r\naround it.","created_at":"2014-02-05T02:30:07Z","updated_at":"2014-02-05T02:30:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/medic/kujua-sentinel/pulls/50/commits","review_comments_url":"https://api.github.com/repos/medic/kujua-sentinel/pulls/50/comments","review_comment_url":"https://api.github.com/repos/medic/kujua-sentinel/pulls/comments/{number}","comments_url":"https://api.github.com/repos/medic/kujua-sentinel/issues/50/comments","statuses_url":"https://api.github.com/repos/medic/kujua-sentinel/statuses/9b29fba50ed1318bafa60b2a84ad97ac982d9b4b","head":{"label":"medic:async-validations","ref":"async-validations","sha":"9b29fba50ed1318bafa60b2a84ad97ac982d9b4b","user":{"login":"medic","id":474424,"avatar_url":"https://gravatar.com/avatar/9123037a0c9bccc13a2bc04f0d1f5723?d=https%3A%2F%2Fidenticons.github.com%2F3a0cb72328aff3f328628e79f6d9e540.png&r=x","gravatar_id":"9123037a0c9bccc13a2bc04f0d1f5723","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"repo":{"id":11725950,"name":"kujua-sentinel","full_name":"medic/kujua-sentinel","owner":{"login":"medic","id":474424,"avatar_url":"https://gravatar.com/avatar/9123037a0c9bccc13a2bc04f0d1f5723?d=https%3A%2F%2Fidenticons.github.com%2F3a0cb72328aff3f328628e79f6d9e540.png&r=x","gravatar_id":"9123037a0c9bccc13a2bc04f0d1f5723","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/medic/kujua-sentinel","description":"Node.js worker for Kujua Lite","fork":false,"url":"https://api.github.com/repos/medic/kujua-sentinel","forks_url":"https://api.github.com/repos/medic/kujua-sentinel/forks","keys_url":"https://api.github.com/repos/medic/kujua-sentinel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/medic/kujua-sentinel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/medic/kujua-sentinel/teams","hooks_url":"https://api.github.com/repos/medic/kujua-sentinel/hooks","issue_events_url":"https://api.github.com/repos/medic/kujua-sentinel/issues/events{/number}","events_url":"https://api.github.com/repos/medic/kujua-sentinel/events","assignees_url":"https://api.github.com/repos/medic/kujua-sentinel/assignees{/user}","branches_url":"https://api.github.com/repos/medic/kujua-sentinel/branches{/branch}","tags_url":"https://api.github.com/repos/medic/kujua-sentinel/tags","blobs_url":"https://api.github.com/repos/medic/kujua-sentinel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/medic/kujua-sentinel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/medic/kujua-sentinel/git/refs{/sha}","trees_url":"https://api.github.com/repos/medic/kujua-sentinel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/medic/kujua-sentinel/statuses/{sha}","languages_url":"https://api.github.com/repos/medic/kujua-sentinel/languages","stargazers_url":"https://api.github.com/repos/medic/kujua-sentinel/stargazers","contributors_url":"https://api.github.com/repos/medic/kujua-sentinel/contributors","subscribers_url":"https://api.github.com/repos/medic/kujua-sentinel/subscribers","subscription_url":"https://api.github.com/repos/medic/kujua-sentinel/subscription","commits_url":"https://api.github.com/repos/medic/kujua-sentinel/commits{/sha}","git_commits_url":"https://api.github.com/repos/medic/kujua-sentinel/git/commits{/sha}","comments_url":"https://api.github.com/repos/medic/kujua-sentinel/comments{/number}","issue_comment_url":"https://api.github.com/repos/medic/kujua-sentinel/issues/comments/{number}","contents_url":"https://api.github.com/repos/medic/kujua-sentinel/contents/{+path}","compare_url":"https://api.github.com/repos/medic/kujua-sentinel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/medic/kujua-sentinel/merges","archive_url":"https://api.github.com/repos/medic/kujua-sentinel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/medic/kujua-sentinel/downloads","issues_url":"https://api.github.com/repos/medic/kujua-sentinel/issues{/number}","pulls_url":"https://api.github.com/repos/medic/kujua-sentinel/pulls{/number}","milestones_url":"https://api.github.com/repos/medic/kujua-sentinel/milestones{/number}","notifications_url":"https://api.github.com/repos/medic/kujua-sentinel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/medic/kujua-sentinel/labels{/name}","releases_url":"https://api.github.com/repos/medic/kujua-sentinel/releases{/id}","created_at":"2013-07-28T21:14:52Z","updated_at":"2014-02-05T02:30:08Z","pushed_at":"2014-02-05T02:24:14Z","git_url":"git://github.com/medic/kujua-sentinel.git","ssh_url":"git@github.com:medic/kujua-sentinel.git","clone_url":"https://github.com/medic/kujua-sentinel.git","svn_url":"https://github.com/medic/kujua-sentinel","homepage":"","size":2384,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":1,"default_branch":"develop","master_branch":"develop"}},"base":{"label":"medic:develop","ref":"develop","sha":"044018c334df0f03840331ae4eea35ac815ce3e4","user":{"login":"medic","id":474424,"avatar_url":"https://gravatar.com/avatar/9123037a0c9bccc13a2bc04f0d1f5723?d=https%3A%2F%2Fidenticons.github.com%2F3a0cb72328aff3f328628e79f6d9e540.png&r=x","gravatar_id":"9123037a0c9bccc13a2bc04f0d1f5723","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"repo":{"id":11725950,"name":"kujua-sentinel","full_name":"medic/kujua-sentinel","owner":{"login":"medic","id":474424,"avatar_url":"https://gravatar.com/avatar/9123037a0c9bccc13a2bc04f0d1f5723?d=https%3A%2F%2Fidenticons.github.com%2F3a0cb72328aff3f328628e79f6d9e540.png&r=x","gravatar_id":"9123037a0c9bccc13a2bc04f0d1f5723","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/medic/kujua-sentinel","description":"Node.js worker for Kujua Lite","fork":false,"url":"https://api.github.com/repos/medic/kujua-sentinel","forks_url":"https://api.github.com/repos/medic/kujua-sentinel/forks","keys_url":"https://api.github.com/repos/medic/kujua-sentinel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/medic/kujua-sentinel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/medic/kujua-sentinel/teams","hooks_url":"https://api.github.com/repos/medic/kujua-sentinel/hooks","issue_events_url":"https://api.github.com/repos/medic/kujua-sentinel/issues/events{/number}","events_url":"https://api.github.com/repos/medic/kujua-sentinel/events","assignees_url":"https://api.github.com/repos/medic/kujua-sentinel/assignees{/user}","branches_url":"https://api.github.com/repos/medic/kujua-sentinel/branches{/branch}","tags_url":"https://api.github.com/repos/medic/kujua-sentinel/tags","blobs_url":"https://api.github.com/repos/medic/kujua-sentinel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/medic/kujua-sentinel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/medic/kujua-sentinel/git/refs{/sha}","trees_url":"https://api.github.com/repos/medic/kujua-sentinel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/medic/kujua-sentinel/statuses/{sha}","languages_url":"https://api.github.com/repos/medic/kujua-sentinel/languages","stargazers_url":"https://api.github.com/repos/medic/kujua-sentinel/stargazers","contributors_url":"https://api.github.com/repos/medic/kujua-sentinel/contributors","subscribers_url":"https://api.github.com/repos/medic/kujua-sentinel/subscribers","subscription_url":"https://api.github.com/repos/medic/kujua-sentinel/subscription","commits_url":"https://api.github.com/repos/medic/kujua-sentinel/commits{/sha}","git_commits_url":"https://api.github.com/repos/medic/kujua-sentinel/git/commits{/sha}","comments_url":"https://api.github.com/repos/medic/kujua-sentinel/comments{/number}","issue_comment_url":"https://api.github.com/repos/medic/kujua-sentinel/issues/comments/{number}","contents_url":"https://api.github.com/repos/medic/kujua-sentinel/contents/{+path}","compare_url":"https://api.github.com/repos/medic/kujua-sentinel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/medic/kujua-sentinel/merges","archive_url":"https://api.github.com/repos/medic/kujua-sentinel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/medic/kujua-sentinel/downloads","issues_url":"https://api.github.com/repos/medic/kujua-sentinel/issues{/number}","pulls_url":"https://api.github.com/repos/medic/kujua-sentinel/pulls{/number}","milestones_url":"https://api.github.com/repos/medic/kujua-sentinel/milestones{/number}","notifications_url":"https://api.github.com/repos/medic/kujua-sentinel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/medic/kujua-sentinel/labels{/name}","releases_url":"https://api.github.com/repos/medic/kujua-sentinel/releases{/id}","created_at":"2013-07-28T21:14:52Z","updated_at":"2014-02-05T02:30:08Z","pushed_at":"2014-02-05T02:24:14Z","git_url":"git://github.com/medic/kujua-sentinel.git","ssh_url":"git@github.com:medic/kujua-sentinel.git","clone_url":"https://github.com/medic/kujua-sentinel.git","svn_url":"https://github.com/medic/kujua-sentinel","homepage":"","size":2384,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":1,"default_branch":"develop","master_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/medic/kujua-sentinel/pulls/50"},"html":{"href":"https://github.com/medic/kujua-sentinel/pull/50"},"issue":{"href":"https://api.github.com/repos/medic/kujua-sentinel/issues/50"},"comments":{"href":"https://api.github.com/repos/medic/kujua-sentinel/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/medic/kujua-sentinel/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/medic/kujua-sentinel/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/medic/kujua-sentinel/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/medic/kujua-sentinel/statuses/9b29fba50ed1318bafa60b2a84ad97ac982d9b4b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":245,"deletions":115,"changed_files":7}}