Currently the Base calculator handles the building of ActiveShipping::Package models, which should be extracted into one or more service objects. A big part of the logic is around building packages based on the maximum allowable weight for a package, which should still be configurable on the calculator level and passed to the service object responsible for building the packages.
Currently the
Base
calculator handles the building ofActiveShipping::Package
models, which should be extracted into one or more service objects. A big part of the logic is around building packages based on the maximum allowable weight for a package, which should still be configurable on the calculator level and passed to the service object responsible for building the packages.There has been an effort here https://github.com/solidusio-contrib/solidus_active_shipping/pull/10 to add better tests for the weight calculation logic which should help us ensure we preserve the existing logic.