{"action":"created","comment":{"url":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/comments/65320367","id":65320367,"diff_hunk":"@@ -28,98 +28,118 @@ def initialize(attrs)\n   describe 'generate answer records' do\n     it 'should return the binary answers hash with value' do\n       user = double 'user', id: 'user-id'\n-      cis_id = 0\n+      cis_id=1\n+      service_id=1\n       answer_params = {\n         \"question_id\"=>\"question-id\",\n         \"text\"=>\"No\",\n         \"question_answer_type\"=>\"binary\",\n-        \"question_value\"=>\"20.0\"\n+        \"question_value\"=>\"20.0\",\n+        \"cis_id\" => \"1\",\n+        \"service_id\" => \"1\"\n       }\n       first_answer = generate_answer_records([answer_params], \"user-id\", cis_id).first\n       expect(first_answer).to include(text: \"No\", question_id: \"question-id\", score: 0.0, user_id: 'user-id')\n     end\n \n     it 'should return the binary answers hash with value' do\n       user = double 'user', id: 'user-id'\n-      cis_id = 0\n-\n+      cis_id=1\n+      service_id=1\n       answer_params = {\n         \"question_id\"=>\"question-id\",\n         \"text\"=>\"Sí\",\n         \"question_answer_type\"=>\"binary\",\n-        \"question_value\"=>\"20.0\"\n+        \"question_value\"=>\"20.0\",\n+        \"cis_id\" => \"1\",\n+        \"service_id\" => \"1\"\n       }\n-      first_answer = generate_answer_records([answer_params], \"user-id\", cis_id).first\n+      first_answer = generate_answer_records([answer_params], \"user-id\", cis_id, service_id).first\n       expect(first_answer).to include(text: \"Sí\", question_id: \"question-id\", score: 20.0, user_id: 'user-id')\n     end\n \n     it 'should return the rating answers hash with value' do\n       user = double 'user', id: 'user-id'\n-      cis_id = 0\n+      cis_id=1\n+      service_id=1\n       answer_params = {\n         \"question_id\"=>\"question-id\",\n         \"text\"=>\"Muy bueno\",\n         \"question_answer_type\"=>\"rating\",\n-        \"question_value\"=>\"30.0\"\n+        \"question_value\"=>\"30.0\",\n+        \"cis_id\" => \"1\",\n+        \"service_id\" => \"1\"\n       }\n-      first_answer = generate_answer_records([answer_params], \"user-id\", cis_id).first\n+      first_answer = generate_answer_records([answer_params], \"user-id\", cis_id, service_id).first\n       expect(first_answer).to include(text: \"Muy bueno\", question_id: \"question-id\", score: 30.0, user_id: 'user-id')\n     end\n \n     it 'should return the rating answers hash with value' do\n       user = double 'user', id: 'user-id'\n-      cis_id = 0\n+      cis_id=1\n+      service_id=1\n       answer_params = {\n         \"question_id\"=>\"question-id\",\n         \"text\"=>\"Regular\",\n         \"question_answer_type\"=>\"rating\",\n-        \"question_value\"=>\"30.0\"\n+        \"question_value\"=>\"30.0\",\n+        \"cis_id\" => \"1\",\n+        \"service_id\" => \"1\"\n       }\n-      first_answer = generate_answer_records([answer_params], \"user-id\", cis_id).first\n+      first_answer = generate_answer_records([answer_params], \"user-id\", cis_id, service_id).first\n       expect(first_answer).to include(text: \"Regular\", question_id: \"question-id\", score: 15.0, user_id: 'user-id')\n     end\n \n     it 'should return the rating answers hash with value even if no answer selected' do\n       user = double 'user', id: 'user-id'\n-      cis_id = 0\n+      cis_id=1\n+      service_id=1\n       answer_params = {\n         \"question_id\"=>\"question-id\",\n         \"text\"=>\"\",\n         \"question_answer_type\"=>\"rating\",\n-        \"question_value\"=>\"30.0\"\n+        \"question_value\"=>\"30.0\",","path":"spec/services/generate_answer_records_spec.rb","position":88,"original_position":88,"commit_id":"1af3798549a666764fba682870028ab089ccab7b","original_commit_id":"1af3798549a666764fba682870028ab089ccab7b","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Surrounding space missing for operator `=>`.","created_at":"2016-06-01T08:24:28Z","updated_at":"2016-06-01T08:24:28Z","html_url":"https://github.com/civica-digital/urbem-puebla/pull/180#discussion_r65320367","pull_request_url":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/180","_links":{"self":{"href":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/comments/65320367"},"html":{"href":"https://github.com/civica-digital/urbem-puebla/pull/180#discussion_r65320367"},"pull_request":{"href":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/180"}}},"pull_request":{"url":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/180","id":71633707,"html_url":"https://github.com/civica-digital/urbem-puebla/pull/180","diff_url":"https://github.com/civica-digital/urbem-puebla/pull/180.diff","patch_url":"https://github.com/civica-digital/urbem-puebla/pull/180.patch","issue_url":"https://api.github.com/repos/civica-digital/urbem-puebla/issues/180","number":180,"state":"open","locked":false,"title":"Relate survey answers to service","user":{"login":"poguez","id":732015,"avatar_url":"https://avatars.githubusercontent.com/u/732015?v=3","gravatar_id":"","url":"https://api.github.com/users/poguez","html_url":"https://github.com/poguez","followers_url":"https://api.github.com/users/poguez/followers","following_url":"https://api.github.com/users/poguez/following{/other_user}","gists_url":"https://api.github.com/users/poguez/gists{/gist_id}","starred_url":"https://api.github.com/users/poguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poguez/subscriptions","organizations_url":"https://api.github.com/users/poguez/orgs","repos_url":"https://api.github.com/users/poguez/repos","events_url":"https://api.github.com/users/poguez/events{/privacy}","received_events_url":"https://api.github.com/users/poguez/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-26T22:17:24Z","updated_at":"2016-06-01T08:24:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94bc4c751c82efd6a3c3ac8ad3c24addc6d24e1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/180/commits","review_comments_url":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/180/comments","review_comment_url":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/comments{/number}","comments_url":"https://api.github.com/repos/civica-digital/urbem-puebla/issues/180/comments","statuses_url":"https://api.github.com/repos/civica-digital/urbem-puebla/statuses/1af3798549a666764fba682870028ab089ccab7b","head":{"label":"civica-digital:relate-survey-answers","ref":"relate-survey-answers","sha":"1af3798549a666764fba682870028ab089ccab7b","user":{"login":"civica-digital","id":10727864,"avatar_url":"https://avatars.githubusercontent.com/u/10727864?v=3","gravatar_id":"","url":"https://api.github.com/users/civica-digital","html_url":"https://github.com/civica-digital","followers_url":"https://api.github.com/users/civica-digital/followers","following_url":"https://api.github.com/users/civica-digital/following{/other_user}","gists_url":"https://api.github.com/users/civica-digital/gists{/gist_id}","starred_url":"https://api.github.com/users/civica-digital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civica-digital/subscriptions","organizations_url":"https://api.github.com/users/civica-digital/orgs","repos_url":"https://api.github.com/users/civica-digital/repos","events_url":"https://api.github.com/users/civica-digital/events{/privacy}","received_events_url":"https://api.github.com/users/civica-digital/received_events","type":"Organization","site_admin":false},"repo":{"id":32949964,"name":"urbem-puebla","full_name":"civica-digital/urbem-puebla","owner":{"login":"civica-digital","id":10727864,"avatar_url":"https://avatars.githubusercontent.com/u/10727864?v=3","gravatar_id":"","url":"https://api.github.com/users/civica-digital","html_url":"https://github.com/civica-digital","followers_url":"https://api.github.com/users/civica-digital/followers","following_url":"https://api.github.com/users/civica-digital/following{/other_user}","gists_url":"https://api.github.com/users/civica-digital/gists{/gist_id}","starred_url":"https://api.github.com/users/civica-digital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civica-digital/subscriptions","organizations_url":"https://api.github.com/users/civica-digital/orgs","repos_url":"https://api.github.com/users/civica-digital/repos","events_url":"https://api.github.com/users/civica-digital/events{/privacy}","received_events_url":"https://api.github.com/users/civica-digital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/civica-digital/urbem-puebla","description":"La plataforma de código abierto para la gestión de reportes ciudadanos.","fork":true,"url":"https://api.github.com/repos/civica-digital/urbem-puebla","forks_url":"https://api.github.com/repos/civica-digital/urbem-puebla/forks","keys_url":"https://api.github.com/repos/civica-digital/urbem-puebla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civica-digital/urbem-puebla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civica-digital/urbem-puebla/teams","hooks_url":"https://api.github.com/repos/civica-digital/urbem-puebla/hooks","issue_events_url":"https://api.github.com/repos/civica-digital/urbem-puebla/issues/events{/number}","events_url":"https://api.github.com/repos/civica-digital/urbem-puebla/events","assignees_url":"https://api.github.com/repos/civica-digital/urbem-puebla/assignees{/user}","branches_url":"https://api.github.com/repos/civica-digital/urbem-puebla/branches{/branch}","tags_url":"https://api.github.com/repos/civica-digital/urbem-puebla/tags","blobs_url":"https://api.github.com/repos/civica-digital/urbem-puebla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civica-digital/urbem-puebla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civica-digital/urbem-puebla/git/refs{/sha}","trees_url":"https://api.github.com/repos/civica-digital/urbem-puebla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civica-digital/urbem-puebla/statuses/{sha}","languages_url":"https://api.github.com/repos/civica-digital/urbem-puebla/languages","stargazers_url":"https://api.github.com/repos/civica-digital/urbem-puebla/stargazers","contributors_url":"https://api.github.com/repos/civica-digital/urbem-puebla/contributors","subscribers_url":"https://api.github.com/repos/civica-digital/urbem-puebla/subscribers","subscription_url":"https://api.github.com/repos/civica-digital/urbem-puebla/subscription","commits_url":"https://api.github.com/repos/civica-digital/urbem-puebla/commits{/sha}","git_commits_url":"https://api.github.com/repos/civica-digital/urbem-puebla/git/commits{/sha}","comments_url":"https://api.github.com/repos/civica-digital/urbem-puebla/comments{/number}","issue_comment_url":"https://api.github.com/repos/civica-digital/urbem-puebla/issues/comments{/number}","contents_url":"https://api.github.com/repos/civica-digital/urbem-puebla/contents/{+path}","compare_url":"https://api.github.com/repos/civica-digital/urbem-puebla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civica-digital/urbem-puebla/merges","archive_url":"https://api.github.com/repos/civica-digital/urbem-puebla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civica-digital/urbem-puebla/downloads","issues_url":"https://api.github.com/repos/civica-digital/urbem-puebla/issues{/number}","pulls_url":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls{/number}","milestones_url":"https://api.github.com/repos/civica-digital/urbem-puebla/milestones{/number}","notifications_url":"https://api.github.com/repos/civica-digital/urbem-puebla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civica-digital/urbem-puebla/labels{/name}","releases_url":"https://api.github.com/repos/civica-digital/urbem-puebla/releases{/id}","deployments_url":"https://api.github.com/repos/civica-digital/urbem-puebla/deployments","created_at":"2015-03-26T20:23:41Z","updated_at":"2016-01-13T15:56:31Z","pushed_at":"2016-06-01T08:24:24Z","git_url":"git://github.com/civica-digital/urbem-puebla.git","ssh_url":"git@github.com:civica-digital/urbem-puebla.git","clone_url":"https://github.com/civica-digital/urbem-puebla.git","svn_url":"https://github.com/civica-digital/urbem-puebla","homepage":"http://codeandomexico.github.io/reporte-ciudadano/","size":20507,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"civica-digital:master","ref":"master","sha":"c5564cdf4bdc96f9da48625083d0b2aa8604f782","user":{"login":"civica-digital","id":10727864,"avatar_url":"https://avatars.githubusercontent.com/u/10727864?v=3","gravatar_id":"","url":"https://api.github.com/users/civica-digital","html_url":"https://github.com/civica-digital","followers_url":"https://api.github.com/users/civica-digital/followers","following_url":"https://api.github.com/users/civica-digital/following{/other_user}","gists_url":"https://api.github.com/users/civica-digital/gists{/gist_id}","starred_url":"https://api.github.com/users/civica-digital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civica-digital/subscriptions","organizations_url":"https://api.github.com/users/civica-digital/orgs","repos_url":"https://api.github.com/users/civica-digital/repos","events_url":"https://api.github.com/users/civica-digital/events{/privacy}","received_events_url":"https://api.github.com/users/civica-digital/received_events","type":"Organization","site_admin":false},"repo":{"id":32949964,"name":"urbem-puebla","full_name":"civica-digital/urbem-puebla","owner":{"login":"civica-digital","id":10727864,"avatar_url":"https://avatars.githubusercontent.com/u/10727864?v=3","gravatar_id":"","url":"https://api.github.com/users/civica-digital","html_url":"https://github.com/civica-digital","followers_url":"https://api.github.com/users/civica-digital/followers","following_url":"https://api.github.com/users/civica-digital/following{/other_user}","gists_url":"https://api.github.com/users/civica-digital/gists{/gist_id}","starred_url":"https://api.github.com/users/civica-digital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civica-digital/subscriptions","organizations_url":"https://api.github.com/users/civica-digital/orgs","repos_url":"https://api.github.com/users/civica-digital/repos","events_url":"https://api.github.com/users/civica-digital/events{/privacy}","received_events_url":"https://api.github.com/users/civica-digital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/civica-digital/urbem-puebla","description":"La plataforma de código abierto para la gestión de reportes ciudadanos.","fork":true,"url":"https://api.github.com/repos/civica-digital/urbem-puebla","forks_url":"https://api.github.com/repos/civica-digital/urbem-puebla/forks","keys_url":"https://api.github.com/repos/civica-digital/urbem-puebla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civica-digital/urbem-puebla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civica-digital/urbem-puebla/teams","hooks_url":"https://api.github.com/repos/civica-digital/urbem-puebla/hooks","issue_events_url":"https://api.github.com/repos/civica-digital/urbem-puebla/issues/events{/number}","events_url":"https://api.github.com/repos/civica-digital/urbem-puebla/events","assignees_url":"https://api.github.com/repos/civica-digital/urbem-puebla/assignees{/user}","branches_url":"https://api.github.com/repos/civica-digital/urbem-puebla/branches{/branch}","tags_url":"https://api.github.com/repos/civica-digital/urbem-puebla/tags","blobs_url":"https://api.github.com/repos/civica-digital/urbem-puebla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civica-digital/urbem-puebla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civica-digital/urbem-puebla/git/refs{/sha}","trees_url":"https://api.github.com/repos/civica-digital/urbem-puebla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civica-digital/urbem-puebla/statuses/{sha}","languages_url":"https://api.github.com/repos/civica-digital/urbem-puebla/languages","stargazers_url":"https://api.github.com/repos/civica-digital/urbem-puebla/stargazers","contributors_url":"https://api.github.com/repos/civica-digital/urbem-puebla/contributors","subscribers_url":"https://api.github.com/repos/civica-digital/urbem-puebla/subscribers","subscription_url":"https://api.github.com/repos/civica-digital/urbem-puebla/subscription","commits_url":"https://api.github.com/repos/civica-digital/urbem-puebla/commits{/sha}","git_commits_url":"https://api.github.com/repos/civica-digital/urbem-puebla/git/commits{/sha}","comments_url":"https://api.github.com/repos/civica-digital/urbem-puebla/comments{/number}","issue_comment_url":"https://api.github.com/repos/civica-digital/urbem-puebla/issues/comments{/number}","contents_url":"https://api.github.com/repos/civica-digital/urbem-puebla/contents/{+path}","compare_url":"https://api.github.com/repos/civica-digital/urbem-puebla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civica-digital/urbem-puebla/merges","archive_url":"https://api.github.com/repos/civica-digital/urbem-puebla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civica-digital/urbem-puebla/downloads","issues_url":"https://api.github.com/repos/civica-digital/urbem-puebla/issues{/number}","pulls_url":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls{/number}","milestones_url":"https://api.github.com/repos/civica-digital/urbem-puebla/milestones{/number}","notifications_url":"https://api.github.com/repos/civica-digital/urbem-puebla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civica-digital/urbem-puebla/labels{/name}","releases_url":"https://api.github.com/repos/civica-digital/urbem-puebla/releases{/id}","deployments_url":"https://api.github.com/repos/civica-digital/urbem-puebla/deployments","created_at":"2015-03-26T20:23:41Z","updated_at":"2016-01-13T15:56:31Z","pushed_at":"2016-06-01T08:24:24Z","git_url":"git://github.com/civica-digital/urbem-puebla.git","ssh_url":"git@github.com:civica-digital/urbem-puebla.git","clone_url":"https://github.com/civica-digital/urbem-puebla.git","svn_url":"https://github.com/civica-digital/urbem-puebla","homepage":"http://codeandomexico.github.io/reporte-ciudadano/","size":20507,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/180"},"html":{"href":"https://github.com/civica-digital/urbem-puebla/pull/180"},"issue":{"href":"https://api.github.com/repos/civica-digital/urbem-puebla/issues/180"},"comments":{"href":"https://api.github.com/repos/civica-digital/urbem-puebla/issues/180/comments"},"review_comments":{"href":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/180/comments"},"review_comment":{"href":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/civica-digital/urbem-puebla/pulls/180/commits"},"statuses":{"href":"https://api.github.com/repos/civica-digital/urbem-puebla/statuses/1af3798549a666764fba682870028ab089ccab7b"}}}}
{"actor":{"display_login":"houndci-bot"}}