Workarea 3.3.12
Patch release notes for Workarea 3.3.12.
Downgrade I18n::JS To Prevent Faker Translations From Loading
Downgrade i18n-js to v3.0.10 to prevent issue with loading Faker translations in the storefront. This was fixed when v3.0.0 was released, but broke due to a change in the i18n-js private method API.
Issues
Pull Requests
Commits
Convert Attribute Case in Customizations Subclasses
Attribute keys passed into a subclass of Catalog::Customizations
will
typically convert to snake_case
so they can be read as methods on the
object. This breaks down when camelCased
attribute names are
encountered because String#underscore
seems to not handle case changes
in the word, because instead of "foo_bar" from "fooBar", "foobar" is what
the attribute key looks like. Call #titleize
on the attribute name before
setting it as an instance variable, this will take both spaces and case
changes into account and treat them as separators of the word.
Issues
Pull Requests
Commits
Always Select Option With One Selection in Option Set Templates
In the option_selects
and option_thumbnails
templates, options with
only one selection available are now selected by default, avoiding an
additional unnecessary click in order to add the product to cart.
Issues
Pull Requests
Commits
Add Weblinc Office and AlertLogic IPs to Rack Attack Safelist
Prevents Weblinc and AlertLogic IPs from being blocked by Rack::Attack
from viewing the application. This also includes integration tests for
all Rack::Attack
safelisting and throttling rules, enabling
implementers to easily test their own custom rules.
Issues
Pull Requests
Commits
Retain Row Type in Imports/Exports
Workarea previously locked the model class that one updated within an
import or export to the corresponding index from which the user came in
the admin (e.g., for products, the "Import" button will import
Workarea::Catalog::Product
models and its embedded data). This caused
an issue with models that use "STI" and inherit from others, because the
data file engine couldn't tell the difference between a brand-new
Pricing::Discount
and a brand-new Pricing::Discount::FreeGift
, for example.
The _type
column provided within the CSV/JSON exports will now be used to
instantiate the model so a single discounts data file can contain information
for every type of discount that Workarea supports.
Issues
Pull Requests
Commits
Populate Product Attributes In create_placed_order
Factory
In the real world, a product has its attributes copied into Order::Item#product_attributes
before the order is placed. In testing, however, this does not occur,
instead the product_attributes
hash is empty. Workarea now ensures that the
#create_placed_order
factory method assigns product.as_document
as these
attributes in the same way as is done in the application, by utilizing the
Workarea::OrderItemDetails
service object.