Carlos Chitty
b43fa55a7b
Do not try to generate a URL for unpersisted blobs in development/test environment
...
Explicitly raise an error in `image_variant_url_for` if an Active Storage variant's blob is not persisted.
This addresses `ArgumentError`/`URI::InvalidURIError` in Rails 7.1, which occurs when attempting to generate a URL for an unsaved Active Storage blob. By raising, we ensure existing error handling in calling methods (e.g., `Spree::Image#url`) can provide graceful fallbacks (default image URLs).
This should only affect test and development environments where blobs may not be immediately persisted. Tests in `SuppliedProductImporter` have been updated to reflect this behavior.
References:
- Suggestion: https://github.com/openfoodfoundation/openfoodnetwork/pull/13232#discussion_r2071116581
- Example of failing test due to this: https://github.com/openfoodfoundation/openfoodnetwork/actions/runs/14739687958/job/41374346184?pr=13232
- Related: https://github.com/rails/rails/issues/50234
2025-06-27 15:05:52 -04:00
Maikel Linke
75b2119dd1
Update all locales with the latest Transifex translations
v5.1.1
2025-06-20 13:59:47 +10:00
Filipe
6ccc588113
Merge pull request #13342 from chitty/cch/refactor-unit-price
...
refactor: move unit price formatting logic out of model into helper
2025-06-19 16:19:03 +01:00
Gaetan Craig-Riou
7115eb3c0e
Merge pull request #13372 from chitty/cch/add-respond-to-missing
...
Add `respond_to_missing?` and replace `method_missing` with explicit preference methods
2025-06-19 18:47:08 +10:00
Maikel
98ebbb2203
Merge pull request #13383 from openfoodfoundation/dependabot/npm_and_yarn/hotkeys-js-3.13.14
...
Bump hotkeys-js from 3.13.12 to 3.13.14
2025-06-19 15:31:23 +10:00
Maikel
3c1ee5f033
Merge pull request #13384 from cyrillefr/MetricsModuleLength
...
Fixes offenses Metrics/ModuleLength in engines spec
2025-06-19 15:30:27 +10:00
Maikel
23b8192b2c
Merge pull request #13380 from openfoodfoundation/dependabot/npm_and_yarn/brace-expansion-1.1.12
...
Bump brace-expansion from 1.1.11 to 1.1.12
2025-06-19 15:19:52 +10:00
Carlos Chitty
37bf3f495f
Refactor preference access to use define_method instead of method_missing
...
Replaces dynamic method handling with explicit getters and setters to
avoid recursion issues and improve clarity.
2025-06-18 13:59:46 -04:00
Carlos Chitty
f909bb2c30
Add respond_to_missing? to classes defining method_missing to improve respond_to? behavior
2025-06-18 13:59:42 -04:00
Maikel
213b977725
Merge pull request #13379 from dacook/map-currency
...
Map currency to DFC codes
2025-06-18 11:32:33 +10:00
David Cook
f723fe025e
Rename file
2025-06-18 11:12:01 +10:00
David Cook
1525501a9d
Monkey-patch SemanticObject module directly
...
This is the module that defines semanticPropertiesMap.
2025-06-18 11:11:58 +10:00
cyrillefr
a4c6514275
Style Metrics/ModuleLength in spec file
2025-06-17 15:46:30 +02:00
cyrillefr
8aba6e9782
Style Metrics/ModuleLength in spec file
2025-06-17 15:41:51 +02:00
cyrillefr
9a2cd3965c
Style Metrics/ModuleLength in spec file
2025-06-17 15:38:25 +02:00
cyrillefr
b9eeb53901
Style Metrics/ModuleLength in spec file
2025-06-17 15:31:17 +02:00
cyrillefr
e19caa0caa
Style Metrics/ModuleLength in spec file
2025-06-17 15:27:31 +02:00
cyrillefr
05995bc026
Style Metrics/ModuleLength in spec file
2025-06-17 15:12:09 +02:00
cyrillefr
6b2297b0e6
Style Metrics/ModuleLength in spec file
2025-06-17 15:09:46 +02:00
cyrillefr
46ba6b7f9c
Style Metrics/ModuleLength in spec file
2025-06-17 14:50:35 +02:00
cyrillefr
e88a9dab4b
Style Metrics/ModuleLength in spec file
2025-06-17 14:47:45 +02:00
cyrillefr
6a44c45699
Style Metrics/ModuleLength in spec file
2025-06-17 14:37:35 +02:00
cyrillefr
bb0a6b7f8d
Style Metrics/ModuleLength in spec file
2025-06-17 14:33:15 +02:00
cyrillefr
abaa7c35a7
Style Metrics/ModuleLength in spec file
2025-06-17 14:18:42 +02:00
cyrillefr
97c4cd382b
Style Metrics/ModuleLength in spec file
2025-06-17 14:05:21 +02:00
cyrillefr
089caa228f
Style Metrics/ModuleLength in spec file
2025-06-17 13:48:22 +02:00
cyrillefr
d9194d3dce
Style Metrics/ModuleLength in spec file
2025-06-17 13:44:43 +02:00
cyrillefr
a792a550b3
Style Metrics/ModuleLength in spec file
2025-06-17 13:40:55 +02:00
cyrillefr
8c50ed9a45
Style Metrics/ModuleLength in spec file
2025-06-17 13:38:29 +02:00
cyrillefr
9d09fa9d54
Style Metrics/ModuleLength in spec file
2025-06-17 13:35:23 +02:00
cyrillefr
8234cc580d
Style Metrics/ModuleLength in spec file
2025-06-17 13:31:22 +02:00
cyrillefr
88b390dac6
Style Metrics/ModuleLength in spec file
2025-06-17 13:22:05 +02:00
cyrillefr
583acfcc79
Style Metrics/ModuleLength in spec file
2025-06-17 13:02:54 +02:00
cyrillefr
d9010c3cf3
Style Metrics/ModuleLength in spec file
2025-06-17 11:51:40 +02:00
cyrillefr
1837d6a381
Style Metrics/ModuleLength in spec file
2025-06-17 11:48:33 +02:00
cyrillefr
5b1b48afc6
Style Metrics/ModuleLength in spec file
2025-06-17 11:35:10 +02:00
cyrillefr
a872544b10
Style Metrics/ModuleLength in spec file
2025-06-17 11:28:54 +02:00
cyrillefr
2b1f75e87e
Style Metrics/ModuleLength in spec file
2025-06-17 11:23:03 +02:00
cyrillefr
9b1c95cbc2
Style Metrics/ModuleLength in spec file
2025-06-17 11:20:06 +02:00
cyrillefr
3743efd5e4
Style Metrics/ModuleLength in spec file
2025-06-17 11:13:45 +02:00
dependabot[bot]
19e654b9e4
Bump hotkeys-js from 3.13.12 to 3.13.14
...
Bumps [hotkeys-js](https://github.com/jaywcjlove/hotkeys-js ) from 3.13.12 to 3.13.14.
- [Release notes](https://github.com/jaywcjlove/hotkeys-js/releases )
- [Commits](https://github.com/jaywcjlove/hotkeys-js/compare/v3.13.12...v3.13.14 )
---
updated-dependencies:
- dependency-name: hotkeys-js
dependency-version: 3.13.14
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-06-17 09:04:36 +00:00
cyrillefr
6b0f690170
Style Metrics/ModuleLength in spec file
2025-06-17 11:02:21 +02:00
cyrillefr
ffe93fc470
Style Metrics/ModuleLength in spec file
2025-06-17 10:52:58 +02:00
David Cook
a4f28a2fac
Merge pull request #13377 from mkllnk/style
...
Style Metrics/ModuleLength in some spec files
2025-06-17 12:37:49 +10:00
dependabot[bot]
c1e6fff275
Bump brace-expansion from 1.1.11 to 1.1.12
...
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion ) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases )
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12 )
---
updated-dependencies:
- dependency-name: brace-expansion
dependency-version: 1.1.12
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-06-17 02:23:01 +00:00
Maikel
b5b50f0b5a
Merge pull request #13378 from openfoodfoundation/dependabot/npm_and_yarn/hotkeys-js-3.13.12
...
Bump hotkeys-js from 3.13.11 to 3.13.12
2025-06-17 11:42:05 +10:00
David Cook
f9764b697d
Found a cleaner way to patch inspect
...
I tried to move on, I really did, but I already had these things in my head and they suddenly clicked together, so I thought it worth updating now.
2025-06-17 10:52:20 +10:00
David Cook
0f3626f12d
Monkey-patch a cleaner inspect
...
I would love to have hooked into the pretty inspect features which provide a better format, with indentation and colours for the console. But I couldn't find out how to.
2025-06-17 10:52:20 +10:00
David Cook
be1f4e91e1
Map currency to DFC codes
...
Probably should have just hardcoded it. Hopefully we can remove this soon anyway.
2025-06-17 10:50:24 +10:00
Carlos Chitty
3dcc4428fa
Fix escaped HTML in unit price by marking output as html_safe
2025-06-16 12:53:41 +01:00