Pau Perez
198d4be18f
Update all locales with the latest Transifex translations
2021-06-18 18:05:03 +02:00
Pau Pérez Fabregat
42e26f3328
Merge pull request #7708 from andrewpbrett/payment-states
...
Add `requires_authorization` Payment state
2021-06-18 17:04:03 +02:00
Pau Perez
cb23cda9e9
Update all locales with the latest Transifex translations
2021-06-18 15:05:26 +02:00
Pau Pérez Fabregat
4ecbf51b33
Merge pull request #7802 from Matt-Yorkley/confirmation-mails
...
Add a delay on sending order confirmation emails
2021-06-18 12:27:24 +02:00
Pau Pérez Fabregat
837e65d72a
Merge pull request #7792 from openfoodfoundation/dependabot/npm_and_yarn/postcss-7.0.36
...
Bump postcss from 7.0.35 to 7.0.36
2021-06-18 12:24:33 +02:00
Pau Pérez Fabregat
aa9a85159e
Merge pull request #7806 from mkllnk/feature-toggles
...
Remove custom feature toggles
2021-06-18 12:23:21 +02:00
Pau Pérez Fabregat
db993652c4
Merge branch 'master' into payment-states
2021-06-18 12:20:26 +02:00
Pau Pérez Fabregat
b500486f6b
Merge pull request #7211 from jibees/4207-add-query-params-in-url
...
Orders list : save filters params
2021-06-18 11:19:26 +02:00
Pau Pérez Fabregat
11a7316b9d
Merge pull request #7759 from apricot12/fix_duplicate_refund
...
Disable credit button on click
2021-06-18 09:27:45 +02:00
Pau Pérez Fabregat
75ed148490
Merge pull request #7803 from openfoodfoundation/transifex
...
Transifex
2021-06-18 09:26:47 +02:00
Transifex-Openfoodnetwork
2f82afcb07
Updating translations for config/locales/en_FR.yml
2021-06-18 16:58:14 +10:00
Transifex-Openfoodnetwork
fcf6f1929b
Updating translations for config/locales/fr.yml
2021-06-18 16:58:00 +10:00
Pau Pérez Fabregat
6f90a7b07f
Merge pull request #7720 from luisramos0/rubocop_auto_correct
...
Executed rubocop autocorrect (-a for safe corrections plus adding frozen_string_literal comment to all files)
2021-06-18 08:48:03 +02:00
Transifex-Openfoodnetwork
36fa34a39e
Updating translations for config/locales/es.yml
2021-06-18 16:44:01 +10:00
Transifex-Openfoodnetwork
d516b1d885
Updating translations for config/locales/ca.yml
2021-06-18 16:43:55 +10:00
Andy Brett
d9aa1b054a
update payments to be in requires_authorization state in specs
2021-06-17 18:10:41 -07:00
Maikel Linke
a8eecf963d
Remove unused custom FeatureToggle implementation
...
Flipper is now our only source of truth regarding feature toggles.
2021-06-18 10:46:51 +10:00
Maikel Linke
bba85e5e79
Remove feature toggling via ENV vars
...
We don't use ENV vars for feature toggles any more. Flipper is much
easier to manage.
2021-06-18 10:46:51 +10:00
Maikel Linke
a712f254e0
Remove Australian custom homepage content
...
This was activated with a feature toggle. But when we re-implemented the
feature toggles, we accidentally broke this one and it hasn't been
active for two months. Nobody complained and it doesn't seem to be
needed while developers are keen to remove instance-specific
customisations anyway.
2021-06-18 10:46:50 +10:00
Luis Ramos
5a05a21dad
Revert to false so strings can be mutated in this class
2021-06-17 23:07:54 +01:00
Luis Ramos
f95b0e3c54
Revert frozen string literal comment in codecov config
2021-06-17 23:07:41 +01:00
Luis Ramos
755222a35d
Revert to false so strings can be mutated in this class
2021-06-17 23:07:35 +01:00
Luis Ramos
e52937c113
Use rubocop auto correct to add frozen string literal to all files
...
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00
Luis Ramos
4fe9a936f0
Regenerate rubocop_todo
2021-06-17 22:32:59 +01:00
Luis Ramos
a253228b96
Add some rubocop disable commands in the code to avoid future wrong rubocop auto corrections
2021-06-17 22:26:54 +01:00
Andy Brett
b41302d5d8
update state transitions for new requires_authorization state
2021-06-17 14:23:59 -07:00
Andy Brett
dd0375aed4
clear authorization url after failing the payment
2021-06-17 14:23:59 -07:00
Andy Brett
d3cca04703
update spec
2021-06-17 14:23:59 -07:00
Andy Brett
3e32abe64f
add colors and translations for requires_authorization state
2021-06-17 14:23:59 -07:00
Andy Brett
dc1a24339c
update can_resend_auth_email
2021-06-17 14:23:59 -07:00
Andy Brett
95f123d137
update success response in payment spec
2021-06-17 14:23:59 -07:00
Andy Brett
b016337d4f
add requires_authorization as a possible payment_state on Orders
2021-06-17 14:23:59 -07:00
Andy Brett
24a60cd108
add translation key
2021-06-17 14:23:59 -07:00
Andy Brett
2699e17b63
update specs to create payment in requires_authorization state
2021-06-17 14:23:59 -07:00
Andy Brett
527f4e2cb3
move payment to requires_authorization if cvv_result is present
2021-06-17 14:23:59 -07:00
Andy Brett
a6cec20056
update success_response in payment_spec
2021-06-17 14:23:59 -07:00
Andy Brett
31738ceb49
rename and consolidate authorization? methods
2021-06-17 14:23:59 -07:00
Andy Brett
674ca3026b
change states after failure/requiring auth
2021-06-17 14:23:58 -07:00
Andy Brett
a3d9f1f3cc
create requires_authorization payment state and migration
2021-06-17 14:23:58 -07:00
Andy Brett
4d2235c9cc
Merge pull request #7794 from openfoodfoundation/dependabot/bundler/bigdecimal-3.0.2
...
Bump bigdecimal from 1.4.2 to 3.0.2
2021-06-17 14:21:55 -07:00
Luis Ramos
de76a1d41e
Manually fix rubocop issue (unsafe auto correct would be wrong)
2021-06-17 22:20:28 +01:00
Luis Ramos
23627c5453
Run rubocop -a (safe corrections) removing all exceptions so all possible fixes are applied
...
9290 issues fixed
2021-06-17 22:19:26 +01:00
Andy Brett
5a25de1c82
Merge pull request #7760 from apricot12/remove_unused_partial_paypal
...
Remove unused partial paypal
2021-06-17 13:21:33 -07:00
Andy Brett
355b5ab56f
Merge pull request #7788 from jibees/5735-flaky-spec-on-variant-override
...
Uncomment flaky (?) spec
2021-06-17 12:55:16 -07:00
Andy Brett
bcd0173ed0
Merge pull request #7305 from cillian/add-distributor-to-shipment-email
...
Add enterprise name to subject and body of shipment shipped email
2021-06-17 12:53:09 -07:00
Andy Brett
7c694e3cf3
Merge pull request #7771 from openfoodfoundation/dependabot/bundler/activemerchant-1.121.0
...
Bump activemerchant from 1.120.0 to 1.121.0
2021-06-17 12:52:21 -07:00
Jean-Baptiste Bellet
89ea9913e6
Checkbox is correctly handled with null value (and not false)
...
- It's better to read the comment juste below the line... 😠 (https://github.com/openfoodfoundation/openfoodnetwork/pull/3076#issuecomment-440010498 )
- Add appropriate spec so it is now correctly tested!
2021-06-17 21:40:25 +02:00
Matt-Yorkley
c821380ff1
Merge pull request #7749 from apricot12/remove_paypal_refund_button
...
Remove refund button from paypal completed order tab
2021-06-17 21:37:51 +02:00
Matt-Yorkley
e4e84b0a86
Remove old warning on BigDecimal gem
2021-06-17 16:05:12 +01:00
Matt-Yorkley
a7d873356d
Fix shady use of BigDecimal
2021-06-17 15:51:06 +01:00
Transifex-Openfoodnetwork
ba7b53051a
Updating translations for config/locales/es.yml
2021-06-17 20:30:36 +10:00
Transifex-Openfoodnetwork
5803c0fe50
Updating translations for config/locales/fr.yml
2021-06-17 20:27:31 +10:00
Transifex-Openfoodnetwork
2e701656d2
Updating translations for config/locales/en_US.yml
2021-06-17 20:27:29 +10:00
Pau Pérez Fabregat
a8efbffca6
Merge pull request #7429 from Matt-Yorkley/adjustments-taxrate
...
[Adjustments] TaxRate changes
2021-06-17 11:51:01 +02:00
Pau Pérez Fabregat
ef724d2de8
Merge pull request #7758 from jibees/7710-manage-comma-as-decimal-separator-in-unit-value-field
...
[UnitPrice] Manage comma as decimal separator in unit value field
2021-06-17 11:46:22 +02:00
Matt-Yorkley
bb848811e6
Add a delay on sending order confirmation emails
...
There's a race condition here that means the order's address is not always present when the email is first sent, but it *is* present shortly after. The fix in this commit is a temporary solution.
2021-06-17 09:35:25 +01:00
Matt-Yorkley
6ebc6bcd6f
Merge pull request #7797 from luisramos0/bundler
...
Upgrade to bundler 2
2021-06-17 09:18:13 +02:00
dependabot[bot]
9653b0a965
Bump activemerchant from 1.120.0 to 1.121.0
...
Bumps [activemerchant](https://github.com/activemerchant/active_merchant ) from 1.120.0 to 1.121.0.
- [Release notes](https://github.com/activemerchant/active_merchant/releases )
- [Changelog](https://github.com/activemerchant/active_merchant/blob/master/CHANGELOG )
- [Commits](https://github.com/activemerchant/active_merchant/compare/v1.120.0...v1.121.0 )
---
updated-dependencies:
- dependency-name: activemerchant
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-17 00:26:49 +00:00
Andy Brett
aca3a76854
Merge pull request #7793 from openfoodfoundation/dependabot/bundler/ransack-2.4.2
...
Bump ransack from 2.4.1 to 2.4.2
2021-06-16 17:12:17 -07:00
Andy Brett
d38cf1da1f
Merge pull request #7795 from openfoodfoundation/dependabot/bundler/rubocop-1.17.0
...
Bump rubocop from 1.16.1 to 1.17.0
2021-06-16 17:10:48 -07:00
Luis Ramos
a226aedaec
Upgrade to bundler 2
2021-06-16 21:50:01 +01:00
dependabot[bot]
b39ed424f6
Bump rubocop from 1.16.1 to 1.17.0
...
Bumps [rubocop](https://github.com/rubocop/rubocop ) from 1.16.1 to 1.17.0.
- [Release notes](https://github.com/rubocop/rubocop/releases )
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop/rubocop/compare/v1.16.1...v1.17.0 )
---
updated-dependencies:
- dependency-name: rubocop
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-16 05:20:57 +00:00
dependabot[bot]
e4cf6421bd
Bump bigdecimal from 1.4.2 to 3.0.2
...
Bumps [bigdecimal](https://github.com/ruby/bigdecimal ) from 1.4.2 to 3.0.2.
- [Release notes](https://github.com/ruby/bigdecimal/releases )
- [Changelog](https://github.com/ruby/bigdecimal/blob/v3.0.2/CHANGES.md )
- [Commits](https://github.com/ruby/bigdecimal/compare/v1.4.2...v3.0.2 )
---
updated-dependencies:
- dependency-name: bigdecimal
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-16 05:18:50 +00:00
dependabot[bot]
0776fcf5cc
Bump ransack from 2.4.1 to 2.4.2
...
Bumps [ransack](https://github.com/activerecord-hackery/ransack ) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/activerecord-hackery/ransack/releases )
- [Changelog](https://github.com/activerecord-hackery/ransack/blob/master/CHANGELOG.md )
- [Commits](https://github.com/activerecord-hackery/ransack/compare/2.4.1...v2.4.2 )
---
updated-dependencies:
- dependency-name: ransack
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-16 05:17:11 +00:00
Andy Brett
59358443b4
Merge pull request #7786 from andrewpbrett/add-web-console
...
Add web-console gem for debugging in development
2021-06-15 13:10:25 -07:00
Andy Brett
c4911b1947
add web console for debugging in development
2021-06-15 13:00:22 -07:00
dependabot[bot]
6c24d4bc1a
Bump postcss from 7.0.35 to 7.0.36
...
Bumps [postcss](https://github.com/postcss/postcss ) from 7.0.35 to 7.0.36.
- [Release notes](https://github.com/postcss/postcss/releases )
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md )
- [Commits](https://github.com/postcss/postcss/compare/7.0.35...7.0.36 )
---
updated-dependencies:
- dependency-name: postcss
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-15 19:08:24 +00:00
Matt-Yorkley
8753076dcd
Merge pull request #7737 from luisramos0/ruby273
...
Upgrade to ruby 2.7.3
2021-06-15 21:07:38 +02:00
Jean-Baptiste Bellet
7f5e58bcc3
Uncomment flaky (?) spec
2021-06-15 13:51:40 +02:00
Maikel
d839313cf5
Merge pull request #7782 from openfoodfoundation/dependabot/bundler/redis-4.3.1
...
Bump redis from 4.2.5 to 4.3.1
2021-06-15 17:17:59 +10:00
Pau Pérez Fabregat
f51f304818
Merge pull request #7778 from openfoodfoundation/transifex
...
Transifex
2021-06-15 09:12:11 +02:00
Transifex-Openfoodnetwork
7f09fd4c19
Updating translations for config/locales/en_US.yml
2021-06-15 10:23:53 +10:00
Andy Brett
b8617e0a5a
Merge pull request #7783 from openfoodfoundation/dependabot/npm_and_yarn/karma-6.3.4
...
Bump karma from 6.3.3 to 6.3.4
2021-06-14 09:18:55 -07:00
Transifex-Openfoodnetwork
6701afcdce
Updating translations for config/locales/en_GB.yml
2021-06-14 18:10:03 +10:00
dependabot[bot]
fbf0e48a07
Bump karma from 6.3.3 to 6.3.4
...
Bumps [karma](https://github.com/karma-runner/karma ) from 6.3.3 to 6.3.4.
- [Release notes](https://github.com/karma-runner/karma/releases )
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md )
- [Commits](https://github.com/karma-runner/karma/compare/v6.3.3...v6.3.4 )
---
updated-dependencies:
- dependency-name: karma
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-14 06:57:07 +00:00
dependabot[bot]
e4087e9c65
Bump redis from 4.2.5 to 4.3.1
...
Bumps [redis](https://github.com/redis/redis-rb ) from 4.2.5 to 4.3.1.
- [Release notes](https://github.com/redis/redis-rb/releases )
- [Changelog](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md )
- [Commits](https://github.com/redis/redis-rb/compare/v4.2.5...v4.3.1 )
---
updated-dependencies:
- dependency-name: redis
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-14 06:05:07 +00:00
Andy Brett
0eea932778
Merge pull request #7757 from openfoodfoundation/dependabot/bundler/acts-as-taggable-on-8.0.0
...
Bump acts-as-taggable-on from 7.0.0 to 8.0.0
2021-06-11 07:39:57 -07:00
Jean-Baptiste Bellet
db8f8a2675
Create internal methods with regexp test
...
- Make it more easily readable and add unit tests
2021-06-11 10:40:02 +02:00
Transifex-Openfoodnetwork
3ef5953db2
Updating translations for config/locales/en_FR.yml
2021-06-11 18:38:36 +10:00
Transifex-Openfoodnetwork
586c97b22c
Updating translations for config/locales/fr.yml
2021-06-11 18:37:04 +10:00
Transifex-Openfoodnetwork
d54cb9182f
Updating translations for config/locales/ca.yml
2021-06-11 18:19:44 +10:00
Transifex-Openfoodnetwork
3257f16667
Updating translations for config/locales/es.yml
2021-06-11 18:17:41 +10:00
Jean-Baptiste Bellet
178c0a441b
Move unlocalize_currency filter to a PriceParser service
...
- It's no longer a filter but more a service: it's therefore more logic.
2021-06-11 10:01:19 +02:00
Maikel Linke
4faf76794d
Update translations from Transifex
2021-06-11 09:44:47 +10:00
Maikel
56570ec604
Merge pull request #7755 from openfoodfoundation/transifex
...
Transifex
2021-06-11 09:41:22 +10:00
Andy Brett
4047f135f7
Merge pull request #7747 from openfoodfoundation/dependabot/bundler/pdf-reader-2.5.0
...
Bump pdf-reader from 2.4.2 to 2.5.0
2021-06-10 14:49:35 -07:00
Matt-Yorkley
690cbe3ad3
Merge pull request #7468 from mkllnk/6328-tos-tracking
...
6328 tos tracking
2021-06-10 19:48:13 +02:00
Matt-Yorkley
04e76ed506
Merge pull request #7776 from openfoodfoundation/dependabot/npm_and_yarn/ssri-6.0.2
...
Bump ssri from 6.0.1 to 6.0.2
2021-06-10 19:45:00 +02:00
Andy Brett
d22f807084
Merge pull request #7773 from Matt-Yorkley/rspec-retries
...
Set Capybara retry count to 3 and remove conditional
2021-06-10 09:52:50 -07:00
Andy Brett
75440856af
Merge pull request #7770 from openfoodfoundation/dependabot/bundler/rubocop-1.16.1
...
Bump rubocop from 1.16.0 to 1.16.1
2021-06-10 09:51:35 -07:00
dependabot[bot]
c614b92c5f
Bump ssri from 6.0.1 to 6.0.2
...
Bumps [ssri](https://github.com/npm/ssri ) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases )
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md )
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2 )
---
updated-dependencies:
- dependency-name: ssri
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-10 16:51:16 +00:00
Andy Brett
84e3db30f1
Merge pull request #7772 from openfoodfoundation/dependabot/bundler/view_component-2.34.0
...
Bump view_component from 2.33.0 to 2.34.0
2021-06-10 09:50:42 -07:00
Matt-Yorkley
937cede9b8
Fix tax adjustment label
...
:amount is actually a property on the TaxRate object itself that refers to the rate (eg 10% expressed as 0.10), and is not the same as the adjustment amount being passed in to this method (eg: $4.28)
2021-06-10 17:16:45 +01:00
Matt-Yorkley
50b5fc7545
Set Capybara retry count to 3 and remove conditional
...
This is a slippery slope and there's perfectly reasonable arguments against doing this, but on a practical level I think retrying the occasional flaky spec (and adding an extra 10 seconds or so on to the build time) is categorically better than failing the build and having to restart the whole thing (potentially multiple times).
2021-06-10 11:39:05 +01:00
Matt-Yorkley
f36c01abf6
Merge pull request #7765 from mkllnk/7764-heartbeat-job
...
Avoid false alarms due to delayed HeartbeatJob
2021-06-10 11:15:42 +02:00
dependabot[bot]
d259771ce9
Bump view_component from 2.33.0 to 2.34.0
...
Bumps [view_component](https://github.com/github/view_component ) from 2.33.0 to 2.34.0.
- [Release notes](https://github.com/github/view_component/releases )
- [Changelog](https://github.com/github/view_component/blob/main/CHANGELOG.md )
- [Commits](https://github.com/github/view_component/compare/v2.33.0...v2.34.0 )
---
updated-dependencies:
- dependency-name: view_component
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-10 05:11:51 +00:00
dependabot[bot]
9fd0b096bd
Bump rubocop from 1.16.0 to 1.16.1
...
Bumps [rubocop](https://github.com/rubocop/rubocop ) from 1.16.0 to 1.16.1.
- [Release notes](https://github.com/rubocop/rubocop/releases )
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop/rubocop/compare/v1.16.0...v1.16.1 )
---
updated-dependencies:
- dependency-name: rubocop
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-10 05:07:28 +00:00
Transifex-Openfoodnetwork
1bbc765028
Updating translations for config/locales/ru.yml
2021-06-10 05:21:49 +10:00
Transifex-Openfoodnetwork
a232722f64
Updating translations for config/locales/ru.yml
2021-06-10 05:18:45 +10:00
Andy Brett
2c1ffa929c
Merge pull request #7766 from mkllnk/schema
...
Update schema file description
2021-06-09 08:45:06 -07:00
Andy Brett
2b66d270c0
Merge pull request #7704 from coopdevs/drop-master-variant-leftovers
...
Drop product.price from /api/order_cycles/:id/products
2021-06-09 08:20:44 -07:00
Transifex-Openfoodnetwork
0e19232f45
Updating translations for config/locales/ca.yml
2021-06-09 17:22:50 +10:00
Transifex-Openfoodnetwork
f4d9e8e520
Updating translations for config/locales/es.yml
2021-06-09 17:22:39 +10:00
Transifex-Openfoodnetwork
d0041334fa
Updating translations for config/locales/en_FR.yml
2021-06-09 16:42:33 +10:00
Transifex-Openfoodnetwork
3b68d8a94e
Updating translations for config/locales/fr.yml
2021-06-09 16:41:46 +10:00
Maikel Linke
fc8e22b82e
Update schema file description
...
I ran `rake db:migrate` and Rails updated this section. Let's use or we
have to constantly checkout the schema after migrations or we'll have
unrelated changes in future pull requests.
2021-06-09 16:02:05 +10:00
Maikel
6caae9e886
Merge pull request #7694 from coopdevs/split-confirm-order-job
...
Split ConfirmOrderJob to avoid blocking DJ worker
2021-06-09 14:11:10 +10:00
Andy Brett
d145d3a8ec
add create/delete specs for admin and non-admin users
2021-06-09 14:06:55 +10:00
Andy Brett
d4e9c0afdc
spec TOS service object
2021-06-09 14:06:55 +10:00
Andy Brett
e0cdf4ff49
refactor to TOS service
2021-06-09 14:06:54 +10:00
Andy Brett
a4bb697787
add spec for trying to create TOS with no file
2021-06-09 14:06:54 +10:00
Maikel Linke
3e2f81d640
Add helper to view spec needing it
2021-06-09 14:06:54 +10:00
Andy Brett
768c56400c
add TOS helper to application_controller.rb
2021-06-09 14:06:54 +10:00
Maikel Linke
af314cbbdf
Allow fast checkout without re-accepting old terms
...
We did that for the shop's terms already and now do it for the platform
terms as well.
2021-06-09 14:06:54 +10:00
Maikel Linke
17a3d23d68
Handle user clicking upload button early
2021-06-09 14:06:54 +10:00
Maikel Linke
e3be519b25
Style TOS page to be usable
...
It's not pretty but only used by instance managers, very rarely.
2021-06-09 14:06:54 +10:00
Maikel Linke
51ad8f8065
Remove old UI to edit Terms of service
...
It's now completely replaced by file uploads on a separate page.
2021-06-09 14:06:54 +10:00
Maikel Linke
960b829ece
Link to last uploaded Terms of service
2021-06-09 14:06:54 +10:00
Maikel Linke
23999c96bf
Unify all links to platform Terms of service
...
DRY code and have more consistency. We always use "Terms of service" now
and not "Terms of Service" or "Terms and conditions". The latter is used
for the shop's terms, not the platform terms.
2021-06-09 14:06:54 +10:00
Maikel Linke
3b3ba70670
Safeguard deletion of ToS with alert
2021-06-09 14:06:54 +10:00
Maikel Linke
690118c2bd
Add delete method to terms of service files
2021-06-09 14:06:54 +10:00
Maikel Linke
3bee9cb951
Add Rails action #new to ToS
2021-06-09 14:06:54 +10:00
Maikel Linke
abe76ccf0f
Add upload of Terms of Service files
...
Admins can upload files and view the most recent (current) one.
2021-06-09 14:06:54 +10:00
Maikel Linke
ed4f61acd7
Add title to TOS config page
2021-06-09 14:06:53 +10:00
Maikel Linke
007b8cd888
Add new admin page for TOS files
...
Just the basic Rails setup without any functionality yet.
2021-06-09 14:06:53 +10:00
Maikel Linke
1f63bb15eb
Remove executable bit from spec
2021-06-09 14:06:53 +10:00
Maikel Linke
9027f8b604
Add attachment to TOS record
2021-06-09 14:06:53 +10:00
Maikel Linke
c4317c5707
Add model TermsOfServiceFile
...
We want to enable instance managers to upload TOS files.
I also added the rails_helper which is a new convention. It can contain
more Rails specific configuration we currently have in the spec_helper.
2021-06-09 14:06:09 +10:00
Maikel Linke
a0835eae54
Avoid false alarms due to delayed HeartbeatJob
...
When Sidekiq was restarted, the scheduler's time was reset and jobs were
executed later. Now we trigger the HeartbeatJob straight after a Sidekiq
boot and we shouldn't see any false alarms in our monitoring.
2021-06-09 12:05:18 +10:00
Maikel
2556921110
Merge pull request #7718 from openfoodfoundation/dependabot/bundler/sidekiq-scheduler-3.1.0
...
Bump sidekiq-scheduler from 3.0.1 to 3.1.0
2021-06-09 12:03:31 +10:00
Andy Brett
fcbe42f080
Merge pull request #7756 from openfoodfoundation/dependabot/bundler/ddtrace-0.50.0
...
Bump ddtrace from 0.49.0 to 0.50.0
2021-06-08 14:59:22 -07:00
Andy Brett
b6f6407c31
Merge pull request #7660 from jibees/7499-remove-feature-toggle-for-unit-price
...
Remove feature toggle around unit_price
2021-06-08 10:39:32 -07:00
Andy Brett
82ec04552c
Merge pull request #7693 from andrewpbrett/add-password-translation
...
Add translation keys for password messages
2021-06-08 10:35:41 -07:00
Andy Brett
fe62a0a2a7
Merge pull request #7697 from jibees/7689-trigger-a-change-when-hour/minute-inputs-are-modified
...
Datetimepicker for order cycles: add keyup event listener on hour/minute inputs
2021-06-08 10:32:07 -07:00
Andy Brett
ba6ebdee15
Merge pull request #7686 from shen-sat/7470-add-delete-action-test-to-shipping-categories-controller-spec
...
[7470] Add delete action test to ShippingCategoriesController spec
2021-06-08 10:31:26 -07:00
Andy Brett
ede966f2d1
Merge pull request #7640 from apricot12/closed_OC_bheaviour
...
Checkout made to redirect to shop front when OC closed
2021-06-08 10:30:13 -07:00
Andy Brett
74d93e324c
Merge pull request #7661 from romale/products_import_date_translation
...
Missed import_date translation key
2021-06-08 10:26:13 -07:00
Andy Brett
37b3f7aa3f
Merge pull request #7743 from openfoodfoundation/dependabot/bundler/test-unit-3.4.4
...
Bump test-unit from 3.4.2 to 3.4.4
2021-06-08 10:05:01 -07:00
Nihal Mohammed
3b4baab01a
Remove unused _paypal_complete partial
2021-06-08 16:31:26 +05:30
Matt-Yorkley
9921e9c72b
Merge pull request #7754 from Matt-Yorkley/stripe-issues
...
Stripe 3DS issues
2021-06-08 11:33:54 +02:00
Nihal Mohammed
4476d7f69e
Disable credit button on click
2021-06-08 14:41:25 +05:30
Jean-Baptiste Bellet
6cf0c73453
Use our unlocalizeCurrencyFilter to parse unit value field
...
- More tolerant (can handle `,` or `.` as decimal separator, remove thousands separator) to return a `number`
2021-06-08 10:55:43 +02:00
Jean-Baptiste Bellet
d3c2158121
Handle comma as decimal separator in the unit value field
...
- Add comma as a decimal separator in the regexp
- Do not use parseFloat but our `unlocalizeCurrencyFilter` which is more tolerant
2021-06-08 09:51:30 +02:00
Jean-Baptiste Bellet
0cb2739139
Handle case when price is not a number
...
And return a `null` if so.
2021-06-08 09:46:24 +02:00
dependabot[bot]
0cca01345c
Bump acts-as-taggable-on from 7.0.0 to 8.0.0
...
Bumps [acts-as-taggable-on](https://github.com/mbleigh/acts-as-taggable-on ) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/mbleigh/acts-as-taggable-on/releases )
- [Changelog](https://github.com/mbleigh/acts-as-taggable-on/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mbleigh/acts-as-taggable-on/compare/v7.0.0...v8.0.0 )
---
updated-dependencies:
- dependency-name: acts-as-taggable-on
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-08 05:12:23 +00:00
dependabot[bot]
6edb80ea29
Bump ddtrace from 0.49.0 to 0.50.0
...
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb ) from 0.49.0 to 0.50.0.
- [Release notes](https://github.com/DataDog/dd-trace-rb/releases )
- [Changelog](https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md )
- [Commits](https://github.com/DataDog/dd-trace-rb/compare/v0.49.0...v0.50.0 )
---
updated-dependencies:
- dependency-name: ddtrace
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-08 05:10:49 +00:00
Matt-Yorkley
15b386bce3
Set :execute_threed option to explicitly handle 3DS responses
2021-06-07 22:48:54 +01:00
Transifex-Openfoodnetwork
225edbf745
Updating translations for config/locales/fr_CA.yml
2021-06-08 07:13:36 +10:00
Transifex-Openfoodnetwork
e8fb5d39a1
Updating translations for config/locales/en_CA.yml
2021-06-08 06:39:23 +10:00
Matt-Yorkley
3544b7de7a
Remove Stripe Decorator
...
The method being overridden here is the same in the upstream
2021-06-07 20:44:58 +01:00
Jean-Baptiste Bellet
e3f56556cf
Remove feature toggle around unit_price and enable it
2021-06-07 20:53:45 +02:00
Matt-Yorkley
8e0a84a502
Merge pull request #7729 from Matt-Yorkley/delayed-cleanup
...
Delayed::Cleanup
2021-06-07 19:11:37 +02:00
Jean-Baptiste Bellet
3ebba9502a
Handle more cases with decimal/thousands separator
...
- ',' or '.' can be used as decimal separator (defined in the application configuration)
- Remove thousands separator if it's detected as so (use regexp to match)
2021-06-07 16:53:20 +02:00
Nihal Mohammed
a5190ec5d7
Remove refund button from paypal completed order tab
2021-06-07 16:07:31 +05:30
dependabot[bot]
90f1e3a80d
Bump pdf-reader from 2.4.2 to 2.5.0
...
Bumps [pdf-reader](https://github.com/yob/pdf-reader ) from 2.4.2 to 2.5.0.
- [Release notes](https://github.com/yob/pdf-reader/releases )
- [Changelog](https://github.com/yob/pdf-reader/blob/main/CHANGELOG )
- [Commits](https://github.com/yob/pdf-reader/compare/v2.4.2...v2.5.0 )
---
updated-dependencies:
- dependency-name: pdf-reader
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-07 05:42:29 +00:00
Matt-Yorkley
5bfe079262
Update Xero Invoices test setup
...
Uses the new format of enterprise fee taxes
2021-06-06 20:20:41 +01:00
Matt-Yorkley
7b641ace23
Update Xero Invoices scopes for taxable fees
...
Taxable enterprise fee adjustments now have a tax_category
2021-06-06 20:20:41 +01:00
Matt-Yorkley
7bcb0bcaa8
Eager-load the adjustment's adjustable
...
Reduces the total migration time by ~15%. Requires including some more models, as order objects are now being eager-loaded as part of the polymorphic associations.
2021-06-06 20:20:41 +01:00
Matt-Yorkley
7ecd67a3fe
Skip orphaned adjustments
...
There are a handful of enterprise fee adjustments on line items in production data where the line item has actually been deleted and no longer exists, but the fee adjustment is still in the database.
2021-06-06 20:20:41 +01:00
Matt-Yorkley
d9f459d94a
Update db/migrate/20210406161242_migrate_enterprise_fee_tax_amounts.rb
...
Co-authored-by: Maikel <maikel@email.org.au >
2021-06-06 20:20:41 +01:00
Matt-Yorkley
76756923ba
Use non-legacy-tax example in paypal items spec
2021-06-06 20:20:41 +01:00
Matt-Yorkley
401dd99225
Update stubbing of default country id in TaxRate tests
2021-06-06 20:20:41 +01:00
Matt-Yorkley
e21ef3f182
Add test coverage to #create_tax_charge! with legacy taxes
2021-06-06 20:20:41 +01:00
Matt-Yorkley
9e1d8ab369
Introduce legacy tax handing in Order::Updater whenever order totals change
...
This will remove legacy tax adjustments, recalculate any relevant taxes for items in the order and re-apply them in non-legacy tax adjustments
2021-06-06 20:20:41 +01:00
Matt-Yorkley
00988dc1e7
Use :order_with_totals factory in payments controller spec
...
This factory makes an order that actually has a line item 👍
2021-06-06 20:20:41 +01:00
Matt-Yorkley
7007de752d
Update BulkLineItemsController spec now that taxes on enterprise fees are updated correctly
...
Tax on fees previously stayed the same unless the fees were deleted recreated from scratch, instead of updating when the fee amounts changed
2021-06-06 20:20:41 +01:00
Matt-Yorkley
832fbb7d5d
Update data migration model definitions
...
The good_migrations gem was not working with polymorphic associations.
2021-06-06 20:18:05 +01:00
Matt-Yorkley
dc7c674a0e
Switch to ApplicationRecord in migation spec
...
Fixes:
An error occurred while loading ./spec/migrations/migrate_enterprise_fee_tax_amounts_spec.rb.
Failure/Error: require_relative '../../db/migrate/20210406161242_migrate_enterprise_fee_tax_amounts'
TypeError:
superclass mismatch for class Adjustment
# ./db/migrate/20210406161242_migrate_enterprise_fee_tax_amounts.rb:2:in `<class:MigrateEnterpriseFeeTaxAmounts>'
# ./db/migrate/20210406161242_migrate_enterprise_fee_tax_amounts.rb:1:in `<top (required)>'
# ./spec/migrations/migrate_enterprise_fee_tax_amounts_spec.rb:4:in `require_relative'
# ./spec/migrations/migrate_enterprise_fee_tax_amounts_spec.rb:4:in `<top (required)>'
# -e:1:in `<main>'
2021-06-06 20:18:05 +01:00
Matt-Yorkley
bfea47802e
Move fee tax call outside of lock and simplify order updating
2021-06-06 20:18:05 +01:00
Matt-Yorkley
28ebb303af
Simplify order interface
2021-06-06 20:17:03 +01:00
Matt-Yorkley
f20cf509d3
Add missing Spree translation
2021-06-06 20:17:03 +01:00
Matt-Yorkley
3f9a3b41da
Refactor and improve EnterpriseFeeApplicator spec
2021-06-06 20:17:03 +01:00
Matt-Yorkley
38811b5a28
Add Bugsnag message if legacy taxes are used
2021-06-06 20:17:03 +01:00
Matt-Yorkley
f791f6fa20
Add test coverage to recalculating fees and taxes on completed orders
2021-06-06 20:17:03 +01:00
Matt-Yorkley
c84f9e56fb
Tax enterprise fee adjustments when calling #recreate_all_fees!
2021-06-06 20:17:03 +01:00
Matt-Yorkley
355837547e
Add test coverage for legacy additional taxes in OrderTaxAdjustmentsFetcher
...
OrderTaxAdjustmentsFetcher is used in various places to display the taxes on an order. This test validates that legacy taxes are still returned and displayed as normal.
2021-06-06 20:16:03 +01:00
Matt-Yorkley
0f5c39317a
Re-apply taxes in Admin::OrdersController#update
...
Ensures taxes are updated properly when hitting the "Update and Recalculate Fees" button on the order edit page.
2021-06-06 20:16:03 +01:00
Matt-Yorkley
43877f4e34
Add unit tests for data migration
2021-06-06 20:16:03 +01:00
Matt-Yorkley
b427fd6876
Add data migration for enterprise fee tax amounts
2021-06-06 20:16:03 +01:00
Matt-Yorkley
a31487a86d
Clear any legacy taxes when applying tax to an order
...
#create_tax_charge! adds tax (adjustments) to all taxable items on an order. If an order order has legacy taxes (lump-sum tax adjustments on the order object), we remove them here before re-applying taxes (using the new setup).
2021-06-06 20:16:03 +01:00
Matt-Yorkley
84a40e6ae0
Improve Order#enterpise_fee_tax
2021-06-06 20:16:03 +01:00
Matt-Yorkley
19f32b7825
Update checkout tax display test setup
2021-06-06 20:16:03 +01:00
Matt-Yorkley
93e422ec59
Update order fee tax test setup
2021-06-06 20:16:03 +01:00
Matt-Yorkley
6e9ae0b0db
Update tax totals calculation in Order::Updater
...
Line items, shipments, and fees now all have taxes recorded in a uniform way, so we can drop more complexity here (and the number of queries).
2021-06-06 20:16:03 +01:00
Matt-Yorkley
a1438bdb3d
Update enterprise fee tax adjustment specs
2021-06-06 20:16:03 +01:00
Matt-Yorkley
510f74f654
Update OrderTaxAdjustmentsFetcher
...
Taxes on Enterprise Fees are now recorded in proper tax adjustments, so they don't need special treatment.
2021-06-06 20:16:03 +01:00
Matt-Yorkley
52452f7939
Update default tax calculator
...
Line items, shipments and fees can now all be calculated in the same way when applying tax.
2021-06-06 20:16:03 +01:00
Matt-Yorkley
b3240f859a
Add tax category id to adjustments
2021-06-06 20:16:03 +01:00
Matt-Yorkley
2de442f44d
Move taxing of enterprise fees to TaxRate
2021-06-06 20:16:03 +01:00
Matt-Yorkley
c2211c501d
Improve test setup in Xero Invoices spec
2021-06-06 20:16:03 +01:00
Matt-Yorkley
6c340f8ed4
Update SalesTax test setup
2021-06-06 20:16:03 +01:00
Matt-Yorkley
a22cc96ea5
Simplify DefaultTax calculator
...
This logic is handled in TaxRate and doesn't need to be duplicated here.
2021-06-06 20:16:03 +01:00
Matt-Yorkley
8c9733d8da
Remove included tax check from CalculatedAdjustments
...
This is handled in TaxRate now.
2021-06-06 20:16:03 +01:00
Matt-Yorkley
ff9ad96b74
Update TaxRate specs
2021-06-06 20:16:03 +01:00
Matt-Yorkley
8479d4ff7c
Update outdated calls to TaxRate#adjust in specs
2021-06-06 20:16:03 +01:00
Matt-Yorkley
d450aff607
Update Order#create_tax_charge!
...
TaxRate#adjust now handles individual items instead of the whole order 🎉 We can use this elsewhere too, for example to re-apply taxes on a single line item, we can do: Spree::TaxRate.adjust(order, [line_item])
2021-06-06 20:16:03 +01:00
Matt-Yorkley
1c28b9783f
Bring in Spree::TaxRate test coverage
2021-06-06 20:16:03 +01:00
Matt-Yorkley
f92c082df8
Refactor tax adjustment create_label method
2021-06-06 20:16:03 +01:00
Matt-Yorkley
d69f714032
Bring in changes to TaxRate#adjust
2021-06-06 20:16:03 +01:00
Matt-Yorkley
50d0952dd5
Bring in TaxRate#potentially_applicable method and add eager-loading
2021-06-06 20:16:03 +01:00
Matt-Yorkley
82e38b0156
Merge pull request #7623 from Matt-Yorkley/order-contents
...
Use OrderContents to update line items
2021-06-05 17:11:45 +02:00
Luis Ramos
5453a1c0fa
Adapt importer error to new ruby version 2.7
2021-06-04 22:42:27 +01:00
Luis Ramos
18231cd950
Adding bigdecimal to avoid errors with BigDecimal
...
v1.4.2 is the version that works for us, see here for more details: https://github.com/ruby/bigdecimal/issues/127
2021-06-04 22:42:27 +01:00
Luis Ramos
5629dfbe09
Fix warning: deprecated Object#=~ is called
2021-06-04 22:42:27 +01:00
Luis Ramos
21b80db0ee
Fix json v1.8.6 common.rb warning
...
Using this patch https://github.com/flori/json/issues/399#issuecomment-734863279
We can upgrade to json v2 but to do that we need to switch from aws-sdk-v1 to aws-sdk-s3 first
2021-06-04 22:42:27 +01:00
Luis Ramos
c22799bda1
Replace gsub! with gsub so that strings are not modified
2021-06-04 22:42:22 +01:00
Luis Ramos
2b187c0547
Upgrade to ruby 2.7.3
2021-06-04 22:29:49 +01:00
Andy Brett
640aa11f3b
Merge pull request #7744 from luisramos0/byebug
...
Move byebug to test gem group so we can use it in specs
2021-06-04 13:17:43 -07:00
Luis Ramos
b939a292df
Move byebug to test gem group so we can use it in specs
2021-06-04 20:59:50 +01:00
Matt-Yorkley
099ef5d358
Add more explicit tests on updating shipping fees in Api::ShipmentsController
2021-06-04 18:19:27 +01:00
dependabot[bot]
6de0682439
Bump test-unit from 3.4.2 to 3.4.4
...
Bumps [test-unit](https://github.com/test-unit/test-unit ) from 3.4.2 to 3.4.4.
- [Release notes](https://github.com/test-unit/test-unit/releases )
- [Commits](https://github.com/test-unit/test-unit/compare/3.4.2...3.4.4 )
---
updated-dependencies:
- dependency-name: test-unit
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-04 16:57:41 +00:00
Matt-Yorkley
efcf71fd2b
Use OrderContents in cart spec test setups
2021-06-04 17:26:49 +01:00
Matt-Yorkley
acf7c0c4d8
Use :order_with_totals factory in CustomersController spec
2021-06-04 17:10:50 +01:00
Matt-Yorkley
443b180f32
Update order totals in :order_with_totals factory
2021-06-04 17:10:50 +01:00
Matt-Yorkley
3222d4980d
Improve comment on #ensure_updated_shipments
2021-06-04 17:10:50 +01:00
Matt-Yorkley
e246eed99d
Move #restart_chceckout_flow out of Order class
2021-06-04 17:10:50 +01:00
Matt-Yorkley
b69d61dd77
Remove #order_update! call from method used in order after_save callbacks
...
This method gets called twice every time we save a completed order, calling order_update! twice...
2021-06-04 17:10:50 +01:00
Matt-Yorkley
2d76c2730a
Update shipment updating
2021-06-04 17:10:50 +01:00
Matt-Yorkley
6b364dc420
Update specs on shipping fee changes and mark as pending
...
The shipping fee and it's tax actually don't get updated correctly here (in master).
2021-06-04 17:10:50 +01:00
Matt-Yorkley
d5b20d5446
Add specs for Order#ensure_updated_shipments
2021-06-04 17:10:50 +01:00
Matt-Yorkley
05c001807e
Add variant override specs for Stock::AvailabilityValidator
2021-06-04 17:10:50 +01:00
Matt-Yorkley
011da05712
Add more test coverage to OrderContents
2021-06-04 17:10:50 +01:00
Matt-Yorkley
2e96982e60
Refactor conditional
...
CartService#populate already returns the value of the #valid? method by default.
2021-06-04 17:10:50 +01:00
Matt-Yorkley
6abe0b375c
Refactor stock levels check in CartController
2021-06-04 17:10:50 +01:00
Matt-Yorkley
dc6be6f06b
Don't resubmit the whole cart contents for no reason.
...
There's a couple of places where this was causing a cart update submission where it wasn't needed, eg the items had not actually changed. The conditional here was designed to stop that from happening, but it was actually passing every time (the conditional logic was not actually catching the case it was supposed to).
This is really expensive!
2021-06-04 17:10:50 +01:00
Matt-Yorkley
47e2976fd1
Update CartService specs
2021-06-04 17:10:50 +01:00
Matt-Yorkley
38ce9eb0c4
Update line item removal in CartService when the line item doesn't exist
2021-06-04 17:10:50 +01:00
Matt-Yorkley
3b52b173e8
Delete more dead code in CartService
2021-06-04 17:10:50 +01:00
Matt-Yorkley
b8ccee5f30
Simplify use of #to_i in variant data hash
2021-06-04 17:10:50 +01:00
Matt-Yorkley
0cfe7fdc45
Move required logic into OrderContents and improve spec
2021-06-04 17:10:50 +01:00
Matt-Yorkley
42ff2307fa
Update specs that use removed #add_variant and #remove_variant methods in test setup
2021-06-04 17:10:50 +01:00
Matt-Yorkley
b25e7fcb89
Delete tests for removed Order #add_variant and #remove_variant methods
2021-06-04 17:10:50 +01:00
Matt-Yorkley
79aebed40e
Bring OrderContents#update_cart tests from upstream and tidy up
2021-06-04 17:10:50 +01:00
Matt-Yorkley
f5c08baabb
Use OrderContents in LineItemsController and move enterprise fee updating logic
2021-06-04 17:10:50 +01:00
Matt-Yorkley
a883b2cf63
Remove dead code CartService#cart_remove
2021-06-04 17:10:50 +01:00
Matt-Yorkley
398d4b2612
Tidy up public interface of CartService
...
We don't need this extra hash to be passed around
2021-06-04 17:10:50 +01:00
Matt-Yorkley
4a7c0e8297
Remove variant early if we're deleting them and they're already loaded
2021-06-04 17:10:50 +01:00
Matt-Yorkley
67df6728f6
Fix Order line items association definition
...
Populating the cart was throwing an "Association Mismatch" error D:
2021-06-04 17:10:50 +01:00
Matt-Yorkley
0178cd7530
Adapt OrderContents to allow use with frontend cart service and updating :max_quantity
...
The cart service and it's surrounding logic is a bit messy, as it jumps through hoops to add extra logic for the :max_quantity attribute used with the "group buy" feature.
This is the last bit of code where an order's line items could be changed where we were not using OrderContents.
2021-06-04 17:10:50 +01:00
Matt-Yorkley
cb92231835
Clarify behavior via variable names
...
This is a small semantic thing to clarify that we're not adding to / incrementing the quantity here, we're setting it to the given value. In other places where we change line items on an order we are actually adding the given value to the existing quantity.
2021-06-04 17:10:50 +01:00
Matt-Yorkley
6e8fd3c3f8
Simplify CartService interface
...
There's only one place this method is called, and the "overwrite" argument is always explicitly true. It doesn't need to be there if it's mandatory.
2021-06-04 17:10:50 +01:00
Matt-Yorkley
6451ef173c
Use OrderContents when removing line items with soft-deleted variants in CartService
2021-06-04 17:10:50 +01:00
Matt-Yorkley
7af5e8931f
Adapt OrderContents for use with BulkLineItemsController#update
2021-06-04 17:10:50 +01:00
Matt-Yorkley
9045cc7d65
Use OrderContents in CartService for removing line items from cart
2021-06-04 17:10:50 +01:00
Matt-Yorkley
5ff8436c1a
Adapt OrderContents#remove to allow deleting line item without passing a quantity
2021-06-04 17:10:50 +01:00
Matt-Yorkley
a5ccaf9595
Remove unnecessary code in BulkLineItemsController
...
This method isn't called from anywhere else
2021-06-04 17:10:50 +01:00
Matt-Yorkley
423c140670
Remove pointless currency code in Order and CartService
...
The currency will always be the currency of the variant, there's no need to pass this value around.
2021-06-04 17:10:50 +01:00
Matt-Yorkley
e8ef183623
Delete dead code Order#set_variant_attributes
2021-06-04 17:10:50 +01:00
Matt-Yorkley
000e2c07f8
Use OrderContents in OrdersController
2021-06-04 17:10:50 +01:00
Matt-Yorkley
c1c69b00b4
Update order explicitly in OrderSyncer
2021-06-04 17:10:50 +01:00
Matt-Yorkley
d5edf03042
Update reports_spec test setup
2021-06-04 17:10:50 +01:00
Matt-Yorkley
305ac037fe
Use OrderContents in customers controller spec
2021-06-04 17:10:50 +01:00
Matt-Yorkley
23910dbab4
Use OrderContents in BulkLineItemsController
...
We should move towards *all* operations on an order's line items being done exclusively through this service.
2021-06-04 17:10:50 +01:00
Matt-Yorkley
632f4228f0
Bring in line item fetching refactor
2021-06-04 17:10:50 +01:00
Matt-Yorkley
1268cb565c
Extract method
2021-06-04 17:10:50 +01:00
Matt-Yorkley
c55e47f6af
Remove superfluous updates in OrderFeesHandler
2021-06-04 17:10:50 +01:00
Matt-Yorkley
03fc63ad14
Remove #order_update! from line item after_save callback
2021-06-04 17:10:50 +01:00
Matt-Yorkley
a124141537
Move Shipment#line_items to private
2021-06-04 17:10:50 +01:00
Matt-Yorkley
0fabb5bc2f
Don't pluck variant_ids multiple times (once for each line item)
2021-06-04 17:10:50 +01:00
Matt-Yorkley
1fff81c214
Remove call to OrderInventory#verify
...
This already gets called in after_save and after_destroy in Spree::LineItem.
2021-06-04 17:10:50 +01:00
Matt-Yorkley
67264c047f
Delete dead code #editable_by?
...
This is junk Spree code from 2010. 11 years old! The method that previous called this was removed long ago...
2021-06-04 17:10:50 +01:00
Matt-Yorkley
34eaf6f0f2
DRY shipment updating
2021-06-04 17:10:50 +01:00
Matt-Yorkley
8405a7672d
Bring in shipment updating
2021-06-04 17:10:50 +01:00
Matt-Yorkley
66a3246a23
Move order updating
2021-06-04 17:10:50 +01:00
Matt-Yorkley
34482f6710
Bring OrderContents#update_cart from Spree 2.2
2021-06-04 17:10:50 +01:00
Matt-Yorkley
f550d1e9f3
Bring Order#ensure_updated_shipments from Spree 2.2
2021-06-04 17:10:50 +01:00
Matt-Yorkley
d99e598e7a
Delete dead code in CartController
...
The two conditionals in #populate_variant_attributes here are never actually true, so the subsequent code paths are never reached.
2021-06-04 17:10:50 +01:00
Matt-Yorkley
eb59b691d8
Move hash parsing outside of order lock
2021-06-04 17:10:50 +01:00
Matt-Yorkley
d5d76d9b9a
Move private controller methods to private
2021-06-04 17:10:50 +01:00
Andy Brett
3c933befbb
Merge pull request #7607 from luisramos0/rails6_select2_upgrade
...
[Rails 6.1] Upgrade thor
2021-06-04 07:45:47 -07:00
Andy Brett
fc4a40ec8b
Merge pull request #7668 from openfoodfoundation/dependabot/bundler/stripe-5.33.0
...
Bump stripe from 5.32.1 to 5.33.0
2021-06-04 07:45:02 -07:00
Andy Brett
d197b81351
Merge pull request #7606 from luisramos0/deprecation
...
[Rails 6.1] Fix deprecation warning in rails 6.0
2021-06-04 07:42:50 -07:00
Andy Brett
b1f619a90a
Merge pull request #7715 from openfoodfoundation/dependabot/bundler/activemerchant-1.120.0
...
Bump activemerchant from 1.119.0 to 1.120.0
2021-06-04 07:40:24 -07:00
Andy Brett
f70c1f0644
Merge pull request #7611 from luisramos0/rails61_arel
...
[Rails 6.1] Adapt code to circunvent security constraint on rails 6.1
2021-06-04 07:36:23 -07:00
Andy Brett
b23530be4c
Merge pull request #7736 from Matt-Yorkley/ssl-in-dev
...
Remove Spree::Config[:allow_ssl_in_development_and_test]
2021-06-04 07:21:05 -07:00
dependabot[bot]
1fe74c9690
Bump activemerchant from 1.119.0 to 1.120.0
...
Bumps [activemerchant](https://github.com/activemerchant/active_merchant ) from 1.119.0 to 1.120.0.
- [Release notes](https://github.com/activemerchant/active_merchant/releases )
- [Changelog](https://github.com/activemerchant/active_merchant/blob/master/CHANGELOG )
- [Commits](https://github.com/activemerchant/active_merchant/compare/v1.119.0...v1.120.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-04 14:20:09 +00:00
Andy Brett
5d39155519
Merge pull request #7739 from openfoodfoundation/dependabot/bundler/rails-6.0.3.7
...
Bump rails from 6.0.3.6 to 6.0.3.7
2021-06-04 07:18:59 -07:00
Pau Perez
dfe83e5c51
Do not return master variant in api/ocs/products
...
`product.master` seems to always be `null` on
/api/v0/order_cycles/:id/products JSON response. That's because the
first of the underlying AR relation,
`order_cycle.variants_distributed_by(distributor)`, does not include
master variants. They are not in OC exchanges.
2021-06-04 12:10:52 +02:00
Pau Perez
e7166ba5d4
Drop product.price from /api/ocs/:id/products
...
Its serializer it's only used by this endpoint and
app/assets/javascripts/templates/shop_variant.html.haml doesn't rely on
the response's product.price but the variant's price.
Because our DB schema allows NULL on spree_prices.amount, a master
variant without a price can cause the shopfront not to load products.
This was the case in
https://app.bugsnag.com/yaycode/openfoodnetwork-uk/errors/60adfcc31cf9740007f82fc9 .
2021-06-04 12:10:52 +02:00
dependabot[bot]
b6c9d4d6a9
Bump rails from 6.0.3.6 to 6.0.3.7
...
Bumps [rails](https://github.com/rails/rails ) from 6.0.3.6 to 6.0.3.7.
- [Release notes](https://github.com/rails/rails/releases )
- [Commits](https://github.com/rails/rails/compare/v6.0.3.6...v6.0.3.7 )
---
updated-dependencies:
- dependency-name: rails
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-04 05:30:32 +00:00
Maikel
0c92a594f4
Merge pull request #7717 from coopdevs/fix-docker-jemalloc-sidekiq
...
Fix docker Jemalloc + Sidekiq setup
2021-06-04 13:16:53 +10:00
Maikel
4dacdb180f
Merge pull request #7617 from luisramos0/layout61
...
[Rails 6.1] Make admin layout path relative
2021-06-04 12:26:40 +10:00
Andy Brett
c1ad4243bb
Update all locales with the latest Transifex translations
2021-06-03 18:21:21 -07:00
Luis Ramos
66934af579
Upgrade to thor v1
2021-06-03 20:54:55 +01:00
Andy Brett
9f3ddfc88b
Merge pull request #7735 from Matt-Yorkley/bootsnap-reloaded
...
Add bootsnap gem (again)
2021-06-03 12:54:22 -07:00
Luis Ramos
466f7030c6
Depend on select2-rails without the thor v0.14 requirement
2021-06-03 20:54:07 +01:00
Matt-Yorkley
7d38bec26d
Remove Spree::Config[:allow_ssl_in_development_and_test]
...
Unconditionally disables forced https-redirects in dev and test
2021-06-03 20:52:09 +01:00
Matt-Yorkley
67d7d225cc
Add bootsnap gem
2021-06-03 19:03:18 +01:00
Andy Brett
24edad15ae
Merge pull request #7727 from openfoodfoundation/dependabot/bundler/view_component-2.33.0
...
Bump view_component from 2.32.0 to 2.33.0
2021-06-03 09:57:36 -07:00
Andy Brett
6d56a0791f
Merge pull request #7728 from Matt-Yorkley/papertrail-deprecation
...
Remove papertrail initializer
2021-06-03 09:52:56 -07:00
dependabot[bot]
cd1d77c572
Bump view_component from 2.32.0 to 2.33.0
...
Bumps [view_component](https://github.com/github/view_component ) from 2.32.0 to 2.33.0.
- [Release notes](https://github.com/github/view_component/releases )
- [Changelog](https://github.com/github/view_component/blob/main/CHANGELOG.md )
- [Commits](https://github.com/github/view_component/compare/v2.32.0...v2.33.0 )
---
updated-dependencies:
- dependency-name: view_component
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-03 16:43:45 +00:00
dependabot[bot]
69690f1e37
Bump stripe from 5.30.0 to 5.33.0
...
Bumps [stripe](https://github.com/stripe/stripe-ruby ) from 5.30.0 to 5.33.0.
- [Release notes](https://github.com/stripe/stripe-ruby/releases )
- [Changelog](https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md )
- [Commits](https://github.com/stripe/stripe-ruby/compare/v5.30.0...v5.33.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-03 16:43:38 +00:00
Andy Brett
2dddd625a1
Merge pull request #7554 from luisramos0/rails6
...
[Rails 6.0] Upgrade to rails 6.0
2021-06-03 09:42:33 -07:00
Matt-Yorkley
d66b6f7192
Fix InvoicesController spec and change from pending to active
2021-06-03 12:51:15 +01:00
Matt-Yorkley
ba592c1ca3
Switch JobLogger to using the default Rails logger
...
Logging in background jobs with Sidekiq all ultimately get sent to STDOUT now anyway, which is redirected to `/log/sidekiq.log` via the Sidekiq systemd service.
2021-06-03 12:48:18 +01:00
Matt-Yorkley
0ede0acc6a
Remove DelayedJob references
2021-06-03 12:45:23 +01:00
Matt-Yorkley
5b676e8f93
Remove papertrail initializer
...
This setting is now deprecated and triggers this message:
Association Tracking for PaperTrail has been extracted to a separate gem. To use it, please add `paper_trail-association_tracking` to your Gemfile. If you don't use it (most people don't, that's the default) and you set `track_associations = false` somewhere (probably a rails initializer) you can remove that line now.
2021-06-03 11:33:33 +01:00
Pau Perez
5d91f5f398
Document Redis as a requirement
2021-06-03 10:11:05 +02:00
Pau Pérez Fabregat
62959cc883
Merge pull request #7724 from openfoodfoundation/transifex
...
Transifex
2021-06-03 09:34:51 +02:00
Andy Brett
bab4b404f4
Merge pull request #7722 from openfoodfoundation/dependabot/npm_and_yarn/karma-6.3.3
...
Bump karma from 6.3.2 to 6.3.3
2021-06-02 15:01:46 -07:00
Andy Brett
5ecd24d66a
Merge pull request #7721 from openfoodfoundation/dependabot/bundler/rubocop-1.16.0
...
Bump rubocop from 1.15.0 to 1.16.0
2021-06-02 15:00:55 -07:00
Transifex-Openfoodnetwork
db373a826b
Updating translations for config/locales/en_IE.yml
2021-06-03 02:38:20 +10:00
Shen
80ae211b72
Use correct syntax for change matcher in spec/controllers/spree/admin/shipping_categories_controller_spec.rb
...
Co-authored-by: Maikel <maikel@email.org.au >
2021-06-02 13:17:49 +01:00
Shen Sat
99a4be134b
Add delete action test to ShippingCategoriesController spec
2021-06-02 13:17:49 +01:00
dependabot[bot]
1ddfd2a4f7
Bump karma from 6.3.2 to 6.3.3
...
Bumps [karma](https://github.com/karma-runner/karma ) from 6.3.2 to 6.3.3.
- [Release notes](https://github.com/karma-runner/karma/releases )
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md )
- [Commits](https://github.com/karma-runner/karma/compare/v6.3.2...v6.3.3 )
---
updated-dependencies:
- dependency-name: karma
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-02 05:32:51 +00:00
dependabot[bot]
d972f6e041
Bump rubocop from 1.15.0 to 1.16.0
...
Bumps [rubocop](https://github.com/rubocop/rubocop ) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/rubocop/rubocop/releases )
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop/rubocop/compare/v1.15.0...v1.16.0 )
---
updated-dependencies:
- dependency-name: rubocop
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-02 05:12:04 +00:00
Luis Ramos
cf756c5774
Added action cable to gemfile by running bundle install
...
After rebase Action cable was missing from Gemfile.lock
2021-06-01 22:34:04 +01:00
Luis Ramos
4252bd0bb1
For some reason report helper is not available on this view now, so we call Spree::Money directly
2021-06-01 22:34:04 +01:00
Luis Ramos
cb6e626193
Remove require rails/all, this is already done in application.rb where we are loading only the rails modules we need
2021-06-01 22:34:04 +01:00
Andy Brett
77c384633b
specify payment intent ID in stripe stub
2021-06-01 22:34:04 +01:00
Luis Ramos
64de303b59
Move compass-rails back to 4.0
...
This must have been a mistake when managing initial conflicts in rails6 branch
2021-06-01 22:34:04 +01:00
Matt-Yorkley
88cae21ab4
Disable currently unused modules and add notes
...
We should migrate to ActiveStorage soon, but we're not using it yet. ActionText is cool but we also don't currently use it. ActionMailbox is not something we need at all.
2021-06-01 22:34:04 +01:00
Matt-Yorkley
66e4986944
Bring modules list from rails/all to application.rb
...
This is the default list in Rails 6.0
2021-06-01 22:34:04 +01:00
Andy Brett
b3e08b47b9
set Stripe api key directly instead of using allow
2021-06-01 22:33:12 +01:00
Luis Ramos
85508f45b4
Replace be_success on test_reponse with status 200
...
In rails 6 response.success? is not supported.
2021-06-01 22:33:12 +01:00
Luis Ramos
f07cc32be0
Remove authorization token from stripe stubs
2021-06-01 22:33:12 +01:00
Luis Ramos
2c43522bf9
change devise config to use secret_key_Base instead of secret_token as pepper
2021-06-01 22:33:12 +01:00
Luis Ramos
adf35f8e18
Fix sass-rails compass-rails compatibility problem
2021-06-01 22:33:12 +01:00
Luis Ramos
04ff4fa47c
Update to rails 6.0 and resolve Gemfile conflicts
2021-06-01 22:33:12 +01:00
Matt-Yorkley
0d30e3359f
Merge pull request #7081 from openfoodfoundation/dependabot/bundler/database_cleaner-2.0.1
...
Bump database_cleaner from 1.99.0 to 2.0.1
2021-06-01 21:59:27 +02:00
Matt-Yorkley
30e2be13f0
Update spec/lib/open_food_network/i18n_config_spec.rb
2021-06-01 18:50:04 +01:00
Luis Ramos
dc1cdf4254
Add required DB cleaner setup code
2021-06-01 18:50:04 +01:00
dependabot[bot]
c4bd9208ce
Bump database_cleaner from 1.99.0 to 2.0.1
...
Bumps [database_cleaner](https://github.com/DatabaseCleaner/database_cleaner ) from 1.99.0 to 2.0.1.
- [Release notes](https://github.com/DatabaseCleaner/database_cleaner/releases )
- [Changelog](https://github.com/DatabaseCleaner/database_cleaner/blob/main/History.rdoc )
- [Commits](https://github.com/DatabaseCleaner/database_cleaner/compare/v1.99.0...v2.0.1 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-01 18:50:04 +01:00
Jean-Baptiste Bellet
60f3ebca62
Check whether the changes made by the keyboard are taken into account in datetimepicker
...
- User can change minute directly with keyboard, and without closing the datetimepicker, the modification should be catch and then a label "You have unsaved changes" with the "Save changes" button should appear
2021-06-01 12:05:03 +02:00
Jean-Baptiste Bellet
0db7df6c14
Add keyup event listener on hour/minute inputs
...
- To set the date (and trigger the onChange event) when the user is typing through its keyboard
2021-06-01 12:04:55 +02:00
Pau Perez
74a8b3038a
Split ConfirmOrderJob to avoid blocking a worker
...
This unties this two email notifications so that they are picked up by
a DJ worker independently. This should avoid the blocking the worker experiences (remember we
still have a single one in all instances) when waiting between the two
deliveries. See the flamegraph:
https://app.datadoghq.com/apm/traces?end=1622015605459&paused=true&query=env%3Aproduction%20service%3Adelayed_job%20operation_name%3Adelayed_job%20resource_name%3AConfirmOrderJob%20%40duration%3A%3E%3D5s&start=1622009898303&streamTraces=true&trace=AQAAAXmngbg_woqc_QAAAABBWG1uZ2IwVkFBRHVDbWJkN25QTUVuY28&traceID=2916038355421570548&spanID=2005781139590273685 .
Overall, both operations may take longer but other jobs can be processed
in between. Also, if any of the two fails, the other won't be affected.
2021-06-01 11:43:00 +02:00
Jean-Baptiste Bellet
f73e5c74fb
Handle null/undefined cases for price
2021-06-01 11:40:02 +02:00
dependabot[bot]
de1d4fa4eb
Bump sidekiq-scheduler from 3.0.1 to 3.1.0
...
Bumps [sidekiq-scheduler](https://github.com/moove-it/sidekiq-scheduler ) from 3.0.1 to 3.1.0.
- [Release notes](https://github.com/moove-it/sidekiq-scheduler/releases )
- [Commits](https://github.com/moove-it/sidekiq-scheduler/compare/v3.0.1...v3.1.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-01 05:31:12 +00:00
Pau Perez
07fd5cb29c
Configure Sidekiq in development also
2021-05-31 17:04:14 +02:00
Pau Perez
ee7da14019
Provide Redis docker container
2021-05-31 17:04:14 +02:00
Pau Perez
e5adbf1f08
Fix jemalloc installation
2021-05-31 16:54:35 +02:00
Jean-Baptiste Bellet
7008b5ec7b
Make a more generic solution: KeyValueMapStore
...
- As QueryPersistence, stored in the localStorage too but it is now more generic and has nothing to do with Query
- Add some js unit testing
2021-05-31 10:44:21 +02:00
Jean-Baptiste Bellet
f167b09397
Add distributor and order cycle selectors in the test
2021-05-31 10:44:21 +02:00
Jean-Baptiste Bellet
54c645e33a
Add tests for clearing all filters feature
...
- and check each filter is well reinitialized
2021-05-31 10:44:21 +02:00
Jean-Baptiste Bellet
385446807d
Add a clear filters button
...
- This button clear all stored filters and then update results
2021-05-31 10:44:21 +02:00
Jean-Baptiste Bellet
ea2cb4e6c0
Update flatpickr input value if ng-model change
2021-05-31 10:44:21 +02:00
Jean-Baptiste Bellet
303bf5420e
Add select2WatchNgModel directive
...
- Select2 components cannot handle ng-model correctly: they do not update if the ng-model change. Add a directive to watch the ng-model and update the component value
2021-05-31 10:44:21 +02:00
Jean-Baptiste Bellet
58a96c6500
Add missing ] char to be consistant
2021-05-31 10:44:12 +02:00
Jean-Baptiste Bellet
4f50afc188
Change shipping_method_id storage: in the query
2021-05-31 10:44:12 +02:00
Jean-Baptiste Bellet
e388238a25
Add tests for saving filter params in Orders list
2021-05-31 10:44:12 +02:00
Jean-Baptiste Bellet
1674c6a252
Improve HTML to improve tests readability
...
- Specify `for` attribute to `<label />` element
- Initialize component with its default value
So, it's linked to its `<input />`
2021-05-31 10:44:12 +02:00
Matt-Yorkley
93ebfb6a4f
Improve checking for presence of saved filters
2021-05-31 10:44:12 +02:00
Matt-Yorkley
47404b1dc8
Improve handling of nils
2021-05-31 10:44:12 +02:00
Matt-Yorkley
c24ceac063
Extract default-setting to comment method
2021-05-31 10:44:12 +02:00
Jean-Baptiste Bellet
c5a2d183d8
Save filter params to sessionStorage for orders list
...
- Use sessionStorage to save the filters params each time a filter is modified
2021-05-31 10:44:12 +02:00
kgericke
bb8535cb3a
add translation keys for password messages
2021-05-26 08:50:16 -07:00
alex
4a5cb7f628
Missed import_date translation
2021-05-18 18:30:59 +03:00
Luis Ramos
3f020ec855
Circunvent security contraint on rails 61
2021-05-14 00:13:38 +01:00
Luis Ramos
3d2155b60e
Use Arel.sql to curcunvent security restriction on rails 6.1
2021-05-13 23:55:08 +01:00
Nihal Mohammed
0b12b398ba
Update spec test for the changed redirect path
2021-05-14 03:32:14 +05:30
Nihal Mohammed
122577b11b
Checkout made to redirect to shop front when OC closed
2021-05-14 02:58:41 +05:30
Luis Ramos
b265fbf9a0
Remove initial slash from admin layout, this fixes a problem with layouts cant be loaded from absolute paths
2021-05-11 22:34:15 +01:00
Luis Ramos
f29f525d90
Adapt code to circunvent security constraint on rails 6.1
2021-05-10 23:39:17 +01:00
Luis Ramos
d308e20871
Fix deprecation warning in rails 6.0
...
Warning: Class level methods will no longer inherit scoping from create in Rails 6.1
2021-05-10 21:03:24 +01:00
Cillian O'Ruanaidh
413896af5d
Add enterprise name to subject and body of shipment shipped email
...
Fixes #7052
2021-04-02 11:44:40 +01:00