{"action":"closed","number":474,"pull_request":{"url":"https://api.github.com/repos/solidusio/solidus/pulls/474","id":49437908,"html_url":"https://github.com/solidusio/solidus/pull/474","diff_url":"https://github.com/solidusio/solidus/pull/474.diff","patch_url":"https://github.com/solidusio/solidus/pull/474.patch","issue_url":"https://api.github.com/repos/solidusio/solidus/issues/474","number":474,"state":"closed","locked":false,"title":"Port Order#merge! fix from Spree","user":{"login":"mtomov","id":1651750,"avatar_url":"https://avatars.githubusercontent.com/u/1651750?v=3","gravatar_id":"","url":"https://api.github.com/users/mtomov","html_url":"https://github.com/mtomov","followers_url":"https://api.github.com/users/mtomov/followers","following_url":"https://api.github.com/users/mtomov/following{/other_user}","gists_url":"https://api.github.com/users/mtomov/gists{/gist_id}","starred_url":"https://api.github.com/users/mtomov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtomov/subscriptions","organizations_url":"https://api.github.com/users/mtomov/orgs","repos_url":"https://api.github.com/users/mtomov/repos","events_url":"https://api.github.com/users/mtomov/events{/privacy}","received_events_url":"https://api.github.com/users/mtomov/received_events","type":"User","site_admin":false},"body":"This commit on Spree https://github.com/spree/spree/commit/d923c10761922801dd2c31b7317877ae0917de6f fixes an often occurring bug when carts are merged together, but their line items contain validation errors (usually not enough stock). \r\n\r\nBefore, calling `save!` on the line item was raising an uncaught error, leaving an unpleasant user experience, and inability to even log in.\r\n\r\nThis commit extracts the full Order#merge! logic into an own class, and most importantly - does away with the bang on the saves!\r\n\r\nThis is just a port of the commit to Solidus.","created_at":"2015-11-02T14:34:18Z","updated_at":"2015-11-05T00:12:54Z","closed_at":"2015-11-05T00:12:53Z","merged_at":"2015-11-05T00:12:53Z","merge_commit_sha":"4fa2c63f565068655c2c4a882d10632f260000a8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/solidusio/solidus/pulls/474/commits","review_comments_url":"https://api.github.com/repos/solidusio/solidus/pulls/474/comments","review_comment_url":"https://api.github.com/repos/solidusio/solidus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solidusio/solidus/issues/474/comments","statuses_url":"https://api.github.com/repos/solidusio/solidus/statuses/e4405dd38fc0f5aa12afd06e8284009d68baf4b6","head":{"label":"mtomov:port-order-merge-fix","ref":"port-order-merge-fix","sha":"e4405dd38fc0f5aa12afd06e8284009d68baf4b6","user":{"login":"mtomov","id":1651750,"avatar_url":"https://avatars.githubusercontent.com/u/1651750?v=3","gravatar_id":"","url":"https://api.github.com/users/mtomov","html_url":"https://github.com/mtomov","followers_url":"https://api.github.com/users/mtomov/followers","following_url":"https://api.github.com/users/mtomov/following{/other_user}","gists_url":"https://api.github.com/users/mtomov/gists{/gist_id}","starred_url":"https://api.github.com/users/mtomov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtomov/subscriptions","organizations_url":"https://api.github.com/users/mtomov/orgs","repos_url":"https://api.github.com/users/mtomov/repos","events_url":"https://api.github.com/users/mtomov/events{/privacy}","received_events_url":"https://api.github.com/users/mtomov/received_events","type":"User","site_admin":false},"repo":{"id":45399489,"name":"solidus","full_name":"mtomov/solidus","owner":{"login":"mtomov","id":1651750,"avatar_url":"https://avatars.githubusercontent.com/u/1651750?v=3","gravatar_id":"","url":"https://api.github.com/users/mtomov","html_url":"https://github.com/mtomov","followers_url":"https://api.github.com/users/mtomov/followers","following_url":"https://api.github.com/users/mtomov/following{/other_user}","gists_url":"https://api.github.com/users/mtomov/gists{/gist_id}","starred_url":"https://api.github.com/users/mtomov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtomov/subscriptions","organizations_url":"https://api.github.com/users/mtomov/orgs","repos_url":"https://api.github.com/users/mtomov/repos","events_url":"https://api.github.com/users/mtomov/events{/privacy}","received_events_url":"https://api.github.com/users/mtomov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mtomov/solidus","description":"Solidus, Rails eCommerce System","fork":true,"url":"https://api.github.com/repos/mtomov/solidus","forks_url":"https://api.github.com/repos/mtomov/solidus/forks","keys_url":"https://api.github.com/repos/mtomov/solidus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mtomov/solidus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mtomov/solidus/teams","hooks_url":"https://api.github.com/repos/mtomov/solidus/hooks","issue_events_url":"https://api.github.com/repos/mtomov/solidus/issues/events{/number}","events_url":"https://api.github.com/repos/mtomov/solidus/events","assignees_url":"https://api.github.com/repos/mtomov/solidus/assignees{/user}","branches_url":"https://api.github.com/repos/mtomov/solidus/branches{/branch}","tags_url":"https://api.github.com/repos/mtomov/solidus/tags","blobs_url":"https://api.github.com/repos/mtomov/solidus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mtomov/solidus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mtomov/solidus/git/refs{/sha}","trees_url":"https://api.github.com/repos/mtomov/solidus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mtomov/solidus/statuses/{sha}","languages_url":"https://api.github.com/repos/mtomov/solidus/languages","stargazers_url":"https://api.github.com/repos/mtomov/solidus/stargazers","contributors_url":"https://api.github.com/repos/mtomov/solidus/contributors","subscribers_url":"https://api.github.com/repos/mtomov/solidus/subscribers","subscription_url":"https://api.github.com/repos/mtomov/solidus/subscription","commits_url":"https://api.github.com/repos/mtomov/solidus/commits{/sha}","git_commits_url":"https://api.github.com/repos/mtomov/solidus/git/commits{/sha}","comments_url":"https://api.github.com/repos/mtomov/solidus/comments{/number}","issue_comment_url":"https://api.github.com/repos/mtomov/solidus/issues/comments{/number}","contents_url":"https://api.github.com/repos/mtomov/solidus/contents/{+path}","compare_url":"https://api.github.com/repos/mtomov/solidus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mtomov/solidus/merges","archive_url":"https://api.github.com/repos/mtomov/solidus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mtomov/solidus/downloads","issues_url":"https://api.github.com/repos/mtomov/solidus/issues{/number}","pulls_url":"https://api.github.com/repos/mtomov/solidus/pulls{/number}","milestones_url":"https://api.github.com/repos/mtomov/solidus/milestones{/number}","notifications_url":"https://api.github.com/repos/mtomov/solidus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mtomov/solidus/labels{/name}","releases_url":"https://api.github.com/repos/mtomov/solidus/releases{/id}","created_at":"2015-11-02T14:29:49Z","updated_at":"2015-11-02T14:29:56Z","pushed_at":"2015-11-04T20:00:43Z","git_url":"git://github.com/mtomov/solidus.git","ssh_url":"git@github.com:mtomov/solidus.git","clone_url":"https://github.com/mtomov/solidus.git","svn_url":"https://github.com/mtomov/solidus","homepage":"http://solidus.io/","size":60358,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"solidusio:master","ref":"master","sha":"fe44008e0b708906ad3489e3adefd26b980e89c8","user":{"login":"solidusio","id":11045486,"avatar_url":"https://avatars.githubusercontent.com/u/11045486?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio","html_url":"https://github.com/solidusio","followers_url":"https://api.github.com/users/solidusio/followers","following_url":"https://api.github.com/users/solidusio/following{/other_user}","gists_url":"https://api.github.com/users/solidusio/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio/subscriptions","organizations_url":"https://api.github.com/users/solidusio/orgs","repos_url":"https://api.github.com/users/solidusio/repos","events_url":"https://api.github.com/users/solidusio/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio/received_events","type":"Organization","site_admin":false},"repo":{"id":30985840,"name":"solidus","full_name":"solidusio/solidus","owner":{"login":"solidusio","id":11045486,"avatar_url":"https://avatars.githubusercontent.com/u/11045486?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio","html_url":"https://github.com/solidusio","followers_url":"https://api.github.com/users/solidusio/followers","following_url":"https://api.github.com/users/solidusio/following{/other_user}","gists_url":"https://api.github.com/users/solidusio/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio/subscriptions","organizations_url":"https://api.github.com/users/solidusio/orgs","repos_url":"https://api.github.com/users/solidusio/repos","events_url":"https://api.github.com/users/solidusio/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solidusio/solidus","description":"Solidus, Rails eCommerce System","fork":false,"url":"https://api.github.com/repos/solidusio/solidus","forks_url":"https://api.github.com/repos/solidusio/solidus/forks","keys_url":"https://api.github.com/repos/solidusio/solidus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solidusio/solidus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solidusio/solidus/teams","hooks_url":"https://api.github.com/repos/solidusio/solidus/hooks","issue_events_url":"https://api.github.com/repos/solidusio/solidus/issues/events{/number}","events_url":"https://api.github.com/repos/solidusio/solidus/events","assignees_url":"https://api.github.com/repos/solidusio/solidus/assignees{/user}","branches_url":"https://api.github.com/repos/solidusio/solidus/branches{/branch}","tags_url":"https://api.github.com/repos/solidusio/solidus/tags","blobs_url":"https://api.github.com/repos/solidusio/solidus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solidusio/solidus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solidusio/solidus/git/refs{/sha}","trees_url":"https://api.github.com/repos/solidusio/solidus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solidusio/solidus/statuses/{sha}","languages_url":"https://api.github.com/repos/solidusio/solidus/languages","stargazers_url":"https://api.github.com/repos/solidusio/solidus/stargazers","contributors_url":"https://api.github.com/repos/solidusio/solidus/contributors","subscribers_url":"https://api.github.com/repos/solidusio/solidus/subscribers","subscription_url":"https://api.github.com/repos/solidusio/solidus/subscription","commits_url":"https://api.github.com/repos/solidusio/solidus/commits{/sha}","git_commits_url":"https://api.github.com/repos/solidusio/solidus/git/commits{/sha}","comments_url":"https://api.github.com/repos/solidusio/solidus/comments{/number}","issue_comment_url":"https://api.github.com/repos/solidusio/solidus/issues/comments{/number}","contents_url":"https://api.github.com/repos/solidusio/solidus/contents/{+path}","compare_url":"https://api.github.com/repos/solidusio/solidus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solidusio/solidus/merges","archive_url":"https://api.github.com/repos/solidusio/solidus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solidusio/solidus/downloads","issues_url":"https://api.github.com/repos/solidusio/solidus/issues{/number}","pulls_url":"https://api.github.com/repos/solidusio/solidus/pulls{/number}","milestones_url":"https://api.github.com/repos/solidusio/solidus/milestones{/number}","notifications_url":"https://api.github.com/repos/solidusio/solidus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solidusio/solidus/labels{/name}","releases_url":"https://api.github.com/repos/solidusio/solidus/releases{/id}","created_at":"2015-02-18T20:41:58Z","updated_at":"2015-11-04T22:02:38Z","pushed_at":"2015-11-05T00:12:54Z","git_url":"git://github.com/solidusio/solidus.git","ssh_url":"git@github.com:solidusio/solidus.git","clone_url":"https://github.com/solidusio/solidus.git","svn_url":"https://github.com/solidusio/solidus","homepage":"http://solidus.io/","size":68047,"stargazers_count":176,"watchers_count":176,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":62,"forks":56,"open_issues":62,"watchers":176,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/474"},"html":{"href":"https://github.com/solidusio/solidus/pull/474"},"issue":{"href":"https://api.github.com/repos/solidusio/solidus/issues/474"},"comments":{"href":"https://api.github.com/repos/solidusio/solidus/issues/474/comments"},"review_comments":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/474/comments"},"review_comment":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/474/commits"},"statuses":{"href":"https://api.github.com/repos/solidusio/solidus/statuses/e4405dd38fc0f5aa12afd06e8284009d68baf4b6"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"jhawthorn","id":131752,"avatar_url":"https://avatars.githubusercontent.com/u/131752?v=3","gravatar_id":"","url":"https://api.github.com/users/jhawthorn","html_url":"https://github.com/jhawthorn","followers_url":"https://api.github.com/users/jhawthorn/followers","following_url":"https://api.github.com/users/jhawthorn/following{/other_user}","gists_url":"https://api.github.com/users/jhawthorn/gists{/gist_id}","starred_url":"https://api.github.com/users/jhawthorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhawthorn/subscriptions","organizations_url":"https://api.github.com/users/jhawthorn/orgs","repos_url":"https://api.github.com/users/jhawthorn/repos","events_url":"https://api.github.com/users/jhawthorn/events{/privacy}","received_events_url":"https://api.github.com/users/jhawthorn/received_events","type":"User","site_admin":false},"comments":10,"review_comments":0,"commits":4,"additions":309,"deletions":124,"changed_files":5}}