{"action":"created","comment":{"url":"https://api.github.com/repos/roqua/quby_engine/pulls/comments/41254689","id":41254689,"diff_hunk":"@@ -277,6 +277,48 @@ def make_definition(definition)\n       end\n     end\n \n+    describe 'score short_key validation' do\n+      it 'accepts the short_key option' do\n+        score_definition = make_definition(<<-END)\n+          score 'score_key', label: 'some_label', short_key: 'short1' do\n+            {}\n+          end\n+        END\n+        expect(score_definition).to be_valid\n+      end\n+\n+      it 'accepts score short keys that are the correct length' do\n+        score_definition = make_definition(<<-END)\n+          score 'some_score_key', label: 'some_label', short_key: 'short_sc' do\n+            {}\n+          end\n+        END\n+        expect(score_definition.valid?).to be true\n+      end\n+\n+      it 'reject score short keys that are too long', label: 'some_label' do\n+        invalid_score_definition = make_definition(<<-END)\n+          score 'some_score_key', short_key: 'not_so_short_key' do\n+            { t_score: 42 }\n+          end\n+        END\n+        expect(invalid_score_definition.valid?).to be false\n+      end\n+\n+      it 'rejects score short_key if already defined', label: 'some_label' do\n+        score_definition = make_definition(<<-END)\n+          question :v_6, type: :radio, title: 'foo'\n+          score 'one_score', short_key: 'some_key'  do\n+            { t_score: 42 }\n+          end\n+          score 'two_score', short_key: 'same_key' do","path":"spec/quby/questionnaires/services/definition_validator_spec.rb","position":38,"original_position":38,"commit_id":"08a0d023e6cc799c3a00bb9921c3bbe075d341d2","original_commit_id":"08a0d023e6cc799c3a00bb9921c3bbe075d341d2","user":{"login":"hampei","id":18834,"avatar_url":"https://avatars.githubusercontent.com/u/18834?v=3","gravatar_id":"","url":"https://api.github.com/users/hampei","html_url":"https://github.com/hampei","followers_url":"https://api.github.com/users/hampei/followers","following_url":"https://api.github.com/users/hampei/following{/other_user}","gists_url":"https://api.github.com/users/hampei/gists{/gist_id}","starred_url":"https://api.github.com/users/hampei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hampei/subscriptions","organizations_url":"https://api.github.com/users/hampei/orgs","repos_url":"https://api.github.com/users/hampei/repos","events_url":"https://api.github.com/users/hampei/events{/privacy}","received_events_url":"https://api.github.com/users/hampei/received_events","type":"User","site_admin":false},"body":"Dit is heel raar, Hij faalt nu bij 2 verschillende keys? Heeft blijkbaar nog een positieve test nodig.","created_at":"2015-10-06T11:58:33Z","updated_at":"2015-10-06T11:58:33Z","html_url":"https://github.com/roqua/quby_engine/pull/132#discussion_r41254689","pull_request_url":"https://api.github.com/repos/roqua/quby_engine/pulls/132","_links":{"self":{"href":"https://api.github.com/repos/roqua/quby_engine/pulls/comments/41254689"},"html":{"href":"https://github.com/roqua/quby_engine/pull/132#discussion_r41254689"},"pull_request":{"href":"https://api.github.com/repos/roqua/quby_engine/pulls/132"}}},"pull_request":{"url":"https://api.github.com/repos/roqua/quby_engine/pulls/132","id":46871026,"html_url":"https://github.com/roqua/quby_engine/pull/132","diff_url":"https://github.com/roqua/quby_engine/pull/132.diff","patch_url":"https://github.com/roqua/quby_engine/pull/132.patch","issue_url":"https://api.github.com/repos/roqua/quby_engine/issues/132","number":132,"state":"open","locked":false,"title":"add short key","user":{"login":"hestervanwijk","id":3309295,"avatar_url":"https://avatars.githubusercontent.com/u/3309295?v=3","gravatar_id":"","url":"https://api.github.com/users/hestervanwijk","html_url":"https://github.com/hestervanwijk","followers_url":"https://api.github.com/users/hestervanwijk/followers","following_url":"https://api.github.com/users/hestervanwijk/following{/other_user}","gists_url":"https://api.github.com/users/hestervanwijk/gists{/gist_id}","starred_url":"https://api.github.com/users/hestervanwijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hestervanwijk/subscriptions","organizations_url":"https://api.github.com/users/hestervanwijk/orgs","repos_url":"https://api.github.com/users/hestervanwijk/repos","events_url":"https://api.github.com/users/hestervanwijk/events{/privacy}","received_events_url":"https://api.github.com/users/hestervanwijk/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-06T07:44:26Z","updated_at":"2015-10-06T11:58:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e9590ff62e1ee33fc5f95c88c5938391ef272e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/roqua/quby_engine/pulls/132/commits","review_comments_url":"https://api.github.com/repos/roqua/quby_engine/pulls/132/comments","review_comment_url":"https://api.github.com/repos/roqua/quby_engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/roqua/quby_engine/issues/132/comments","statuses_url":"https://api.github.com/repos/roqua/quby_engine/statuses/08a0d023e6cc799c3a00bb9921c3bbe075d341d2","head":{"label":"roqua:hw_short_key","ref":"hw_short_key","sha":"08a0d023e6cc799c3a00bb9921c3bbe075d341d2","user":{"login":"roqua","id":598697,"avatar_url":"https://avatars.githubusercontent.com/u/598697?v=3","gravatar_id":"","url":"https://api.github.com/users/roqua","html_url":"https://github.com/roqua","followers_url":"https://api.github.com/users/roqua/followers","following_url":"https://api.github.com/users/roqua/following{/other_user}","gists_url":"https://api.github.com/users/roqua/gists{/gist_id}","starred_url":"https://api.github.com/users/roqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roqua/subscriptions","organizations_url":"https://api.github.com/users/roqua/orgs","repos_url":"https://api.github.com/users/roqua/repos","events_url":"https://api.github.com/users/roqua/events{/privacy}","received_events_url":"https://api.github.com/users/roqua/received_events","type":"Organization","site_admin":false},"repo":{"id":4905239,"name":"quby_engine","full_name":"roqua/quby_engine","owner":{"login":"roqua","id":598697,"avatar_url":"https://avatars.githubusercontent.com/u/598697?v=3","gravatar_id":"","url":"https://api.github.com/users/roqua","html_url":"https://github.com/roqua","followers_url":"https://api.github.com/users/roqua/followers","following_url":"https://api.github.com/users/roqua/following{/other_user}","gists_url":"https://api.github.com/users/roqua/gists{/gist_id}","starred_url":"https://api.github.com/users/roqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roqua/subscriptions","organizations_url":"https://api.github.com/users/roqua/orgs","repos_url":"https://api.github.com/users/roqua/repos","events_url":"https://api.github.com/users/roqua/events{/privacy}","received_events_url":"https://api.github.com/users/roqua/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/roqua/quby_engine","description":"Rails Engine to let people edit answers for questionnaires","fork":false,"url":"https://api.github.com/repos/roqua/quby_engine","forks_url":"https://api.github.com/repos/roqua/quby_engine/forks","keys_url":"https://api.github.com/repos/roqua/quby_engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/roqua/quby_engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/roqua/quby_engine/teams","hooks_url":"https://api.github.com/repos/roqua/quby_engine/hooks","issue_events_url":"https://api.github.com/repos/roqua/quby_engine/issues/events{/number}","events_url":"https://api.github.com/repos/roqua/quby_engine/events","assignees_url":"https://api.github.com/repos/roqua/quby_engine/assignees{/user}","branches_url":"https://api.github.com/repos/roqua/quby_engine/branches{/branch}","tags_url":"https://api.github.com/repos/roqua/quby_engine/tags","blobs_url":"https://api.github.com/repos/roqua/quby_engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/roqua/quby_engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/roqua/quby_engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/roqua/quby_engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/roqua/quby_engine/statuses/{sha}","languages_url":"https://api.github.com/repos/roqua/quby_engine/languages","stargazers_url":"https://api.github.com/repos/roqua/quby_engine/stargazers","contributors_url":"https://api.github.com/repos/roqua/quby_engine/contributors","subscribers_url":"https://api.github.com/repos/roqua/quby_engine/subscribers","subscription_url":"https://api.github.com/repos/roqua/quby_engine/subscription","commits_url":"https://api.github.com/repos/roqua/quby_engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/roqua/quby_engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/roqua/quby_engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/roqua/quby_engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/roqua/quby_engine/contents/{+path}","compare_url":"https://api.github.com/repos/roqua/quby_engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/roqua/quby_engine/merges","archive_url":"https://api.github.com/repos/roqua/quby_engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/roqua/quby_engine/downloads","issues_url":"https://api.github.com/repos/roqua/quby_engine/issues{/number}","pulls_url":"https://api.github.com/repos/roqua/quby_engine/pulls{/number}","milestones_url":"https://api.github.com/repos/roqua/quby_engine/milestones{/number}","notifications_url":"https://api.github.com/repos/roqua/quby_engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/roqua/quby_engine/labels{/name}","releases_url":"https://api.github.com/repos/roqua/quby_engine/releases{/id}","created_at":"2012-07-05T12:01:01Z","updated_at":"2015-05-04T15:48:34Z","pushed_at":"2015-10-06T07:44:26Z","git_url":"git://github.com/roqua/quby_engine.git","ssh_url":"git@github.com:roqua/quby_engine.git","clone_url":"https://github.com/roqua/quby_engine.git","svn_url":"https://github.com/roqua/quby_engine","homepage":null,"size":16328,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":2,"default_branch":"master"}},"base":{"label":"roqua:master","ref":"master","sha":"5262b86936e54797cd92cbb797e3f55ad801d2d7","user":{"login":"roqua","id":598697,"avatar_url":"https://avatars.githubusercontent.com/u/598697?v=3","gravatar_id":"","url":"https://api.github.com/users/roqua","html_url":"https://github.com/roqua","followers_url":"https://api.github.com/users/roqua/followers","following_url":"https://api.github.com/users/roqua/following{/other_user}","gists_url":"https://api.github.com/users/roqua/gists{/gist_id}","starred_url":"https://api.github.com/users/roqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roqua/subscriptions","organizations_url":"https://api.github.com/users/roqua/orgs","repos_url":"https://api.github.com/users/roqua/repos","events_url":"https://api.github.com/users/roqua/events{/privacy}","received_events_url":"https://api.github.com/users/roqua/received_events","type":"Organization","site_admin":false},"repo":{"id":4905239,"name":"quby_engine","full_name":"roqua/quby_engine","owner":{"login":"roqua","id":598697,"avatar_url":"https://avatars.githubusercontent.com/u/598697?v=3","gravatar_id":"","url":"https://api.github.com/users/roqua","html_url":"https://github.com/roqua","followers_url":"https://api.github.com/users/roqua/followers","following_url":"https://api.github.com/users/roqua/following{/other_user}","gists_url":"https://api.github.com/users/roqua/gists{/gist_id}","starred_url":"https://api.github.com/users/roqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roqua/subscriptions","organizations_url":"https://api.github.com/users/roqua/orgs","repos_url":"https://api.github.com/users/roqua/repos","events_url":"https://api.github.com/users/roqua/events{/privacy}","received_events_url":"https://api.github.com/users/roqua/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/roqua/quby_engine","description":"Rails Engine to let people edit answers for questionnaires","fork":false,"url":"https://api.github.com/repos/roqua/quby_engine","forks_url":"https://api.github.com/repos/roqua/quby_engine/forks","keys_url":"https://api.github.com/repos/roqua/quby_engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/roqua/quby_engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/roqua/quby_engine/teams","hooks_url":"https://api.github.com/repos/roqua/quby_engine/hooks","issue_events_url":"https://api.github.com/repos/roqua/quby_engine/issues/events{/number}","events_url":"https://api.github.com/repos/roqua/quby_engine/events","assignees_url":"https://api.github.com/repos/roqua/quby_engine/assignees{/user}","branches_url":"https://api.github.com/repos/roqua/quby_engine/branches{/branch}","tags_url":"https://api.github.com/repos/roqua/quby_engine/tags","blobs_url":"https://api.github.com/repos/roqua/quby_engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/roqua/quby_engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/roqua/quby_engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/roqua/quby_engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/roqua/quby_engine/statuses/{sha}","languages_url":"https://api.github.com/repos/roqua/quby_engine/languages","stargazers_url":"https://api.github.com/repos/roqua/quby_engine/stargazers","contributors_url":"https://api.github.com/repos/roqua/quby_engine/contributors","subscribers_url":"https://api.github.com/repos/roqua/quby_engine/subscribers","subscription_url":"https://api.github.com/repos/roqua/quby_engine/subscription","commits_url":"https://api.github.com/repos/roqua/quby_engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/roqua/quby_engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/roqua/quby_engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/roqua/quby_engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/roqua/quby_engine/contents/{+path}","compare_url":"https://api.github.com/repos/roqua/quby_engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/roqua/quby_engine/merges","archive_url":"https://api.github.com/repos/roqua/quby_engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/roqua/quby_engine/downloads","issues_url":"https://api.github.com/repos/roqua/quby_engine/issues{/number}","pulls_url":"https://api.github.com/repos/roqua/quby_engine/pulls{/number}","milestones_url":"https://api.github.com/repos/roqua/quby_engine/milestones{/number}","notifications_url":"https://api.github.com/repos/roqua/quby_engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/roqua/quby_engine/labels{/name}","releases_url":"https://api.github.com/repos/roqua/quby_engine/releases{/id}","created_at":"2012-07-05T12:01:01Z","updated_at":"2015-05-04T15:48:34Z","pushed_at":"2015-10-06T07:44:26Z","git_url":"git://github.com/roqua/quby_engine.git","ssh_url":"git@github.com:roqua/quby_engine.git","clone_url":"https://github.com/roqua/quby_engine.git","svn_url":"https://github.com/roqua/quby_engine","homepage":null,"size":16328,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/roqua/quby_engine/pulls/132"},"html":{"href":"https://github.com/roqua/quby_engine/pull/132"},"issue":{"href":"https://api.github.com/repos/roqua/quby_engine/issues/132"},"comments":{"href":"https://api.github.com/repos/roqua/quby_engine/issues/132/comments"},"review_comments":{"href":"https://api.github.com/repos/roqua/quby_engine/pulls/132/comments"},"review_comment":{"href":"https://api.github.com/repos/roqua/quby_engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/roqua/quby_engine/pulls/132/commits"},"statuses":{"href":"https://api.github.com/repos/roqua/quby_engine/statuses/08a0d023e6cc799c3a00bb9921c3bbe075d341d2"}}}}