Andy Brett
2910cbf15c
Merge pull request #7582 from openfoodfoundation/transifex
...
Transifex
2021-05-08 13:55:11 -07:00
Transifex-Openfoodnetwork
d24d7fce56
Updating translations for config/locales/de_DE.yml
2021-05-09 05:16:39 +10:00
Andy Brett
5a16954bf6
Merge pull request #7572 from openfoodfoundation/transifex
...
Transifex
2021-05-07 06:46:56 -07:00
Matt-Yorkley
39156ec988
Merge pull request #7574 from Matt-Yorkley/dfc-routes
...
Update DFC routes
2021-05-07 11:27:50 +02:00
Matt-Yorkley
c71d4bce6a
Update DFC routes
2021-05-07 09:42:35 +01:00
Pau Pérez Fabregat
8d8abed529
Merge pull request #7496 from jibees/4957-flaky-specs
...
Uncomment flaky spec on variant_overrides_spec.rb
2021-05-07 10:29:36 +02:00
Transifex-Openfoodnetwork
55018260df
Updating translations for config/locales/en_FR.yml
2021-05-07 17:53:34 +10:00
Transifex-Openfoodnetwork
cbdeef064a
Updating translations for config/locales/fr.yml
2021-05-07 17:53:20 +10:00
Transifex-Openfoodnetwork
ac2c02a983
Updating translations for config/locales/es.yml
2021-05-07 16:40:26 +10:00
Transifex-Openfoodnetwork
c71a4918a0
Updating translations for config/locales/ca.yml
2021-05-07 16:40:03 +10:00
Andy Brett
dbd0d4a795
Merge pull request #7570 from openfoodfoundation/release/v3.6.10
...
Update all locales with the latest Transifex translations
2021-05-06 20:41:25 -07:00
Andy Brett
328381b732
Update all locales with the latest Transifex translations
2021-05-06 20:38:41 -07:00
Andy Brett
415d86bff0
Merge pull request #7562 from coopdevs/fix-failed-sca-auth
...
Fix failed SCA authentication on subs. order payment not reflected in OFN
2021-05-06 15:25:16 -07:00
Andy Brett
8b9083d28f
Merge pull request #7560 from openfoodfoundation/dependabot/bundler/rails-5.2.6
...
Bump rails from 5.2.5 to 5.2.6
2021-05-06 15:14:06 -07:00
dependabot[bot]
7f5dddffa0
Bump rails from 5.2.5 to 5.2.6
...
Bumps [rails](https://github.com/rails/rails ) from 5.2.5 to 5.2.6.
- [Release notes](https://github.com/rails/rails/releases )
- [Commits](https://github.com/rails/rails/compare/v5.2.5...v5.2.6 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-06 17:35:58 +00:00
Andy Brett
cfa4bde965
Merge pull request #7559 from openfoodfoundation/dependabot/bundler/rubocop-rails-2.10.1
...
Bump rubocop-rails from 2.10.0 to 2.10.1
2021-05-06 10:34:20 -07:00
Andy Brett
9e6ede4072
Merge pull request #7561 from openfoodfoundation/dependabot/bundler/rubocop-1.14.0
...
Bump rubocop from 1.13.0 to 1.14.0
2021-05-06 10:33:40 -07:00
Pau Perez
9a63f38790
I18n-ize error messages.
2021-05-06 16:34:29 +02:00
Pau Perez
69b91ea136
Wait until the end to mark payment as processed
...
This gives us the opportunity to retry the operation in case the
processing fails.
2021-05-06 16:19:01 +02:00
Pau Perez
dea6a01e61
Handle SCA payments that can't complete
2021-05-06 16:19:01 +02:00
Pau Perez
2147584daf
Validate intents against Stripe and display errors
...
Now the existing validation is redundant. It's Stripe's API who does
that now. It's up to them to decide what's a valid intent.
2021-05-06 16:19:01 +02:00
Pau Perez
b723ed4a98
Skip Stripe logic when no payment data is passed
2021-05-06 16:19:01 +02:00
dependabot[bot]
ccfe352d62
Bump rubocop from 1.13.0 to 1.14.0
...
Bumps [rubocop](https://github.com/rubocop/rubocop ) from 1.13.0 to 1.14.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.13.0...v1.14.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-06 05:22:38 +00:00
dependabot[bot]
76fb157518
Bump rubocop-rails from 2.10.0 to 2.10.1
...
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails ) from 2.10.0 to 2.10.1.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases )
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.10.0...v2.10.1 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-06 05:18:52 +00:00
Andy Brett
a7331efd67
Merge pull request #7477 from luisramos0/require_dependency
...
Remove require_dependency or use require
2021-05-05 13:24:19 -07:00
Pau Pérez Fabregat
b57755398c
Merge pull request #7531 from openfoodfoundation/dependabot/bundler/daemons-1.4.0
...
Bump daemons from 1.3.1 to 1.4.0
2021-05-05 21:42:25 +02:00
dependabot[bot]
076081929f
Bump daemons from 1.3.1 to 1.4.0
...
Bumps [daemons](https://github.com/thuehlinger/daemons ) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/thuehlinger/daemons/releases )
- [Changelog](https://github.com/thuehlinger/daemons/blob/master/Releases )
- [Commits](https://github.com/thuehlinger/daemons/compare/v1.3.1...v1.4.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-05 18:07:37 +00:00
Andy Brett
4b183bb6c1
Merge pull request #7555 from openfoodfoundation/dependabot/bundler/rubocop-rails-2.10.0
...
Bump rubocop-rails from 2.9.1 to 2.10.0
2021-05-05 11:06:43 -07:00
Andy Brett
d2f3cdd6b9
Merge pull request #7546 from openfoodfoundation/dependabot/bundler/activerecord-session_store-2.0.0
...
Bump activerecord-session_store from 1.1.3 to 2.0.0
2021-05-05 11:06:10 -07:00
Andy Brett
baf3d4b2cd
Merge pull request #6488 from openfoodfoundation/dependabot/bundler/pg-1.2.3
...
Bump pg from 0.21.0 to 1.2.3
2021-05-05 11:05:52 -07:00
Andy Brett
f8f3cb78e3
Merge pull request #7549 from openfoodfoundation/dependabot/bundler/roadie-rails-2.2.0
...
Bump roadie-rails from 1.3.0 to 2.2.0
2021-05-05 11:05:24 -07:00
dependabot[bot]
18373533e6
Bump roadie-rails from 1.3.0 to 2.2.0
...
Bumps [roadie-rails](https://github.com/Mange/roadie-rails ) from 1.3.0 to 2.2.0.
- [Release notes](https://github.com/Mange/roadie-rails/releases )
- [Changelog](https://github.com/Mange/roadie-rails/blob/master/Changelog.md )
- [Commits](https://github.com/Mange/roadie-rails/compare/v1.3.0...v2.2.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-05 17:40:59 +00:00
dependabot[bot]
679ceaead7
Bump pg from 0.21.0 to 1.2.3
...
Bumps [pg](https://github.com/ged/ruby-pg ) from 0.21.0 to 1.2.3.
- [Release notes](https://github.com/ged/ruby-pg/releases )
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.rdoc )
- [Commits](https://github.com/ged/ruby-pg/compare/v0.21.0...v1.2.3 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-05 17:40:49 +00:00
Pau Pérez Fabregat
64baebd791
Merge pull request #7545 from openfoodfoundation/dependabot/bundler/ransack-2.4.1
...
Bump ransack from 2.3.0 to 2.4.1
2021-05-05 19:39:42 +02:00
dependabot[bot]
31adbdbf7a
Bump activerecord-session_store from 1.1.3 to 2.0.0
...
Bumps [activerecord-session_store](https://github.com/rails/activerecord-session_store ) from 1.1.3 to 2.0.0.
- [Release notes](https://github.com/rails/activerecord-session_store/releases )
- [Commits](https://github.com/rails/activerecord-session_store/compare/v1.1.3...v2.0.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-05 17:15:11 +00:00
Pau Pérez Fabregat
819479f05c
Merge pull request #7552 from luisramos0/rails525
...
Upgrade to rails 5.2.5 with "bundle update rails"
2021-05-05 19:14:04 +02:00
Pau Pérez Fabregat
324999494b
Merge pull request #7523 from openfoodfoundation/transifex
...
Transifex
2021-05-05 18:31:30 +02:00
Andy Brett
82845e1cfc
Merge pull request #7528 from Matt-Yorkley/has_many_through
...
Reorder has_many relationship with :through option
2021-05-05 08:08:15 -07:00
Andy Brett
3e714b1539
Merge pull request #7527 from Matt-Yorkley/dead-code-deleted
...
Remove #deleted? method from Product and Variant
2021-05-05 08:07:39 -07:00
Andy Brett
002420304d
Merge pull request #7526 from Matt-Yorkley/dead-currency
...
Remove currency from OrderContents
2021-05-05 08:06:53 -07:00
dependabot[bot]
aa90c4f34f
Bump rubocop-rails from 2.9.1 to 2.10.0
...
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails ) from 2.9.1 to 2.10.0.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases )
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.9.1...v2.10.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-05 05:14:36 +00:00
Luis Ramos
63e2122593
Upgrade to rails 5.2.5 with a bundle update rails
2021-05-04 21:31:09 +01:00
Andy Brett
35671e2464
Merge pull request #7548 from openfoodfoundation/dependabot/bundler/rspec-rails-5.0.1
...
Bump rspec-rails from 4.1.2 to 5.0.1
2021-05-04 13:22:48 -07:00
Andy Brett
4b9418ebd6
Merge pull request #7547 from openfoodfoundation/dependabot/bundler/coffee-rails-5.0.0
...
Bump coffee-rails from 4.2.2 to 5.0.0
2021-05-04 13:02:50 -07:00
dependabot[bot]
ec8f42513b
Bump rspec-rails from 4.1.2 to 5.0.1
...
Bumps [rspec-rails](https://github.com/rspec/rspec-rails ) from 4.1.2 to 5.0.1.
- [Release notes](https://github.com/rspec/rspec-rails/releases )
- [Changelog](https://github.com/rspec/rspec-rails/blob/main/Changelog.md )
- [Commits](https://github.com/rspec/rspec-rails/compare/v4.1.2...v5.0.1 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-04 19:21:11 +00:00
dependabot[bot]
3ba439ec0d
Bump coffee-rails from 4.2.2 to 5.0.0
...
Bumps [coffee-rails](https://github.com/rails/coffee-rails ) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/rails/coffee-rails/releases )
- [Changelog](https://github.com/rails/coffee-rails/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rails/coffee-rails/compare/v4.2.2...v5.0.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-04 19:20:07 +00:00
dependabot[bot]
47e79a8d60
Bump ransack from 2.3.0 to 2.4.1
...
Bumps [ransack](https://github.com/activerecord-hackery/ransack ) from 2.3.0 to 2.4.1.
- [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/v2.3.0...2.4.1 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-04 19:19:33 +00:00
Transifex-Openfoodnetwork
119fdd9e53
Updating translations for config/locales/en_CA.yml
2021-05-05 03:12:14 +10:00
Matt-Yorkley
2b1becfd47
Merge pull request #7185 from openfoodfoundation/rails-5-2
...
Rails 5.2 upgrade
2021-05-04 17:21:03 +02:00
Pau Perez
cb1e4caad8
Update all locales with the latest Transifex translations
2021-05-04 08:34:04 +02:00
Andy Brett
edc51d1155
Merge pull request #7532 from openfoodfoundation/dependabot/bundler/test-prof-1.0.3
...
Bump test-prof from 1.0.2 to 1.0.3
2021-05-03 11:31:50 -07:00
Transifex-Openfoodnetwork
55b1b860d1
Updating translations for config/locales/en_US.yml
2021-05-04 02:03:25 +10:00
Matt-Yorkley
e2a411c23c
Add map helper to RegistrationController
...
Fixes 3 errors including:
Registration Terms of Service agreement if accepting Terms of Service is not required allows registration as normal
Failure/Error: super
ActionView::Template::Error:
undefined method `using_google_maps?' for #<#<Class:0x00007fd4949c4558>:0x00007fd499dd0ae8>
# ./app/helpers/application_helper.rb:20:in `method_missing'
# ./app/views/registration/steps/_details.html.haml:60:in `_app_views_registration_steps__details_html_haml___1911121144363058234_70275472163280'
# ./app/views/registration/index.html.haml:12:in `block in _app_views_registration_index_html_haml__993897347679518865_70275545598940'
# ./app/views/registration/index.html.haml:11:in `each'
# ./app/views/registration/index.html.haml:11:in `_app_views_registration_index_html_haml__993897347679518865_70275545598940'
# ./lib/open_food_network/rack_request_blocker.rb:36:in `call'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `using_google_maps?' for #<#<Class:0x00007fd4949c4558>:0x00007fd499dd0ae8>
# ./app/helpers/application_helper.rb:20:in `method_missing'
2021-05-03 14:17:54 +01:00
Matt-Yorkley
aa013ef76a
Update redirect_back syntax for Rails 5
...
Introduced in 5.0, the old syntax is removed in 5.2
2021-05-03 14:17:54 +01:00
Matt-Yorkley
a645b8c58f
Re-apply previous 5.2 commit: Don't reload payments in after_save callback
...
This causes issues in master, but is needed in the 5.2 branch.
2021-05-03 14:17:54 +01:00
Matt-Yorkley
4888f1cd06
Stub OrderPaymentFinder to return correct object
...
OrderPaymentFinder was re-fetching the payment object from the database, so the subsequent line that stubs #authorize! on that payment was not being applied to the correct object.
2021-05-03 14:17:54 +01:00
Matt-Yorkley
31fc6201fc
Include payment method helper in ApplicationController
2021-05-03 14:17:54 +01:00
Matt-Yorkley
ab65b01fcf
Rename payments helper
2021-05-03 14:17:54 +01:00
Matt-Yorkley
1de68d091a
Update guard clause in line item callbacks (take two)
...
The `changed?` method is more accurately replaced by `saved_changes.present?`
In some cases here (where the object had just been saved for the first time) the guard clause was still stopping execution unexpectedly.
2021-05-03 14:17:54 +01:00
Matt-Yorkley
ac53df37d9
Fix callback in LineItem
...
#changed? here was not working as before, and the code was never getting past this guard in various places where previously it did. This meant the callback was effectively disabled, and order.update! was not being called when it should be.
2021-05-03 14:17:54 +01:00
Luis Ramos
279c15c306
Adapt spec to rails 5.2
2021-05-03 14:17:54 +01:00
Luis Ramos
47a5809100
Fix rspec syntax
2021-05-03 14:17:54 +01:00
Andy Brett
705666ecd0
fix /spec/models/spree/credit_card_spec.rb:301
2021-05-03 14:17:54 +01:00
Luis Ramos
aaf4710694
Fix cart_service_spec to adapt to the actual usage of it from cart_controller, params are now sent inside a Parameters object, not as a hash
2021-05-03 14:17:54 +01:00
Luis Ramos
f5a7ff0f0a
Switch from map, that does not exist in ActionController::Parameters, to each
2021-05-03 14:17:54 +01:00
Andy Brett
203dbb7a8b
Revert "Switch from map, that does not exist in ActionController::Parameters, to each"
...
This reverts commit 69a15d4f04 .
2021-05-03 14:17:54 +01:00
Andy Brett
ea5f9c6747
Revert "Fix cart_service_spec to adapt to the actual usage of it from cart_controller, params are now sent inside a Parameters object, not as a hash"
...
This reverts commit bb465b5715 .
2021-05-03 14:17:54 +01:00
Andy Brett
d255ca22f5
use new attribute_changed method for taxons take 2
2021-05-03 14:17:54 +01:00
Andy Brett
be0eb5f5f9
ignore nil in payment report spec expectation
2021-05-03 14:17:54 +01:00
Andy Brett
52525dc437
Fix /spec/models/spree/product_spec.rb:118
2021-05-03 14:17:54 +01:00
Andy Brett
d381b2a544
Use saved_change_to prefix to check for changes
2021-05-03 14:17:54 +01:00
Luis Ramos
c08bc743d3
Replace usage of changed? with saved_change_to_
2021-05-03 14:17:54 +01:00
Luis Ramos
c1402fe4f2
Upgrade state_machines
2021-05-03 14:17:54 +01:00
Matt-Yorkley
e9b6f89ae0
Update params syntax in engine controller specs
2021-05-03 14:17:54 +01:00
Matt-Yorkley
26688dda36
Add angular_form helper
...
Fixes:
Failure/Error: super
ActionView::Template::Error:
undefined method `ng_options_for_select' for #<#<Class:0x00007fbf8e43e310>:0x000055783fbebec0>
Did you mean? options_for_select
# ./app/helpers/application_helper.rb:20:in `method_missing'
# ./app/helpers/angular_form_builder.rb:26:in `ng_select'
# ./app/views/admin/enterprise_fees/index.html.haml:34:in `block (2 levels) in _app_views_admin_enterprise_fees_index_html_haml__800455454875182851_46987476952700'
# ./app/helpers/angular_form_builder.rb:6:in `ng_fields_for'
# ./app/views/admin/enterprise_fees/index.html.haml:28:in `block in _app_views_admin_enterprise_fees_index_html_haml__800455454875182851_46987476952700'
# ./app/helpers/application_helper.rb:11:in `ng_form_for'
# ./app/views/admin/enterprise_fees/index.html.haml:4:in `_app_views_admin_enterprise_fees_index_html_haml__800455454875182851_46987476952700'
# ./lib/open_food_network/rack_request_blocker.rb:36:in `call'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `ng_options_for_select' for #<#<Class:0x00007fbf8e43e310>:0x000055783fbebec0>
# Did you mean? options_for_select
# ./app/helpers/application_helper.rb:20:in `method_missing'
2021-05-03 14:17:54 +01:00
Matt-Yorkley
b7aeceaf67
Add enterprise_fees helper
...
Fixes:
Failure/Error: super
ActionView::Template::Error:
undefined method `angular_id' for #<#<Class:0x00007f57c7126670>:0x00007f57c55754f8>
# ./app/helpers/application_helper.rb:20:in `method_missing'
# ./app/views/admin/enterprise_fees/index.html.haml:32:in `block (2 levels) in _app_views_admin_enterprise_fees_index_html_haml__3854507252304647884_70007474860840'
# ./app/helpers/angular_form_builder.rb:6:in `ng_fields_for'
# ./app/views/admin/enterprise_fees/index.html.haml:28:in `block in _app_views_admin_enterprise_fees_index_html_haml__3854507252304647884_70007474860840'
# ./app/helpers/application_helper.rb:11:in `ng_form_for'
# ./app/views/admin/enterprise_fees/index.html.haml:4:in `_app_views_admin_enterprise_fees_index_html_haml__3854507252304647884_70007474860840'
# ./lib/open_food_network/rack_request_blocker.rb:36:in `call'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `angular_id' for #<#<Class:0x00007f57c7126670>:0x00007f57c55754f8>
# ./app/helpers/application_helper.rb:20:in `method_missing'
2021-05-03 14:17:54 +01:00
Matt-Yorkley
e6a3041f45
Add admin/enterprises helper
...
Fixes:
Failure/Error: super
ActionView::Template::Error:
undefined method `add_check_if_single' for #<#<Class:0x0000564501a3c838>:0x00007f446cdd68e8>
# ./app/helpers/application_helper.rb:20:in `method_missing'
# ./app/views/spree/admin/shared/_hubs_sidebar.html.haml:16:in `block in _app_views_spree_admin_shared__hubs_sidebar_html_haml___1973426344114200431_69965928779540'
# ./app/views/spree/admin/shared/_hubs_sidebar.html.haml:11:in `each'
# ./app/views/spree/admin/shared/_hubs_sidebar.html.haml:11:in `_app_views_spree_admin_shared__hubs_sidebar_html_haml___1973426344114200431_69965928779540'
# ./app/views/spree/admin/payment_methods/edit.html.haml:15:in `block in _app_views_spree_admin_payment_methods_edit_html_haml__571217921761730685_69965930474120'
# ./app/views/spree/admin/payment_methods/edit.html.haml:11:in `_app_views_spree_admin_payment_methods_edit_html_haml__571217921761730685_69965930474120'
# ./app/controllers/admin/resource_controller.rb:23:in `block (2 levels) in edit'
# ./lib/spree/core/controller_helpers/respond_with.rb:24:in `respond_with'
# ./app/controllers/admin/resource_controller.rb:22:in `edit'
# ./lib/open_food_network/rack_request_blocker.rb:36:in `call'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `add_check_if_single' for #<#<Class:0x0000564501a3c838>:0x00007f446cdd68e8>
# ./app/helpers/application_helper.rb:20:in `method_missing'
2021-05-03 14:17:54 +01:00
Matt-Yorkley
b0787e83b2
Add checkout helper
...
Fixes:
Failure/Error: super
ActionView::Template::Error:
undefined method `checkout_adjustments_for' for #<#<Class:0x000055f4bd847a30>:0x000055f4bd845c30>
# ./app/helpers/application_helper.rb:20:in `method_missing'
# ./app/views/spree/admin/orders/_invoice_table.html.haml:26:in `_app_views_spree_admin_orders__invoice_table_html_haml___3617932924646213210_47254819384740'
# ./app/views/spree/admin/orders/invoice.html.haml:67:in `_app_views_spree_admin_orders_invoice_html_haml__1476001169744481148_47254819971700'
# ./app/services/invoice_renderer.rb:8:in `render_to_string'
# ./app/controllers/spree/admin/orders_controller.rb:81:in `invoice'
# ./spec/support/controller_requests_helper.rb:49:in `process_action_with_route'
# ./spec/support/controller_requests_helper.rb:23:in `spree_get'
# ./spec/controllers/spree/admin/orders/invoices_spec.rb:58:in `block (6 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `checkout_adjustments_for' for #<#<Class:0x000055f4bd847a30>:0x000055f4bd845c30>
# ./app/helpers/application_helper.rb:20:in `method_missing'
2021-05-03 14:17:54 +01:00
Luis Ramos
1b4930de8f
Fix mimemagic 036 yank issue
2021-05-03 14:17:54 +01:00
Matt-Yorkley
f874397115
Fix errors in PermittedAttributes::OrderCycle
2021-05-03 14:17:54 +01:00
Matt-Yorkley
5fc60f53ba
Update mimemagic gem!
...
The package maintainer nuked this gem last night as part of a major licence change for the repo, and chaos ensued. It's a dependency for ActiveStorage which is now part of Rails. Versions *above* 0.3.5 are now available, and work. All versions below 0.3.6 have been removed without warning (currently used by ~576,971 repos on Github!) D:
2021-05-03 14:17:54 +01:00
Matt-Yorkley
943c00c924
WIP - Update loading of helpers in controllers
...
Rails has changed the way helpers are loaded. It's a bit weird. It was throwing lots of errors, and recommended using this setting, but now requires that all helpers are loaded explicitly. I'm not sure about this.
2021-05-03 14:17:54 +01:00
Matt-Yorkley
138f00876b
Update Rails to 5.2
2021-05-03 14:17:54 +01:00
Transifex-Openfoodnetwork
b00dcecd52
Updating translations for config/locales/en_GB.yml
2021-05-03 18:16:39 +10:00
dependabot[bot]
d3b3ed3b9c
Bump test-prof from 1.0.2 to 1.0.3
...
Bumps [test-prof](https://github.com/test-prof/test-prof ) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/test-prof/test-prof/releases )
- [Changelog](https://github.com/test-prof/test-prof/blob/master/CHANGELOG.md )
- [Commits](https://github.com/test-prof/test-prof/commits )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-03 05:47:40 +00:00
Matt-Yorkley
9d23c0d9e2
Reorder has_many relationship with :through option
...
If it's using :through it should be defined after the relationship it's connected to
2021-05-01 16:20:36 +01:00
Matt-Yorkley
7948c5943d
Remove #deleted? method from Product and Variant
...
This method is already supplied via the paranoia gem, there's no need to re-implement it here.
2021-05-01 12:54:33 +01:00
Matt-Yorkley
2eb17dbbd1
Remove currency from OrderContents
...
The currency argument here is not actually used anywhere. The related conditional logic is also not covered in any tests.
2021-05-01 11:10:51 +01:00
Transifex-Openfoodnetwork
0a9fc429ac
Updating translations for config/locales/de_DE.yml
2021-05-01 08:32:50 +10:00
Andy Brett
8672969798
Merge pull request #7515 from openfoodfoundation/dependabot/bundler/devise-4.8.0
...
Bump devise from 4.7.3 to 4.8.0
2021-04-30 11:24:20 -07:00
Andy Brett
1be730fcfb
Merge pull request #7512 from Matt-Yorkley/package-refactor
...
Package update
2021-04-30 08:51:51 -07:00
Transifex-Openfoodnetwork
7fd82540ce
Updating translations for config/locales/en_IE.yml
2021-05-01 00:27:53 +10:00
Matt-Yorkley
c7ce10f998
Handle order objects with no distributor
2021-04-30 11:12:41 +01:00
Matt-Yorkley
5b29243847
Delete unused method Stock::Package#currency
2021-04-30 11:10:20 +01:00
Matt-Yorkley
3897c3af68
Refactor Stock::Package#shipping_methods
2021-04-30 11:10:20 +01:00
Matt-Yorkley
c3c396eaea
Add soft-deletion test coverage to Package#shipping_methods
2021-04-30 11:10:19 +01:00
Pau Perez
03b2e558b3
Update all locales with the latest Transifex translations
2021-04-30 11:58:13 +02:00
Pau Pérez Fabregat
fca4fde9a6
Merge pull request #7518 from openfoodfoundation/transifex
...
Transifex
2021-04-30 11:54:01 +02:00
Pau Pérez Fabregat
057bcddee9
Merge pull request #7478 from jibees/7458-get-products-on-order-cycle-change-events
...
Get the whole list of products on order cycle changes
2021-04-30 11:39:15 +02:00
Transifex-Openfoodnetwork
05b1e598e0
Updating translations for config/locales/es.yml
2021-04-30 19:37:16 +10:00
Transifex-Openfoodnetwork
0faee508b5
Updating translations for config/locales/ca.yml
2021-04-30 19:34:42 +10:00
Pau Pérez Fabregat
3aaa818d00
Merge pull request #7516 from openfoodfoundation/transifex
...
Transifex
2021-04-30 11:30:07 +02:00
Pau Pérez Fabregat
006cf45f2a
Merge pull request #7514 from openfoodfoundation/dependabot/bundler/rack-mini-profiler-2.3.2
...
Bump rack-mini-profiler from 2.3.1 to 2.3.2
2021-04-30 11:29:28 +02:00
Transifex-Openfoodnetwork
afd17d6cf8
Updating translations for config/locales/ru.yml
2021-04-30 18:45:03 +10:00
Transifex-Openfoodnetwork
f6b6564048
Updating translations for config/locales/fr.yml
2021-04-30 17:48:22 +10:00
Transifex-Openfoodnetwork
9c49040fbb
Updating translations for config/locales/en_FR.yml
2021-04-30 17:47:48 +10:00
Transifex-Openfoodnetwork
a8b3d10377
Updating translations for config/locales/fr.yml
2021-04-30 17:45:21 +10:00
dependabot[bot]
c1d246081e
Bump devise from 4.7.3 to 4.8.0
...
Bumps [devise](https://github.com/plataformatec/devise ) from 4.7.3 to 4.8.0.
- [Release notes](https://github.com/plataformatec/devise/releases )
- [Changelog](https://github.com/heartcombo/devise/blob/master/CHANGELOG.md )
- [Commits](https://github.com/plataformatec/devise/compare/v4.7.3...v4.8.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-30 05:20:39 +00:00
dependabot[bot]
cf6545e501
Bump rack-mini-profiler from 2.3.1 to 2.3.2
...
Bumps [rack-mini-profiler](https://github.com/MiniProfiler/rack-mini-profiler ) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/MiniProfiler/rack-mini-profiler/releases )
- [Changelog](https://github.com/MiniProfiler/rack-mini-profiler/blob/master/CHANGELOG.md )
- [Commits](https://github.com/MiniProfiler/rack-mini-profiler/compare/v2.3.1...v2.3.2 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-30 05:17:41 +00:00
Andy Brett
f64d5a9f59
Merge pull request #7438 from jibees/7353-fix-OC-display-issue-text-on-two-lines
...
Change the position of order_cycle component into a shop front
2021-04-29 14:05:06 -07:00
Andy Brett
c069a23926
Merge pull request #7476 from cillian/admin-stripe-elements-width
...
Increase the width of Stripe Elements fields in admin so they don't overlap
2021-04-29 14:04:44 -07:00
Andy Brett
8ba139c6fb
Merge pull request #6825 from julesemmac/6584-map-location-confirm
...
6584 map location confirm
2021-04-29 14:04:06 -07:00
Matt-Yorkley
0291a7c471
Merge pull request #7482 from Matt-Yorkley/updater-update
...
Updater update
2021-04-29 21:12:15 +02:00
Andy Brett
699f1c4f41
Merge pull request #7497 from andrewpbrett/fix-double-stripe-payments
...
Use capture! if payment is already authorized
2021-04-29 08:35:19 -07:00
Jean-Baptiste Bellet
5a3771fc42
Add special config to avoid a inconsistant LoadError
...
Error is
```
Failure/Error: @app.call(env)
LoadError:
Unable to autoload constant Api::V0::OrderCyclesController, expected /Users/jibees/dev/openfoodnetwork/app/controllers/api/v0/order_cycles_controller.rb to define it
```
2021-04-29 15:31:24 +02:00
Pau Pérez Fabregat
6c5db0f836
Merge pull request #7507 from Matt-Yorkley/shipment-state-update
...
Shipment callback state update
2021-04-29 12:01:55 +02:00
Matt-Yorkley
2f49d089ea
Use Time.zone.now
2021-04-29 08:56:17 +01:00
Matt-Yorkley
290c1d0ebf
Bring in shipment state updating from Spree 2.2
2021-04-28 21:43:28 +01:00
Matt-Yorkley
2fda550821
Add test for shipment state after ship action
2021-04-28 21:40:08 +01:00
Andy Brett
4f246da79f
add feature spec
2021-04-28 11:25:43 -07:00
Andy Brett
73e5fd3f5b
use method to clarify intent on payment intents
2021-04-28 10:43:06 -07:00
Andy Brett
4736013946
update spec
2021-04-28 10:43:06 -07:00
Pau Pérez Fabregat
6ee6e4ed04
Merge pull request #7472 from openfoodfoundation/transifex
...
Transifex
2021-04-28 19:36:43 +02:00
Pau Pérez Fabregat
ef9720aee7
Merge pull request #7461 from andrewpbrett/fix-blocked-bo-orders
...
Scope variant to take overrides into account in packer
2021-04-28 19:36:02 +02:00
Matt-Yorkley
4bd2fb8930
Merge pull request #7498 from openfoodfoundation/dependabot/bundler/view_component-2.31.1
...
Bump view_component from 2.31.0 to 2.31.1
2021-04-28 12:47:55 +02:00
dependabot[bot]
2494ba0def
Bump view_component from 2.31.0 to 2.31.1
...
Bumps [view_component](https://github.com/github/view_component ) from 2.31.0 to 2.31.1.
- [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.31.0...v2.31.1 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-28 05:28:59 +00:00
Andy Brett
9906afa1a6
use capture! if payment is already authorized
2021-04-27 17:59:03 -07:00
Matt-Yorkley
1d29e277f2
Merge pull request #7493 from Matt-Yorkley/order-states-bug-redux
...
Reload order before updating in Payment callback
2021-04-27 17:43:34 +02:00
Matt-Yorkley
c7e65185ee
Regression test for new order with variant overrides
2021-04-27 07:44:41 -07:00
Matt-Yorkley
22f79fe540
Reload order before updating in Payment callback
2021-04-27 14:27:35 +01:00
Matt-Yorkley
a5a324fd6f
Add failing spec for payment and shipment states bug
...
The order was being left in an unexpected condition here, it's states are not set and there seem to be some weird issues.
2021-04-27 14:27:35 +01:00
Matt-Yorkley
5934b100e9
Test payment and shipment states in checkout spec
...
If these aren't behaving correctly we need to know about it...
2021-04-27 14:27:35 +01:00
Jean-Baptiste Bellet
81385b63c7
Uncomment (not so) flaky spec
2021-04-27 15:27:16 +02:00
Matt-Yorkley
574d78403d
Merge pull request #7433 from coopdevs/raise-on-failed-customer-creation
...
Notify Bugsnag if customer fails to be created
2021-04-27 12:42:39 +02:00
Matt-Yorkley
3c1889d719
Merge pull request #7490 from openfoodfoundation/dependabot/bundler/view_component-2.31.0
...
Bump view_component from 2.30.0 to 2.31.0
2021-04-27 12:08:29 +02:00
Jean-Baptiste Bellet
5085501f89
Add automated tests around pagination in product list for a shop
...
- with two order cycles and go from one to the other
2021-04-27 11:24:56 +02:00
Jean-Baptiste Bellet
07881ede2d
Do not trigger loadMore method immediatly
...
- This avoid to request unwanted resources, ie. the next 10 products of a shop
2021-04-27 11:24:48 +02:00
Jean-Baptiste Bellet
cdbcbf4214
Reinitialize page params when changing order cycle
2021-04-27 11:24:48 +02:00
Jean-Baptiste Bellet
523b957ba7
Initialize activeTaxons and activeProperties
...
- so there is no unwanted changes (from `undefined` to `[]`) that would trigger a loadProducts request
2021-04-27 11:24:48 +02:00
Jean-Baptiste Bellet
71466e643f
Instanciate only one ProductsCtrl
...
- instead of 2: therefore, for each shop display, we only request products one time instead of two times.
2021-04-27 11:24:48 +02:00
Matt-Yorkley
cc85bf791a
Merge pull request #7481 from openfoodfoundation/dependabot/bundler/codecov-0.5.2
...
Bump codecov from 0.5.1 to 0.5.2
2021-04-27 09:24:51 +02:00
dependabot[bot]
fa32aecebf
Bump view_component from 2.30.0 to 2.31.0
...
Bumps [view_component](https://github.com/github/view_component ) from 2.30.0 to 2.31.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.30.0...v2.31.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-27 05:26:40 +00:00
Andy Brett
de02acad64
add feature spec
2021-04-26 15:42:36 -07:00
Matt-Yorkley
f52d03fbf4
Refactor Order::Updater#update so we don't call update_totals twice
...
Calling this method twice on every update is really expensive and not necessary.
2021-04-26 11:46:05 +01:00
Pau Perez
ee01b0162c
Write if as a one-liner and avoid extra queries
2021-04-26 12:39:03 +02:00
Pau Perez
002dabb80c
Improve spec
2021-04-26 10:15:13 +02:00
Pau Perez
451e05985f
Fix spec
2021-04-26 10:15:13 +02:00
Pau Perez
679de40a41
Move specs to where they belong
2021-04-26 10:15:13 +02:00
Pau Perez
5845ace8e9
Don't persist models to test serializer
...
Serializers don't care whether or not the objects they go through are
persisted in DB. They just convert them.
2021-04-26 10:15:13 +02:00
Pau Perez
c65d82be01
Notify Bugsnag if customer fails to be created
...
This will hopefully let us see in Bugsnag when #6038 happens and so
we'll have all the diagnostics data. The fact that the `order.distributor`
is optional but mandatory to create the customer already gives us some
clue.
2021-04-26 10:15:12 +02:00
dependabot[bot]
69dd33383c
Bump codecov from 0.5.1 to 0.5.2
...
Bumps [codecov](https://github.com/codecov/codecov-ruby ) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/codecov/codecov-ruby/releases )
- [Changelog](https://github.com/codecov/codecov-ruby/blob/master/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-ruby/compare/v0.5.1...v0.5.2 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-26 05:53:44 +00:00
Andy Brett
6153f1c1b4
Merge pull request #7471 from Matt-Yorkley/dead-scopes
...
Order scopes
2021-04-25 11:51:00 -07:00
Andy Brett
6f20a23d47
Merge pull request #7436 from coopdevs/remove-duplicate-method
...
Replace duplicate #unauthorized method with module inclusion
2021-04-25 11:26:12 -07:00
Luis Ramos
f357c3ff30
Remove require_dependency or use require
...
See here https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#require-dependency
2021-04-23 19:20:25 +01:00
Cillian O'Ruanaidh
8cdc4bc3f4
Increase the width of Stripe Elements fields in admin so they don't overlap
...
The card number and expiry month/year fields were overlapping on the new payment form in the admin area.
2021-04-23 17:54:22 +01:00
Andy Brett
e42b0bb1ae
Merge pull request #7469 from openfoodfoundation/dependabot/bundler/view_component-2.30.0
...
Bump view_component from 2.28.0 to 2.30.0
2021-04-23 09:48:57 -07:00
Andy Brett
5e21480ae0
add packer spec
2021-04-23 09:35:27 -07:00
Matt-Yorkley
0c08e3cb3a
Merge pull request #7466 from openfoodfoundation/dependabot/npm_and_yarn/storybook/addon-docs-6.2.9
...
Bump @storybook/addon-docs from 6.2.7 to 6.2.9
2021-04-23 13:53:04 +02:00
dependabot[bot]
3c9b7db763
Bump @storybook/addon-docs from 6.2.7 to 6.2.9
...
Bumps [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/addons/docs ) from 6.2.7 to 6.2.9.
- [Release notes](https://github.com/storybookjs/storybook/releases )
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.2.9/CHANGELOG.md )
- [Commits](https://github.com/storybookjs/storybook/commits/v6.2.9/addons/docs )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-23 11:49:16 +00:00
Matt-Yorkley
d116d664f5
Merge pull request #7467 from openfoodfoundation/dependabot/npm_and_yarn/storybook/addon-controls-6.2.9
...
Bump @storybook/addon-controls from 6.2.7 to 6.2.9
2021-04-23 13:47:14 +02:00
dependabot[bot]
ff36cea0b0
Bump @storybook/addon-controls from 6.2.7 to 6.2.9
...
Bumps [@storybook/addon-controls](https://github.com/storybookjs/storybook/tree/HEAD/addons/controls ) from 6.2.7 to 6.2.9.
- [Release notes](https://github.com/storybookjs/storybook/releases )
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.2.9/CHANGELOG.md )
- [Commits](https://github.com/storybookjs/storybook/commits/v6.2.9/addons/controls )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-23 11:30:47 +00:00
Matt-Yorkley
0c6f8e978e
Merge pull request #7465 from openfoodfoundation/dependabot/npm_and_yarn/storybook/server-6.2.9
...
Bump @storybook/server from 6.2.7 to 6.2.9
2021-04-23 13:27:50 +02:00
Pau Perez
e5eb68dffc
Replace duplicate method with module inclusion
...
No reason to risk diverging their implementations. They are exact
copies.
Likewise, there's no need to have to I18n keys with almost the same
content.
2021-04-23 12:03:11 +02:00
Transifex-Openfoodnetwork
35658e984b
Updating translations for config/locales/en_IE.yml
2021-04-23 19:43:25 +10:00
Transifex-Openfoodnetwork
a019c73166
Updating translations for config/locales/en_IE.yml
2021-04-23 19:40:16 +10:00
Matt-Yorkley
4938285dd7
Move order query methods to chainable scopes
2021-04-23 10:29:48 +01:00
Matt-Yorkley
caee2eb3e9
Remove dead code in order
...
These aren't used anywhere
2021-04-23 10:23:40 +01:00
dependabot[bot]
54fd2c5f0f
Bump view_component from 2.28.0 to 2.30.0
...
Bumps [view_component](https://github.com/github/view_component ) from 2.28.0 to 2.30.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.28.0...v2.30.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-23 08:18:44 +00:00
dependabot[bot]
8c76752045
Bump @storybook/server from 6.2.7 to 6.2.9
...
Bumps [@storybook/server](https://github.com/storybookjs/storybook/tree/HEAD/app/server ) from 6.2.7 to 6.2.9.
- [Release notes](https://github.com/storybookjs/storybook/releases )
- [Changelog](https://github.com/storybookjs/storybook/blob/v6.2.9/CHANGELOG.md )
- [Commits](https://github.com/storybookjs/storybook/commits/v6.2.9/app/server )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-23 06:06:24 +00:00
Cillian O'Ruanaidh
af3eb82343
Merge in upstream changes from julesemmac:6584-map-location-confirm and resolve conflicts
2021-04-22 22:34:02 +01:00
Cillian O'Ruanaidh
1e96f92df2
Fix the toggle address confirmed checkbox so the latitude/longitude gets set
...
Before when you checked and unchecked the checkbox it was toggling the :isConfirmed variable.
2021-04-22 22:16:47 +01:00
Cillian O'Ruanaidh
12704af143
Use after_action calls for geocoding instead of old update.after, create.after calls
2021-04-22 22:13:28 +01:00
Cillian O'Ruanaidh
42d002cee8
Increase the default geocoder timeout to prevent geocoding timeouts in development
...
The timeout default was 3 before, this changes it to 6. I presume these timeouts could happen in production too.
2021-04-22 22:10:36 +01:00
Cillian O'Ruanaidh
cd97f1a6ef
Update angular-google-maps to 2.0.1 instead of 2.4.0 which was breaking /map page.
...
The master branch uses 2.0.0 but this PR went up to 2.4.0, however that caused the /map page to break and it was difficult to figure out why. We need to update to 2.0.1 because when you drag and drop the location icon during sign up there was an error which is fixed in 2.0.1. Maybe it would be good to upgrade to 2.4.0 at some point but this PR is already quite big.
2021-04-22 22:08:40 +01:00
Andy Brett
56cf43f1c1
scope variant to take overrides into account in packer
2021-04-22 11:45:12 -07:00
Cillian O'Ruanaidh
c41476423b
Merge latest master into julesemmac/6584-map-location-confirm and resolve conflict in api/enterprises_controller.rb
2021-04-22 19:43:49 +01:00
Matt-Yorkley
9b52c453db
Update all locales with the latest Transifex translations
2021-04-22 19:14:57 +01:00
Pau Pérez Fabregat
cf2e3db645
Merge pull request #7445 from jibees/7403-add-customer-name-into-subscriptions-table
...
Add customer name into subscriptions list in order to search subscription by customer name
2021-04-22 19:46:49 +02:00
Pau Pérez Fabregat
74968c308c
Merge pull request #7448 from openfoodfoundation/dependabot/bundler/knapsack-1.22.0
...
Bump knapsack from 1.20.0 to 1.22.0
2021-04-22 19:20:30 +02:00
Pau Pérez Fabregat
c1da97527a
Merge pull request #7420 from Matt-Yorkley/adjustments-controller
...
Adjustments controller index
2021-04-22 19:15:28 +02:00
Pau Pérez Fabregat
0194e39bd2
Merge pull request #7437 from jibees/7422-add-flipper-banner
...
Add banner to Flipper UI to warn the admin users
2021-04-22 18:29:12 +02:00
Matt-Yorkley
123e96eb1e
Merge pull request #7284 from jibees/styleguide
...
Implements our StyleGuide
2021-04-22 18:14:40 +02:00
Matt-Yorkley
bef3f8c51f
Merge pull request #7452 from Matt-Yorkley/adjustments-permissions
...
Update CanCan permissions on adjustments
2021-04-22 18:07:18 +02:00
Andy Brett
cf7efa5589
Merge pull request #7450 from jibees/6205-remove-line-items-empty-error-on-order-creation-in-backoffice
...
Suppress "Line items can't be blank" message on order creation process
2021-04-22 08:40:51 -07:00
Andy Brett
10834c1d3a
Merge pull request #7447 from openfoodfoundation/dependabot/bundler/rubocop-1.13.0
...
Bump rubocop from 1.12.1 to 1.13.0
2021-04-22 07:22:35 -07:00
Pau Pérez Fabregat
e5610d5424
Merge pull request #7427 from jibees/add-flipper-instrumentation
...
Instrument Flipper with ActiveSupport
2021-04-22 16:11:30 +02:00
jibees
1c53bbec57
Add banner to Flipper UI to warn the admin users
...
Add a link (escaped...) to the wiki page
Co-authored-by: Pau Pérez Fabregat <saulopefa@gmail.com >
2021-04-22 15:40:39 +02:00
Jean-Baptiste Bellet
9a670c7821
Print order needs render_with_wicked_pdf
...
and call WickedPdf::PdfHelper explicitly
2021-04-22 15:18:27 +02:00
Jean-Baptiste Bellet
de592de13a
Use the first view component DistributorTitleComponent for a shopfront
2021-04-22 15:08:54 +02:00
Jean-Baptiste Bellet
4781d6cc84
Add new (and first) component: DistributorTitle
...
- Simple wrapper around `<h3 />` for distributor title, used in the shop front
2021-04-22 15:08:54 +02:00
Jean-Baptiste Bellet
39683bd814
Create first story for ExampleComponent
...
- Once story has been created, still need to generate the story itself (in json file format). Help with command: `rake view_component_storybook:write_stories_json`
2021-04-22 15:08:54 +02:00
Jean-Baptiste Bellet
57e5214217
Call WickedPdf::PdfHelper#render_to_string_with_wicked_pdf explicitly
2021-04-22 15:08:54 +02:00
Matt-Yorkley
18881180ae
Remove WickedPdf monkey-patch on ActionController#render
2021-04-22 15:08:54 +02:00
Matt-Yorkley
453328a97e
Configure CORS settings for StoriesController
...
- Storybook need to access through a GET method on `/rails/stories/**` served by `ViewComponent::Storybook::StoriesController`
- Configure exact policy with an initialized filter
2021-04-22 15:08:54 +02:00
Maikel Linke
d674490896
Serve assets (css+roboto font) for the preview iframe
...
- Thus, component can inherit from all CSS rules, rendering is as close as to the truth
- Still need to import `admin` css file if we want to create components for admin part (and we probably want too). This will probably lead to overlapping problems between all CSS rules...
- This is a bit hacky, but as our CSS files are packed by rails I didn't find any better solution. We could also use any sass loader, but with this solution we can be confident on the fact that the generated CSS is the one used by the server that finally displays the component
2021-04-22 15:08:54 +02:00
Jean-Baptiste Bellet
30bd932ddc
Add storybook
...
- Via `view_component_storybook` : https://github.com/jonspalmer/view_component_storybook
- Configure both `view_component_storybook` and `storybook`
- Add two addons: `@storybook/addon-docs` and `@storybook/addon-controls`
Update config comment for clarity
2021-04-22 15:08:54 +02:00
Jean-Baptiste Bellet
390c8a89da
Add (very simple) spec for a ViewComponent component
...
- Add `ViewComponent::TestHelpers` to get the helper method `render_inline`
- Use Capybara to expect some assertion
2021-04-22 15:08:54 +02:00
Jean-Baptiste Bellet
6c37461c37
Create very first component
...
- With command: `rails generate component Example title --sidecar`
- Delete generated spec file
2021-04-22 15:08:54 +02:00
Jean-Baptiste Bellet
e25cb1b65e
Add view_components to manage our components
...
- Documentation : https://viewcomponent.org/
- Our template engine generator is haml
2021-04-22 15:08:54 +02:00
Jean-Baptiste Bellet
05a00a07ef
Add test on order creation and correct display of the error
...
- The error "Line items can't be blank" should not be displayed when we first arrived on this page after creation but only if we update the page
2021-04-22 10:03:43 +02:00
Jean-Baptiste Bellet
259e758d6e
When suppress_error_msg is present do no validate order and redirect
...
- When creating a new order, it's not necessary to display the "Line items can't be blank" as the order has just been created and the user is rightly doing configuration about line items
2021-04-22 10:03:36 +02:00
Matt-Yorkley
6dc23804a1
Merge pull request #7425 from mkllnk/application-record
...
Add ApplicationRecord for customisations of models
2021-04-21 23:18:03 +02:00
Matt-Yorkley
ecd433b343
Update permissions on adjustments
...
The previous permissions assumed that an adjustment's "adjustable" could only be only line items or orders, and that's no longer true. It's now commonly a shipment or a payment as well.
2021-04-21 18:17:20 +01:00
Jean-Baptiste Bellet
da5f1b0b38
Update test for subscriptions search by email and name
...
- We now display the name of the customer so we can search by its name: add specs about search by email/name
2021-04-21 09:44:30 +02:00
dependabot[bot]
519c04f2e4
Bump knapsack from 1.20.0 to 1.22.0
...
Bumps [knapsack](https://github.com/KnapsackPro/knapsack ) from 1.20.0 to 1.22.0.
- [Release notes](https://github.com/KnapsackPro/knapsack/releases )
- [Changelog](https://github.com/KnapsackPro/knapsack/blob/master/CHANGELOG.md )
- [Commits](https://github.com/KnapsackPro/knapsack/compare/v1.20.0...v1.22.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-21 05:17:32 +00:00
dependabot[bot]
99a857cdf9
Bump rubocop from 1.12.1 to 1.13.0
...
Bumps [rubocop](https://github.com/rubocop/rubocop ) from 1.12.1 to 1.13.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.12.1...v1.13.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-21 05:15:48 +00:00
Andy Brett
479897fcbd
Merge pull request #7315 from Matt-Yorkley/double-checkout
...
Double checkout
2021-04-20 10:44:32 -07:00
Andy Brett
883cc6f96f
Merge pull request #7428 from jibees/7426-show-unit-price-in-the-bulk-modal
...
Show unit price in the bulk buy modal
2021-04-20 10:43:28 -07:00
Jean-Baptiste Bellet
ddb63dff8a
Add name of the customers into subscriptions table
...
- Thus, we can filter subscriptions by customer email
2021-04-20 16:09:48 +02:00
Jean-Baptiste Bellet
5e712fa4c0
Add variable for the zIndex of the navigation header
2021-04-20 13:50:39 +02:00
Jean-Baptiste Bellet
6dbe91b199
Positions the order_cycle according to shop-tabs
...
- Move from `enterprises/shop.html.haml` to `shopping_shared/_tabs.html.haml` to handle its position correctly
- Remove marginTop and height to order cycle component and display it relative to parent's bottom (ie. the columns in `tab-buttons`)
- Adjust z-index to display the entire component
2021-04-20 13:50:33 +02:00
Matt-Yorkley
a3b90f3a63
Merge pull request #7443 from mkllnk/order-cycle-factory
...
Spec customer creation during checkout
2021-04-20 10:08:57 +02:00
Pau Pérez Fabregat
7da0dc0053
Merge pull request #7441 from openfoodfoundation/dependabot/bundler/test-unit-3.4.1
...
Bump test-unit from 3.4.0 to 3.4.1
2021-04-20 09:49:19 +02:00
Pau Pérez Fabregat
ef7c47d8f1
Merge pull request #7440 from openfoodfoundation/dependabot/bundler/acts_as_list-1.0.4
...
Bump acts_as_list from 1.0.3 to 1.0.4
2021-04-20 09:04:04 +02:00
Pau Pérez Fabregat
9907c678e4
Merge pull request #7442 from openfoodfoundation/dependabot/bundler/ddtrace-0.48.0
...
Bump ddtrace from 0.47.0 to 0.48.0
2021-04-20 09:01:58 +02:00
Pau Pérez Fabregat
87624f4c9f
Merge pull request #7416 from coopdevs/remove-old-balance-implementation
...
Remove old balance implementation
2021-04-20 08:51:27 +02:00
Maikel Linke
1753156578
Spec customer creation during checkout
...
Expanding the controller spec with real data instead of mocks to test
the real callback behaviours.
2021-04-20 16:14:41 +10:00
Maikel Linke
db0e681add
Open order cycle factory for passing enterprises
...
The simple order cycle factory was flexible enough already to work with
given suppliers and distributors. We are now re-using that code so that
you can pass these enterprises when creating a normal order cycle, too.
2021-04-20 16:06:45 +10:00
dependabot[bot]
4dc350408b
Bump ddtrace from 0.47.0 to 0.48.0
...
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb ) from 0.47.0 to 0.48.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.47.0...v0.48.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-20 05:26:52 +00:00
dependabot[bot]
8cb9053115
Bump test-unit from 3.4.0 to 3.4.1
...
Bumps [test-unit](https://github.com/test-unit/test-unit ) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/test-unit/test-unit/releases )
- [Commits](https://github.com/test-unit/test-unit/compare/3.4.0...3.4.1 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-20 05:26:14 +00:00
dependabot[bot]
f354ace186
Bump acts_as_list from 1.0.3 to 1.0.4
...
Bumps [acts_as_list](https://github.com/brendon/acts_as_list ) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/brendon/acts_as_list/releases )
- [Changelog](https://github.com/brendon/acts_as_list/blob/master/CHANGELOG.md )
- [Commits](https://github.com/brendon/acts_as_list/compare/v1.0.3...v1.0.4 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-20 05:24:53 +00:00
Andy Brett
aca19edd3b
Merge pull request #7421 from andrewpbrett/rails-5-2-prep-2
...
Prepare for Rails 5.2
2021-04-19 11:32:21 -07:00
Pau Pérez Fabregat
5b0921e6ba
Merge pull request #7435 from openfoodfoundation/dependabot/bundler/geocoder-1.6.7
...
Bump geocoder from 1.6.6 to 1.6.7
2021-04-19 16:55:08 +02:00
Pau Perez
d26c52c2fa
Memoize OrderBalance instance
...
There's no need to create an instance of such class for every call to
one of its methods. The balance is computed each time anyway, so it'll
always be up-to-date.
2021-04-19 11:52:41 +02:00
Pau Perez
5bca7d1f8f
Remove the old balance's code branch
...
This keeps the `OrderBalance` abstraction but removes the old code now
that the feature is enabled for all users in all instances and there are
no bugs reported. It's become dead code.
2021-04-19 11:52:41 +02:00
dependabot[bot]
f999e04020
Bump geocoder from 1.6.6 to 1.6.7
...
Bumps [geocoder](https://github.com/alexreisner/geocoder ) from 1.6.6 to 1.6.7.
- [Release notes](https://github.com/alexreisner/geocoder/releases )
- [Changelog](https://github.com/alexreisner/geocoder/blob/master/CHANGELOG.md )
- [Commits](https://github.com/alexreisner/geocoder/compare/v1.6.6...v1.6.7 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-04-19 06:05:20 +00:00
Andy Brett
9bddf5b00f
Merge pull request #7432 from coopdevs/add-tests-to-customers
...
Add tests to customers
2021-04-17 11:28:24 -07:00
Pau Perez
fd29030bf9
Doc through specs how customer creation works
2021-04-16 13:34:35 +02:00
Pau Perez
5087ca709a
Make method stick to Boolean instead of Nil
2021-04-16 13:23:56 +02:00
Pau Perez
e30ddf3f77
Test and simplify #require_customer?
2021-04-16 13:08:42 +02:00
Jean-Baptiste Bellet
8b3a178d97
Increase zIndex of the tooltip as it's now displayed inside modal
...
specify zIndex by using vars from modal zIndex
2021-04-16 11:09:26 +02:00
Jean-Baptiste Bellet
e0987c52ed
Add unit price information into the bulk buy modal
...
- Pass a parameter to scope: showunitprice and display unit price information if it's true
2021-04-16 11:09:05 +02:00
Jean-Baptiste Bellet
f9aab2ef5f
Adjust little cross inside blue circle to close tooltip
2021-04-16 11:08:57 +02:00
Matt-Yorkley
206d9e06ea
Reinstate old logic for adjustments controller
...
Certain types of adjustments (eg enterprise fees) cannot really be changed arbitrarily; when the order is saved and "recalculated" the values will be reset. The adjustments are still shown in the main order edit tab, but are not editable in the adjustments tab.
2021-04-15 14:00:48 +01:00
Matt-Yorkley
50da77c6db
Hide tax rate selection when editing non-admin adjustments
2021-04-15 13:59:05 +01:00
Jean-Baptiste Bellet
1e0230aae2
Instrument Flipper with ActiveSupport
2021-04-15 14:05:15 +02:00
Maikel Linke
5c0cdce597
Confine Permalinks patch to application
...
We were also patching ActiveRecord::Relation for the `#find_by_param`
methods but we are not using those any more. They were deprecated a
while ago. We now use `find_by(permalink: ...)`.
2021-04-15 15:59:03 +10:00
Maikel Linke
125374c488
Confine Preferences patch to our app
2021-04-15 15:59:03 +10:00
Maikel Linke
1893313c40
Confine DelegateBelongsTo patch to our app
2021-04-15 15:59:03 +10:00
Maikel Linke
1364b878fe
Add ApplicationRecord for customisations
...
Rails 5 introduced this new class to confine application-specific monkey
patches to our models only, and not leak into other libraries using
ActiveRecord::Base.
https://bigbinary.com/blog/application-record-in-rails-5
2021-04-15 15:59:03 +10:00
Matt-Yorkley
fa14a80295
Adapt order payment creation in failing specs
...
In the test setups here order.payments is empty
2021-04-14 09:22:31 -07:00
Matt-Yorkley
a4cb698d6f
Don't reload payments in after_save callback
2021-04-14 09:22:18 -07:00
Andy Brett
ebb413bd83
only reload payments after updating order
2021-04-14 09:22:02 -07:00
Luis Ramos
4590db1cc2
Fix view spec by adding mocks to helper methods
2021-04-14 09:20:30 -07:00
Andy Brett
3e14138a3f
fix ./spec/features/admin/customers_spec.rb:27
2021-04-14 09:19:13 -07:00
Luis Ramos
6fab8db1b0
Fix cart_service_spec to adapt to the actual usage of it from cart_controller, params are now sent inside a Parameters object, not as a hash
2021-04-14 09:18:29 -07:00
Luis Ramos
0707f3c0cc
Switch from map, that does not exist in ActionController::Parameters, to each
2021-04-14 09:17:53 -07:00
Matt-Yorkley
7fc29961e2
Fix handling of other empty params
2021-04-14 09:16:39 -07:00
Matt-Yorkley
72c6935ff8
Fix handling of empty order cycle params
...
This guard clause was returning an instance of an unpermitted Params object (containing a blank hash) here, which was causing unexpected results in various places. Returning a blank hash explicitly resolved the issue.
Fixes:
4) Admin::OrderCyclesController create as a manager of a shop when creation is successful returns success: true and a valid edit path
Failure/Error:
@order_cycle_params ||= PermittedAttributes::OrderCycle.new(params).call.
to_h.with_indifferent_access
ActionController::UnfilteredParameters:
unable to convert unpermitted parameters to hash
# ./app/controllers/admin/order_cycles_controller.rb:245:in `order_cycle_params'
# ./app/controllers/admin/order_cycles_controller.rb:44:in `create'
# ./spec/support/controller_requests_helper.rb:49:in `process_action_with_route'
# ./spec/support/controller_requests_helper.rb:27:in `spree_post'
# ./spec/controllers/admin/order_cycles_controller_spec.rb:124:in `block (5 levels) in <module:Admin>'
2021-04-14 09:16:27 -07:00
Matt-Yorkley
6f8ade52eb
Persist last_ip_address when loading current_order
...
Leaving the object with unpersisted changes breaks order locking with this error (in various places):
RuntimeError:
Locking a record with unpersisted changes is not supported. Use `save` to persist the changes, or `reload` to discard them explicitly.
2021-04-14 09:14:58 -07:00
Matt-Yorkley
0dde8112d2
Add redirect specs for PaypalController#express
2021-04-12 17:23:49 +01:00
Matt-Yorkley
06c01955f5
Rename describe block names to controller actions
2021-04-12 16:44:45 +01:00
Maikel Linke
1b14755401
Reduce AbcSize for rubocop
2021-04-09 12:15:47 +10:00
Maikel Linke
ce516db20f
Replace usage of Spree's action hooks with Rails
...
We don't need Spree's hooks any more and will remove them. Rails'
version is much simpler.
2021-04-09 12:04:31 +10:00
Cillian O'Ruanaidh
8a4e7d70a9
Pass in owner_id parameter correctly so admin/enterprises#create controller spec doesn't fail
2021-04-09 12:04:31 +10:00
Cillian O'Ruanaidh
a59a340fcd
Extract location map from registration form into its own partial, also add missing new lines
2021-04-09 12:04:31 +10:00
Cillian O'Ruanaidh
16b90cfc2e
Allow people to set enterprise latitude/longitude manually or automatically.
...
This for new changes to the enterprise registration/signup flow where a map will be displayed when people are filling in their address. On this map people can check the geocoder has geocoded their address correctly and if not they can manually adjust their latitude/longitude on the map.
But currently every time someone changes their address in the Admin > Enterprise > Address section the address would automatically be geocoded so this could overwrite the latitude/longitude that was set during sign up. To prevent the latitude/longitude from being overwritten this add's a checkbox which people need to explicity click if they want their address to be automatically geocoded, otherwise it will just use the manually configured latitude/longitude.
Note this new feature which allows people to select their location on a map during registration only works with Google maps so far. So if an instance is using Open Street Map this change also adds support for passing a :use_geocoder parameter to the Api::EnterprisesController during registration so that the address will be geocoded on the backend without the use of a map.
2021-04-09 12:03:12 +10:00
julesemmac
5e6ea31ad1
Improving user discover on ofn map
...
The context for this update is here: https://community.openfoodnetwork.org/t/improving-user-discovery-on-ofn-map/2013
Also with rebasing help from Maikel Linke <mkllnk@web.de >
2021-04-09 12:02:22 +10:00
Matt-Yorkley
4a18ba256d
Add test for paypal controller redirect
2021-04-05 14:00:07 +01:00
Matt-Yorkley
e2e943e394
Update uses of checkout_state route
2021-04-03 19:13:41 +01:00
Matt-Yorkley
fe507f63fc
Move checkout_state route from spree to main_app
2021-04-03 19:13:41 +01:00
Matt-Yorkley
dd73af8e7a
Remove duplicate checkout controller
2021-04-03 18:52:05 +01:00
Cillian O'Ruanaidh
31f737422c
Pass in owner_id parameter correctly so admin/enterprises#create controller spec doesn't fail
2021-03-19 22:21:47 +00:00
Cillian O'Ruanaidh
4e1eefa877
Extract location map from registration form into its own partial, also add missing new lines
2021-03-19 21:43:29 +00:00
Cillian O'Ruanaidh
f20cea7e4f
Allow people to set enterprise latitude/longitude manually or automatically.
...
This for new changes to the enterprise registration/signup flow where a map will be displayed when people are filling in their address. On this map people can check the geocoder has geocoded their address correctly and if not they can manually adjust their latitude/longitude on the map.
But currently every time someone changes their address in the Admin > Enterprise > Address section the address would automatically be geocoded so this could overwrite the latitude/longitude that was set during sign up. To prevent the latitude/longitude from being overwritten this add's a checkbox which people need to explicity click if they want their address to be automatically geocoded, otherwise it will just use the manually configured latitude/longitude.
Note this new feature which allows people to select their location on a map during registration only works with Google maps so far. So if an instance is using Open Street Map this change also adds support for passing a :use_geocoder parameter to the Api::EnterprisesController during registration so that the address will be geocoded on the backend without the use of a map.
2021-03-19 21:43:29 +00:00
julesemmac
971971803e
Improving user discover on ofn map
...
The context for this update is here: https://community.openfoodnetwork.org/t/improving-user-discovery-on-ofn-map/2013
Also with rebasing help from Maikel Linke <mkllnk@web.de >
2021-03-19 21:43:29 +00:00