{"action":"opened","number":30,"pull_request":{"url":"https://api.github.com/repos/bonobos/solidus/pulls/30","id":59191698,"html_url":"https://github.com/bonobos/solidus/pull/30","diff_url":"https://github.com/bonobos/solidus/pull/30.diff","patch_url":"https://github.com/bonobos/solidus/pull/30.patch","issue_url":"https://api.github.com/repos/bonobos/solidus/issues/30","number":30,"state":"open","locked":false,"title":"Fix promotion rule spec to use association","user":{"login":"scottcrawford03","id":8398867,"avatar_url":"https://avatars.githubusercontent.com/u/8398867?v=3","gravatar_id":"","url":"https://api.github.com/users/scottcrawford03","html_url":"https://github.com/scottcrawford03","followers_url":"https://api.github.com/users/scottcrawford03/followers","following_url":"https://api.github.com/users/scottcrawford03/following{/other_user}","gists_url":"https://api.github.com/users/scottcrawford03/gists{/gist_id}","starred_url":"https://api.github.com/users/scottcrawford03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottcrawford03/subscriptions","organizations_url":"https://api.github.com/users/scottcrawford03/orgs","repos_url":"https://api.github.com/users/scottcrawford03/repos","events_url":"https://api.github.com/users/scottcrawford03/events{/privacy}","received_events_url":"https://api.github.com/users/scottcrawford03/received_events","type":"User","site_admin":false},"body":"* #dup will do a shallow copy of the object. That means that it will\r\n  copy the attributes but not the associations. The way that the code is\r\n  written works because we are building new associations. The way that\r\n  the spec was written will not work because the\r\n  #test_rule_test_products was an attribute on the object and therefore\r\n  copied over to the duplicated object. This would cause the\r\n  'association' we were trying to mimick in the spec to be the both\r\n  in the original and dup, therefore adding the association to the\r\n  same array and causing an infinite loop where we map over the original associations.","created_at":"2016-02-12T15:58:32Z","updated_at":"2016-02-12T15:58:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60abed86069bfffe6ba7bf6ca26be2cdcda7038b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bonobos/solidus/pulls/30/commits","review_comments_url":"https://api.github.com/repos/bonobos/solidus/pulls/30/comments","review_comment_url":"https://api.github.com/repos/bonobos/solidus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bonobos/solidus/issues/30/comments","statuses_url":"https://api.github.com/repos/bonobos/solidus/statuses/d294d999c93c22b0d76e033f21a9ef9b963a0e49","head":{"label":"bonobos:fix-promotion-spec","ref":"fix-promotion-spec","sha":"d294d999c93c22b0d76e033f21a9ef9b963a0e49","user":{"login":"bonobos","id":78914,"avatar_url":"https://avatars.githubusercontent.com/u/78914?v=3","gravatar_id":"","url":"https://api.github.com/users/bonobos","html_url":"https://github.com/bonobos","followers_url":"https://api.github.com/users/bonobos/followers","following_url":"https://api.github.com/users/bonobos/following{/other_user}","gists_url":"https://api.github.com/users/bonobos/gists{/gist_id}","starred_url":"https://api.github.com/users/bonobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonobos/subscriptions","organizations_url":"https://api.github.com/users/bonobos/orgs","repos_url":"https://api.github.com/users/bonobos/repos","events_url":"https://api.github.com/users/bonobos/events{/privacy}","received_events_url":"https://api.github.com/users/bonobos/received_events","type":"Organization","site_admin":false},"repo":{"id":37876553,"name":"solidus","full_name":"bonobos/solidus","owner":{"login":"bonobos","id":78914,"avatar_url":"https://avatars.githubusercontent.com/u/78914?v=3","gravatar_id":"","url":"https://api.github.com/users/bonobos","html_url":"https://github.com/bonobos","followers_url":"https://api.github.com/users/bonobos/followers","following_url":"https://api.github.com/users/bonobos/following{/other_user}","gists_url":"https://api.github.com/users/bonobos/gists{/gist_id}","starred_url":"https://api.github.com/users/bonobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonobos/subscriptions","organizations_url":"https://api.github.com/users/bonobos/orgs","repos_url":"https://api.github.com/users/bonobos/repos","events_url":"https://api.github.com/users/bonobos/events{/privacy}","received_events_url":"https://api.github.com/users/bonobos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bonobos/solidus","description":"Solidus e-commerce system","fork":true,"url":"https://api.github.com/repos/bonobos/solidus","forks_url":"https://api.github.com/repos/bonobos/solidus/forks","keys_url":"https://api.github.com/repos/bonobos/solidus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bonobos/solidus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bonobos/solidus/teams","hooks_url":"https://api.github.com/repos/bonobos/solidus/hooks","issue_events_url":"https://api.github.com/repos/bonobos/solidus/issues/events{/number}","events_url":"https://api.github.com/repos/bonobos/solidus/events","assignees_url":"https://api.github.com/repos/bonobos/solidus/assignees{/user}","branches_url":"https://api.github.com/repos/bonobos/solidus/branches{/branch}","tags_url":"https://api.github.com/repos/bonobos/solidus/tags","blobs_url":"https://api.github.com/repos/bonobos/solidus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bonobos/solidus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bonobos/solidus/git/refs{/sha}","trees_url":"https://api.github.com/repos/bonobos/solidus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bonobos/solidus/statuses/{sha}","languages_url":"https://api.github.com/repos/bonobos/solidus/languages","stargazers_url":"https://api.github.com/repos/bonobos/solidus/stargazers","contributors_url":"https://api.github.com/repos/bonobos/solidus/contributors","subscribers_url":"https://api.github.com/repos/bonobos/solidus/subscribers","subscription_url":"https://api.github.com/repos/bonobos/solidus/subscription","commits_url":"https://api.github.com/repos/bonobos/solidus/commits{/sha}","git_commits_url":"https://api.github.com/repos/bonobos/solidus/git/commits{/sha}","comments_url":"https://api.github.com/repos/bonobos/solidus/comments{/number}","issue_comment_url":"https://api.github.com/repos/bonobos/solidus/issues/comments{/number}","contents_url":"https://api.github.com/repos/bonobos/solidus/contents/{+path}","compare_url":"https://api.github.com/repos/bonobos/solidus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bonobos/solidus/merges","archive_url":"https://api.github.com/repos/bonobos/solidus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bonobos/solidus/downloads","issues_url":"https://api.github.com/repos/bonobos/solidus/issues{/number}","pulls_url":"https://api.github.com/repos/bonobos/solidus/pulls{/number}","milestones_url":"https://api.github.com/repos/bonobos/solidus/milestones{/number}","notifications_url":"https://api.github.com/repos/bonobos/solidus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bonobos/solidus/labels{/name}","releases_url":"https://api.github.com/repos/bonobos/solidus/releases{/id}","deployments_url":"https://api.github.com/repos/bonobos/solidus/deployments","created_at":"2015-06-22T19:37:20Z","updated_at":"2016-02-05T16:38:44Z","pushed_at":"2016-02-12T15:58:33Z","git_url":"git://github.com/bonobos/solidus.git","ssh_url":"git@github.com:bonobos/solidus.git","clone_url":"https://github.com/bonobos/solidus.git","svn_url":"https://github.com/bonobos/solidus","homepage":"","size":64543,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"bonobos:master","ref":"master","sha":"05ba7054f50c44de9aea5778c926175af8d27a10","user":{"login":"bonobos","id":78914,"avatar_url":"https://avatars.githubusercontent.com/u/78914?v=3","gravatar_id":"","url":"https://api.github.com/users/bonobos","html_url":"https://github.com/bonobos","followers_url":"https://api.github.com/users/bonobos/followers","following_url":"https://api.github.com/users/bonobos/following{/other_user}","gists_url":"https://api.github.com/users/bonobos/gists{/gist_id}","starred_url":"https://api.github.com/users/bonobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonobos/subscriptions","organizations_url":"https://api.github.com/users/bonobos/orgs","repos_url":"https://api.github.com/users/bonobos/repos","events_url":"https://api.github.com/users/bonobos/events{/privacy}","received_events_url":"https://api.github.com/users/bonobos/received_events","type":"Organization","site_admin":false},"repo":{"id":37876553,"name":"solidus","full_name":"bonobos/solidus","owner":{"login":"bonobos","id":78914,"avatar_url":"https://avatars.githubusercontent.com/u/78914?v=3","gravatar_id":"","url":"https://api.github.com/users/bonobos","html_url":"https://github.com/bonobos","followers_url":"https://api.github.com/users/bonobos/followers","following_url":"https://api.github.com/users/bonobos/following{/other_user}","gists_url":"https://api.github.com/users/bonobos/gists{/gist_id}","starred_url":"https://api.github.com/users/bonobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonobos/subscriptions","organizations_url":"https://api.github.com/users/bonobos/orgs","repos_url":"https://api.github.com/users/bonobos/repos","events_url":"https://api.github.com/users/bonobos/events{/privacy}","received_events_url":"https://api.github.com/users/bonobos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bonobos/solidus","description":"Solidus e-commerce system","fork":true,"url":"https://api.github.com/repos/bonobos/solidus","forks_url":"https://api.github.com/repos/bonobos/solidus/forks","keys_url":"https://api.github.com/repos/bonobos/solidus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bonobos/solidus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bonobos/solidus/teams","hooks_url":"https://api.github.com/repos/bonobos/solidus/hooks","issue_events_url":"https://api.github.com/repos/bonobos/solidus/issues/events{/number}","events_url":"https://api.github.com/repos/bonobos/solidus/events","assignees_url":"https://api.github.com/repos/bonobos/solidus/assignees{/user}","branches_url":"https://api.github.com/repos/bonobos/solidus/branches{/branch}","tags_url":"https://api.github.com/repos/bonobos/solidus/tags","blobs_url":"https://api.github.com/repos/bonobos/solidus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bonobos/solidus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bonobos/solidus/git/refs{/sha}","trees_url":"https://api.github.com/repos/bonobos/solidus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bonobos/solidus/statuses/{sha}","languages_url":"https://api.github.com/repos/bonobos/solidus/languages","stargazers_url":"https://api.github.com/repos/bonobos/solidus/stargazers","contributors_url":"https://api.github.com/repos/bonobos/solidus/contributors","subscribers_url":"https://api.github.com/repos/bonobos/solidus/subscribers","subscription_url":"https://api.github.com/repos/bonobos/solidus/subscription","commits_url":"https://api.github.com/repos/bonobos/solidus/commits{/sha}","git_commits_url":"https://api.github.com/repos/bonobos/solidus/git/commits{/sha}","comments_url":"https://api.github.com/repos/bonobos/solidus/comments{/number}","issue_comment_url":"https://api.github.com/repos/bonobos/solidus/issues/comments{/number}","contents_url":"https://api.github.com/repos/bonobos/solidus/contents/{+path}","compare_url":"https://api.github.com/repos/bonobos/solidus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bonobos/solidus/merges","archive_url":"https://api.github.com/repos/bonobos/solidus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bonobos/solidus/downloads","issues_url":"https://api.github.com/repos/bonobos/solidus/issues{/number}","pulls_url":"https://api.github.com/repos/bonobos/solidus/pulls{/number}","milestones_url":"https://api.github.com/repos/bonobos/solidus/milestones{/number}","notifications_url":"https://api.github.com/repos/bonobos/solidus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bonobos/solidus/labels{/name}","releases_url":"https://api.github.com/repos/bonobos/solidus/releases{/id}","deployments_url":"https://api.github.com/repos/bonobos/solidus/deployments","created_at":"2015-06-22T19:37:20Z","updated_at":"2016-02-05T16:38:44Z","pushed_at":"2016-02-12T15:58:33Z","git_url":"git://github.com/bonobos/solidus.git","ssh_url":"git@github.com:bonobos/solidus.git","clone_url":"https://github.com/bonobos/solidus.git","svn_url":"https://github.com/bonobos/solidus","homepage":"","size":64543,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bonobos/solidus/pulls/30"},"html":{"href":"https://github.com/bonobos/solidus/pull/30"},"issue":{"href":"https://api.github.com/repos/bonobos/solidus/issues/30"},"comments":{"href":"https://api.github.com/repos/bonobos/solidus/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/bonobos/solidus/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/bonobos/solidus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bonobos/solidus/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/bonobos/solidus/statuses/d294d999c93c22b0d76e033f21a9ef9b963a0e49"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":6,"deletions":17,"changed_files":1}}