{"action":"closed","number":76,"pull_request":{"url":"https://api.github.com/repos/raoulmillais/7digital-api/pulls/76","id":52837731,"html_url":"https://github.com/raoulmillais/7digital-api/pull/76","diff_url":"https://github.com/raoulmillais/7digital-api/pull/76.diff","patch_url":"https://github.com/raoulmillais/7digital-api/pull/76.patch","issue_url":"https://api.github.com/repos/raoulmillais/7digital-api/issues/76","number":76,"state":"closed","locked":false,"title":"Revisiting collection enforcing","user":{"login":"willm","id":771001,"avatar_url":"https://avatars.githubusercontent.com/u/771001?v=3","gravatar_id":"","url":"https://api.github.com/users/willm","html_url":"https://github.com/willm","followers_url":"https://api.github.com/users/willm/followers","following_url":"https://api.github.com/users/willm/following{/other_user}","gists_url":"https://api.github.com/users/willm/gists{/gist_id}","starred_url":"https://api.github.com/users/willm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willm/subscriptions","organizations_url":"https://api.github.com/users/willm/orgs","repos_url":"https://api.github.com/users/willm/repos","events_url":"https://api.github.com/users/willm/events{/privacy}","received_events_url":"https://api.github.com/users/willm/received_events","type":"User","site_admin":false},"body":"The motivation behind this pull request is supporting node 4.0.0\r\n\r\nThe following is no longer allowed in strict mode which was breaking the collection merging in cases where there was new line content in the xml response.\r\n\r\n```javascript\r\n'use strict';\r\nvar test = 'hello';\r\ntest['property'] = [];\r\n```\r\n\r\nThe unit tests for ensuring that the basket item collection array nesting is removed were testing against a different collection path to what actually happens in the response parser. I've added some unit tests that check this.\r\n\r\nThere was also special logic for handling basket responses, I've made this more generic.\r\n\r\nI've also extracted the collection paths to a separate module inside response cleaners as this has more to do with modifying the response than parsing it.","created_at":"2015-12-07T12:17:40Z","updated_at":"2015-12-09T13:21:02Z","closed_at":"2015-12-09T13:21:02Z","merged_at":"2015-12-09T13:21:02Z","merge_commit_sha":"1c249d7206d84221db126db69a22ad5d0c1ff93b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/raoulmillais/7digital-api/pulls/76/commits","review_comments_url":"https://api.github.com/repos/raoulmillais/7digital-api/pulls/76/comments","review_comment_url":"https://api.github.com/repos/raoulmillais/7digital-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/raoulmillais/7digital-api/issues/76/comments","statuses_url":"https://api.github.com/repos/raoulmillais/7digital-api/statuses/d7eb4dd17d1d72e53338fa949e718fa61c012891","head":{"label":"raoulmillais:collection-merging-tests","ref":"collection-merging-tests","sha":"d7eb4dd17d1d72e53338fa949e718fa61c012891","user":{"login":"raoulmillais","id":302663,"avatar_url":"https://avatars.githubusercontent.com/u/302663?v=3","gravatar_id":"","url":"https://api.github.com/users/raoulmillais","html_url":"https://github.com/raoulmillais","followers_url":"https://api.github.com/users/raoulmillais/followers","following_url":"https://api.github.com/users/raoulmillais/following{/other_user}","gists_url":"https://api.github.com/users/raoulmillais/gists{/gist_id}","starred_url":"https://api.github.com/users/raoulmillais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raoulmillais/subscriptions","organizations_url":"https://api.github.com/users/raoulmillais/orgs","repos_url":"https://api.github.com/users/raoulmillais/repos","events_url":"https://api.github.com/users/raoulmillais/events{/privacy}","received_events_url":"https://api.github.com/users/raoulmillais/received_events","type":"User","site_admin":false},"repo":{"id":1971554,"name":"7digital-api","full_name":"raoulmillais/7digital-api","owner":{"login":"raoulmillais","id":302663,"avatar_url":"https://avatars.githubusercontent.com/u/302663?v=3","gravatar_id":"","url":"https://api.github.com/users/raoulmillais","html_url":"https://github.com/raoulmillais","followers_url":"https://api.github.com/users/raoulmillais/followers","following_url":"https://api.github.com/users/raoulmillais/following{/other_user}","gists_url":"https://api.github.com/users/raoulmillais/gists{/gist_id}","starred_url":"https://api.github.com/users/raoulmillais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raoulmillais/subscriptions","organizations_url":"https://api.github.com/users/raoulmillais/orgs","repos_url":"https://api.github.com/users/raoulmillais/repos","events_url":"https://api.github.com/users/raoulmillais/events{/privacy}","received_events_url":"https://api.github.com/users/raoulmillais/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/raoulmillais/7digital-api","description":"7digital API client for node.js","fork":false,"url":"https://api.github.com/repos/raoulmillais/7digital-api","forks_url":"https://api.github.com/repos/raoulmillais/7digital-api/forks","keys_url":"https://api.github.com/repos/raoulmillais/7digital-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raoulmillais/7digital-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raoulmillais/7digital-api/teams","hooks_url":"https://api.github.com/repos/raoulmillais/7digital-api/hooks","issue_events_url":"https://api.github.com/repos/raoulmillais/7digital-api/issues/events{/number}","events_url":"https://api.github.com/repos/raoulmillais/7digital-api/events","assignees_url":"https://api.github.com/repos/raoulmillais/7digital-api/assignees{/user}","branches_url":"https://api.github.com/repos/raoulmillais/7digital-api/branches{/branch}","tags_url":"https://api.github.com/repos/raoulmillais/7digital-api/tags","blobs_url":"https://api.github.com/repos/raoulmillais/7digital-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raoulmillais/7digital-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raoulmillais/7digital-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/raoulmillais/7digital-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raoulmillais/7digital-api/statuses/{sha}","languages_url":"https://api.github.com/repos/raoulmillais/7digital-api/languages","stargazers_url":"https://api.github.com/repos/raoulmillais/7digital-api/stargazers","contributors_url":"https://api.github.com/repos/raoulmillais/7digital-api/contributors","subscribers_url":"https://api.github.com/repos/raoulmillais/7digital-api/subscribers","subscription_url":"https://api.github.com/repos/raoulmillais/7digital-api/subscription","commits_url":"https://api.github.com/repos/raoulmillais/7digital-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/raoulmillais/7digital-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/raoulmillais/7digital-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/raoulmillais/7digital-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/raoulmillais/7digital-api/contents/{+path}","compare_url":"https://api.github.com/repos/raoulmillais/7digital-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raoulmillais/7digital-api/merges","archive_url":"https://api.github.com/repos/raoulmillais/7digital-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raoulmillais/7digital-api/downloads","issues_url":"https://api.github.com/repos/raoulmillais/7digital-api/issues{/number}","pulls_url":"https://api.github.com/repos/raoulmillais/7digital-api/pulls{/number}","milestones_url":"https://api.github.com/repos/raoulmillais/7digital-api/milestones{/number}","notifications_url":"https://api.github.com/repos/raoulmillais/7digital-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raoulmillais/7digital-api/labels{/name}","releases_url":"https://api.github.com/repos/raoulmillais/7digital-api/releases{/id}","created_at":"2011-06-29T09:40:31Z","updated_at":"2015-11-23T19:08:50Z","pushed_at":"2015-12-09T13:21:02Z","git_url":"git://github.com/raoulmillais/7digital-api.git","ssh_url":"git@github.com:raoulmillais/7digital-api.git","clone_url":"https://github.com/raoulmillais/7digital-api.git","svn_url":"https://github.com/raoulmillais/7digital-api","homepage":"http://www.7digital.com/","size":1301,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"open_issues_count":6,"forks":10,"open_issues":6,"watchers":25,"default_branch":"master"}},"base":{"label":"raoulmillais:master","ref":"master","sha":"adfd4f2a607ab27f2876b259a15cfcb56cef91f0","user":{"login":"raoulmillais","id":302663,"avatar_url":"https://avatars.githubusercontent.com/u/302663?v=3","gravatar_id":"","url":"https://api.github.com/users/raoulmillais","html_url":"https://github.com/raoulmillais","followers_url":"https://api.github.com/users/raoulmillais/followers","following_url":"https://api.github.com/users/raoulmillais/following{/other_user}","gists_url":"https://api.github.com/users/raoulmillais/gists{/gist_id}","starred_url":"https://api.github.com/users/raoulmillais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raoulmillais/subscriptions","organizations_url":"https://api.github.com/users/raoulmillais/orgs","repos_url":"https://api.github.com/users/raoulmillais/repos","events_url":"https://api.github.com/users/raoulmillais/events{/privacy}","received_events_url":"https://api.github.com/users/raoulmillais/received_events","type":"User","site_admin":false},"repo":{"id":1971554,"name":"7digital-api","full_name":"raoulmillais/7digital-api","owner":{"login":"raoulmillais","id":302663,"avatar_url":"https://avatars.githubusercontent.com/u/302663?v=3","gravatar_id":"","url":"https://api.github.com/users/raoulmillais","html_url":"https://github.com/raoulmillais","followers_url":"https://api.github.com/users/raoulmillais/followers","following_url":"https://api.github.com/users/raoulmillais/following{/other_user}","gists_url":"https://api.github.com/users/raoulmillais/gists{/gist_id}","starred_url":"https://api.github.com/users/raoulmillais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raoulmillais/subscriptions","organizations_url":"https://api.github.com/users/raoulmillais/orgs","repos_url":"https://api.github.com/users/raoulmillais/repos","events_url":"https://api.github.com/users/raoulmillais/events{/privacy}","received_events_url":"https://api.github.com/users/raoulmillais/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/raoulmillais/7digital-api","description":"7digital API client for node.js","fork":false,"url":"https://api.github.com/repos/raoulmillais/7digital-api","forks_url":"https://api.github.com/repos/raoulmillais/7digital-api/forks","keys_url":"https://api.github.com/repos/raoulmillais/7digital-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raoulmillais/7digital-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raoulmillais/7digital-api/teams","hooks_url":"https://api.github.com/repos/raoulmillais/7digital-api/hooks","issue_events_url":"https://api.github.com/repos/raoulmillais/7digital-api/issues/events{/number}","events_url":"https://api.github.com/repos/raoulmillais/7digital-api/events","assignees_url":"https://api.github.com/repos/raoulmillais/7digital-api/assignees{/user}","branches_url":"https://api.github.com/repos/raoulmillais/7digital-api/branches{/branch}","tags_url":"https://api.github.com/repos/raoulmillais/7digital-api/tags","blobs_url":"https://api.github.com/repos/raoulmillais/7digital-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raoulmillais/7digital-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raoulmillais/7digital-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/raoulmillais/7digital-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raoulmillais/7digital-api/statuses/{sha}","languages_url":"https://api.github.com/repos/raoulmillais/7digital-api/languages","stargazers_url":"https://api.github.com/repos/raoulmillais/7digital-api/stargazers","contributors_url":"https://api.github.com/repos/raoulmillais/7digital-api/contributors","subscribers_url":"https://api.github.com/repos/raoulmillais/7digital-api/subscribers","subscription_url":"https://api.github.com/repos/raoulmillais/7digital-api/subscription","commits_url":"https://api.github.com/repos/raoulmillais/7digital-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/raoulmillais/7digital-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/raoulmillais/7digital-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/raoulmillais/7digital-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/raoulmillais/7digital-api/contents/{+path}","compare_url":"https://api.github.com/repos/raoulmillais/7digital-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raoulmillais/7digital-api/merges","archive_url":"https://api.github.com/repos/raoulmillais/7digital-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raoulmillais/7digital-api/downloads","issues_url":"https://api.github.com/repos/raoulmillais/7digital-api/issues{/number}","pulls_url":"https://api.github.com/repos/raoulmillais/7digital-api/pulls{/number}","milestones_url":"https://api.github.com/repos/raoulmillais/7digital-api/milestones{/number}","notifications_url":"https://api.github.com/repos/raoulmillais/7digital-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raoulmillais/7digital-api/labels{/name}","releases_url":"https://api.github.com/repos/raoulmillais/7digital-api/releases{/id}","created_at":"2011-06-29T09:40:31Z","updated_at":"2015-11-23T19:08:50Z","pushed_at":"2015-12-09T13:21:02Z","git_url":"git://github.com/raoulmillais/7digital-api.git","ssh_url":"git@github.com:raoulmillais/7digital-api.git","clone_url":"https://github.com/raoulmillais/7digital-api.git","svn_url":"https://github.com/raoulmillais/7digital-api","homepage":"http://www.7digital.com/","size":1301,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"open_issues_count":6,"forks":10,"open_issues":6,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/raoulmillais/7digital-api/pulls/76"},"html":{"href":"https://github.com/raoulmillais/7digital-api/pull/76"},"issue":{"href":"https://api.github.com/repos/raoulmillais/7digital-api/issues/76"},"comments":{"href":"https://api.github.com/repos/raoulmillais/7digital-api/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/raoulmillais/7digital-api/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/raoulmillais/7digital-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/raoulmillais/7digital-api/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/raoulmillais/7digital-api/statuses/d7eb4dd17d1d72e53338fa949e718fa61c012891"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"willm","id":771001,"avatar_url":"https://avatars.githubusercontent.com/u/771001?v=3","gravatar_id":"","url":"https://api.github.com/users/willm","html_url":"https://github.com/willm","followers_url":"https://api.github.com/users/willm/followers","following_url":"https://api.github.com/users/willm/following{/other_user}","gists_url":"https://api.github.com/users/willm/gists{/gist_id}","starred_url":"https://api.github.com/users/willm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willm/subscriptions","organizations_url":"https://api.github.com/users/willm/orgs","repos_url":"https://api.github.com/users/willm/repos","events_url":"https://api.github.com/users/willm/events{/privacy}","received_events_url":"https://api.github.com/users/willm/received_events","type":"User","site_admin":false},"comments":10,"review_comments":2,"commits":1,"additions":417,"deletions":163,"changed_files":7}}