{"action":"created","comment":{"url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/comments/65621755","id":65621755,"diff_hunk":"@@ -106,7 +106,7 @@ def packages(package)\n       end\n \n       item_specific_packages.each do |package|\n-        packages << ::ActiveShipping::Package.new(package.at(0), [package.at(1), package.at(2), package.at(3)], units: :imperial)\n+        packages << ::ActiveShipping::Package.new(package.weight * multiplier, [package.length, package.width, package.height], units: units)","path":"app/models/spree/package_builder.rb","position":null,"original_position":14,"commit_id":"9b3a275b107b1cf75083689a2cc66f595896969d","original_commit_id":"07d25ff1ecebec8d7c366becb4ebf5da67b1a033","user":{"login":"dangerdogz","id":4110905,"avatar_url":"https://avatars.githubusercontent.com/u/4110905?v=3","gravatar_id":"","url":"https://api.github.com/users/dangerdogz","html_url":"https://github.com/dangerdogz","followers_url":"https://api.github.com/users/dangerdogz/followers","following_url":"https://api.github.com/users/dangerdogz/following{/other_user}","gists_url":"https://api.github.com/users/dangerdogz/gists{/gist_id}","starred_url":"https://api.github.com/users/dangerdogz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dangerdogz/subscriptions","organizations_url":"https://api.github.com/users/dangerdogz/orgs","repos_url":"https://api.github.com/users/dangerdogz/repos","events_url":"https://api.github.com/users/dangerdogz/events{/privacy}","received_events_url":"https://api.github.com/users/dangerdogz/received_events","type":"User","site_admin":false},"body":"Everywhere else in the code, the unit is pulled from the config so I'd assume people who wants to use :imperial are setting the value themselves otherwise you'd get weird results\r\n\r\nI'd also expect the behavior to be different because this whole part looks bugged to me considering that product with product packages are double-packed (once based on weight and once based on product_packages)","created_at":"2016-06-02T21:27:25Z","updated_at":"2016-06-02T21:27:25Z","html_url":"https://github.com/solidusio-contrib/solidus_active_shipping/pull/21#discussion_r65621755","pull_request_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/comments/65621755"},"html":{"href":"https://github.com/solidusio-contrib/solidus_active_shipping/pull/21#discussion_r65621755"},"pull_request":{"href":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/21","id":72252057,"html_url":"https://github.com/solidusio-contrib/solidus_active_shipping/pull/21","diff_url":"https://github.com/solidusio-contrib/solidus_active_shipping/pull/21.diff","patch_url":"https://github.com/solidusio-contrib/solidus_active_shipping/pull/21.patch","issue_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/issues/21","number":21,"state":"open","locked":false,"title":"WIP Extract the packaging code into a service object","user":{"login":"dangerdogz","id":4110905,"avatar_url":"https://avatars.githubusercontent.com/u/4110905?v=3","gravatar_id":"","url":"https://api.github.com/users/dangerdogz","html_url":"https://github.com/dangerdogz","followers_url":"https://api.github.com/users/dangerdogz/followers","following_url":"https://api.github.com/users/dangerdogz/following{/other_user}","gists_url":"https://api.github.com/users/dangerdogz/gists{/gist_id}","starred_url":"https://api.github.com/users/dangerdogz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dangerdogz/subscriptions","organizations_url":"https://api.github.com/users/dangerdogz/orgs","repos_url":"https://api.github.com/users/dangerdogz/repos","events_url":"https://api.github.com/users/dangerdogz/events{/privacy}","received_events_url":"https://api.github.com/users/dangerdogz/received_events","type":"User","site_admin":false},"body":"Logic related to building the ActiveShipping::Packages needed for the find rates is extracted into a service object.\r\n\r\nThe goal would be for it to be an extension point where different \"packager\" could be used. Code is the same for now, it's a straight extraction so no refactoring yet\r\n\r\nMax weight is delegated to the calculator through Forwardable since max_weight_for_country is a protected method.\r\n\r\nNext step would be to determine how to better handle the max_weight since it's determined on the calculator level and is currently riddled with bugs\r\n\r\nNote : build is currently failing because USPS is returning 503","created_at":"2016-06-01T21:04:57Z","updated_at":"2016-06-02T21:27:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22804c2273f4cbeb00284aee8bd19f9cc59b16f1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/21/commits","review_comments_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/21/comments","review_comment_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/issues/21/comments","statuses_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/statuses/9b3a275b107b1cf75083689a2cc66f595896969d","head":{"label":"solidusio-contrib:extract_service","ref":"extract_service","sha":"9b3a275b107b1cf75083689a2cc66f595896969d","user":{"login":"solidusio-contrib","id":15385649,"avatar_url":"https://avatars.githubusercontent.com/u/15385649?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio-contrib","html_url":"https://github.com/solidusio-contrib","followers_url":"https://api.github.com/users/solidusio-contrib/followers","following_url":"https://api.github.com/users/solidusio-contrib/following{/other_user}","gists_url":"https://api.github.com/users/solidusio-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio-contrib/subscriptions","organizations_url":"https://api.github.com/users/solidusio-contrib/orgs","repos_url":"https://api.github.com/users/solidusio-contrib/repos","events_url":"https://api.github.com/users/solidusio-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":57410574,"name":"solidus_active_shipping","full_name":"solidusio-contrib/solidus_active_shipping","owner":{"login":"solidusio-contrib","id":15385649,"avatar_url":"https://avatars.githubusercontent.com/u/15385649?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio-contrib","html_url":"https://github.com/solidusio-contrib","followers_url":"https://api.github.com/users/solidusio-contrib/followers","following_url":"https://api.github.com/users/solidusio-contrib/following{/other_user}","gists_url":"https://api.github.com/users/solidusio-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio-contrib/subscriptions","organizations_url":"https://api.github.com/users/solidusio-contrib/orgs","repos_url":"https://api.github.com/users/solidusio-contrib/repos","events_url":"https://api.github.com/users/solidusio-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio-contrib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solidusio-contrib/solidus_active_shipping","description":":package: Solidus integration for Shopify's active_shipping gem.","fork":false,"url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping","forks_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/forks","keys_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/teams","hooks_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/hooks","issue_events_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/issues/events{/number}","events_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/events","assignees_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/assignees{/user}","branches_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/branches{/branch}","tags_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/tags","blobs_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/git/refs{/sha}","trees_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/statuses/{sha}","languages_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/languages","stargazers_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/stargazers","contributors_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/contributors","subscribers_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/subscribers","subscription_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/subscription","commits_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/commits{/sha}","git_commits_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/git/commits{/sha}","comments_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/comments{/number}","issue_comment_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/issues/comments{/number}","contents_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/contents/{+path}","compare_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/merges","archive_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/downloads","issues_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/issues{/number}","pulls_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls{/number}","milestones_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/milestones{/number}","notifications_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/labels{/name}","releases_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/releases{/id}","deployments_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/deployments","created_at":"2016-04-29T20:17:56Z","updated_at":"2016-05-12T23:13:24Z","pushed_at":"2016-06-02T21:05:45Z","git_url":"git://github.com/solidusio-contrib/solidus_active_shipping.git","ssh_url":"git@github.com:solidusio-contrib/solidus_active_shipping.git","clone_url":"https://github.com/solidusio-contrib/solidus_active_shipping.git","svn_url":"https://github.com/solidusio-contrib/solidus_active_shipping","homepage":"","size":726,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":8,"forks":3,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"solidusio-contrib:master","ref":"master","sha":"7830807c2347a751cc605ff5e13715ead66d2ba8","user":{"login":"solidusio-contrib","id":15385649,"avatar_url":"https://avatars.githubusercontent.com/u/15385649?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio-contrib","html_url":"https://github.com/solidusio-contrib","followers_url":"https://api.github.com/users/solidusio-contrib/followers","following_url":"https://api.github.com/users/solidusio-contrib/following{/other_user}","gists_url":"https://api.github.com/users/solidusio-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio-contrib/subscriptions","organizations_url":"https://api.github.com/users/solidusio-contrib/orgs","repos_url":"https://api.github.com/users/solidusio-contrib/repos","events_url":"https://api.github.com/users/solidusio-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":57410574,"name":"solidus_active_shipping","full_name":"solidusio-contrib/solidus_active_shipping","owner":{"login":"solidusio-contrib","id":15385649,"avatar_url":"https://avatars.githubusercontent.com/u/15385649?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio-contrib","html_url":"https://github.com/solidusio-contrib","followers_url":"https://api.github.com/users/solidusio-contrib/followers","following_url":"https://api.github.com/users/solidusio-contrib/following{/other_user}","gists_url":"https://api.github.com/users/solidusio-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio-contrib/subscriptions","organizations_url":"https://api.github.com/users/solidusio-contrib/orgs","repos_url":"https://api.github.com/users/solidusio-contrib/repos","events_url":"https://api.github.com/users/solidusio-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio-contrib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solidusio-contrib/solidus_active_shipping","description":":package: Solidus integration for Shopify's active_shipping gem.","fork":false,"url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping","forks_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/forks","keys_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/teams","hooks_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/hooks","issue_events_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/issues/events{/number}","events_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/events","assignees_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/assignees{/user}","branches_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/branches{/branch}","tags_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/tags","blobs_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/git/refs{/sha}","trees_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/statuses/{sha}","languages_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/languages","stargazers_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/stargazers","contributors_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/contributors","subscribers_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/subscribers","subscription_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/subscription","commits_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/commits{/sha}","git_commits_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/git/commits{/sha}","comments_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/comments{/number}","issue_comment_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/issues/comments{/number}","contents_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/contents/{+path}","compare_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/merges","archive_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/downloads","issues_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/issues{/number}","pulls_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls{/number}","milestones_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/milestones{/number}","notifications_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/labels{/name}","releases_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/releases{/id}","deployments_url":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/deployments","created_at":"2016-04-29T20:17:56Z","updated_at":"2016-05-12T23:13:24Z","pushed_at":"2016-06-02T21:05:45Z","git_url":"git://github.com/solidusio-contrib/solidus_active_shipping.git","ssh_url":"git@github.com:solidusio-contrib/solidus_active_shipping.git","clone_url":"https://github.com/solidusio-contrib/solidus_active_shipping.git","svn_url":"https://github.com/solidusio-contrib/solidus_active_shipping","homepage":"","size":726,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":8,"forks":3,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/21"},"html":{"href":"https://github.com/solidusio-contrib/solidus_active_shipping/pull/21"},"issue":{"href":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/issues/21"},"comments":{"href":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/solidusio-contrib/solidus_active_shipping/statuses/9b3a275b107b1cf75083689a2cc66f595896969d"}}}}
{"actor":{"display_login":"dangerdogz"}}