I didn't look into what's going wrong here. A sleep is not ideal but
better than a retry.
That page needs a rewrite anyway and therefore I don't want to invest
more work now.
Inspecting 1509 files
.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C...............
Offenses:
spec/system/support/cuprite_setup.rb:13:5: C: [Corrected] Style/RedundantDoubleSplatHashBraces: Remove the redundant double splat and braces, use keyword arguments directly.
**{ ...
^^^
spec/system/support/cuprite_setup.rb:14:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
browser_options:,
^^^^^^^^^^^^^^^^
spec/system/support/cuprite_setup.rb:15:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
process_timeout: 60,
^^^^^^^^^^^^^^^^^^^
spec/system/support/cuprite_setup.rb:16:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
timeout: 60,
^^^^^^^^^^^
spec/system/support/cuprite_setup.rb:17:7: C: [Corrected] Layout/CommentIndentation: Incorrect indentation detected (column 6 instead of 4).
# Don't load scripts from external sources, like google maps or stripe
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/support/cuprite_setup.rb:18:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
url_whitelist: ["http://localhost", "http://0.0.0.0", "http://127.0.0.1"],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/support/cuprite_setup.rb:19:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
inspector: true,
^^^^^^^^^^^^^^^
spec/system/support/cuprite_setup.rb:20:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
headless:,
^^^^^^^^^
spec/system/support/cuprite_setup.rb:21:7: C: [Corrected] Layout/HashAlignment: Align the keys of a hash literal if they span more than one line.
js_errors: true
^^^^^^^^^^^^^^^
1509 files inspected, 9 offenses detected, 9 offenses corrected
Inspecting 1509 files
.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.................................................................................................................................................................................................................................................................................................................................C............................................................C...........................................................................................................................................................................................................................................................................................................................................C.C.........................................................................................................................................C........................................................................................................................................
Offenses:
app/services/exchange_products_renderer.rb:50:13: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
where("spree_variants.id": incoming_exchanges_variants)
^^^^^^^^^^^^^^^^^^^
lib/stripe/credit_card_cloner.rb:67:50: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
{ metadata: { "ofn-clone": true } },
^^^^^^^^^^^
spec/controllers/api/v0/exchange_products_controller_spec.rb:59:52: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
Spree::Product.includes(:variants).where("spree_variants.id": exchange.variants.map(&:id))
^^^^^^^^^^^^^^^^^^^
spec/requests/api/orders_spec.rb:35:11: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
"application/json": {
^^^^^^^^^^^^^^^^^^
spec/requests/api/v1/customers_spec.rb:39:16: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
schema "$ref": "#/components/schemas/customers_collection"
^^^^^^
spec/requests/api/v1/customers_spec.rb:186:16: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
schema "$ref": "#/components/schemas/customer"
^^^^^^
spec/requests/api/v1/customers_spec.rb:207:16: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
schema "$ref": "#/components/schemas/customer"
^^^^^^
spec/requests/api/v1/customers_spec.rb:230:16: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
schema "$ref": "#/components/schemas/error_response"
^^^^^^
spec/requests/api/v1/customers_spec.rb:239:16: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
schema "$ref": "#/components/schemas/error_response"
^^^^^^
spec/requests/api/v1/customers_spec.rb:274:16: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
schema "$ref": "#/components/schemas/error_response"
^^^^^^
spec/requests/api/v1/customers_spec.rb:286:18: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
schema "$ref": "#/components/schemas/error_response"
^^^^^^
spec/requests/api/v1/customers_spec.rb:361:16: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
schema "$ref": "#/components/schemas/customer"
^^^^^^
spec/requests/api/v1/customers_spec.rb:427:16: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
schema "$ref": "#/components/schemas/error_response"
^^^^^^
spec/requests/api/v1/customers_spec.rb:440:16: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
schema "$ref": "#/components/schemas/customer"
^^^^^^
spec/requests/api/v1/customers_spec.rb:455:16: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
schema "$ref": "#/components/schemas/customers_collection"
^^^^^^
spec/support/request/stripe_stubs.rb:72:42: C: [Corrected] Style/QuotedSymbols: Prefer single-quoted symbols when you don't need string interpolation or special symbols.
stub = stub.with(body: { metadata: { "ofn-clone": true } })
^^^^^^^^^^^
1509 files inspected, 16 offenses detected, 16 offenses corrected
There's a user-facing change here. When you tried to update the quantity
of a line item beyond available stock, two things used to happen:
1. A warning was displayed.
2. The item's quantity was updated to the highest possible.
Unfortunately, the logic to update the line item was also reloading the
page and the warning message disappeared before it could be
acknowledged. The easiest fix was to skip the update request. And in my
opinion, it's even better to let the user decide if they still want to
update or cancel the update.
Eventually, we want to replace all this custom Javascript logic with
StimulusJS anyway. So let's not put too much effort into this. It was
important though to resolve the flaky spec which made many builds fail.