{"action":"created","comment":{"url":"https://api.github.com/repos/spree/spree/pulls/comments/26012876","id":26012876,"diff_hunk":"@@ -87,6 +87,10 @@ def to_shipment\n           inventory_units: contents.map(&:inventory_unit)\n         )\n       end\n+\n+      def contents_by_weight\n+        contents.sort{|x, y| y.weight <=> x.weight }","path":"core/app/models/spree/stock/package.rb","position":6,"original_position":6,"commit_id":"5ff03be9a83e8b884fa5ebfc7583863b3b9af708","original_commit_id":"5ff03be9a83e8b884fa5ebfc7583863b3b9af708","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Space missing to the left of {.<br>Space between { and | missing.","created_at":"2015-03-09T02:27:12Z","updated_at":"2015-03-09T02:27:12Z","html_url":"https://github.com/spree/spree/pull/6133#discussion_r26012876","pull_request_url":"https://api.github.com/repos/spree/spree/pulls/6133","_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/comments/26012876"},"html":{"href":"https://github.com/spree/spree/pull/6133#discussion_r26012876"},"pull_request":{"href":"https://api.github.com/repos/spree/spree/pulls/6133"}}},"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/6133","id":30732523,"html_url":"https://github.com/spree/spree/pull/6133","diff_url":"https://github.com/spree/spree/pull/6133.diff","patch_url":"https://github.com/spree/spree/pull/6133.patch","issue_url":"https://api.github.com/repos/spree/spree/issues/6133","number":6133,"state":"open","locked":false,"title":"Handle splitting packages with varying weights better","user":{"login":"GeekOnCoffee","id":240650,"avatar_url":"https://avatars.githubusercontent.com/u/240650?v=3","gravatar_id":"","url":"https://api.github.com/users/GeekOnCoffee","html_url":"https://github.com/GeekOnCoffee","followers_url":"https://api.github.com/users/GeekOnCoffee/followers","following_url":"https://api.github.com/users/GeekOnCoffee/following{/other_user}","gists_url":"https://api.github.com/users/GeekOnCoffee/gists{/gist_id}","starred_url":"https://api.github.com/users/GeekOnCoffee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeekOnCoffee/subscriptions","organizations_url":"https://api.github.com/users/GeekOnCoffee/orgs","repos_url":"https://api.github.com/users/GeekOnCoffee/repos","events_url":"https://api.github.com/users/GeekOnCoffee/events{/privacy}","received_events_url":"https://api.github.com/users/GeekOnCoffee/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-09T02:27:10Z","updated_at":"2015-03-09T02:27:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89109a2658acece8836fb984ceae3e09569425c6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spree/spree/pulls/6133/commits","review_comments_url":"https://api.github.com/repos/spree/spree/pulls/6133/comments","review_comment_url":"https://api.github.com/repos/spree/spree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spree/spree/issues/6133/comments","statuses_url":"https://api.github.com/repos/spree/spree/statuses/5ff03be9a83e8b884fa5ebfc7583863b3b9af708","head":{"label":"GeekOnCoffee:fix_weights","ref":"fix_weights","sha":"5ff03be9a83e8b884fa5ebfc7583863b3b9af708","user":{"login":"GeekOnCoffee","id":240650,"avatar_url":"https://avatars.githubusercontent.com/u/240650?v=3","gravatar_id":"","url":"https://api.github.com/users/GeekOnCoffee","html_url":"https://github.com/GeekOnCoffee","followers_url":"https://api.github.com/users/GeekOnCoffee/followers","following_url":"https://api.github.com/users/GeekOnCoffee/following{/other_user}","gists_url":"https://api.github.com/users/GeekOnCoffee/gists{/gist_id}","starred_url":"https://api.github.com/users/GeekOnCoffee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeekOnCoffee/subscriptions","organizations_url":"https://api.github.com/users/GeekOnCoffee/orgs","repos_url":"https://api.github.com/users/GeekOnCoffee/repos","events_url":"https://api.github.com/users/GeekOnCoffee/events{/privacy}","received_events_url":"https://api.github.com/users/GeekOnCoffee/received_events","type":"User","site_admin":false},"repo":{"id":803064,"name":"spree","full_name":"GeekOnCoffee/spree","owner":{"login":"GeekOnCoffee","id":240650,"avatar_url":"https://avatars.githubusercontent.com/u/240650?v=3","gravatar_id":"","url":"https://api.github.com/users/GeekOnCoffee","html_url":"https://github.com/GeekOnCoffee","followers_url":"https://api.github.com/users/GeekOnCoffee/followers","following_url":"https://api.github.com/users/GeekOnCoffee/following{/other_user}","gists_url":"https://api.github.com/users/GeekOnCoffee/gists{/gist_id}","starred_url":"https://api.github.com/users/GeekOnCoffee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeekOnCoffee/subscriptions","organizations_url":"https://api.github.com/users/GeekOnCoffee/orgs","repos_url":"https://api.github.com/users/GeekOnCoffee/repos","events_url":"https://api.github.com/users/GeekOnCoffee/events{/privacy}","received_events_url":"https://api.github.com/users/GeekOnCoffee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GeekOnCoffee/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/GeekOnCoffee/spree","forks_url":"https://api.github.com/repos/GeekOnCoffee/spree/forks","keys_url":"https://api.github.com/repos/GeekOnCoffee/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GeekOnCoffee/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GeekOnCoffee/spree/teams","hooks_url":"https://api.github.com/repos/GeekOnCoffee/spree/hooks","issue_events_url":"https://api.github.com/repos/GeekOnCoffee/spree/issues/events{/number}","events_url":"https://api.github.com/repos/GeekOnCoffee/spree/events","assignees_url":"https://api.github.com/repos/GeekOnCoffee/spree/assignees{/user}","branches_url":"https://api.github.com/repos/GeekOnCoffee/spree/branches{/branch}","tags_url":"https://api.github.com/repos/GeekOnCoffee/spree/tags","blobs_url":"https://api.github.com/repos/GeekOnCoffee/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GeekOnCoffee/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GeekOnCoffee/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/GeekOnCoffee/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GeekOnCoffee/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/GeekOnCoffee/spree/languages","stargazers_url":"https://api.github.com/repos/GeekOnCoffee/spree/stargazers","contributors_url":"https://api.github.com/repos/GeekOnCoffee/spree/contributors","subscribers_url":"https://api.github.com/repos/GeekOnCoffee/spree/subscribers","subscription_url":"https://api.github.com/repos/GeekOnCoffee/spree/subscription","commits_url":"https://api.github.com/repos/GeekOnCoffee/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/GeekOnCoffee/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/GeekOnCoffee/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/GeekOnCoffee/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/GeekOnCoffee/spree/contents/{+path}","compare_url":"https://api.github.com/repos/GeekOnCoffee/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GeekOnCoffee/spree/merges","archive_url":"https://api.github.com/repos/GeekOnCoffee/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GeekOnCoffee/spree/downloads","issues_url":"https://api.github.com/repos/GeekOnCoffee/spree/issues{/number}","pulls_url":"https://api.github.com/repos/GeekOnCoffee/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/GeekOnCoffee/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/GeekOnCoffee/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GeekOnCoffee/spree/labels{/name}","releases_url":"https://api.github.com/repos/GeekOnCoffee/spree/releases{/id}","created_at":"2010-07-28T15:04:43Z","updated_at":"2015-02-03T16:40:12Z","pushed_at":"2015-03-09T02:26:43Z","git_url":"git://github.com/GeekOnCoffee/spree.git","ssh_url":"git@github.com:GeekOnCoffee/spree.git","clone_url":"https://github.com/GeekOnCoffee/spree.git","svn_url":"https://github.com/GeekOnCoffee/spree","homepage":"http://spreecommerce.com","size":65806,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"spree:3-0-stable","ref":"3-0-stable","sha":"f5a38f959867ae7a7a4f64fb36d9b66ee4858212","user":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"repo":{"id":3314,"name":"spree","full_name":"spree/spree","owner":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spree/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/spree/spree","forks_url":"https://api.github.com/repos/spree/spree/forks","keys_url":"https://api.github.com/repos/spree/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spree/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spree/spree/teams","hooks_url":"https://api.github.com/repos/spree/spree/hooks","issue_events_url":"https://api.github.com/repos/spree/spree/issues/events{/number}","events_url":"https://api.github.com/repos/spree/spree/events","assignees_url":"https://api.github.com/repos/spree/spree/assignees{/user}","branches_url":"https://api.github.com/repos/spree/spree/branches{/branch}","tags_url":"https://api.github.com/repos/spree/spree/tags","blobs_url":"https://api.github.com/repos/spree/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spree/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spree/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/spree/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spree/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/spree/spree/languages","stargazers_url":"https://api.github.com/repos/spree/spree/stargazers","contributors_url":"https://api.github.com/repos/spree/spree/contributors","subscribers_url":"https://api.github.com/repos/spree/spree/subscribers","subscription_url":"https://api.github.com/repos/spree/spree/subscription","commits_url":"https://api.github.com/repos/spree/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/spree/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/spree/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/spree/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/spree/spree/contents/{+path}","compare_url":"https://api.github.com/repos/spree/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spree/spree/merges","archive_url":"https://api.github.com/repos/spree/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spree/spree/downloads","issues_url":"https://api.github.com/repos/spree/spree/issues{/number}","pulls_url":"https://api.github.com/repos/spree/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/spree/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/spree/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spree/spree/labels{/name}","releases_url":"https://api.github.com/repos/spree/spree/releases{/id}","created_at":"2008-03-10T14:45:35Z","updated_at":"2015-03-09T02:25:21Z","pushed_at":"2015-03-08T04:20:26Z","git_url":"git://github.com/spree/spree.git","ssh_url":"git@github.com:spree/spree.git","clone_url":"https://github.com/spree/spree.git","svn_url":"https://github.com/spree/spree","homepage":"http://spreecommerce.com","size":132023,"stargazers_count":6058,"watchers_count":6058,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2844,"mirror_url":null,"open_issues_count":87,"forks":2844,"open_issues":87,"watchers":6058,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/6133"},"html":{"href":"https://github.com/spree/spree/pull/6133"},"issue":{"href":"https://api.github.com/repos/spree/spree/issues/6133"},"comments":{"href":"https://api.github.com/repos/spree/spree/issues/6133/comments"},"review_comments":{"href":"https://api.github.com/repos/spree/spree/pulls/6133/comments"},"review_comment":{"href":"https://api.github.com/repos/spree/spree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spree/spree/pulls/6133/commits"},"statuses":{"href":"https://api.github.com/repos/spree/spree/statuses/5ff03be9a83e8b884fa5ebfc7583863b3b9af708"}}}}