{"action":"created","comment":{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments/223071332","pull_request_review_id":162117010,"id":223071332,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzA3MTMzMg==","diff_hunk":"@@ -1,7 +1,13 @@\n module Spree\n   Shipment.class_eval do\n     def ensure_correct_adjustment_with_included_tax\n-      ensure_correct_adjustment_without_included_tax\n+      if adjustment\n+        ensure_correct_adjustment_without_included_tax\n+      elsif selected_shipping_rate_id\n+        # ensures the attribute adjustment is set (which, in original spree method, even with the reload is not happening)\n+        adjustment = shipping_method.create_adjustment shipping_method.adjustment_label, order, self, true, \"open\"","path":"app/models/spree/shipment_decorator.rb","position":9,"original_position":9,"commit_id":"a4288fff7e5d154b1e4ab245e199eb14fd7fb9ae","original_commit_id":"a4288fff7e5d154b1e4ab245e199eb14fd7fb9ae","user":{"login":"sauloperez","id":762088,"node_id":"MDQ6VXNlcjc2MjA4OA==","avatar_url":"https://avatars1.githubusercontent.com/u/762088?v=4","gravatar_id":"","url":"https://api.github.com/users/sauloperez","html_url":"https://github.com/sauloperez","followers_url":"https://api.github.com/users/sauloperez/followers","following_url":"https://api.github.com/users/sauloperez/following{/other_user}","gists_url":"https://api.github.com/users/sauloperez/gists{/gist_id}","starred_url":"https://api.github.com/users/sauloperez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sauloperez/subscriptions","organizations_url":"https://api.github.com/users/sauloperez/orgs","repos_url":"https://api.github.com/users/sauloperez/repos","events_url":"https://api.github.com/users/sauloperez/events{/privacy}","received_events_url":"https://api.github.com/users/sauloperez/received_events","type":"User","site_admin":false},"body":"Is this `adjustment` local var really visible in line 11? 🤔","created_at":"2018-10-05T16:45:09Z","updated_at":"2018-10-05T16:50:57Z","html_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/2811#discussion_r223071332","pull_request_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/2811","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments/223071332"},"html":{"href":"https://github.com/openfoodfoundation/openfoodnetwork/pull/2811#discussion_r223071332"},"pull_request":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/2811"}}},"pull_request":{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/2811","id":219741397,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NzQxMzk3","html_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/2811","diff_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/2811.diff","patch_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/2811.patch","issue_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/2811","number":2811,"state":"open","locked":false,"title":"[Spree Upgrade] Fixes shipping tests in adjustment spec","user":{"login":"luisramos0","id":1640378,"node_id":"MDQ6VXNlcjE2NDAzNzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1640378?v=4","gravatar_id":"","url":"https://api.github.com/users/luisramos0","html_url":"https://github.com/luisramos0","followers_url":"https://api.github.com/users/luisramos0/followers","following_url":"https://api.github.com/users/luisramos0/following{/other_user}","gists_url":"https://api.github.com/users/luisramos0/gists{/gist_id}","starred_url":"https://api.github.com/users/luisramos0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisramos0/subscriptions","organizations_url":"https://api.github.com/users/luisramos0/orgs","repos_url":"https://api.github.com/users/luisramos0/repos","events_url":"https://api.github.com/users/luisramos0/events{/privacy}","received_events_url":"https://api.github.com/users/luisramos0/received_events","type":"User","site_admin":false},"body":"#### What? Why?\r\n\r\nContinues #2665 \r\n\r\nFixes shipping adjustment spec tests.\r\nEnterprise Fees specs still need to be fixed.\r\n\r\n#### What should we test?\r\nNothing for now. adjustment_spec should have 4 more green tests.\r\n","created_at":"2018-10-02T15:13:01Z","updated_at":"2018-10-05T16:50:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83675e60a7c902d6ff0f08b64fd1992acfb46bd6","assignee":{"login":"luisramos0","id":1640378,"node_id":"MDQ6VXNlcjE2NDAzNzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1640378?v=4","gravatar_id":"","url":"https://api.github.com/users/luisramos0","html_url":"https://github.com/luisramos0","followers_url":"https://api.github.com/users/luisramos0/followers","following_url":"https://api.github.com/users/luisramos0/following{/other_user}","gists_url":"https://api.github.com/users/luisramos0/gists{/gist_id}","starred_url":"https://api.github.com/users/luisramos0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisramos0/subscriptions","organizations_url":"https://api.github.com/users/luisramos0/orgs","repos_url":"https://api.github.com/users/luisramos0/repos","events_url":"https://api.github.com/users/luisramos0/events{/privacy}","received_events_url":"https://api.github.com/users/luisramos0/received_events","type":"User","site_admin":false},"assignees":[{"login":"luisramos0","id":1640378,"node_id":"MDQ6VXNlcjE2NDAzNzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1640378?v=4","gravatar_id":"","url":"https://api.github.com/users/luisramos0","html_url":"https://github.com/luisramos0","followers_url":"https://api.github.com/users/luisramos0/followers","following_url":"https://api.github.com/users/luisramos0/following{/other_user}","gists_url":"https://api.github.com/users/luisramos0/gists{/gist_id}","starred_url":"https://api.github.com/users/luisramos0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisramos0/subscriptions","organizations_url":"https://api.github.com/users/luisramos0/orgs","repos_url":"https://api.github.com/users/luisramos0/repos","events_url":"https://api.github.com/users/luisramos0/events{/privacy}","received_events_url":"https://api.github.com/users/luisramos0/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/2811/commits","review_comments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/2811/comments","review_comment_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/2811/comments","statuses_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/statuses/a4288fff7e5d154b1e4ab245e199eb14fd7fb9ae","head":{"label":"luisramos0:2-0-adjust-basic-spec-fix","ref":"2-0-adjust-basic-spec-fix","sha":"a4288fff7e5d154b1e4ab245e199eb14fd7fb9ae","user":{"login":"luisramos0","id":1640378,"node_id":"MDQ6VXNlcjE2NDAzNzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1640378?v=4","gravatar_id":"","url":"https://api.github.com/users/luisramos0","html_url":"https://github.com/luisramos0","followers_url":"https://api.github.com/users/luisramos0/followers","following_url":"https://api.github.com/users/luisramos0/following{/other_user}","gists_url":"https://api.github.com/users/luisramos0/gists{/gist_id}","starred_url":"https://api.github.com/users/luisramos0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisramos0/subscriptions","organizations_url":"https://api.github.com/users/luisramos0/orgs","repos_url":"https://api.github.com/users/luisramos0/repos","events_url":"https://api.github.com/users/luisramos0/events{/privacy}","received_events_url":"https://api.github.com/users/luisramos0/received_events","type":"User","site_admin":false},"repo":{"id":134475188,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ0NzUxODg=","name":"openfoodnetwork","full_name":"luisramos0/openfoodnetwork","private":false,"owner":{"login":"luisramos0","id":1640378,"node_id":"MDQ6VXNlcjE2NDAzNzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1640378?v=4","gravatar_id":"","url":"https://api.github.com/users/luisramos0","html_url":"https://github.com/luisramos0","followers_url":"https://api.github.com/users/luisramos0/followers","following_url":"https://api.github.com/users/luisramos0/following{/other_user}","gists_url":"https://api.github.com/users/luisramos0/gists{/gist_id}","starred_url":"https://api.github.com/users/luisramos0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisramos0/subscriptions","organizations_url":"https://api.github.com/users/luisramos0/orgs","repos_url":"https://api.github.com/users/luisramos0/repos","events_url":"https://api.github.com/users/luisramos0/events{/privacy}","received_events_url":"https://api.github.com/users/luisramos0/received_events","type":"User","site_admin":false},"html_url":"https://github.com/luisramos0/openfoodnetwork","description":"Connect suppliers, distributors and consumers for the sale and purchase of local produce","fork":true,"url":"https://api.github.com/repos/luisramos0/openfoodnetwork","forks_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/forks","keys_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/teams","hooks_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/hooks","issue_events_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/events","assignees_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/tags","blobs_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/languages","stargazers_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/stargazers","contributors_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/contributors","subscribers_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/subscribers","subscription_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/subscription","commits_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/merges","archive_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/downloads","issues_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/labels{/name}","releases_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/releases{/id}","deployments_url":"https://api.github.com/repos/luisramos0/openfoodnetwork/deployments","created_at":"2018-05-22T20:58:53Z","updated_at":"2018-09-27T18:16:17Z","pushed_at":"2018-10-04T20:23:39Z","git_url":"git://github.com/luisramos0/openfoodnetwork.git","ssh_url":"git@github.com:luisramos0/openfoodnetwork.git","clone_url":"https://github.com/luisramos0/openfoodnetwork.git","svn_url":"https://github.com/luisramos0/openfoodnetwork","homepage":"http://openfoodnetwork.org/","size":39140,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openfoodfoundation:2-0-stable","ref":"2-0-stable","sha":"f0183cd17ec23fd52b637379f5859f0c2a574141","user":{"login":"openfoodfoundation","id":2578987,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1Nzg5ODc=","avatar_url":"https://avatars0.githubusercontent.com/u/2578987?v=4","gravatar_id":"","url":"https://api.github.com/users/openfoodfoundation","html_url":"https://github.com/openfoodfoundation","followers_url":"https://api.github.com/users/openfoodfoundation/followers","following_url":"https://api.github.com/users/openfoodfoundation/following{/other_user}","gists_url":"https://api.github.com/users/openfoodfoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/openfoodfoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfoodfoundation/subscriptions","organizations_url":"https://api.github.com/users/openfoodfoundation/orgs","repos_url":"https://api.github.com/users/openfoodfoundation/repos","events_url":"https://api.github.com/users/openfoodfoundation/events{/privacy}","received_events_url":"https://api.github.com/users/openfoodfoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":6257856,"node_id":"MDEwOlJlcG9zaXRvcnk2MjU3ODU2","name":"openfoodnetwork","full_name":"openfoodfoundation/openfoodnetwork","private":false,"owner":{"login":"openfoodfoundation","id":2578987,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1Nzg5ODc=","avatar_url":"https://avatars0.githubusercontent.com/u/2578987?v=4","gravatar_id":"","url":"https://api.github.com/users/openfoodfoundation","html_url":"https://github.com/openfoodfoundation","followers_url":"https://api.github.com/users/openfoodfoundation/followers","following_url":"https://api.github.com/users/openfoodfoundation/following{/other_user}","gists_url":"https://api.github.com/users/openfoodfoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/openfoodfoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfoodfoundation/subscriptions","organizations_url":"https://api.github.com/users/openfoodfoundation/orgs","repos_url":"https://api.github.com/users/openfoodfoundation/repos","events_url":"https://api.github.com/users/openfoodfoundation/events{/privacy}","received_events_url":"https://api.github.com/users/openfoodfoundation/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openfoodfoundation/openfoodnetwork","description":"Connect suppliers, distributors and consumers to trade local produce","fork":false,"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork","forks_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/forks","keys_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/teams","hooks_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/hooks","issue_events_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/events","assignees_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/tags","blobs_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/languages","stargazers_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/stargazers","contributors_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/contributors","subscribers_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/subscribers","subscription_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/subscription","commits_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/merges","archive_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/downloads","issues_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/labels{/name}","releases_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/releases{/id}","deployments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/deployments","created_at":"2012-10-17T07:56:23Z","updated_at":"2018-10-05T15:46:54Z","pushed_at":"2018-10-05T10:33:31Z","git_url":"git://github.com/openfoodfoundation/openfoodnetwork.git","ssh_url":"git@github.com:openfoodfoundation/openfoodnetwork.git","clone_url":"https://github.com/openfoodfoundation/openfoodnetwork.git","svn_url":"https://github.com/openfoodfoundation/openfoodnetwork","homepage":"http://openfoodnetwork.org/","size":39224,"stargazers_count":322,"watchers_count":322,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":216,"mirror_url":null,"archived":false,"open_issues_count":489,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":216,"open_issues":489,"watchers":322,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/2811"},"html":{"href":"https://github.com/openfoodfoundation/openfoodnetwork/pull/2811"},"issue":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/2811"},"comments":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/2811/comments"},"review_comments":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/2811/comments"},"review_comment":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/2811/commits"},"statuses":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/statuses/a4288fff7e5d154b1e4ab245e199eb14fd7fb9ae"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sauloperez"}}