{"action":"created","comment":{"url":"https://api.github.com/repos/Sealious/sealious/pulls/comments/47000134","id":47000134,"diff_hunk":"@@ -0,0 +1,72 @@\n+var Sealious = require(\"sealious\");\n+var crypto = require('crypto');\n+\n+module.exports = {\n+\ttest_init: function() {\n+\n+\t},\n+\ttest_start: function() {\n+\t\tvar field_type_hashed_text = Sealious.ChipManager.get_chip(\"field_type\", \"hashed-text\");\n+\t\tdescribe(\"FieldType.HashedText\", function() {\n+\t\t\tit(\"should return the description of the field type\", function(done) {\n+\t\t\t\tif (typeof field_type_hashed_text.declaration.get_description() === \"string\")\n+\t\t\t\t\tdone();\n+\t\t\t\telse\n+\t\t\t\t\tdone(new Error(\"But it didn't\"));\n+\t\t\t});\n+\t\t\tit(\"accepts given password ('pas1sw24rd1')\", function(done) {\n+\t\t\t\tfield_type_hashed_text.is_proper_value(new Sealious.Context(), {}, \"pas1sw24rd1\")\n+\t\t\t\t.then(function() {\n+\t\t\t\t\tdone();\n+\t\t\t\t})\n+\t\t\t\t.catch(function(error) {\n+\t\t\t\t\tdone(new Error(error));\n+\t\t\t\t})\n+\t\t\t});\n+\t\t\tit(\"accepts given password ('pas1sw24rd1')\", function(done) {\n+\t\t\t\tfield_type_hashed_text.is_proper_value(new Sealious.Context(), {digits: 3}, \"pas1sw24rd1\")\n+\t\t\t\t.then(function() {\n+\t\t\t\t\tdone();\n+\t\t\t\t})\n+\t\t\t\t.catch(function(error) {\n+\t\t\t\t\tdone(new Error(error));\n+\t\t\t\t})\n+\t\t\t});\n+\t\t\tit(\"accepts given password ('PAs1sW24rD1')\", function(done) {\n+\t\t\t\tfield_type_hashed_text.is_proper_value(new Sealious.Context(), {capitals: 3}, \"PAs1sW24rD1\")\n+\t\t\t\t.then(function() {\n+\t\t\t\t\tdone();\n+\t\t\t\t})\n+\t\t\t\t.catch(function(error) {\n+\t\t\t\t\tdone(new Error(error));\n+\t\t\t\t})\n+\t\t\t});\n+\t\t\tit(\"accepts given password ('PaSw0rd23')\", function(done) {\n+\t\t\t\tfield_type_hashed_text.is_proper_value(new Sealious.Context(), {capitals: 2, digits: 3}, \"PaSw0rd23\")\n+\t\t\t\t.then(function() {\n+\t\t\t\t\tdone();\n+\t\t\t\t})\n+\t\t\t\t.catch(function(error) {\n+\t\t\t\t\tdone(new Error(error));\n+\t\t\t\t})\n+\t\t\t});\n+\t\t\tit(\"resolved with a hash (algorithm: 'md5', salt: '')\", function(done) {\n+\t\t\t\tfield_type_hashed_text.encode(new Sealious.Context(), {}, \"test\")\n+\t\t\t\t.then(function(result){\t\t\n+\t\t\t\t\tcrypto.pbkdf2(\"test\", \"\", 4096, 64, \"md5\", function(err, key){\n+\t\t\t\t\t\tif (err)\n+\t\t\t\t\t\t\tdone(new Error(err));","path":"tests/unit-tests/field-type.hashed-text.test.js","position":58,"original_position":58,"commit_id":"e9df4fde989934f72ed8822b65e788de1d17e13e","original_commit_id":"e9df4fde989934f72ed8822b65e788de1d17e13e","user":{"login":"groovy354","id":2697916,"avatar_url":"https://avatars.githubusercontent.com/u/2697916?v=3","gravatar_id":"","url":"https://api.github.com/users/groovy354","html_url":"https://github.com/groovy354","followers_url":"https://api.github.com/users/groovy354/followers","following_url":"https://api.github.com/users/groovy354/following{/other_user}","gists_url":"https://api.github.com/users/groovy354/gists{/gist_id}","starred_url":"https://api.github.com/users/groovy354/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groovy354/subscriptions","organizations_url":"https://api.github.com/users/groovy354/orgs","repos_url":"https://api.github.com/users/groovy354/repos","events_url":"https://api.github.com/users/groovy354/events{/privacy}","received_events_url":"https://api.github.com/users/groovy354/received_events","type":"User","site_admin":false},"body":"Please inline these conditionals :)","created_at":"2015-12-08T19:22:46Z","updated_at":"2015-12-08T19:22:46Z","html_url":"https://github.com/Sealious/sealious/pull/245#discussion_r47000134","pull_request_url":"https://api.github.com/repos/Sealious/sealious/pulls/245","_links":{"self":{"href":"https://api.github.com/repos/Sealious/sealious/pulls/comments/47000134"},"html":{"href":"https://github.com/Sealious/sealious/pull/245#discussion_r47000134"},"pull_request":{"href":"https://api.github.com/repos/Sealious/sealious/pulls/245"}}},"pull_request":{"url":"https://api.github.com/repos/Sealious/sealious/pulls/245","id":52976663,"html_url":"https://github.com/Sealious/sealious/pull/245","diff_url":"https://github.com/Sealious/sealious/pull/245.diff","patch_url":"https://github.com/Sealious/sealious/pull/245.patch","issue_url":"https://api.github.com/repos/Sealious/sealious/issues/245","number":245,"state":"open","locked":false,"title":"Trello#field type.password","user":{"login":"theadimar21","id":5767638,"avatar_url":"https://avatars.githubusercontent.com/u/5767638?v=3","gravatar_id":"","url":"https://api.github.com/users/theadimar21","html_url":"https://github.com/theadimar21","followers_url":"https://api.github.com/users/theadimar21/followers","following_url":"https://api.github.com/users/theadimar21/following{/other_user}","gists_url":"https://api.github.com/users/theadimar21/gists{/gist_id}","starred_url":"https://api.github.com/users/theadimar21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theadimar21/subscriptions","organizations_url":"https://api.github.com/users/theadimar21/orgs","repos_url":"https://api.github.com/users/theadimar21/repos","events_url":"https://api.github.com/users/theadimar21/events{/privacy}","received_events_url":"https://api.github.com/users/theadimar21/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-08T12:54:13Z","updated_at":"2015-12-08T19:22:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Sealious/sealious/pulls/245/commits","review_comments_url":"https://api.github.com/repos/Sealious/sealious/pulls/245/comments","review_comment_url":"https://api.github.com/repos/Sealious/sealious/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sealious/sealious/issues/245/comments","statuses_url":"https://api.github.com/repos/Sealious/sealious/statuses/e9df4fde989934f72ed8822b65e788de1d17e13e","head":{"label":"Sealious:trello#field-type.password","ref":"trello#field-type.password","sha":"e9df4fde989934f72ed8822b65e788de1d17e13e","user":{"login":"Sealious","id":11518171,"avatar_url":"https://avatars.githubusercontent.com/u/11518171?v=3","gravatar_id":"","url":"https://api.github.com/users/Sealious","html_url":"https://github.com/Sealious","followers_url":"https://api.github.com/users/Sealious/followers","following_url":"https://api.github.com/users/Sealious/following{/other_user}","gists_url":"https://api.github.com/users/Sealious/gists{/gist_id}","starred_url":"https://api.github.com/users/Sealious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sealious/subscriptions","organizations_url":"https://api.github.com/users/Sealious/orgs","repos_url":"https://api.github.com/users/Sealious/repos","events_url":"https://api.github.com/users/Sealious/events{/privacy}","received_events_url":"https://api.github.com/users/Sealious/received_events","type":"Organization","site_admin":false},"repo":{"id":25256202,"name":"sealious","full_name":"Sealious/sealious","owner":{"login":"Sealious","id":11518171,"avatar_url":"https://avatars.githubusercontent.com/u/11518171?v=3","gravatar_id":"","url":"https://api.github.com/users/Sealious","html_url":"https://github.com/Sealious","followers_url":"https://api.github.com/users/Sealious/followers","following_url":"https://api.github.com/users/Sealious/following{/other_user}","gists_url":"https://api.github.com/users/Sealious/gists{/gist_id}","starred_url":"https://api.github.com/users/Sealious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sealious/subscriptions","organizations_url":"https://api.github.com/users/Sealious/orgs","repos_url":"https://api.github.com/users/Sealious/repos","events_url":"https://api.github.com/users/Sealious/events{/privacy}","received_events_url":"https://api.github.com/users/Sealious/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sealious/sealious","description":"An extensible, declarative node framework","fork":false,"url":"https://api.github.com/repos/Sealious/sealious","forks_url":"https://api.github.com/repos/Sealious/sealious/forks","keys_url":"https://api.github.com/repos/Sealious/sealious/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sealious/sealious/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sealious/sealious/teams","hooks_url":"https://api.github.com/repos/Sealious/sealious/hooks","issue_events_url":"https://api.github.com/repos/Sealious/sealious/issues/events{/number}","events_url":"https://api.github.com/repos/Sealious/sealious/events","assignees_url":"https://api.github.com/repos/Sealious/sealious/assignees{/user}","branches_url":"https://api.github.com/repos/Sealious/sealious/branches{/branch}","tags_url":"https://api.github.com/repos/Sealious/sealious/tags","blobs_url":"https://api.github.com/repos/Sealious/sealious/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sealious/sealious/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sealious/sealious/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sealious/sealious/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sealious/sealious/statuses/{sha}","languages_url":"https://api.github.com/repos/Sealious/sealious/languages","stargazers_url":"https://api.github.com/repos/Sealious/sealious/stargazers","contributors_url":"https://api.github.com/repos/Sealious/sealious/contributors","subscribers_url":"https://api.github.com/repos/Sealious/sealious/subscribers","subscription_url":"https://api.github.com/repos/Sealious/sealious/subscription","commits_url":"https://api.github.com/repos/Sealious/sealious/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sealious/sealious/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sealious/sealious/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sealious/sealious/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sealious/sealious/contents/{+path}","compare_url":"https://api.github.com/repos/Sealious/sealious/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sealious/sealious/merges","archive_url":"https://api.github.com/repos/Sealious/sealious/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sealious/sealious/downloads","issues_url":"https://api.github.com/repos/Sealious/sealious/issues{/number}","pulls_url":"https://api.github.com/repos/Sealious/sealious/pulls{/number}","milestones_url":"https://api.github.com/repos/Sealious/sealious/milestones{/number}","notifications_url":"https://api.github.com/repos/Sealious/sealious/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sealious/sealious/labels{/name}","releases_url":"https://api.github.com/repos/Sealious/sealious/releases{/id}","created_at":"2014-10-15T13:39:35Z","updated_at":"2015-12-01T13:45:11Z","pushed_at":"2015-12-08T14:51:55Z","git_url":"git://github.com/Sealious/sealious.git","ssh_url":"git@github.com:Sealious/sealious.git","clone_url":"https://github.com/Sealious/sealious.git","svn_url":"https://github.com/Sealious/sealious","homepage":"http://sealious.github.io","size":26928,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":9,"default_branch":"latest"}},"base":{"label":"Sealious:next","ref":"next","sha":"997a13382f993446cd7dbe50ec562dd3b067c26b","user":{"login":"Sealious","id":11518171,"avatar_url":"https://avatars.githubusercontent.com/u/11518171?v=3","gravatar_id":"","url":"https://api.github.com/users/Sealious","html_url":"https://github.com/Sealious","followers_url":"https://api.github.com/users/Sealious/followers","following_url":"https://api.github.com/users/Sealious/following{/other_user}","gists_url":"https://api.github.com/users/Sealious/gists{/gist_id}","starred_url":"https://api.github.com/users/Sealious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sealious/subscriptions","organizations_url":"https://api.github.com/users/Sealious/orgs","repos_url":"https://api.github.com/users/Sealious/repos","events_url":"https://api.github.com/users/Sealious/events{/privacy}","received_events_url":"https://api.github.com/users/Sealious/received_events","type":"Organization","site_admin":false},"repo":{"id":25256202,"name":"sealious","full_name":"Sealious/sealious","owner":{"login":"Sealious","id":11518171,"avatar_url":"https://avatars.githubusercontent.com/u/11518171?v=3","gravatar_id":"","url":"https://api.github.com/users/Sealious","html_url":"https://github.com/Sealious","followers_url":"https://api.github.com/users/Sealious/followers","following_url":"https://api.github.com/users/Sealious/following{/other_user}","gists_url":"https://api.github.com/users/Sealious/gists{/gist_id}","starred_url":"https://api.github.com/users/Sealious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sealious/subscriptions","organizations_url":"https://api.github.com/users/Sealious/orgs","repos_url":"https://api.github.com/users/Sealious/repos","events_url":"https://api.github.com/users/Sealious/events{/privacy}","received_events_url":"https://api.github.com/users/Sealious/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sealious/sealious","description":"An extensible, declarative node framework","fork":false,"url":"https://api.github.com/repos/Sealious/sealious","forks_url":"https://api.github.com/repos/Sealious/sealious/forks","keys_url":"https://api.github.com/repos/Sealious/sealious/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sealious/sealious/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sealious/sealious/teams","hooks_url":"https://api.github.com/repos/Sealious/sealious/hooks","issue_events_url":"https://api.github.com/repos/Sealious/sealious/issues/events{/number}","events_url":"https://api.github.com/repos/Sealious/sealious/events","assignees_url":"https://api.github.com/repos/Sealious/sealious/assignees{/user}","branches_url":"https://api.github.com/repos/Sealious/sealious/branches{/branch}","tags_url":"https://api.github.com/repos/Sealious/sealious/tags","blobs_url":"https://api.github.com/repos/Sealious/sealious/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sealious/sealious/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sealious/sealious/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sealious/sealious/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sealious/sealious/statuses/{sha}","languages_url":"https://api.github.com/repos/Sealious/sealious/languages","stargazers_url":"https://api.github.com/repos/Sealious/sealious/stargazers","contributors_url":"https://api.github.com/repos/Sealious/sealious/contributors","subscribers_url":"https://api.github.com/repos/Sealious/sealious/subscribers","subscription_url":"https://api.github.com/repos/Sealious/sealious/subscription","commits_url":"https://api.github.com/repos/Sealious/sealious/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sealious/sealious/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sealious/sealious/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sealious/sealious/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sealious/sealious/contents/{+path}","compare_url":"https://api.github.com/repos/Sealious/sealious/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sealious/sealious/merges","archive_url":"https://api.github.com/repos/Sealious/sealious/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sealious/sealious/downloads","issues_url":"https://api.github.com/repos/Sealious/sealious/issues{/number}","pulls_url":"https://api.github.com/repos/Sealious/sealious/pulls{/number}","milestones_url":"https://api.github.com/repos/Sealious/sealious/milestones{/number}","notifications_url":"https://api.github.com/repos/Sealious/sealious/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sealious/sealious/labels{/name}","releases_url":"https://api.github.com/repos/Sealious/sealious/releases{/id}","created_at":"2014-10-15T13:39:35Z","updated_at":"2015-12-01T13:45:11Z","pushed_at":"2015-12-08T14:51:55Z","git_url":"git://github.com/Sealious/sealious.git","ssh_url":"git@github.com:Sealious/sealious.git","clone_url":"https://github.com/Sealious/sealious.git","svn_url":"https://github.com/Sealious/sealious","homepage":"http://sealious.github.io","size":26928,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":9,"default_branch":"latest"}},"_links":{"self":{"href":"https://api.github.com/repos/Sealious/sealious/pulls/245"},"html":{"href":"https://github.com/Sealious/sealious/pull/245"},"issue":{"href":"https://api.github.com/repos/Sealious/sealious/issues/245"},"comments":{"href":"https://api.github.com/repos/Sealious/sealious/issues/245/comments"},"review_comments":{"href":"https://api.github.com/repos/Sealious/sealious/pulls/245/comments"},"review_comment":{"href":"https://api.github.com/repos/Sealious/sealious/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sealious/sealious/pulls/245/commits"},"statuses":{"href":"https://api.github.com/repos/Sealious/sealious/statuses/e9df4fde989934f72ed8822b65e788de1d17e13e"}}}}