{"push_id":690906837,"size":18,"distinct_size":1,"ref":"refs/heads/shipment-destroy-prevention","head":"1328ef0b346f1bb0e751da384f8b194addd4dbb2","before":"9ab0e2f9f655afeb32908a78fd0cef4683a0f5c2","commits":[{"sha":"3f25644c5d8ea6169ffc70d0b8da736262ce810e","author":{"email":"0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@freerunningtech.com","name":"Adam Mueller"},"message":"Invalidate promo codes on completed orders.\n\nSimply updates promotion codes to only consider themselves used when\nassociated to a completed order. This means that a user can add the same\ncode to multiple carts. It isn't until the code is associated to a\ncompleted order that it's considered used.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/3f25644c5d8ea6169ffc70d0b8da736262ce810e"},{"sha":"3971524294d2bcba0edae34ac5b77963a5412c77","author":{"email":"0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@freerunningtech.com","name":"Adam Mueller"},"message":"Fix issue with code invalidation for items.\n\nAlso added a bunch more specs to help catch what happens for line item\nadjustments.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/3971524294d2bcba0edae34ac5b77963a5412c77"},{"sha":"2df39d0bca2dee9ced6a38cfbad224ddb1203e70","author":{"email":"0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@freerunningtech.com","name":"Adam Mueller"},"message":"Add extra test for multiple line items.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/2df39d0bca2dee9ced6a38cfbad224ddb1203e70"},{"sha":"2e02ed079c51cfec66a7674d239db69ba68f0206","author":{"email":"0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@freerunningtech.com","name":"Adam Mueller"},"message":"Add a freature spec to ensure multiple items works.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/2e02ed079c51cfec66a7674d239db69ba68f0206"},{"sha":"0419af5c974f82912ccd955e21fb95ba963c7e4e","author":{"email":"0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@freerunningtech.com","name":"Adam Mueller"},"message":"Remove `usage_code_for` from promotion codes.\n\nIt won't make a difference, due to the constraint on the order being\ncomplete.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/0419af5c974f82912ccd955e21fb95ba963c7e4e"},{"sha":"fe4cf258a23358bbc98b898aa0c887ccafb88069","author":{"email":"0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@freerunningtech.com","name":"Adam Mueller"},"message":"Remove `promotable` arguement from usage check.\n\nNo longer used and it's Bonobos only.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/fe4cf258a23358bbc98b898aa0c887ccafb88069"},{"sha":"1a203c8c171f07d5518e38585b16a5fec4c4c889","author":{"email":"0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@freerunningtech.com","name":"Adam Mueller"},"message":"Fix issue with multiple use of same code.\n\nIf multiple orders make it to the confirm step with the same promotion\ncode, it would correctly make the adjustment ineligible but wouldn't\nupdate the totals.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/1a203c8c171f07d5518e38585b16a5fec4c4c889"},{"sha":"5feee7bfeaef5eefd72685fb46f48c67488d2c6a","author":{"email":"0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@freerunningtech.com","name":"Adam Mueller"},"message":"Reset order state if promotion ineligible.\n\nIf promotion becomes ineligible just before complete, we kick the user\nback to the start of checkout and display an error.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/5feee7bfeaef5eefd72685fb46f48c67488d2c6a"},{"sha":"b1cbab85926493fe3709eb2757288db894940471","author":{"email":"0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@freerunningtech.com","name":"Adam Mueller"},"message":"Update `Promotion#usage_limit_exceeded?`\n\nNow only considereds eligible adjustments from completed orders.\nIdentical to how promotion codes work.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/b1cbab85926493fe3709eb2757288db894940471"},{"sha":"ae41dd977c952ea328d218a76cfed9043546829b","author":{"email":"b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@richardnuno.com","name":"Richard Nuno"},"message":"Fixes incorrect variant images being displayed in stock management\n\nCurrently when a variant is supplied to one of the generated image helpers and the variant does not have any associated images, the first of the variant’s product’s variant_images is used. The result is that incorrect images are displayed for certain variants. This can be misleading to admins since the image isn’t incorrect, it’s just not present.\n\nThis change is the initial step to begin deprecating the image helper methods. The image helpers’ behavior isn’t very clear so we want to move towards deprecating them in favor of accessing the images associated with a resource directly. A deprecation warning was added to the currently generated helper methods.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/ae41dd977c952ea328d218a76cfed9043546829b"},{"sha":"4625feed0177d4b0e460d6bf4b2e7cfc2557f71b","author":{"email":"b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@richardnuno.com","name":"Richard Nuno"},"message":"Merge pull request #404 from bonobos/deprecate-image-helpers\n\nFixes incorrect variant images being displayed in stock management","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/4625feed0177d4b0e460d6bf4b2e7cfc2557f71b"},{"sha":"70c3b547edb69c8d8dcfffe09bcc5f565a32fffa","author":{"email":"b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@richardnuno.com","name":"Richard Nuno"},"message":"Prevent inventory units from being created without an associated shipment\n\nWhen using the StockCoordinator to [generate shipments] (https://github.com/bonobos/spree/blob/2-2-dev/core/app/models/spree/order.rb#L438), the InventoryUnitBuilder [associates inventory units to the order] (https://github.com/bonobos/spree/blob/2-2-dev/core/app/models/spree/stock/inventory_unit_builder.rb#L11) which will then get associated to a [shipment] (https://github.com/bonobos/spree/blob/2-2-dev/core/app/models/spree/stock/package.rb#L100). When there isn’t enough stock for a variant, the inventory unit does not get added to a shipment but continues associated to the order. When the order is saved the inventory units will be persisted without having an associated shipment.\n\nChange will raise an error when attempting to create a package for a variant that does not have enough stock. I’ve added `validates_presence_of` validations for all of the associations we’d always want to be present on an inventory unit. I've also moved the InsufficientStock error from the LineItem to the Order to make it reusable for this scenario.\n\nThe added migration deletes all of the associated inventory units and shipments for orders that have never been completed and that contain inventory units without an associated shipment. It will also restart the checkout flow for those orders.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/70c3b547edb69c8d8dcfffe09bcc5f565a32fffa"},{"sha":"74b4598d93425e772a8a2fa1725bc5be890e0fb9","author":{"email":"b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@richardnuno.com","name":"Richard Nuno"},"message":"Update conditions under which the orders are updated\n\nDo not destroy the shipments/inventory units for cancelled orders or orders that have shipments that have either been cancelled or are ready.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/74b4598d93425e772a8a2fa1725bc5be890e0fb9"},{"sha":"383aaffe620a7ea61f1aa8ae9cf05911637132e9","author":{"email":"b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@richardnuno.com","name":"Richard Nuno"},"message":"Merge pull request #384 from bonobos/fix-inventory-units-without-shipments\n\nPrevent inventory units from being created without an associated shipment","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/383aaffe620a7ea61f1aa8ae9cf05911637132e9"},{"sha":"4aa2b5dfe27a162656c8dd946e16efae3d8fd373","author":{"email":"b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@richardnuno.com","name":"Richard Nuno"},"message":"Revert \"Revert \"Fix issue with insufficient stock validation when completing an order\"\"","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/4aa2b5dfe27a162656c8dd946e16efae3d8fd373"},{"sha":"9c2cde5d8e00621e00e0e829ab969de82ae0341c","author":{"email":"b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@richardnuno.com","name":"Richard Nuno"},"message":"Merge pull request #407 from bonobos/revert-382-revert-360-fix-insufficient-stock-error\n\nRevert \"Revert \"Fix issue with insufficient stock validation when com…","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/9c2cde5d8e00621e00e0e829ab969de82ae0341c"},{"sha":"4ecb42653bf05c7df78b65d816d041a3e9bce6dd","author":{"email":"dc7de07ca3b0e9525989d8856b9cb95fdd73480a@gmail.com","name":"Adam Mueller"},"message":"Merge pull request #338 from adammathys/2-2-promo-code-invalidation\n\nInvalidate promo codes on completed orders.","distinct":false,"url":"https://api.github.com/repos/bonobos/spree/commits/4ecb42653bf05c7df78b65d816d041a3e9bce6dd"},{"sha":"1328ef0b346f1bb0e751da384f8b194addd4dbb2","author":{"email":"61af3515749c80f94c4c7ece432eff97aeccad32@me.com","name":"Andrew Thal"},"message":"Be more strict about when inventory units and shipments are allowed to be destroyed.","distinct":true,"url":"https://api.github.com/repos/bonobos/spree/commits/1328ef0b346f1bb0e751da384f8b194addd4dbb2"}]}