Andy Brett
2d636c8272
Merge pull request #6546 from andrewpbrett/sca-backend
...
Fix #6543
2020-12-17 14:00:36 -08:00
Andy Brett
13d6d2c978
separate conditionals 🤦
2020-12-17 13:23:14 -08:00
Matt-Yorkley
1269e5f2e9
Merge pull request #6533 from andrewpbrett/sca-backend
...
Patch #6469 : use `purchase` to charge offline for Stripe Connect
2020-12-17 17:17:14 +01:00
Andy Brett
7fc9cc9f31
test that purchase is called by SCA and Connect providers
2020-12-16 11:09:15 -08:00
Andy Brett
934f4f278e
add spec to subscription confirm job
2020-12-15 12:24:38 -08:00
Andy Brett
484576d1ac
add unit test for stripe connect
2020-12-15 10:30:05 -08:00
Andy Brett
cb29d05069
use purchase to charge offline for Stripe Connect
2020-12-14 11:54:03 -08:00
Pau Pérez Fabregat
c79baead84
Merge pull request #6524 from ankis17/DatePickerTranslation
...
Fixed Translation for DatePicker
2020-12-14 16:41:51 +01:00
Pau Pérez Fabregat
f26507b897
Merge pull request #6454 from arku/fix/signup-route
...
Remove /signup routes
2020-12-14 16:38:23 +01:00
Pau Pérez Fabregat
d4fc3f2118
Merge pull request #6516 from coopdevs/per-user-feature-toggles
...
Refactor FeatureToggle to toggle depending on user
2020-12-14 16:03:05 +01:00
Pau Pérez Fabregat
fa812364ff
Merge pull request #6453 from andrewpbrett/fix-void-payment-error
...
fix #5829 (Voiding an initial payment (i.e. a full refund) after partially refunding the order is not possible with Stripe-SCA)
2020-12-14 09:48:41 +01:00
Pau Pérez Fabregat
9f517e1931
Merge pull request #6455 from arku/fix/tabs
...
Fix tab toggle
2020-12-14 09:34:05 +01:00
Luis Ramos
997b9b9a2e
Merge pull request #6526 from openfoodfoundation/dependabot/bundler/combine_pdf-1.0.21
...
Bump combine_pdf from 1.0.16 to 1.0.21
2020-12-13 22:40:55 +00:00
dependabot[bot]
6f763e1216
Bump combine_pdf from 1.0.16 to 1.0.21
...
Bumps [combine_pdf](https://github.com/boazsegev/combine_pdf ) from 1.0.16 to 1.0.21.
- [Release notes](https://github.com/boazsegev/combine_pdf/releases )
- [Changelog](https://github.com/boazsegev/combine_pdf/blob/master/CHANGELOG.md )
- [Commits](https://github.com/boazsegev/combine_pdf/compare/v1.0.16...v1.0.21 )
Signed-off-by: dependabot[bot] <support@github.com >
2020-12-12 21:17:26 +00:00
Andy Brett
92aeab2ec3
Merge pull request #6490 from openfoodfoundation/dependabot/bundler/capybara-3.15.1
...
Bump capybara from 2.18.0 to 3.15.1
2020-12-12 13:16:04 -08:00
Andy Brett
94d10a45a7
Merge pull request #6486 from openfoodfoundation/dependabot/bundler/factory_bot_rails-5.2.0
...
Bump factory_bot_rails from 4.10.0 to 5.2.0
2020-12-12 08:58:53 -08:00
Ankita Satyavarapu
377febd8d7
Fixed Translation for DatePicker
2020-12-11 22:52:22 -05:00
Luis Ramos
1ea775cffb
Keep factory bot v4 behaviour
...
In v5 the default value is true, that means that all parent objects (for example the order od a line item) will be built using the same strategy as the object (build or create), in v4 and now with this config, the parent is always created
We can revert this and use the default value but that will require some adaptions, quite a lot of specs are broken with that behaviour activated
2020-12-12 00:23:24 +00:00
Luis Ramos
367622cea8
Capybara v3 is not cleaning up the html into text so the permissions that are inside html li elements are not matched with the matcher have_table_row when there are multiple permissions. So, in this case, we need to do the work ourselves: looking up the correct row and then asserting the permissions are the ones required
2020-12-12 00:07:33 +00:00
Luis Ramos
ada25fa2b2
Improve stripe spec
...
I am not sure why this was passing without these stubbed requests for
the second order, but now they were correctly failing. This commit fixes
the spec.
2020-12-11 23:15:08 +00:00
Luis Ramos
480dfdf961
Handle redirect case
...
For some reason the process is now working correctly, the authorization step succeeds and a redirect link is stored in the payment with state pending. The payment state is correctly left at pending. Here we add a check for the redirect path sent by stripe and fail the authorization if there is one (it means the payment would need an extra auth step only available in the frontoffice now and probably through email to customer at some point in the future). For some reason the flash with the authorization failure message is not showing up for the user
2020-12-11 23:14:23 +00:00
Andy Brett
a745fceb53
Merge pull request #6469 from andrewpbrett/sca-backend
...
Allow SCA cards to be setup and charged offline for subscriptions
2020-12-11 14:23:12 -08:00
Pau Perez
182f0f66b6
Refactor FeatureToggle to toggle depending on user
...
This enables showing features to individual users only, which enables us
to deploy features that are not yet released to gather feedback from
product and testing, while no users have access to it.
2020-12-11 09:13:07 +01:00
Luis Ramos
62715a8060
Adapt matcher to capybara v3
2020-12-11 00:21:46 +00:00
Luis Ramos
26165cc08d
Adapt matcher to capybara v3
2020-12-11 00:20:58 +00:00
Luis Ramos
f19946af8d
Remove unnecessary test step that is breaking in capybara v3
2020-12-11 00:16:31 +00:00
Luis Ramos
c92e8de51f
Adapt matchers to capybara v3
2020-12-11 00:13:46 +00:00
Luis Ramos
ed4a7bd361
Adapt matchers to capybara v3
2020-12-11 00:09:34 +00:00
Luis Ramos
6d37a15488
Adapt matchers to capybara v3
2020-12-11 00:02:22 +00:00
Luis Ramos
79c538fad9
Fix syntax for nil property
2020-12-10 23:44:24 +00:00
Luis Ramos
b287d67f6b
Adapt matchers to capybara v3
2020-12-10 23:36:40 +00:00
Luis Ramos
5ae955c27f
Adapt matchers to capybara v3
2020-12-10 23:35:34 +00:00
Luis Ramos
fd5adab0d5
Adapt matchers to capybara v3
2020-12-10 23:27:56 +00:00
Luis Ramos
773f733c8e
Adapt matchers to capybara v3
2020-12-10 23:05:15 +00:00
Luis Ramos
80e59a920e
Adpat matcher to capybara v3
2020-12-10 23:01:01 +00:00
Luis Ramos
b58fddf098
Adapt matcher to capybara v3
2020-12-10 22:59:37 +00:00
Luis Ramos
bcf7cc1013
Replace ignore with transient according to changes in factory bot v5
2020-12-10 22:16:17 +00:00
Andy Brett
3b7313f7e3
add spec for deleting the default card
2020-12-10 12:31:58 -08:00
Andy Brett
3daccb6420
update specs with new method signature
2020-12-10 12:17:55 -08:00
Andy Brett
655512adab
add missing require statements
2020-12-10 12:17:42 -08:00
Andy Brett
f50577b489
refactor cloner to use ivars
2020-12-10 11:42:28 -08:00
Andy Brett
a1f6fe5522
remove unused method now that we use autopaging
2020-12-10 11:22:14 -08:00
Andy Brett
8c747e4812
refactor destroy_clones to separate class
2020-12-10 11:22:02 -08:00
Andy Brett
4c25edd91c
refactor find_cloned_card to separate class
2020-12-10 11:04:27 -08:00
Andy Brett
0ac248f03a
refactor offline payment methods
2020-12-10 10:26:38 -08:00
Andy Brett
13b95f41bb
use built-in auto_paging_each with stripe
2020-12-10 08:19:41 -08:00
Andy Brett
50e87a023b
rename method to validate! since it can raise an error
2020-12-10 07:45:07 -08:00
Pau Pérez Fabregat
b4b4d38d3b
Merge pull request #6509 from mkllnk/image-tweaks
...
Image code tweaks
2020-12-10 12:50:18 +01:00
Pau Pérez Fabregat
3bf58b5b7c
Merge pull request #6503 from openfoodfoundation/dependabot/bundler/delayed_job_active_record-4.1.5
...
Bump delayed_job_active_record from 4.1.4 to 4.1.5
2020-12-10 12:33:41 +01:00
Maikel Linke
3f6288d5c7
Load rake task under test for all its specs
...
If you ran only the second spec without the first, the rake file wasn't
loaded and the test failed.
2020-12-10 15:35:05 +11:00
Maikel Linke
6bf041aa74
Reduce complexity
2020-12-10 15:33:34 +11:00
Maikel Linke
e6c411684f
Don't fail on missing images when resizing
...
The changed code obtains the image dimensions when you first upload an
image. Unfortunately it's also triggered when thumbnails are refreshed.
That doesn't change the size of the original image though.
2020-12-10 15:32:43 +11:00
Luis Ramos
465d2d2f1c
Remove unused dependency
2020-12-09 18:35:44 -08:00
Maikel Linke
edf9dd7921
Update translations from Transifex
2020-12-10 13:34:05 +11:00
Maikel
5ca10d5cd1
Merge pull request #6465 from openfoodfoundation/transifex
...
Transifex
2020-12-10 13:29:12 +11:00
Maikel
33d220e777
Merge pull request #6291 from luisramos0/subs_tasks
...
Add tasks to help manually test subscriptions
2020-12-10 12:55:59 +11:00
Luis Ramos
9728b088f9
Fix syntax for nil properties
2020-12-09 23:38:16 +00:00
dependabot[bot]
c033fe70e7
Bump delayed_job_active_record from 4.1.4 to 4.1.5
...
Bumps [delayed_job_active_record](https://github.com/collectiveidea/delayed_job_active_record ) from 4.1.4 to 4.1.5.
- [Release notes](https://github.com/collectiveidea/delayed_job_active_record/releases )
- [Commits](https://github.com/collectiveidea/delayed_job_active_record/compare/v4.1.4...v4.1.5 )
Signed-off-by: dependabot[bot] <support@github.com >
2020-12-09 23:28:46 +00:00
Luis Ramos
c17998774e
Adapt factories to factory_bot_rails v5 syntax
2020-12-09 23:09:33 +00:00
Andy Brett
de786982dd
bump karma coffee preprocessor
2020-12-09 12:31:36 -08:00
dependabot[bot]
9b6702946c
Bump moment from 2.28.0 to 2.29.1
...
Bumps [moment](https://github.com/moment/moment ) from 2.28.0 to 2.29.1.
- [Release notes](https://github.com/moment/moment/releases )
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md )
- [Commits](https://github.com/moment/moment/compare/2.28.0...2.29.1 )
Signed-off-by: dependabot[bot] <support@github.com >
2020-12-09 11:40:06 -08:00
Transifex-Openfoodnetwork
7c6621a49b
Updating translations for config/locales/en_FR.yml
2020-12-10 00:36:39 +11:00
Transifex-Openfoodnetwork
134c63f353
Updating translations for config/locales/en_FR.yml
2020-12-10 00:33:37 +11:00
Transifex-Openfoodnetwork
1d64230d4b
Updating translations for config/locales/fr.yml
2020-12-10 00:31:44 +11:00
Transifex-Openfoodnetwork
8f796de35b
Updating translations for config/locales/ar.yml
2020-12-10 00:03:43 +11:00
Transifex-Openfoodnetwork
b4a43e0554
Updating translations for config/locales/ar.yml
2020-12-10 00:00:34 +11:00
dependabot[bot]
f2c37ef64d
Bump karma-chrome-launcher from 2.2.0 to 3.1.0
...
Bumps [karma-chrome-launcher](https://github.com/karma-runner/karma-chrome-launcher ) from 2.2.0 to 3.1.0.
- [Release notes](https://github.com/karma-runner/karma-chrome-launcher/releases )
- [Changelog](https://github.com/karma-runner/karma-chrome-launcher/blob/master/CHANGELOG.md )
- [Commits](https://github.com/karma-runner/karma-chrome-launcher/compare/v2.2.0...v3.1.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2020-12-08 17:58:00 -08:00
dependabot[bot]
f45d348dd7
Bump ddtrace from 0.42.0 to 0.43.0
...
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb ) from 0.42.0 to 0.43.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.42.0...v0.43.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2020-12-08 17:56:37 -08:00
dependabot-preview[bot]
351d694c13
Bump haml from 5.2.0 to 5.2.1
...
Bumps [haml](https://github.com/haml/haml ) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/haml/haml/releases )
- [Changelog](https://github.com/haml/haml/blob/main/CHANGELOG.md )
- [Commits](https://github.com/haml/haml/compare/v5.2.0...5.2.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-12-08 17:53:03 -08:00
Andy Brett
22ef9a0fef
fix long line
2020-12-08 14:37:16 -08:00
Andy Brett
7a03882314
re-refactor cart_service
2020-12-08 14:37:16 -08:00
Andy Brett
b713bd7aa7
spec updates
2020-12-08 14:37:16 -08:00
Andy Brett
c70ea44091
show specific error message when add-to-cart fails
2020-12-08 14:37:16 -08:00
Luis Ramos
7a27741cf5
Remove unnecessary capybara version control in Gemfile
2020-12-08 22:15:54 +00:00
dependabot[bot]
2a3176f7f5
Bump capybara from 2.18.0 to 3.15.1
...
Bumps [capybara](https://github.com/teamcapybara/capybara ) from 2.18.0 to 3.15.1.
- [Release notes](https://github.com/teamcapybara/capybara/releases )
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md )
- [Commits](https://github.com/teamcapybara/capybara/compare/2.18.0...3.15.1 )
Signed-off-by: dependabot[bot] <support@github.com >
2020-12-08 21:24:15 +00:00
dependabot[bot]
5c65f9bf55
Bump factory_bot_rails from 4.10.0 to 5.2.0
...
Bumps [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails ) from 4.10.0 to 5.2.0.
- [Release notes](https://github.com/thoughtbot/factory_bot_rails/releases )
- [Changelog](https://github.com/thoughtbot/factory_bot_rails/blob/master/NEWS.md )
- [Commits](https://github.com/thoughtbot/factory_bot_rails/compare/v4.10.0...v5.2.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2020-12-08 20:24:41 +00:00
Luis Ramos
0824f12472
Merge pull request #6472 from luisramos0/depen
...
Fix dependabot config
2020-12-08 20:02:26 +00:00
Luis Ramos
ab6f6c463a
Fix problem in dependabot config, yarn is not a valid package-ecosystem, we can try npm
2020-12-08 20:00:19 +00:00
Luis Ramos
e2181960bc
Merge pull request #6450 from openfoodfoundation/dependabot/bundler/knapsack-1.20.0
...
Bump knapsack from 1.19.0 to 1.20.0
2020-12-08 19:39:13 +00:00
Luis Ramos
e8ba16cb3e
Merge pull request #6457 from openfoodfoundation/dependabot/bundler/spring-2.0.2
...
Bump spring from 1.7.2 to 2.0.2
2020-12-08 19:38:55 +00:00
Luis Ramos
c233052ec6
Merge pull request #6438 from luisramos0/devise4
...
Upgrade to devise 4.7
2020-12-08 17:19:13 +00:00
Andy Brett
d55343da1a
only return gateway payment info if set on customer
2020-12-08 07:52:42 -08:00
Andy Brett
eddf8da107
update subscription spec with new method name
2020-12-08 07:52:42 -08:00
Andy Brett
3a8203094a
refactor to remove boolean flag param
2020-12-08 07:52:42 -08:00
Andy Brett
f1d439870e
use a named argument for offline param
2020-12-08 07:52:42 -08:00
Andy Brett
103366ea97
add request limits to credit card cloner
2020-12-08 07:52:42 -08:00
Andy Brett
9c544ef2f4
remove cloned cards after removing the platform card
2020-12-08 07:52:42 -08:00
Andy Brett
bc3fd8c50c
remove unused method
2020-12-08 07:52:42 -08:00
Andy Brett
277d7f44b7
refactor api customers controller; resolve merge conflict
2020-12-08 07:52:42 -08:00
Andy Brett
a466886a32
fix rubocop warnings
2020-12-08 07:52:42 -08:00
Andy Brett
3d47ad7e33
add stubs for stripe requests
2020-12-08 07:52:42 -08:00
Andy Brett
fea7576ac1
update CreditCardCloner to find existing clone
2020-12-08 07:52:42 -08:00
Andy Brett
13ab25ac45
separate method for charging offline
2020-12-08 07:52:41 -08:00
Andy Brett
cad8a018f9
put SetupIntent on the connected Stripe account
2020-12-08 07:52:41 -08:00
Andy Brett
215d1bbe20
create js setup intent when authing shop
2020-12-08 07:52:41 -08:00
Andy Brett
b517d2f0c7
guard against a stripe customer already being deleted
2020-12-08 07:52:41 -08:00
Andy Brett
cc00f24569
add spec for clearing authorizations to credit_card_controller_spec
2020-12-08 07:46:10 -08:00
Andy Brett
d0098e190f
close #4175
2020-12-08 07:46:10 -08:00
Andy Brett
1f8b4e05bb
allow charges in subscriptions spec
2020-12-08 07:46:10 -08:00
Andy Brett
f875e406a8
update karma specs for setting default card
2020-12-08 07:46:10 -08:00
Andy Brett
3b44c8e7e2
update UI after changing default card
2020-12-08 07:46:10 -08:00
Andy Brett
6fdcd6218d
add remove_shop_authorizations method to controller
2020-12-08 07:46:10 -08:00
Andy Brett
c60dcc75cd
confirm changes to default card
2020-12-08 07:46:10 -08:00
Andy Brett
4cdc1993b8
add more specific copy on cc authorization
2020-12-08 07:46:10 -08:00
Andy Brett
747345ece9
only show authorized shops if there is a default card
2020-12-08 07:46:10 -08:00
Maikel Linke
84730577da
Fail with better message when giving wrong OC id
...
The script was failing with:
NoMethodError: undefined method `update!' for nil:NilClass
Now it's failing with:
ActiveRecord::RecordNotFound: Couldn't find OrderCycle with id=1
2020-12-08 11:48:34 +11:00
Maikel Linke
906dbffb29
Fail loudly when task doesn't work
2020-12-08 11:43:21 +11:00
Maikel Linke
aa8df639c4
Style to avoid indent changes with context changes
...
When the indent of arguments is aligned with the method brackets, it
needs to be changed when the method changes. Putting all arguments on
their own line makes diffs of method changes or argument changes
clearer. See the next commit.
2020-12-08 11:38:50 +11:00
Maikel Linke
70d1888cc2
Ease reading of times
2020-12-08 11:36:15 +11:00
Maikel Linke
feb0ad452d
Safeguard production env from test script
2020-12-08 11:33:37 +11:00
Andy Brett
e866e983f6
add spec for partially refunded SCA orders
2020-12-07 14:51:47 -08:00
Transifex-Openfoodnetwork
33916cfff3
Updating translations for config/locales/nb.yml
2020-12-08 08:21:50 +11:00
Transifex-Openfoodnetwork
9333a6385e
Updating translations for config/locales/nb.yml
2020-12-08 08:00:43 +11:00
Transifex-Openfoodnetwork
c37bd8e911
Updating translations for config/locales/nb.yml
2020-12-08 07:40:37 +11:00
Andy Brett
96462325d2
fix #5829
2020-12-04 18:13:43 -08:00
dependabot-preview[bot]
567e489716
Bump spring from 1.7.2 to 2.0.2
...
Bumps [spring](https://github.com/rails/spring ) from 1.7.2 to 2.0.2.
- [Release notes](https://github.com/rails/spring/releases )
- [Changelog](https://github.com/rails/spring/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rails/spring/compare/v1.7.2...v2.0.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-12-04 19:14:16 +00:00
Arun Kumar Mohan
868a19df6e
Fix tab toggle
2020-12-03 21:03:44 -05:00
Arun Kumar Mohan
81b03906f9
Remove /signup routes
2020-12-03 20:43:28 -05:00
Luis Ramos
acddb496b7
Remove spree_i18n dependency
2020-12-03 15:34:46 -08:00
dependabot-preview[bot]
d29773d297
[Security] Bump jquery-rails from 3.1.5 to 4.4.0
...
Bumps [jquery-rails](https://github.com/rails/jquery-rails ) from 3.1.5 to 4.4.0. **This update includes a security fix.**
- [Release notes](https://github.com/rails/jquery-rails/releases )
- [Changelog](https://github.com/rails/jquery-rails/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rails/jquery-rails/compare/v3.1.5...v4.4.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-12-03 15:33:41 -08:00
Luis Ramos
0f27f57cbb
Use new Admin::ResourceController
2020-12-03 15:32:20 -08:00
Luis Ramos
1d327a61a6
Fix rubocop issue and adapt rubocop exceptions
2020-12-03 15:32:20 -08:00
Luis Ramos
0fb9f44dda
Make all controllers use new Admin::ResourceController
2020-12-03 15:32:20 -08:00
Luis Ramos
c63d99dd20
Remove Spree namespace from controller
2020-12-03 15:32:20 -08:00
Luis Ramos
99fd99cd33
Move spree admin resource controller to admin resource controller
2020-12-03 15:32:20 -08:00
Luis Ramos
1d075bbc90
Remove empty resource controller
2020-12-03 15:32:20 -08:00
Luis Ramos
6e08fccbbe
Merge resource_controller url helpers with parent version
2020-12-03 15:32:20 -08:00
Luis Ramos
fc4cf6a9a7
Merge resource_controller model_class method with parent version
2020-12-03 15:32:20 -08:00
dependabot-preview[bot]
abc58f5bb4
Bump acts_as_list from 0.3.0 to 0.9.19
...
Bumps [acts_as_list](https://github.com/brendon/acts_as_list ) from 0.3.0 to 0.9.19.
- [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/0.3.0...v0.9.19 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-12-03 15:30:24 -08:00
Matt-Yorkley
0ceba7c0a8
Update orders closing message
2020-12-03 15:29:14 -08:00
Luis Ramos
f71de8123a
Dont show 'closing in' message when oc closes in more than 3 months
2020-12-03 15:29:14 -08:00
Luis Ramos
a51d01efac
Merge pull request #6452 from luisramos0/dep
...
Move dependabot file to correct location
2020-12-03 21:35:49 +00:00
Luis Ramos
7a35fabb22
Move dependendabot config file to .github
2020-12-03 21:32:57 +00:00
dependabot-preview[bot]
67ee8c3500
Bump knapsack from 1.19.0 to 1.20.0
...
Bumps [knapsack](https://github.com/ArturT/knapsack ) from 1.19.0 to 1.20.0.
- [Release notes](https://github.com/ArturT/knapsack/releases )
- [Changelog](https://github.com/ArturT/knapsack/blob/master/CHANGELOG.md )
- [Commits](https://github.com/ArturT/knapsack/compare/v1.19.0...v1.20.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-12-03 19:14:05 +00:00
Luis Ramos
5b00868c6f
Allow mutable strings in some specs
2020-12-03 06:38:24 -08:00
Luis Ramos
bfd4adbcee
Adapt code to work with frozen strings
2020-12-03 06:38:24 -08:00
Luis Ramos
611de912a8
Switch frozen_string_literal to false so that price code keeps working
2020-12-03 06:38:24 -08:00
Luis Ramos
2b8f0abe49
Try some mass auto-correct adding frozen-string-literal to all specs
2020-12-03 06:38:24 -08:00
Luis Ramos
de19efca64
Fix rubocop issue and add missing exceptions to manual_todo to get a green rubocop run
2020-12-03 06:38:24 -08:00
Luis Ramos
6c9e12b4ea
Update rubocop exceptions file after bye bye spree
2020-12-03 06:38:24 -08:00
Andy Brett
dfabc5fa06
Update all locales with the latest Transifex translations
2020-12-02 21:41:18 -08:00
Luis Ramos
7a5a4f956a
Replace use of Faker with FFaker
2020-12-02 11:40:50 -08:00
Luis Ramos
720edb4b05
Relax ffaker version requirement so that upgrades come as possible
2020-12-02 11:40:50 -08:00
dependabot-preview[bot]
3ec1af104f
Bump ffaker from 1.32.1 to 2.11.0
...
Bumps [ffaker](https://github.com/ffaker/ffaker ) from 1.32.1 to 2.11.0.
- [Release notes](https://github.com/ffaker/ffaker/releases )
- [Changelog](https://github.com/ffaker/ffaker/blob/master/Changelog.md )
- [Commits](https://github.com/ffaker/ffaker/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-12-02 11:40:50 -08:00
dependabot-preview[bot]
80d034706c
Bump test-unit from 3.3.6 to 3.3.7
...
Bumps [test-unit](https://github.com/test-unit/test-unit ) from 3.3.6 to 3.3.7.
- [Release notes](https://github.com/test-unit/test-unit/releases )
- [Commits](https://github.com/test-unit/test-unit/compare/3.3.6...3.3.7 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-12-02 11:40:04 -08:00
Andy Brett
902f8caea9
direct specifically to shop tab
2020-12-02 11:39:02 -08:00
Andy Brett
14091cd106
fix #6415
2020-12-02 11:39:02 -08:00
Andy Brett
936f5c1a0c
remove extraneous page call
2020-12-02 11:38:10 -08:00
Andy Brett
8963a787d6
only validate unit_value presence if "items" is not chosen
2020-12-02 11:38:10 -08:00
Andy Brett
59cab902f0
add numericality validation
2020-12-02 11:38:10 -08:00
Andy Brett
4d2c93930b
resolve merge conflict
2020-12-02 11:38:10 -08:00
Tsara Sudrajat
fb769d37f9
Fix error when setting stock for new product
2020-12-02 11:38:10 -08:00
Andy Brett
65f6f1febf
rearrange css
2020-12-02 11:37:25 -08:00
Andy Brett
99b5d9e0c5
use white-space: nowrap on variant prices
2020-12-02 11:37:25 -08:00
Andy Brett
c4cd574242
fix currency spec
2020-12-02 11:37:25 -08:00
Andy Brett
a3a6205343
fix #6252
2020-12-02 11:37:25 -08:00
Maikel
25c363feba
Merge pull request #6356 from openfoodfoundation/dependabot/bundler/stringex-2.8.5
...
Bump stringex from 1.5.1 to 2.8.5
2020-12-02 16:39:00 +11:00
Luis Ramos
839278fc75
Add dependendabot config to increase limit to 10 PRs
2020-12-01 12:40:24 -08:00
Luis Ramos
3162cf9abf
Add gem to make tests work with devise callbacks
...
This is noted in the devise 4.1 release notes: https://github.com/heartcombo/devise/blob/master/CHANGELOG.md#410
2020-12-01 17:19:07 +00:00
Luis Ramos
9abdcd88e5
Move confirmable config together with other devise configs in user model
2020-12-01 17:06:39 +00:00
Luis Ramos
bd6b1dbfed
Upgrade to devise 4.7
2020-12-01 11:59:41 +00:00
Matt-Yorkley
1cab9e473b
Merge pull request #6378 from openfoodfoundation/dependabot/bundler/webmock-3.10.0
...
Bump webmock from 3.9.5 to 3.10.0
2020-12-01 11:58:01 +01:00
dependabot-preview[bot]
93a73b4823
Bump stringex from 1.5.1 to 2.8.5
...
Bumps [stringex](https://github.com/rsl/stringex ) from 1.5.1 to 2.8.5.
- [Release notes](https://github.com/rsl/stringex/releases )
- [Commits](https://github.com/rsl/stringex/compare/v1.5.1...v2.8.5 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-12-01 09:58:08 +00:00
Matt-Yorkley
7408c45980
Merge pull request #6297 from openfoodfoundation/rails-4-1
...
[Rails 4.1] Merge Rails 4.1 branch into master
2020-12-01 10:56:08 +01:00
Matt-Yorkley
fe4b20dd7b
Merge pull request #6354 from openfoodfoundation/rails-4-2-rebased
...
Rails 4.2 upgrade
2020-12-01 10:55:25 +01:00
Pau Pérez Fabregat
3c71b7f6be
Merge pull request #6428 from coopdevs/upgrade-brakeman-dependencies
...
Upgrade Ruby and Ubuntu to latest in GH action
2020-11-30 21:13:25 +01:00
Transifex-Openfoodnetwork
ea148d7f51
Updating translations for config/locales/en_US.yml
2020-12-01 00:15:59 +11:00
Transifex-Openfoodnetwork
a5761707d5
Updating translations for config/locales/en_US.yml
2020-12-01 00:12:50 +11:00
Pau Perez
259e139c47
Update all locales with the latest Transifex translations
2020-11-30 09:21:13 +01:00
Pau Perez
8c1e222788
Upgrade Ruby and Ubuntu to latest in GH action
...
It was asked for in
https://github.com/openfoodfoundation/openfoodnetwork/pull/6163/ to use
the latest stable Ruby version. It's also better to use Ubuntu's latest
as well.
2020-11-30 09:11:41 +01:00
Pau Pérez Fabregat
4ca930bdad
Merge pull request #6163 from openfoodfoundation/luisramos0-patch-2
...
Add brakeman config
2020-11-30 09:08:32 +01:00
Pau Pérez Fabregat
f0a052b65b
Merge pull request #6357 from Matt-Yorkley/secret-key-base
...
Update secret key base
2020-11-27 17:32:14 +01:00
Pau Pérez Fabregat
07a72eccd4
Merge pull request #6391 from Matt-Yorkley/paypal-stock-clashes
...
Paypal stock clashes
2020-11-27 17:08:15 +01:00
Matt-Yorkley
b04a76e8bf
Update payments_report totals
2020-11-27 14:00:29 +00:00
Matt-Yorkley
1ceb6ac916
Update orders_and_fulfilment report totals
2020-11-27 14:00:29 +00:00
Andy Brett
049f66c2aa
address #6411
2020-11-27 14:00:29 +00:00
Matt-Yorkley
9c41c296e4
Remove default comments from ApplicationResponder
2020-11-27 14:00:29 +00:00
Matt-Yorkley
d299c8cf01
Update test setup in Packer spec.
...
This is the correct way to set a variant's weight.
2020-11-27 14:00:29 +00:00
Matt-Yorkley
2b2f1ac0cd
Improve specificity of expectation in reset password email test
2020-11-27 14:00:29 +00:00
Matt-Yorkley
d2998f1190
Remove spaces in payments report
2020-11-27 14:00:29 +00:00
Matt-Yorkley
c6c20dc0f6
Add ActionController::ConditionalGet to Api::BaseController
...
This was added in Spree around the time of Rails 4.2 and seems to fix some of the response errors around the `responders` gem.
2020-11-27 14:00:29 +00:00
Matt-Yorkley
60aaf8100a
Fix some Rubocop offences
2020-11-27 14:00:29 +00:00
Matt-Yorkley
98f42a1f81
Fix output of Package#inspect
2020-11-27 14:00:29 +00:00
Matt-Yorkley
f589d278cf
Add failing spec for Package#inspect
2020-11-27 14:00:29 +00:00
Matt-Yorkley
2b884be8dd
Update specs to work with ActionMailer::DeliveryJob
2020-11-27 14:00:29 +00:00
Matt-Yorkley
64153c5072
Remove #handle_asyncronously and update to recommended asyncronous devise mail method
2020-11-27 14:00:29 +00:00
Matt-Yorkley
9de3370a8a
Fix precision in adjustment form display
...
The tests here were looking for values with a format like "10.00" but the output had changed to "10.0"
2020-11-27 14:00:29 +00:00
Matt-Yorkley
63fb46f440
Delete some dead code
...
There are some really weird issues in the spec here, and this module is not in use anywhere.
2020-11-27 14:00:29 +00:00
Matt-Yorkley
aa718824d8
Fix touch spec
...
The behavior in #change blocks ironically seems to have changed
2020-11-27 14:00:29 +00:00
Matt-Yorkley
4394d2fe43
Fix tag_rules ForbiddenAttributes errors
...
Example error:
Tag Rules creating allows creation of rules of each type
Failure/Error: expect(tag_rule.preferred_shipping_method_tags).to eq "volunteers-only"
expected: "volunteers-only"
got: ""
(compared using ==)
# ./spec/features/admin/tag_rules_spec.rb:81:in `block (3 levels) in <top (required)>'
2020-11-27 14:00:29 +00:00
Matt-Yorkley
ea5c7c5990
Fix broken redirect after bulk product update
...
Error:
As an Administrator
I want to be able to manage products in bulk
updating when a filter has been applied
Failure/Error: expect(page.find("#status-message")).to have_content "Changes saved."
expected to find text "Changes saved." in "Saving.."
# ./spec/features/admin/bulk_product_update_spec.rb:451:in `block (2 levels) in <top (required)>'
2020-11-27 14:00:29 +00:00
Matt-Yorkley
2905267142
Fix broken variant weight assignment in spec
...
OrderManagement::Stock::Packer builds a package with all the items
Failure/Error: expect(package.weight).to be_positive
expected `0.0 (#<BigDecimal:7f156c99fda8,'0.0',9(18)>).positive?` to be truthy, got false
# ./engines/order_management/spec/services/order_management/stock/packer_spec.rb:19:in `block (2 levels) in <module:Stock>'
2020-11-27 14:00:29 +00:00
Matt-Yorkley
71c6cee94c
Fix "modifying frozen string" error in Package#inspect
2020-11-27 14:00:29 +00:00
Matt-Yorkley
7ef0056225
Fix invoice rendering issue
...
Setting `locals: { :@order => order }` no longer works; `@order` is not set as expected in the partial. Fixes various errors eg:
Failure/Error: = "#{@order.number}"
ActionView::Template::Error:
undefined method `number' for nil:NilClass
# ./app/views/spree/admin/orders/invoice.html.haml:14:in `_app_views_spree_admin_orders_invoice_html_haml__1740595365701113578_70025078036080'
# ./app/services/invoice_renderer.rb:3:in `render_to_string'
# ./app/controllers/spree/admin/orders_controller.rb:89:in `invoice'
2020-11-27 14:00:29 +00:00
Matt-Yorkley
b512d3ce21
Fix column preferences spec
...
Failure/Error: expect(preferences.map(&:column_name)).to eq [:col1, :col2, :col3]
expected: [:col1, :col2, :col3]
got: ["col1", "col2", "col3"]
(compared using ==)
Diff:
@@ -1 +1 @@
-[:col1, :col2, :col3]
+["col1", "col2", "col3"]
# ./spec/models/column_preference_spec.rb:56:in `block (4 levels) in <top (required)>'
2020-11-27 14:00:29 +00:00
Matt-Yorkley
98c99de835
Use ActiveJob::Testhelper where needed
2020-11-27 14:00:29 +00:00
Matt-Yorkley
1aa2b7274b
Fix test mailer delivery
2020-11-27 14:00:29 +00:00
Matt-Yorkley
ae33df946e
Fix StateMachine specs
2020-11-27 14:00:29 +00:00
Matt-Yorkley
54ad90e071
Replace deprecated ActiveRecord::ConnectionAdapters::Column#value_to_boolean
...
This method has been removed in Rails 4.2
2020-11-27 14:00:29 +00:00
Matt-Yorkley
e1c1574931
Refactor BulkInvoiceService to use ActiveJob
...
Removes use of #handle_asynchronously, which we need to do elsewhere. Fixes:
BulkInvoiceService#start_pdf_job starts a background process to create a pdf with multiple invoices
Failure/Error:
expect do
service.start_pdf_job [1, 2]
end.to enqueue_job Delayed::PerformableMethod
expected to enqueue exactly 1 jobs, but enqueued 0
# ./spec/services/bulk_invoice_service_spec.rb:8:in `block (3 levels) in <top (required)>'
2020-11-27 14:00:29 +00:00
Matt-Yorkley
8f8973b6f9
Call #deliver in user_mailer_spec so mail is sent
2020-11-27 14:00:29 +00:00
Matt-Yorkley
3c74541145
Fix misbehaving params in Api::ProductsController
...
In some cases the given params were being deleted here.
2020-11-27 14:00:29 +00:00
Matt-Yorkley
1ab62fddcb
Patch Paranoia#delete to resolve ActiveRecord::ConnectionAdapters::NullTransaction errors
...
Patches Paranoia gem to fix a conflict with transactions in Rspec: https://github.com/rubysherpas/paranoia/issues/274
Example error:
```
Failure/Error: order.line_items.first.variant.tap(&:delete)
NoMethodError:
undefined method `state' for #<ActiveRecord::ConnectionAdapters::NullTransaction:0x0000564117dddd18>
```
2020-11-27 14:00:29 +00:00
Matt-Yorkley
1e8d400534
Add Paranoia#delete (original)
2020-11-27 14:00:29 +00:00
Matt-Yorkley
1a4e292178
Fix json "empty body" expectations
2020-11-27 14:00:29 +00:00
Matt-Yorkley
49081e171e
Fix PG::UndefinedTable errors
...
The logic of #includes has changed slightly in Rails 4.2 and now usually needs the #references method as well.
PG::UndefinedTable:
# ERROR: missing FROM-clause entry for table "enterprises"
# LINE 1: SELECT "spree_users".* FROM "spree_users" WHERE (enterprises...
# ^
# ./spec/models/spree/user_spec.rb:125:in `block (4 levels) in <top (required)>'
2020-11-27 14:00:29 +00:00
Matt-Yorkley
a5472d6b64
Convert ConfirmSignupJob to ActiveJob
2020-11-27 14:00:29 +00:00
Matt-Yorkley
62b80043ba
Fix mailer specs
...
These methods are not actually called now until the email is being delivered.
2020-11-27 14:00:29 +00:00
Matt-Yorkley
eb040de422
Fix expectation in base_helper_spec
...
The attribute on this element are now rendered in alphabetical order
2020-11-27 14:00:29 +00:00
Matt-Yorkley
b36b0eddee
Fix Rubocop issues
2020-11-27 14:00:29 +00:00
Matt-Yorkley
aaf7a90f8b
Convert OrderCycleNotificationJob to ActiveJob
2020-11-27 14:00:29 +00:00
Matt-Yorkley
9e334a4c1e
Convert ConfirmOrderJob to ActiveJob
2020-11-27 14:00:29 +00:00
Matt-Yorkley
56f2d38714
Use "raise_in_transactional_callbacks"
...
https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#error-handling-in-transaction-callbacks
2020-11-27 14:00:29 +00:00
Matt-Yorkley
6b3da4ac89
Fix "PG::ProtocolViolation: ERROR: bind message supplies 0 parameters" errors
2020-11-27 14:00:28 +00:00
Matt-Yorkley
31415d00e6
TEMP - Fix deprecated cache store naming
2020-11-27 14:00:28 +00:00
Matt-Yorkley
e155b00ab9
Fix undefined constant Spree::Responder
2020-11-27 14:00:28 +00:00
Matt-Yorkley
3c0172c507
Fix Spree::Preferences cache issue
...
In some cases this method was trying to delete a Rails.cache entry with `nil` as the key, leading to lots of errors.
2020-11-27 14:00:28 +00:00
Matt-Yorkley
3cba9a16aa
Use ActionController::Base for Api::BaseController
...
It looks like ActionController::Metal does not play nicely with the big changes to controller responders: https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#responders
2020-11-27 14:00:28 +00:00
Matt-Yorkley
58350ed338
Set ActiveJob configs and convert WelcomeEnterpriseJob to new format
...
This needs to be done for all jobs.
Docs: https://guides.rubyonrails.org/v4.2/active_job_basics.html
2020-11-27 14:00:28 +00:00
Matt-Yorkley
54a4952dc5
Fix ForbiddenAttributesError on tag rules
2020-11-27 14:00:28 +00:00
Matt-Yorkley
34bfd877cc
Fix #bulk_update in EnterprisesController
2020-11-27 14:00:28 +00:00
Matt-Yorkley
16cc0afe8f
Replace removed method #retrieve_collector_from_mimes
...
https://apidock.com/rails/v4.1.8/ActionController/MimeResponds/retrieve_collector_from_mimes
2020-11-27 14:00:28 +00:00
Matt-Yorkley
ccaff08928
Re-add ForbiddenAttributesError debugging helper
2020-11-27 14:00:28 +00:00
Matt-Yorkley
91908a0e4c
Switch from state_machine to state_machines gem
...
The old version is completely unmaintained and does not work with Rails 4.2
2020-11-27 14:00:28 +00:00
Matt-Yorkley
6b45208cf1
Define Capybara server
...
The server type now has to be set explicitly for Capybara
2020-11-27 14:00:28 +00:00
Matt-Yorkley
fb333c37e7
Fix Api controller setup for responders gem
2020-11-27 14:00:28 +00:00
Matt-Yorkley
3090cfa909
Add setup for responders gem
2020-11-27 14:00:28 +00:00
Matt-Yorkley
9205c85d4d
Run rake db:migrate
2020-11-27 14:00:28 +00:00
Matt-Yorkley
ff9f6c3317
Remove foreigner gem
...
https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#foreign-key-support
2020-11-27 14:00:28 +00:00
Matt-Yorkley
25dd47e511
Add responders gem
...
https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#responders
2020-11-27 14:00:28 +00:00
Matt-Yorkley
ece3e7aa69
Update gems to Rails 4.2
2020-11-27 14:00:28 +00:00
Luis Ramos
ff8d935699
Fix problem in enterprises controller
2020-11-27 13:59:46 +00:00
Luis Ramos
1d32ecab98
Fix spec by adding necessary references statement
2020-11-27 13:59:46 +00:00
Luis Ramos
ff17ced101
Fix enterprises spec by adding needed references statement
2020-11-27 13:59:46 +00:00
Luis Ramos
fa6cf0f281
Fix prod importer spec in rails 4.1
2020-11-27 13:59:46 +00:00
Luis Ramos
7e39d78733
Fix Long Method rubocop issue
2020-11-27 13:59:46 +00:00
Luis Ramos
0152b4da55
Fix rubocop issues
2020-11-27 13:59:46 +00:00
Luis Ramos
2a03e42f2a
Update deep_munge patch to rails 4.1 where the code is now in ActionDispatch::Request::Utils
2020-11-27 13:59:46 +00:00
Matt-Yorkley
01a726d9bd
Fix stubbing of stock totals
...
Recent changes to the way count_on_hand is summed in Spree::Stock::Quantifier mean the old method here will not work. Error:
```
2) Spree::Variant#in_stock? when stock_items are not backorderable when stock_items out of stock return false if stock_items out of stock
Failure/Error: expect(variant.in_stock?).to be_falsy
expected: falsey value
got: true
# ./spec/models/spree/variant_spec.rb:241:in `block (5 levels) in <module:Spree>'
```
2020-11-27 13:59:46 +00:00
Matt-Yorkley
93fe8dbc5f
Replace #scoped, which is now deprecated and removed in Rails 4.1
2020-11-27 13:59:46 +00:00
Matt-Yorkley
5c5a6361bf
Fix nasty json encoding issue
...
The enterprise id returned by these json endpoints was being returned in *unicode* format, so where Angular was expecting a simple integer it was instead getting strings like: "\u0017"
2020-11-27 13:59:46 +00:00
Matt-Yorkley
0f2cbe8a52
Fix API exception response handling
...
For some reason when using `render text:` instead of `render json:` for this response, the status code being returned was 200 instead of the clearly explicitly defined 422 (:unprocessable_entity). I absolutely have no idea why!
2020-11-27 13:59:46 +00:00
Matt-Yorkley
f1002b953d
Disable Javascript CSRF protection on EnterprisesController#check_permalink route
...
This route checks if an enterprise permalink is taken or not. Allowing the route to be accessed via Javascript without strict CSRF protection is reasonable. Fixes the following errors:
ActionController::InvalidCrossOriginRequest: Security warning: an embedded <script> tag on another site requested protected JavaScript. If you know what you're doing, go ahead and disable forgery protection on this action to permit cross-origin JavaScript embedding.
2020-11-27 13:59:46 +00:00
Luis Ramos
3ebc8145df
Avoid calling update with nil values
2020-11-27 13:59:46 +00:00
Luis Ramos
edc1773676
Fix some calls to sum in reports code
2020-11-27 13:59:46 +00:00
Luis Ramos
6814eb663f
Fix respond_with error
2020-11-27 13:59:46 +00:00
Luis Ramos
78cfcd905f
Adapt more & and no & when using sum
2020-11-27 13:59:46 +00:00
Luis Ramos
9bbef16804
Converting all calls to ActiveRelation#sum to use a symbol with &
...
This is only applicable to database columns, if we are summing using a method in the model than the & is required!
2020-11-27 13:59:46 +00:00
Luis Ramos
974240fd4b
Fix two sum calls in checkout helper
2020-11-27 13:59:46 +00:00
Luis Ramos
7472b7cc27
Fix sum call in quantifier
2020-11-27 13:59:46 +00:00
Eduardo
a8a933d73a
change from render json to render plain due to template missing issue
2020-11-27 13:59:46 +00:00
Luis Ramos
bcd07e1791
Upgrade to rails 4.1
2020-11-27 13:59:46 +00:00
Luis Ramos
ecb29ec830
Add state machine patch to fix error with state machine
...
See here for details: https://github.com/pluginaweek/state_machine/issues/251#issuecomment-32133267
2020-11-27 13:59:46 +00:00
Luis Ramos
202aa3e5b7
Use reflections instead of, now gone, reflections
2020-11-27 13:59:46 +00:00
Luis Ramos
a05f43000a
ActionView was extracted from ActionPack in rails 4.1 so we need to use ActionView
2020-11-27 13:59:46 +00:00
Luis Ramos
61708e5deb
AbstractController::ViewPaths was moved to ActionView::ViewPaths in rails 4.1
2020-11-27 13:59:46 +00:00
Matt-Yorkley
27586d072d
Merge pull request #6423 from openfoodfoundation/revert-6277-controllers
...
Revert "Move Spree::Admin::BaseController to Admin::BaseController"
2020-11-27 14:29:15 +01:00
Matt-Yorkley
3bfa903912
Revert "Move Spree::Admin::BaseController to Admin::BaseController"
2020-11-27 14:11:57 +01:00
Matt-Yorkley
0ba670b180
Ensure order is cleanly reset to cart state when redirecting to cart
2020-11-27 11:42:46 +00:00
Matt-Yorkley
c4cfc1dc05
Improve order test in paypal controller spec
2020-11-27 11:42:06 +00:00
Pau Pérez Fabregat
17957ed6c0
Merge pull request #6408 from openfoodfoundation/transifex
...
Transifex
2020-11-27 10:31:56 +01:00
Pau Pérez Fabregat
8b6a08457a
Merge pull request #6293 from luisramos0/subs_debug
...
Add task to print Subscriptions debug info
2020-11-27 10:17:57 +01:00
Maikel
9e2a3d6973
Merge pull request #6277 from luisramos0/controllers
...
Move Spree::Admin::BaseController to Admin::BaseController
2020-11-27 16:13:55 +11:00
Icker
55b21310e4
Added introductory information for testing.
2020-11-25 09:44:02 -08:00
Transifex-Openfoodnetwork
1266a37ac5
Updating translations for config/locales/en_NZ.yml
2020-11-25 05:39:17 +11:00
Transifex-Openfoodnetwork
54feb2f57d
Updating translations for config/locales/en_AU.yml
2020-11-24 07:31:32 +11:00
Transifex-Openfoodnetwork
e9eb90507e
Updating translations for config/locales/ca.yml
2020-11-24 07:22:28 +11:00
Transifex-Openfoodnetwork
ee44159c83
Updating translations for config/locales/es.yml
2020-11-24 07:19:47 +11:00
Transifex-Openfoodnetwork
8861f5c6aa
Updating translations for config/locales/ca.yml
2020-11-24 07:19:18 +11:00
Matt-Yorkley
b089404891
Merge pull request #6362 from coopdevs/remove-unused-truncate-html-gem
...
Remove unused truncate_html gem
2020-11-23 00:49:34 +01:00
Matt-Yorkley
2fa2a30c67
Add spec coverage, refactor, avoid double-render errors
...
👍
2020-11-22 18:37:31 +00:00
Matt-Yorkley
cabec7e73f
Fix Rubocop warnings and tidy up
2020-11-22 18:02:54 +00:00
Matt-Yorkley
87df44764f
Extract stock-check logic to controller concern and inject prior to final Paypal payment confirmation.
2020-11-22 18:02:52 +00:00
Andy Brett
8f25568530
Merge pull request #6390 from jhsu802701/qtest
...
SIMPLE: added scripts for running test suite in quiet mode
2020-11-20 12:15:04 -08:00
Andy Brett
b1b422b90e
fix/silence rubocop styles
2020-11-20 10:41:31 -08:00
Andy Brett
cd94b23277
fix rubocop styles
2020-11-20 10:35:02 -08:00
Andy Brett
4e155641fc
fix nil error if no proxy orders found
2020-11-20 10:32:48 -08:00
Andy Brett
85d99f3bf2
Merge branch 'master' into controllers
2020-11-20 08:12:03 -08:00
Andy Brett
c6b3a615f1
Merge pull request #6385 from jhsu802701/update_db_schema
...
SIMPLE: updated db/schema.rb with 'bundle exec rake db:migrate'
2020-11-20 08:03:27 -08:00
Matt-Yorkley
5429bd8d7a
Update all locales with the latest Transifex translations
2020-11-19 23:13:09 +00:00
Matt-Yorkley
300e87648b
Merge pull request #6394 from openfoodfoundation/transifex
...
Transifex
2020-11-20 00:11:03 +01:00
Matt-Yorkley
4a9ac62d91
Merge branch 'master' into transifex
2020-11-20 00:10:48 +01:00
Luis Ramos
d7a1d7769c
Merge pull request #6258 from luisramos0/s3_with_region
...
Upgrade aws-sdk and switch to S3 virtual host style URLs
2020-11-19 22:59:57 +00:00
Transifex-Openfoodnetwork
cd20d2612d
Updating translations for config/locales/cy.yml
2020-11-19 22:09:04 +11:00
Transifex-Openfoodnetwork
446007e283
Updating translations for config/locales/cy.yml
2020-11-19 22:05:56 +11:00
Transifex-Openfoodnetwork
7bc59512fd
Updating translations for config/locales/cy.yml
2020-11-19 22:02:49 +11:00
Pau Pérez Fabregat
8c9960854f
Merge pull request #6343 from Matt-Yorkley/api-controllers
...
API controllers: strong paramaters
2020-11-19 09:04:16 +01:00
Matt-Yorkley
242c1a2715
Add new Paypal feature spec
2020-11-19 01:44:53 +00:00
Matt-Yorkley
21d67a0723
Extract some more paypal-specific test code to new helper
2020-11-19 01:44:38 +00:00
Jason Hsu
59b3bfa161
Added scripts for running test suite in quiet mode and updated docker/README.md
2020-11-18 16:25:03 -06:00
Transifex-Openfoodnetwork
9fc3ff0250
Updating translations for config/locales/en_GB.yml
2020-11-19 05:14:36 +11:00
Transifex-Openfoodnetwork
7ddbc10c19
Updating translations for config/locales/en_GB.yml
2020-11-19 05:11:27 +11:00
Matt-Yorkley
41a5787830
Extract paypal response stubbing to helper
2020-11-18 15:39:01 +00:00
Matt-Yorkley
010c1c799d
Add some notes on paypal checkout flow
2020-11-18 14:55:29 +00:00
Matt-Yorkley
2faea65f82
Bring in Spree::PaypalController#confirm method
...
Original method from the gem. This handles the post-payment response from paypal.
2020-11-18 14:51:23 +00:00
Matt-Yorkley
dd8f139c1b
Memoize Spree::PaypalController#payment_method
...
This gets called 4 or 5 times in a single request just to read basic attributes from the object. The query doesn't need to be repeated each time
2020-11-18 13:45:14 +00:00
Matt-Yorkley
6d0d4b5096
Bring in Spree::PaypalController#payment_method
...
Original method from the gem. Modified in preceding commit.
2020-11-18 13:45:13 +00:00
Matt-Yorkley
b0a70f0ba3
Improve TaxonController strong params handling
2020-11-17 19:48:27 +00:00
Matt-Yorkley
0b18b0dc0a
Include Calculator attributes in PaymentMethod nested attributes and DRY repeated code
2020-11-17 19:04:26 +00:00
Matt-Yorkley
d225294b6b
Extract to PermittedAttributes::Calculator
2020-11-17 18:51:48 +00:00
Matt-Yorkley
3547b9fe56
Add missing calculator params
2020-11-17 18:51:48 +00:00
Matt-Yorkley
1766f33d46
Use ActionController::Metal and include StrongParameters
2020-11-17 18:51:48 +00:00
Matt-Yorkley
cbdb6126a6
Fix strong_params in API enterprises_controller
2020-11-17 18:51:48 +00:00
Matt-Yorkley
6a26c9da8c
Fix strong_params in API products_controller
2020-11-17 18:51:48 +00:00
Matt-Yorkley
36f4f40e84
Refactor and fix PaymentMethod strong params
2020-11-17 18:51:48 +00:00
Matt-Yorkley
787f29105c
Fix ForbiddenAttribute errors for bulk update of enterprise fees and order cycles
...
Example error:
As an administrator
I want to manage simple order cycles
updating many order cycle opening/closing times at once
Failure/Error: raise ActiveModel::ForbiddenAttributesError, params.to_s
ActiveModel::ForbiddenAttributesError:
{"order_cycle_set"=>{"collection_attributes"=>{"0"=>{"id"=>62, "name"=>"Updated Order Cycle 1", "orders_open_at"=>"2040-12-01 12:00:00", "orders_close_at"=>"2040-12-01 12:00:01"}, "1"=>{"id"=>63, "name"=>"Updated Order Cycle 2", "orders_open_at"=>"2040-12-01 12:00:02", "orders_close_at"=>"2040-12-01 12:00:03"}, "2"=>{"id"=>64, "name"=>"Updated Order Cycle 3", "orders_open_at"=>"2040-12-01 12:00:04", "orders_close_at"=>"2040-12-01 12:00:05"}}}, "controller"=>"admin/order_cycles", "action"=>"bulk_update", "format"=>"json", "order_cycle"=>{}}
# ./app/controllers/application_controller.rb:20:in `print_params'
# ./lib/open_food_network/rack_request_blocker.rb:36:in `call'
# ------------------
# --- Caused by: ---
# ActiveModel::ForbiddenAttributesError:
# ActiveModel::ForbiddenAttributesError
# ./app/models/model_set.rb:29:in `block in collection_attributes='
2020-11-17 18:51:48 +00:00
Matt-Yorkley
642a294844
Fix broken order edit shipment
...
As an administrator
I want to create and edit orders
as an enterprise manager viewing the edit page with different shipping methods can edit shipping method
Failure/Error: expect(page).to have_content "Shipping: #{different_shipping_method_for_distributor1.name}"
expected to find text "Shipping: Different" in "Logged in as : owen@romaguera.ca Account Logout Store DASHBOARD PRODUCTS ORDER CYCLES ORDERS REPORTS ENTERPRISES CUSTOMERS Order # R813516688 CANCEL ACTIONS BACK TO ORDER LIST John Doe - ADD PRODUCT NAME OR SKU (ENTER AT LEAST FIRST 4 CHARACTERS OF PRODUCT NAME) Select a variant 100 - PENDING ITEM DESCRIPTION PRICE QUANTITY TOTAL Product #3 - 9924 - 1g, S $10.00 1 x none $10.00 Product #4 - 5548 - 1g, S $10.00 1 x none $10.00 Product #5 - 8080 - 1g, S $10.00 1 x none $10.00 Product #6 - 3591 - 1g, S $10.00 1 x none $10.00 Product #7 - 6461 - 1g, S $10.00 1 x none $10.00 Product #8 - 4071 - 1g, S $110.00 1 x none $110.00 SHIPPING METHOD Different $0.00 Normal $0.00 Different $0.00 Tracking: U10000 LINE ITEM ADJUSTMENTS NAME AMOUNT Tax 1 10.0%: $10.00 ORDER ADJUSTMENTS NAME AMOUNT Transaction fee: $0.00 ORDER TOTAL $160.00 DISTRIBUTION Distributor: Enterprise 4 Order cycle: Order Cycle 2 UPDATE AND RECALCULATE FEES or BACK ORDER INFORMATION STATUS COMPLETE TOTAL : $160.00 SHIPMENT : PENDING PAYMENT : BALANCE DUE DATE COMPLETED : November 08, 2020 1:51 AM ORDER DETAILS CUSTOMER DETAILS ADJUSTMENTS PAYMENTS RETURN AUTHORIZATIONS"
# ./spec/features/admin/order_spec.rb:291:in `block (5 levels) in <top (required)>'
2020-11-17 18:51:48 +00:00
Matt-Yorkley
7401e34c52
Fix credit cards strong params
2020-11-17 18:51:48 +00:00
Matt-Yorkley
ca41bbcee7
Fix Api::VariantsController ForbiddenAttributesError
2020-11-17 18:51:48 +00:00
Matt-Yorkley
c374bf5e49
Fix strong_params in API taxons_controller
2020-11-17 18:51:48 +00:00
Matt-Yorkley
417c4d9aea
Inherit from ActionController::Base in API Controllers
2020-11-17 18:51:48 +00:00
Jason Hsu
b85f8d4b45
Updated db/schema.rb with 'bundle exec rake db:migrate'
2020-11-16 18:23:00 -06:00
Maikel Linke
315a5f0fd9
Update translations
2020-11-17 10:17:08 +11:00
Transifex-Openfoodnetwork
4ca8c220e9
Updating translations for config/locales/fr_CA.yml
2020-11-17 09:06:27 +11:00
Transifex-Openfoodnetwork
442dbaa7d7
Updating translations for config/locales/en_CA.yml
2020-11-17 08:49:15 +11:00
Matt-Yorkley
c080c1f1d6
Merge pull request #6382 from Matt-Yorkley/menu-fix
...
Fix the user menu
2020-11-16 22:20:12 +01:00
Matt-Yorkley
3b92df42c3
Fix the menu!
...
🙈
2020-11-16 19:05:08 +00:00
Matt-Yorkley
e2dbb150e5
Update all locales with the latest Transifex translations
2020-11-16 16:02:40 +00:00
Luis Ramos
ca29604ff8
Merge pull request #6377 from luisramos0/repeat_calculator_migrations
...
Repeat calculator migrations to clean up existing data
2020-11-16 10:46:42 +00:00
Transifex-Openfoodnetwork
57bc146de9
Updating translations for config/locales/it.yml
2020-11-14 21:08:20 +11:00
dependabot-preview[bot]
66799bad46
Bump webmock from 3.9.5 to 3.10.0
...
Bumps [webmock](https://github.com/bblimke/webmock ) from 3.9.5 to 3.10.0.
- [Release notes](https://github.com/bblimke/webmock/releases )
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md )
- [Commits](https://github.com/bblimke/webmock/compare/v3.9.5...v3.10.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-11-13 19:16:37 +00:00
Luis Ramos
e5b7c036d5
Repeat calculator migrations to clean up existing data
2020-11-13 16:35:22 +00:00
Pau Pérez Fabregat
6f1d8664ac
Merge pull request #6355 from coopdevs/install-gems-on-docker-boot
...
Install any missing gems when booting docker
2020-11-13 13:32:27 +01:00
Pau Pérez Fabregat
8d5e90e40f
Merge pull request #6365 from Matt-Yorkley/mail-settings
...
Allow mail_auth_type to be set
2020-11-13 13:30:17 +01:00
Pau Pérez Fabregat
6db80e837b
Merge pull request #6361 from andrewpbrett/fix-gateway-error-error
...
move gateway_error require to lib/spree/core.rb
2020-11-13 13:15:13 +01:00
Matt-Yorkley
cec295a113
Merge pull request #6373 from andrewpbrett/fix-admin-users
...
specify Spree routes for pagination, fix 500 on admin/users
2020-11-13 11:30:16 +01:00
Maikel Linke
a553547403
Update translations
2020-11-13 14:15:45 +11:00
Maikel
1e4edc671a
Merge pull request #6364 from openfoodfoundation/transifex
...
Transifex
2020-11-13 14:05:12 +11:00
Maikel
b2113c96a2
Merge pull request #6317 from openfoodfoundation/dependabot/bundler/kaminari-0.17.0
...
Bump kaminari from 0.14.1 to 0.17.0
2020-11-13 13:58:25 +11:00
Maikel
408103516e
Merge pull request #6321 from openfoodfoundation/dependabot/bundler/awesome_nested_set-3.2.1
...
Bump awesome_nested_set from 3.0.3 to 3.2.1
2020-11-13 13:30:18 +11:00
Maikel
d96216b8d7
Merge pull request #6268 from yihyang/master-yy-added-product-sorting
...
Sort products alphabetically in OC edit/create page
2020-11-13 13:29:54 +11:00
Maikel
d4ff9055c0
Merge pull request #6351 from efgalvao/issue#6249
...
Fixes Issue#6249
2020-11-13 13:28:55 +11:00
Maikel
591ba34eb6
Merge pull request #6335 from cillian/reset-on-demand-on-inventory-import
...
When resetting stock to 0 on absent products in inventory import also reset the on demand setting
2020-11-13 13:28:17 +11:00
Andy Brett
8dfd3f624d
paginate zones using spree routes as well
2020-11-12 14:24:04 -08:00
Andy Brett
9cf30b431a
specify Spree routes for pagination
2020-11-12 14:09:59 -08:00
Pau Pérez Fabregat
777cedd90d
Merge pull request #6305 from efgalvao/issue#6292
...
Fixed issue #6292 .
2020-11-12 17:42:42 +01:00
Transifex-Openfoodnetwork
b80d15b672
Updating translations for config/locales/pt_BR.yml
2020-11-13 02:43:56 +11:00
Transifex-Openfoodnetwork
228c7cc13a
Updating translations for config/locales/pt_BR.yml
2020-11-13 02:40:55 +11:00
Pau Pérez Fabregat
7c4691ab33
Merge pull request #6339 from andrewpbrett/fix-instance-unit-picker
...
Fix #6304 (Product edit: Cannot change Variant unit scale of an existing product)
2020-11-12 16:15:00 +01:00
Pau Pérez Fabregat
692adb0113
Merge pull request #6336 from coopdevs/fix-shop-layout
...
Fix .top-bar-section not to wrap the icons-menu
2020-11-11 17:29:53 +01:00
Matt-Yorkley
58e34b5ad6
Allow mail_auth_type to be set
2020-11-11 15:51:08 +00:00
Transifex-Openfoodnetwork
694bc6a598
Updating translations for config/locales/ar.yml
2020-11-12 02:18:05 +11:00
Transifex-Openfoodnetwork
e06b82f335
Updating translations for config/locales/ar.yml
2020-11-12 02:14:55 +11:00
Pau Perez
f9869d4360
Remove unused truncate_html gem
...
It seems that we don't use this gem in OFN. It was used in Spree in
https://github.com/openfoodfoundation/spree/blob/2-1-0-stable/core/app/helpers/spree/orders_helper.rb
to truncate the product description. We don't because we show it in
the product modal, and there's no trace of that helper method in our
codebase nor I see the gem used at all.
2020-11-11 13:18:23 +01:00
Matt-Yorkley
1cad631bdb
Replace secret_token and update comments
...
`secret_token` is apparently still called directly in other places...
2020-11-11 01:30:52 +00:00
Andy Brett
17202ff39c
move gateway_error require to lib/spree/core.rb
2020-11-10 14:55:56 -08:00
Luis Ramos
5d93180081
Move subs tasks into subs:test namespace
2020-11-10 22:03:36 +00:00
Luis Ramos
fdfc0b330f
Remove some duplicated code
2020-11-10 22:03:36 +00:00
Luis Ramos
63d62d7ce4
Improve subs task by making it handle open and close times of the Order Cycle being tested
2020-11-10 22:03:36 +00:00
Luis Ramos
51451292bd
Add task to closse OC and confirm orders
2020-11-10 22:03:36 +00:00
Luis Ramos
2bb22fb7f4
Add task to reset Orders inside a specific Order Cycle by repeating the
...
placement job
2020-11-10 22:03:36 +00:00
Luis Ramos
5289a5b381
Add namespace to all sample data factories
...
These factories are not used in testing and this way we avoid collisions on the root namespace as it was happening already with OrderFactory
2020-11-10 22:03:36 +00:00
Matt-Yorkley
03d49c7987
Update secret key base
...
`secret_token` is no longer used in Rails 4+
2020-11-10 20:46:15 +00:00
Andy Brett
d5037abbe7
add specs for new/edit product pages
2020-11-10 10:49:14 -08:00
Pau Perez
5ddfc54b2b
Install any missing gems when booting docker
...
This runs `bundle install` if there are any missing gems when booting
the containers. `bundle check` ensures we don't unnecessarily run
`bundle install`, which is rather slow.
This avoids having to build the entire image (painfully slow) or having
to bring up a container just to install the gems. I used to do this
with `docker-compose run --rm web bundle install`.
2020-11-10 18:08:34 +01:00
Pau Pérez Fabregat
bea8982085
Merge pull request #6329 from openfoodfoundation/transifex
...
Transifex
2020-11-10 17:37:00 +01:00
Pau Pérez Fabregat
fc06cc242b
Merge pull request #6210 from ipalo/feature/update-docker-image-to-ubuntu-20-04
...
Update the base Ubuntu Docker image from 18.04 to 20.04
2020-11-10 17:30:03 +01:00
Pau Pérez Fabregat
b70c349b05
Merge pull request #6352 from openfoodfoundation/dependabot/bundler/webmock-3.9.5
...
Bump webmock from 3.9.4 to 3.9.5
2020-11-10 16:47:44 +01:00
Pau Perez
634ab5ca6a
Don't scale logo image
...
The trick using `width: 100%` and a set `max-width` doesn't work if we
can't know the image width as it can be uploaded by superadmins. There's
no need though because the media query breakpoint triggers just before that.
2020-11-10 09:51:41 +01:00
Matt-Yorkley
a802fe29be
Fix typo in initializer
2020-11-10 00:07:06 +00:00
Luis Ramos
88ac5dc955
Fix rubocop issues by refactoring code
2020-11-10 00:03:34 +00:00
Luis Ramos
e879aa1bed
Switch to s3_alias_url that enabble virtual host type of path
2020-11-10 00:03:33 +00:00
Luis Ramos
94a815a9ef
Upgrade aws-sdk and set s3 host name using the provided url config.
...
This will enable us to set hostnames with the s3 region defined and that
will make our image upload work for all s3 regions.
2020-11-10 00:03:33 +00:00
Luis Ramos
c7c5a95407
Merge pull request #6345 from Matt-Yorkley/flaky-oc-spec
...
Improve flaky order cycle spec
2020-11-09 21:59:41 +00:00
dependabot-preview[bot]
1825c90a5f
Bump webmock from 3.9.4 to 3.9.5
...
Bumps [webmock](https://github.com/bblimke/webmock ) from 3.9.4 to 3.9.5.
- [Release notes](https://github.com/bblimke/webmock/releases )
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md )
- [Commits](https://github.com/bblimke/webmock/compare/v3.9.4...v3.9.5 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-11-09 19:14:30 +00:00
efgalvao
307b1ca9f9
Fixes Issue#6249
2020-11-09 14:06:37 -03:00
Pau Perez
17abb3e345
Fix feature specs
...
The underlying markup and CSS changed but the tests did not.
2020-11-09 15:43:54 +01:00
Pau Perez
1903c575ff
Reorder properties alphabetically
...
As Hound demands.
2020-11-09 15:40:25 +01:00
Pau Perez
9a885173b9
Remove element from class selector
...
Fixes Hound error `Avoid qualifying class selectors with an element.`.
2020-11-09 15:39:09 +01:00
Transifex-Openfoodnetwork
3167e5ae2b
Updating translations for config/locales/ru.yml
2020-11-10 01:29:44 +11:00
Transifex-Openfoodnetwork
7f968b2b10
Updating translations for config/locales/ru.yml
2020-11-10 01:26:34 +11:00
Transifex-Openfoodnetwork
b08299e83a
Updating translations for config/locales/ru.yml
2020-11-10 01:23:23 +11:00
Matt-Yorkley
d9e2a80a4f
Improve flaky order cycle spec
...
There are various points in this spec where content is dynamically added to the DOM, but Capybara is jumping ahead to start interacting with it before it as actually finished loading.
2020-11-09 11:26:12 +00:00
dependabot-preview[bot]
863702ed4b
Bump awesome_nested_set from 3.0.3 to 3.2.1
...
Bumps [awesome_nested_set](https://github.com/collectiveidea/awesome_nested_set ) from 3.0.3 to 3.2.1.
- [Release notes](https://github.com/collectiveidea/awesome_nested_set/releases )
- [Changelog](https://github.com/collectiveidea/awesome_nested_set/blob/master/CHANGELOG )
- [Commits](https://github.com/collectiveidea/awesome_nested_set/commits/v3.2.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-11-07 08:58:44 +00:00
Luis Ramos
6114dfb4ef
Merge pull request #6337 from openfoodfoundation/dependabot/bundler/webmock-3.9.4
...
Bump webmock from 3.9.3 to 3.9.4
2020-11-07 08:57:13 +00:00
Luis Ramos
f39008f3d3
Merge pull request #6338 from openfoodfoundation/dependabot/bundler/highline-2.0.3
...
Bump highline from 1.6.18 to 2.0.3
2020-11-07 08:57:02 +00:00
Andy Brett
99301e1fb2
fix #6304
2020-11-06 12:49:07 -08:00
dependabot-preview[bot]
cb0b7ed030
Bump highline from 1.6.18 to 2.0.3
...
Bumps [highline](https://github.com/JEG2/highline ) from 1.6.18 to 2.0.3.
- [Release notes](https://github.com/JEG2/highline/releases )
- [Changelog](https://github.com/JEG2/highline/blob/master/Changelog.md )
- [Commits](https://github.com/JEG2/highline/commits/v2.0.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-11-06 19:17:11 +00:00
dependabot-preview[bot]
7d9948f5b6
Bump webmock from 3.9.3 to 3.9.4
...
Bumps [webmock](https://github.com/bblimke/webmock ) from 3.9.3 to 3.9.4.
- [Release notes](https://github.com/bblimke/webmock/releases )
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md )
- [Commits](https://github.com/bblimke/webmock/compare/v3.9.3...v3.9.4 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-11-06 19:14:43 +00:00
Transifex-Openfoodnetwork
18a7bdc631
Updating translations for config/locales/de_DE.yml
2020-11-07 05:32:48 +11:00
Transifex-Openfoodnetwork
6083d61ba7
Updating translations for config/locales/de_DE.yml
2020-11-07 05:29:38 +11:00
Transifex-Openfoodnetwork
9e2054dcd4
Updating translations for config/locales/de_DE.yml
2020-11-07 05:26:28 +11:00
Pau Perez
b5f27d48df
Fix .top-bar-section not to wrap the icons-menu
...
This line-wrap makes the icons-menu overlap the OC selector. The menu's
background is transparent, what makes it look even more broken.
The fix involves refactoring the `.top-bar-section` into using flexbox
instead of this highly coupled CSS and floats. With flexbox it becomes
as easy as telling the browser to space the three sections evenly
filling-up the window, while scaling down the logo if there's not enough
room.
The root cause is that every instance uses a custom logo, which wasn't
the one we used while designing and implementing. This is why using
fixed-sizes in pixels won't work.
2020-11-06 17:35:24 +01:00
Cillian O'Ruanaidh
89d63dfbb9
When resetting stock to 0 on absent products in inventory import also reset the on demand setting
...
Before when you imported inventory and clicked the 'Set stock to zero for all existing products not present in the file' option it would set the on hand stock to 0 but if the variant override was also set to be on demand the inventory would still be available for sale. This change makes sure the on demand setting is turned off too.
Fixes #6289 .
2020-11-06 14:57:31 +00:00
Matt-Yorkley
73995d1aff
Merge pull request #6334 from Matt-Yorkley/hound2
...
Switch to rubocop_styleguide.yml as style source
2020-11-06 12:55:23 +01:00
Matt-Yorkley
f5a9c6f3f4
Switch to rubocop_styleguide.yml as style source
2020-11-06 11:53:56 +00:00
Matt-Yorkley
f6aeb04b14
Merge pull request #6322 from Matt-Yorkley/hound
...
Add HoundCI config
2020-11-06 12:20:03 +01:00
Matt-Yorkley
00320e4387
Use .scss-lint.yml with HoundCI
2020-11-06 10:18:35 +00:00
Matt-Yorkley
ebd7409f70
Add scss-lint configs to .scss-lint.yml
2020-11-06 10:18:34 +00:00
Transifex-Openfoodnetwork
e86d84e10f
Updating translations for config/locales/en_FR.yml
2020-11-06 19:26:16 +11:00
Transifex-Openfoodnetwork
b7a503a848
Updating translations for config/locales/fr.yml
2020-11-06 19:26:04 +11:00
Luis Ramos
28570cded2
Update all locales with the latest Transifex translations
2020-11-06 04:20:08 +00:00
Luis Ramos
c0bb9aad5e
Merge pull request #6286 from openfoodfoundation/transifex
...
Transifex
2020-11-06 04:18:56 +00:00
Luis Ramos
b281e7e9e5
Merge pull request #6312 from mkllnk/variant-override-loading
...
Avoid loading variant overrides for no reason
2020-11-06 03:59:33 +00:00
Matt-Yorkley
3011bdb87d
Add HoundCI config
2020-11-06 00:27:32 +00:00
Matt-Yorkley
66b531ddf6
Merge pull request #6310 from luisramos0/acts_as_list
...
Bump acts_as_list to 0.3.0
2020-11-05 23:03:02 +01:00
Transifex-Openfoodnetwork
213f3cf072
Updating translations for config/locales/ar.yml
2020-11-06 07:43:38 +11:00
Transifex-Openfoodnetwork
e1962419c2
Updating translations for config/locales/ar.yml
2020-11-06 07:40:32 +11:00
Transifex-Openfoodnetwork
bb6f5cb3a7
Updating translations for config/locales/en_US.yml
2020-11-06 07:06:15 +11:00
dependabot-preview[bot]
2d90fa4723
Bump kaminari from 0.14.1 to 0.17.0
...
Bumps [kaminari](https://github.com/kaminari/kaminari ) from 0.14.1 to 0.17.0.
- [Release notes](https://github.com/kaminari/kaminari/releases )
- [Changelog](https://github.com/kaminari/kaminari/blob/master/CHANGELOG.md )
- [Commits](https://github.com/kaminari/kaminari/compare/v0.14.1...v0.17.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-11-05 19:15:53 +00:00
Matt-Yorkley
db3576f469
Merge pull request #6308 from luisramos0/translations
...
Fix some missing translations in orders edit page
2020-11-05 18:33:51 +01:00
Matt-Yorkley
c2362921fa
Merge pull request #6272 from tsara27/fix-alignment-order
...
Align center order adjustment and order total title
2020-11-05 18:33:08 +01:00
Matt-Yorkley
0668dd2591
Merge pull request #6307 from efgalvao/issue#6262
...
Fixes issue #6262 .
2020-11-05 18:31:49 +01:00
Matt-Yorkley
d8f9dead8b
Merge pull request #6270 from Matt-Yorkley/paperclip-handlers
...
Remove Paperclip URL handlers
2020-11-05 18:29:20 +01:00
Matt-Yorkley
bc96ad9515
Merge pull request #6299 from Matt-Yorkley/admin-image-edit
...
Fix display issue in product image edit page
2020-11-05 18:28:10 +01:00
Luis Ramos
bd4da3b5ce
Merge pull request #6247 from cillian/deep-munge-issue
...
Patch Rails :deep_munge issue so empty array parameters don't get converted to nil
2020-11-05 13:25:39 +00:00
Pau Pérez Fabregat
8e3f0d2152
Merge pull request #6134 from Matt-Yorkley/webmock-helper
...
Improve Webmock debugging
2020-11-05 13:11:02 +01:00
Pau Pérez Fabregat
1ea503ed5d
Merge pull request #6306 from SerenaWhite/update-handbook-reference
...
Update reference to OFN Handbook in README.md
2020-11-05 13:05:39 +01:00
Transifex-Openfoodnetwork
719007ecb4
Updating translations for config/locales/es.yml
2020-11-05 22:57:29 +11:00
Transifex-Openfoodnetwork
bd06f898a3
Updating translations for config/locales/ca.yml
2020-11-05 22:55:21 +11:00
Transifex-Openfoodnetwork
246a1f368b
Updating translations for config/locales/de_DE.yml
2020-11-05 21:59:09 +11:00
Transifex-Openfoodnetwork
f6443f00e5
Updating translations for config/locales/en_FR.yml
2020-11-05 19:23:26 +11:00
Transifex-Openfoodnetwork
fd52800d2c
Updating translations for config/locales/fr.yml
2020-11-05 19:21:40 +11:00
Maikel Linke
4b1f5ae060
Avoid loading variant overrides for no reason
2020-11-05 14:31:19 +11:00
Transifex-Openfoodnetwork
31a34fc9d2
Updating translations for config/locales/en_NZ.yml
2020-11-05 10:00:28 +11:00
Transifex-Openfoodnetwork
3fc0d1bcb9
Updating translations for config/locales/en_NZ.yml
2020-11-05 09:57:27 +11:00
Luis Ramos
bb89557beb
Bump acts_as_list to 0.3.0
2020-11-04 22:13:24 +00:00
Luis Ramos
0ae3bf985a
Fix some missing translations in orders edit page
2020-11-04 21:54:27 +00:00
Luis Ramos
387326b9b4
Merge pull request #5978 from luisramos0/bye_bye_spree
...
Bye bye spree - final PR 🎉
2020-11-04 21:27:28 +00:00
Luis Ramos
cb80f67dc6
Merge pull request #5885 from luisramos0/variants
...
[Bye bye Spree] Bring models product, variant, price from spree_core
2020-11-04 21:26:07 +00:00
efgalvao
5260c01f16
Update registration.html.haml
...
Removed spaces.
2020-11-04 17:37:11 -03:00
Matt-Yorkley
3170db9532
Remove Paperclip URL handlers
...
See ofn-security issue #33 for details.
2020-11-04 16:49:01 +00:00
efgalvao
42d5f377e0
Fixes issue #6262 .
2020-11-04 13:11:37 -03:00
Ren White
f513d888a3
Update reference to OFN handbook in README.md
2020-11-04 06:57:06 -07:00
Luis Ramos
5cde085241
Fix a number of spree translations
2020-11-04 13:55:36 +00:00
Luis Ramos
23956726e9
Add missing translation
2020-11-04 12:37:55 +00:00
efgalvao
1f1da3eb6d
Fixed issue #6292 .
2020-11-04 09:37:51 -03:00
Luis Ramos
f6d0905517
Add s3_support require to image.rb
2020-11-04 12:15:45 +00:00
Luis Ramos
c2591104ee
Fix typo in application setup
...
This was forcing env test in all environments breaking payment methods that are activated by environment
2020-11-04 12:15:45 +00:00
Luis Ramos
3beea43143
Switch to a version of better_paypal_express that does not define
...
routes and define those routes on the OFN side
2020-11-04 12:15:45 +00:00
Luis Ramos
8f2d52b9e3
Revert "Do not reload routes and make spree routes append instead of draw in"
...
This reverts commit cdf4c795c7c7ae18006eb24af9336941361b6b81.
2020-11-04 12:15:45 +00:00
Luis Ramos
eada388534
Add handle_extensions to get Spree.translations (archaic spree js translations) in handlebars templates
...
This is all legacy from spree that can be cleaned up at some point, we only have two handlebars templates in OFN
2020-11-04 12:15:45 +00:00
Luis Ramos
f6f4faf146
Move test setup to application.rb
...
Without spree_core, the test environment file loads before the Spree engine is loaded
2020-11-04 12:15:45 +00:00
Luis Ramos
5c4ea1a6be
Fix tax rates spec
2020-11-04 12:15:45 +00:00
Luis Ramos
72c454a211
Fix reference to Spree bug
2020-11-04 12:15:45 +00:00
Luis Ramos
543a9592c7
Adapt spec to routes without spree
2020-11-04 12:15:45 +00:00
Luis Ramos
2ce96f4bbe
Registration path is working correctly again without spree
2020-11-04 12:15:45 +00:00
Luis Ramos
00d121ebfc
Add misssing translation
2020-11-04 12:15:45 +00:00
Luis Ramos
c785d0d1d7
Make engine's routes append to main app instead of prepend
2020-11-04 12:15:45 +00:00
Luis Ramos
80cbe6b30f
Add route helper to call to sort_link so that it can find the necessary routes
2020-11-04 12:15:45 +00:00
Luis Ramos
09aef524f3
Make route helpers use spree helper
2020-11-04 12:15:45 +00:00
Luis Ramos
805b4d243e
Fix missing translations
2020-11-04 12:15:45 +00:00
Luis Ramos
a07029f660
Add require so that model is available when needed
2020-11-04 12:15:45 +00:00
Luis Ramos
ccab133d63
Make sample data use OFN's calculators
2020-11-04 12:15:45 +00:00
Luis Ramos
a51645f316
Remove deleted file
2020-11-04 12:15:45 +00:00
Luis Ramos
4125fe1690
Fix problem with string matchers
2020-11-04 12:15:45 +00:00
Luis Ramos
6950d7717f
Add missing translation
2020-11-04 12:15:45 +00:00
Luis Ramos
ab53db0c61
Merge ability and ability decorator
2020-11-04 12:15:45 +00:00
Luis Ramos
1b4a4a8113
Bring code from spree_paypal_express to make it use spree url_helper
2020-11-04 12:15:45 +00:00
Luis Ramos
66fb3a9cf3
Remove code related to spree promotions
2020-11-04 12:15:45 +00:00
Luis Ramos
79a7cf9b39
Add default spree logo
2020-11-04 12:15:45 +00:00
Luis Ramos
a18a198812
Fix locations of requires in admin js all.js
2020-11-04 12:15:45 +00:00
Luis Ramos
0ca71ce0a9
Do not reload routes and make spree routes append instead of draw in
...
case thee routes are already defined elsewhere, for example, by the
paypal express gem
2020-11-04 12:15:45 +00:00
Luis Ramos
b7aa04353c
Fix requires of product duplicator
2020-11-04 12:15:45 +00:00
Luis Ramos
bfeebccbc5
Load Spree engine before configuring it
2020-11-04 12:15:45 +00:00
Luis Ramos
4b21667974
Move initializers from Spree engine to the OFN application
2020-11-04 12:15:45 +00:00
Luis Ramos
9bbeec5031
Require code from spree/core explicitly
2020-11-04 12:15:45 +00:00
Luis Ramos
af3057f55f
Remove spree requires that are not needed in OFN
2020-11-04 12:15:45 +00:00
Luis Ramos
e8381304f9
Remove spree_core dependency
2020-11-04 12:15:45 +00:00
Luis Ramos
58a476751b
Remove code from the spree engine that is not needed in OFN
2020-11-04 12:15:45 +00:00
Luis Ramos
3320a3f0bc
Fix some more rubocop issues
2020-11-04 12:15:45 +00:00
Luis Ramos
4c6708267a
Run rubocop -a
2020-11-04 12:15:45 +00:00
Luis Ramos
2f0d61d54f
Bring Spree engine.rb from spree_core
2020-11-04 12:15:45 +00:00
Luis Ramos
451d8488d9
Run rubocop -a
2020-11-04 12:15:45 +00:00
Luis Ramos
bcca2eee9d
Bring user and ability related files from spree_core
2020-11-04 12:15:45 +00:00
Luis Ramos
1bce516a45
Make specs load product duplicator
...
This makes the ofn version of the product duplicator be used instead of the spree one
2020-11-04 12:15:45 +00:00
Luis Ramos
f6195f1159
Remove duplicate_extra logic from ProductDuplicator
2020-11-04 12:15:23 +00:00
Luis Ramos
503c17f896
Move Spree::ProductDuplicator to Spree::Core namespace
2020-11-04 12:15:23 +00:00
Luis Ramos
795b7101ab
Remove spree requires that are not needed in OFN
2020-11-04 12:15:23 +00:00
Luis Ramos
9d4a15b0e0
Add required product scopes from spree_core product_scopes
2020-11-04 12:15:23 +00:00
Luis Ramos
459959c068
Remove code related to spree promotions
2020-11-04 12:15:23 +00:00
Luis Ramos
ba16de6627
Move product duplicator to lib/spree/core, it's where spree_core is currently loading it from
2020-11-04 12:15:23 +00:00
Luis Ramos
72a39fdf54
Add required factory from spree_core
2020-11-04 12:15:23 +00:00
Luis Ramos
4b8515358c
Remove reference to FactoryGirl, it's FactoryBot that is used in OFN
2020-11-04 12:15:23 +00:00
Luis Ramos
cf7d8067df
Fix easy rubocop issues
2020-11-04 12:15:23 +00:00
Luis Ramos
d4e4669e49
Run transpec
2020-11-04 12:15:23 +00:00
Luis Ramos
e9f76cb339
Remove some dead code (Config.track_inventory_levels), remove variant.cost_price= so that localized number is seen, and fix specs
2020-11-04 12:15:23 +00:00
Luis Ramos
b68c5ee0f9
Remove dead code (prototypes) and fix specs
2020-11-04 12:15:23 +00:00
Luis Ramos
072cd2bd54
Run rubocop autocorrect in specs
2020-11-04 12:15:23 +00:00
Luis Ramos
2f8198eecc
Fix some easy rubocop issues
2020-11-04 12:15:23 +00:00
Luis Ramos
f85044e035
Run rubocop autocorrect
2020-11-04 12:15:23 +00:00
Luis Ramos
751beceb34
Merge decorators with original spree files
2020-11-04 12:15:23 +00:00
Luis Ramos
8cb75fc6d8
Bring models from spree_core: Spree::Product and Spree::Variant!
...
EPIC COMMIT ALERT :-)
2020-11-04 12:15:23 +00:00
Matt-Yorkley
d147996af6
Fix display issue in product image edit page
2020-11-03 18:41:09 +00:00
Transifex-Openfoodnetwork
daff0a250c
Updating translations for config/locales/pt_BR.yml
2020-11-04 03:32:20 +11:00
Transifex-Openfoodnetwork
65bccb9236
Updating translations for config/locales/ru.yml
2020-11-03 20:36:52 +11:00
Transifex-Openfoodnetwork
efe5a4700a
Updating translations for config/locales/en_FR.yml
2020-11-03 19:13:11 +11:00
Transifex-Openfoodnetwork
0103cc3a2f
Updating translations for config/locales/fr.yml
2020-11-03 19:13:06 +11:00
Transifex-Openfoodnetwork
2a2c7bdc4e
Updating translations for config/locales/es.yml
2020-11-03 08:49:53 +11:00
Transifex-Openfoodnetwork
ad76f3e91e
Updating translations for config/locales/ca.yml
2020-11-03 08:48:11 +11:00
Pau Pérez Fabregat
201c9c109d
Merge pull request #6281 from Matt-Yorkley/missing-translation-ordering
...
Add missing translation key for enterprise taxon ordering
2020-11-02 22:15:43 +01:00
Pau Pérez Fabregat
4911bb6613
Merge pull request #6274 from luisramos0/rubocop
...
Use rubocop auto correct to fix a number of issues
2020-11-02 22:13:36 +01:00
Luis Ramos
c07215552e
Add log entries to log
2020-11-02 20:59:57 +00:00
Luis Ramos
2b01c80c54
Add subs debug task that prints out basic info about a specific Order Cycle
2020-11-02 20:59:57 +00:00
Pau Pérez Fabregat
9de74500cd
Merge pull request #6288 from andrewpbrett/fix-cookies-banner
...
update template path for cookies banner, fix #6284
2020-11-02 20:52:46 +01:00
Andy Brett
04f5249176
update template path for cookies banner, fix #6284
2020-11-02 07:45:30 -08:00
Transifex-Openfoodnetwork
5c81f645c9
Updating translations for config/locales/fr.yml
2020-11-02 20:38:38 +11:00
Transifex-Openfoodnetwork
6ff8cadb26
Updating translations for config/locales/en_FR.yml
2020-11-02 20:27:13 +11:00
Transifex-Openfoodnetwork
04358dfa39
Updating translations for config/locales/en_FR.yml
2020-11-02 20:24:09 +11:00
Transifex-Openfoodnetwork
b23d6674b5
Updating translations for config/locales/ru.yml
2020-11-02 18:59:12 +11:00
Transifex-Openfoodnetwork
8904273bea
Updating translations for config/locales/ru.yml
2020-11-02 18:56:03 +11:00
Luis Ramos
1bb7fd9ec8
Merge pull request #6280 from Matt-Yorkley/eastern-slavic-plurals
...
Add missing translation keys for Eastern Slavic plurals
2020-10-31 23:13:54 +00:00
Matt-Yorkley
0af20e48b0
Add missing translation key for enterprise taxon ordering
2020-10-31 19:17:19 +00:00
Matt-Yorkley
bc40088eaf
Add missing translation keys for Eastern Slavic plurals
...
There are multiple forms of pluralisation here, with different translations for each.
перевод сложен !
2020-10-31 16:58:15 +00:00
Luis Ramos
fa77204e14
Adapt spec to the move of the controller, in prod the call to request.env['PATH_INFO'] will work correctly
2020-10-31 10:44:19 +00:00
Luis Ramos
af713385d8
Add frozen string literal
2020-10-31 10:16:37 +00:00
Luis Ramos
c9972189d0
Change usage of Spree::Admin::BaseController to Admin::BaseController
2020-10-31 09:56:59 +00:00
Luis Ramos
eb07a91acb
Adapt code from Spree::Admin::BaseController to Admin::BaseController
2020-10-31 09:52:34 +00:00
Luis Ramos
66ba9ff73d
Move Spree::Admin::BaseController to Admin::BaseController
2020-10-31 09:51:37 +00:00
Pau Perez
1abdd0112e
Update all locales with the latest Transifex translations
2020-10-31 10:46:12 +01:00
Pau Pérez Fabregat
bc6ffe3b0c
Merge pull request #6242 from openfoodfoundation/transifex
...
Transifex
2020-10-31 10:36:12 +01:00
Luis Ramos
eea73aa989
Merge pull request #5919 from luisramos0/injector_refactor_for_rails41
...
[Rails 4.1, works in master] Convert relations with to_a so that they work in rails 4.1
2020-10-31 09:33:27 +00:00
Pau Pérez Fabregat
03b0ce430d
Merge branch 'master' into transifex
2020-10-31 10:05:27 +01:00
Luis Ramos
bfce012a4b
Update manual rubocop todo
2020-10-30 17:56:13 +00:00
Luis Ramos
fb3dd0aa18
Update rubocop manual list for MethodLength and AbcSize cops
2020-10-30 17:46:49 +00:00
Luis Ramos
01320105ea
Update rubocop_todo
2020-10-30 17:32:47 +00:00
Luis Ramos
c2c12b34f9
Fix more rubocop issues with auto correct
2020-10-30 17:10:23 +00:00
Luis Ramos
c71ebc38bb
Fix Layout/ArgumentAlignment
2020-10-30 17:06:08 +00:00
Luis Ramos
4b03dec119
Update manual todo for Line Length
2020-10-30 17:01:38 +00:00
Luis Ramos
ca1373a366
Fix Style/RescueStandardError and Style/RegexpLiteral
2020-10-30 16:50:37 +00:00
Luis Ramos
b0e889be2a
Fix Style/RandomWithOffset
2020-10-30 16:50:37 +00:00
Luis Ramos
b3196295e6
Fix Style/RaiseArgs
2020-10-30 16:50:37 +00:00
Luis Ramos
75cec3b606
Fix issue Style/HashSyntax
2020-10-30 16:50:37 +00:00
Luis Ramos
92417d849c
Fix rubocop issue Rails/DynamicFindBy
2020-10-30 16:50:37 +00:00
Luis Ramos
bf5fcde885
Fix Lint/UnusedMethodArgument
2020-10-30 16:50:37 +00:00
Luis Ramos
40f8c785a2
Fix Lint/UnusedBlockArgument
2020-10-30 16:50:37 +00:00
Luis Ramos
403384dbb1
Fix rubocop isssues, trailing whitespaces and empty lines
2020-10-30 16:50:37 +00:00
Luis Ramos
c30cba8bfe
Fix issue Layout/SpaceInsideHashLiteralBraces
2020-10-30 16:50:37 +00:00
Luis Ramos
e8138e8c23
Fix rubocop issues in models/payment_spec
2020-10-30 16:50:37 +00:00
Luis Ramos
4845cde20f
Fix rubocop issue Layout/HashAlignment
2020-10-30 16:50:37 +00:00
Luis Ramos
a8265aff89
Fix rubocop issue Layout/FirstHashElementIndentation
2020-10-30 16:50:37 +00:00
Luis Ramos
9cb3b0b14a
Fix rubocop issue Layout/FirstArrayElementIndentation
2020-10-30 16:50:37 +00:00
Luis Ramos
06433b1be3
Fix rubocop issue Layout/ExtraSpacing
2020-10-30 16:50:37 +00:00
Luis Ramos
d4c52ce122
Fix rubocop issue Layout/EmptyLinesAroundBlockBody
2020-10-30 16:50:37 +00:00
Luis Ramos
eb4e732c1a
Fix rubocop issue Layout/EmptyLines
2020-10-30 16:50:37 +00:00
Luis Ramos
3fe2684270
Fix rubocop issue Layout/BlockAlignment
2020-10-30 16:50:37 +00:00
Luis Ramos
3e6e338e3d
Fix rubocop issue Layout/ArgumentAlignment
2020-10-30 16:50:37 +00:00
Luis Ramos
ad14f7f9b0
Merge pull request #6203 from luisramos0/rubocop_fix
...
Fix ~80 rubocop issues in serializers/api/admin
2020-10-30 16:48:22 +00:00
Luis Ramos
7cc7c62232
Fix long lines
2020-10-30 16:14:39 +00:00
Luis Ramos
b6dc46a911
Fix rubocop issue by nesting module and class declarations
...
No file contents changed
2020-10-30 16:14:34 +00:00
Luis Ramos
0b70c67908
Merge pull request #5994 from openfoodfoundation/tcs_checkbox
...
Terms and Conditions checkbox on checkout
2020-10-30 15:10:06 +00:00
Luis Ramos
71a181341b
Fix bug in terms_and_conditions_helper related to guest checkout where current_user is nil and T&Cs must be shown all the time
2020-10-30 15:09:13 +00:00
Luis Ramos
cf3f511f4d
Add directive spec to validate the dialog template is loaded on element click
2020-10-30 15:09:13 +00:00
Luis Ramos
1d1067ebc1
Add coverage to T&Cs file opening on a new tab and also for the upload timestamp now displayed in the page
2020-10-30 15:09:13 +00:00
Luis Ramos
bd4d0ba5d3
Make the warning message work for first upload and for changes
2020-10-30 15:09:13 +00:00
Luis Ramos
3b682bc47f
Add warning when uploading a file
2020-10-30 15:09:13 +00:00
Luis Ramos
be35f97622
Add tooltip icon to terms and conditions
2020-10-30 15:09:13 +00:00
Luis Ramos
ca79270ba3
Show T&Cs warning when uploading a new file
2020-10-30 15:09:13 +00:00
Luis Ramos
2cf7b1b36c
Make label translatable
2020-10-30 15:09:13 +00:00
Luis Ramos
f7c07f492c
Make TCs file input onoy accept pdf files
2020-10-30 15:09:13 +00:00
Luis Ramos
9f17e4fd8f
Add upload timestamp to TCs upload form in enterprise business details
2020-10-30 15:09:13 +00:00
Luis Ramos
c980d22826
Make TCs link open in a new tab in the backoffice
2020-10-30 15:09:13 +00:00
Luis Ramos
ceee89fad0
Make Checkout form submit read terms_and_conditions_accepted from the checkout form checkbox
2020-10-30 15:09:13 +00:00
Luis Ramos
a942218708
Fix post checkout actions spec
2020-10-30 15:09:13 +00:00
Luis Ramos
26946ec102
Fix edge case and some specs in post checkout actions
2020-10-30 15:09:13 +00:00
Luis Ramos
dd31cbe014
Cover case where enterprise uploads new T&Cs file and customer has already accepted before
2020-10-30 15:09:13 +00:00
Luis Ramos
46733d0c0d
Add feature spec to cover T&Cs ticked by default if customer has already accepted them
2020-10-30 15:09:13 +00:00
Luis Ramos
57a9d6e1e2
Make customer terms_and_conditions_accepted_at be set to current time
...
after a successful checkout
2020-10-30 15:09:13 +00:00
Luis Ramos
ad592785cf
Rename methods to follwo ruby convention and improve readability
2020-10-30 15:09:13 +00:00
Luis Ramos
f3ba0ebdbb
Move code to a new helper
2020-10-30 15:09:13 +00:00
Luis Ramos
4d64bf6ece
Add column to customers table to register last time enterprise terms and
...
conditions were accepted so customer doesnt have to accept terms on all
checkouts but only when the enterprise updates the terms file
2020-10-30 15:09:13 +00:00
Luis Ramos
3c9c5862d1
Verify terms and conditions updated_at timestamp is touched every time the file name changes.
...
We will need this to check if user already accepted the terms and
conditions of this enterprise.
2020-10-30 15:08:26 +00:00
Luis Ramos
78a8f53d8d
Change default translations to what's been requested on the issue
2020-10-30 15:08:26 +00:00
Luis Ramos
806c8b943d
Move small class to label so that rule is actually applied
2020-10-30 15:08:26 +00:00
Luis Ramos
85096a997f
Add a checkbox to checkout to tick for Terms and Conditions
...
Checkout button should be disabled if checkbox is not ticked
2020-10-30 15:08:26 +00:00
Transifex-Openfoodnetwork
19b6cb13f1
Updating translations for config/locales/pt_BR.yml
2020-10-31 01:36:45 +11:00
Transifex-Openfoodnetwork
dd228cc750
Updating translations for config/locales/ar.yml
2020-10-30 22:39:44 +11:00
Cillian O'Ruanaidh
5aa8c783b1
Use Rspec syntax instead of Test::Unit in ActionDispatch::Request spec.
2020-10-30 11:12:36 +00:00
Cillian O'Ruanaidh
5a66c855bc
Add :frozen_string_literal magic comment and underscore prefix to unused block argument for Rubocop
2020-10-30 11:12:36 +00:00
Cillian O'Ruanaidh
ea3c456d3b
Patch Rails :deep_munge issue so empty array parameters don't get converted to nil
...
Before people were unable to remove coordinator fees from an order cycle because Rails was converting the empty :coordinator_fee_ids array paramter into nil. This issue was introduced to Rails in v4.0.0.beta1 and isn't fixed until v5.0.0.beta1
Another way to fix this could be to do something like 'params[:coordinator_fee_ids] ||= []' but it seems like this issue could problems in other parts of the app so a more general fix might be better.
Fixes #6224
2020-10-30 11:12:36 +00:00
Luis Ramos
586e8a9abe
Fix some more rubocop issues
2020-10-30 10:13:16 +00:00
Luis Ramos
1847b62cf4
Fix some rubocop issues
2020-10-30 10:12:56 +00:00
Luis Ramos
0618c9e4dd
Fix line_items_decorator spec
2020-10-30 10:12:56 +00:00
Luis Ramos
d15301021a
Rename inject_json_list to inject_json_array
2020-10-30 10:12:56 +00:00
Luis Ramos
55e8dace44
Fix sort_by issue on relation by calling to_a
2020-10-30 10:12:56 +00:00
Luis Ramos
9a9b455e66
Fix problem in default_tax related to sum in active record
2020-10-30 10:12:56 +00:00
Luis Ramos
399fe2c01b
Make code work for relations and arrays
2020-10-30 10:12:56 +00:00
Luis Ramos
3aeb87debc
Make it work with both relations and arrays
2020-10-30 10:12:56 +00:00
Luis Ramos
7b06fdd943
Convert to array before using sort_by!
2020-10-30 10:12:56 +00:00
Luis Ramos
6755354196
Convert relation to_a to be able to use sum
2020-10-30 10:12:56 +00:00
Luis Ramos
440e69e156
Convert relation to array to be able to use sum
2020-10-30 10:12:47 +00:00
Luis Ramos
a53223aefc
Convert relation to array before using array only method sort_by!
2020-10-30 10:10:54 +00:00
Luis Ramos
cc1b4123b7
Make model_set handle collections that are relations and not arrays
2020-10-30 10:10:54 +00:00
Luis Ramos
65ce183830
Make checkout_adjustments_for handle adjustments if a relation is given
2020-10-30 10:10:54 +00:00
Luis Ramos
7e606471e4
Make tag_rulee_applicator and available_payment_methods_filter handle case where a relation is given instead of an array
2020-10-30 10:10:54 +00:00
Luis Ramos
1dace1f0e3
Make quantifier use stock_items relation and not an array because sum will behave differently with an array in rails 4.1
2020-10-30 10:10:54 +00:00
Luis Ramos
08d26102d2
Separate injection methods so that we can have a separate behaviour for lists without having to check their types
...
This change is required for rails 4.1 where the relations api changed
2020-10-30 10:10:54 +00:00
Transifex-Openfoodnetwork
35790b3cca
Updating translations for config/locales/en_FR.yml
2020-10-30 19:29:20 +11:00
Transifex-Openfoodnetwork
2ce05d48bf
Updating translations for config/locales/fr.yml
2020-10-30 19:29:05 +11:00
Tsara Sudrajat
f4c7a0b2a2
Align center order adjustment and order total title
2020-10-30 11:29:38 +07:00
Luis Ramos
6b826423c1
Merge pull request #6145 from andrewpbrett/instance-unit-picker
...
Allow instances to choose available units for products/variants
2020-10-29 22:22:33 +00:00
Luis Ramos
412457bb19
Merge pull request #6122 from luisramos0/customer_total
...
Add Customer balance to customer list
2020-10-29 22:06:05 +00:00
Andy Brett
2605b9cdf0
refactor unitScales function
2020-10-29 09:18:24 -07:00
Andy Brett
867947f6b2
refactor availableUnitScales into unitScales
2020-10-29 09:18:24 -07:00
Andy Brett
8d9b33abe8
update spec with new param structure
2020-10-29 09:18:24 -07:00
Andy Brett
57fe1db10e
guard against nil params[:available_units]
2020-10-29 09:18:24 -07:00
Andy Brett
18d2599075
indicate block argument is unused
2020-10-29 09:18:24 -07:00
Andy Brett
292b33b4ea
simplify available units params (and remove regex!)
2020-10-29 09:18:24 -07:00
Andy Brett
8591934c19
extract availableUnits to separate method
2020-10-29 09:18:24 -07:00
Andy Brett
9bf84bd5a8
provide default availableUnits to specs
2020-10-29 09:18:24 -07:00
Andy Brett
67a603f77f
inject available_units for new variant creation
2020-10-29 09:18:24 -07:00
Andy Brett
331ac28b71
inject available units to edit variants page
2020-10-29 09:18:24 -07:00
Andy Brett
3ead050a56
provide availableUnits to VariantUnitManager spec
2020-10-29 09:18:24 -07:00
Andy Brett
23dd09eaad
remove extra debugger statement 🤦
2020-10-29 09:18:23 -07:00
Andy Brett
8585e6c7f0
add available units injection to BOM page
2020-10-29 09:18:19 -07:00
Andy Brett
866452383d
rubocop fix
2020-10-29 09:17:49 -07:00
Andy Brett
402fc902ff
remove non-default units from expected options array
2020-10-29 09:17:49 -07:00
Andy Brett
8f21b66b96
add controller spec for updating available units
2020-10-29 09:17:49 -07:00
Andy Brett
c9b540677c
refactor general settings controller to handle available_units params
2020-10-29 09:17:49 -07:00
Andy Brett
4f579facfe
move all_units to admin helper
2020-10-29 09:17:49 -07:00
Andy Brett
fa62ec0bff
only show available units for products
2020-10-29 09:17:49 -07:00
Andy Brett
cb3ea133e9
add available units to instance prefs page
2020-10-29 09:17:31 -07:00
Luis Ramos
10490536e2
Merge pull request #6244 from cillian/configurable-geocoder-service
...
Allow Geocoder to be configured to use different APIs
2020-10-29 16:12:52 +00:00
Yih Yang
b477ed4a0a
added products variable
2020-10-29 23:37:56 +08:00
Yih Yang
f7ee08855a
updated implementation
2020-10-29 22:07:11 +08:00
Yih Yang
e3d1f5256b
added product sorting
2020-10-29 22:06:35 +08:00
Luis Ramos
a43737af8b
Merge pull request #6266 from jhsu802701/rubocop_web_helper
...
Exempted spec/support/request/web_helper.rb from Metrics/AbcSize
2020-10-29 13:52:15 +00:00
Luis Ramos
0138f04506
Add spec to cover new customer balances on customers list
2020-10-29 13:38:36 +00:00
Luis Ramos
4a2684e3d9
Fix rubocop issues
2020-10-29 13:38:36 +00:00
Luis Ramos
e860e2ca57
Add label to customer balance so it's clear to the manager what's the balance status: credit owed or balance due
2020-10-29 13:38:36 +00:00
Luis Ramos
da69dca471
Make customer balance serialize with the currency
2020-10-29 13:38:36 +00:00
Luis Ramos
e4f3aae7c0
Add customer balance to customer list
2020-10-29 13:38:36 +00:00
Luis Ramos
72ae7ea8a2
Merge pull request #6267 from jhsu802701/rubocop_shopworkflow_2
...
Removed variant argument from click_add_bulk_max_to_cart
2020-10-29 13:36:58 +00:00
Jason Hsu
8f95de10bc
Removed variant argument from click_add_bulk_max_to_cart; updated spec/features/consumer/shopping/shopping_spec.rb to reflect this
2020-10-29 00:35:49 -05:00
Jason Hsu
cbe1b53189
Exempted spec/support/request/web_helper.rb from Metrics/AbcSize; reduces the number of offenses from 122 to 121
2020-10-29 00:23:30 -05:00
Transifex-Openfoodnetwork
9c30c3c0ed
Updating translations for config/locales/ar.yml
2020-10-29 11:15:12 +11:00
Luis Ramos
9a03428412
Merge pull request #6197 from cillian/reset-on-demand-on-absent-products
...
When resetting stock to 0 on absent products in product import also reset the on demand setting
2020-10-29 00:09:49 +00:00
Luis Ramos
76afc0b407
Merge pull request #6202 from cillian/sort-admin-products-by-name-fix
...
Fix sorting of admin products by name
2020-10-29 00:09:31 +00:00
Luis Ramos
200e9c5078
Merge pull request #6246 from tsara27/fix-shipping-method-translation
...
Add new translation for shipping method
2020-10-29 00:09:14 +00:00
Luis Ramos
caea5b2aa8
Merge pull request #6264 from openfoodfoundation/dependabot/bundler/bugsnag-6.18.0
...
Bump bugsnag from 6.17.0 to 6.18.0
2020-10-28 21:11:15 +00:00
Luis Ramos
3730d76b44
Merge pull request #6155 from arku/perf/model-specs
...
Improve model specs' performance
2020-10-28 21:06:10 +00:00
Transifex-Openfoodnetwork
28c25cff2c
Updating translations for config/locales/en_IE.yml
2020-10-29 07:08:18 +11:00
Pau Pérez Fabregat
20edcfab26
Merge pull request #6217 from santakadev/docker-open-db-port
...
Open PostgreSQL port in docker-compose
2020-10-28 17:56:49 +01:00
Pau Pérez Fabregat
642787b95a
Merge branch 'master' into reset-on-demand-on-absent-products
2020-10-28 17:28:53 +01:00
Transifex-Openfoodnetwork
a1438d3b2e
Updating translations for config/locales/ru.yml
2020-10-29 02:23:55 +11:00
dependabot-preview[bot]
fc8e3d1ece
Bump bugsnag from 6.17.0 to 6.18.0
...
Bumps [bugsnag](https://github.com/bugsnag/bugsnag-ruby ) from 6.17.0 to 6.18.0.
- [Release notes](https://github.com/bugsnag/bugsnag-ruby/releases )
- [Changelog](https://github.com/bugsnag/bugsnag-ruby/blob/master/CHANGELOG.md )
- [Commits](https://github.com/bugsnag/bugsnag-ruby/compare/v6.17.0...v6.18.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-10-27 17:41:49 +00:00
Transifex-Openfoodnetwork
21991515df
Updating translations for config/locales/ar.yml
2020-10-27 22:56:03 +11:00
Luis Ramos
3534559fbf
Merge pull request #6235 from Matt-Yorkley/flaky-tag-rules
...
[Flaky Specs] Fix tag_rules and select2 issues
2020-10-27 11:40:04 +00:00
Matt-Yorkley
f1373b902c
Merge pull request #6256 from luisramos0/rubocop_specs
...
Relax ModuleLength rubocop rule for specs
2020-10-26 22:41:30 +01:00
Luis Ramos
e5e67fbdf0
Merge pull request #6255 from jhsu802701/fix_docker_up
...
Added yarn install to docker-compose up
2020-10-26 21:16:09 +00:00
Transifex-Openfoodnetwork
f1e80e92de
Updating translations for config/locales/it.yml
2020-10-27 07:18:57 +11:00
Luis Ramos
c5186c2412
Fix rubocop_specs file path
2020-10-26 17:27:38 +00:00
Luis Ramos
52f56baa8c
Remove specs with more than 100 lines but less than 300 from rubocop exceptions list
2020-10-26 17:03:54 +00:00
Luis Ramos
0b51d8b297
Add rubocop config to allow specs to be 300 lines long
2020-10-26 17:03:50 +00:00
Luis Ramos
0f5aa11f05
Nest spec in module declaration
2020-10-26 16:50:29 +00:00
Jason Hsu
00624d1b96
Added yarn install to docker-compose up; allows the app to work properly in the Docker environment
2020-10-26 11:07:01 -05:00
Transifex-Openfoodnetwork
7e8aaaa5f9
Updating translations for config/locales/fr.yml
2020-10-27 01:27:40 +11:00
Transifex-Openfoodnetwork
49b8dcb880
Updating translations for config/locales/en_FR.yml
2020-10-27 01:24:49 +11:00
Transifex-Openfoodnetwork
479520bf97
Updating translations for config/locales/fr.yml
2020-10-27 01:24:35 +11:00
Luis Ramos
b66b50cd56
Merge pull request #6125 from tsara27/fix-translation
...
Fix translation for password reset instruction mailer subject
2020-10-26 12:01:47 +00:00
Transifex-Openfoodnetwork
50cbc971a1
Updating translations for config/locales/pt_BR.yml
2020-10-26 10:13:53 +11:00
Transifex-Openfoodnetwork
7178a69a54
Updating translations for config/locales/pt_BR.yml
2020-10-26 10:10:47 +11:00
Matt-Yorkley
e06e8fc460
Improve flaky form interaction process in #fill_in_tag
2020-10-25 10:17:16 +00:00
Matt-Yorkley
ee402db734
Refactor and DRY tag-rule-filling-in to #fill_in_tag method
2020-10-25 09:01:04 +00:00
Matt-Yorkley
3f1e496731
Fix select2 capybara issues
2020-10-24 23:53:02 +01:00
Transifex-Openfoodnetwork
494f0d8ff6
Updating translations for config/locales/ru.yml
2020-10-24 23:18:00 +11:00
Transifex-Openfoodnetwork
15715f9bb4
Updating translations for config/locales/it.yml
2020-10-24 22:28:59 +11:00
Tsara Sudrajat
4baf53a0a9
Add new translation for shipping method
2020-10-24 17:06:19 +07:00
Transifex-Openfoodnetwork
8041111886
Updating translations for config/locales/ar.yml
2020-10-24 07:34:19 +11:00
Transifex-Openfoodnetwork
adc2bcb442
Updating translations for config/locales/es.yml
2020-10-24 01:40:48 +11:00
Transifex-Openfoodnetwork
8a51c5cb5d
Updating translations for config/locales/es.yml
2020-10-24 01:37:39 +11:00
Transifex-Openfoodnetwork
e114d58ff2
Updating translations for config/locales/ca.yml
2020-10-24 01:36:14 +11:00
Transifex-Openfoodnetwork
b7fc3df86a
Updating translations for config/locales/fr_CA.yml
2020-10-23 23:18:11 +11:00
Transifex-Openfoodnetwork
01fe12e72b
Updating translations for config/locales/fr_CA.yml
2020-10-23 23:15:02 +11:00
Cillian O'Ruanaidh
c5e125747f
Allow Geocoder to be configured to use different APIs.
...
This gives instances the option to use other geocoding services, for example MapBox because instances may not have a Google Maps API key if they are using Open Street Map for their map instead of Google.
2020-10-23 13:09:59 +01:00
Transifex-Openfoodnetwork
3baaa5cc40
Updating translations for config/locales/en_CA.yml
2020-10-23 23:06:57 +11:00
Cillian O'Ruanaidh
e29d6048c2
Add a test for sorting admin products by name
2020-10-23 10:53:30 +01:00
Transifex-Openfoodnetwork
c4ba8db7ed
Updating translations for config/locales/en_FR.yml
2020-10-23 19:12:20 +11:00
Transifex-Openfoodnetwork
764169c9ca
Updating translations for config/locales/fr.yml
2020-10-23 19:12:17 +11:00
Transifex-Openfoodnetwork
30a1832302
Updating translations for config/locales/en_FR.yml
2020-10-23 19:09:10 +11:00
Transifex-Openfoodnetwork
a07f64f8a8
Updating translations for config/locales/fr.yml
2020-10-23 19:09:07 +11:00
Daniel Santamaría
ca2d66eacf
Open PostgreSQL port in docker-compose
2020-10-18 08:45:08 +02:00
Arun Kumar Mohan
c65108731c
Define supplier_ids in inventory_reset_strategy specs for clarity
2020-10-17 20:12:14 -05:00
Arun Kumar Mohan
5928eba767
Use build to validate objects from the shipping method factory
2020-10-17 19:59:21 -05:00
Arun Kumar Mohan
874d33caaa
Convert multiline blocks to single-line ones
2020-10-17 19:44:57 -05:00
Tsara Sudrajat
66be86cca9
Fix translation on reset password mailer
2020-10-17 17:59:54 +07:00
Paolo Rossi
4a60d7ef0e
Update the base Ubuntu Docker image from 18.04 to 20.04
2020-10-16 17:26:08 +02:00
Cillian O'Ruanaidh
35110eaf4a
Make sure :sorting parameter is nested inside the :q parameter to fix sorting of admin products
...
Fixes #6105 .
2020-10-16 15:21:15 +01:00
Cillian O'Ruanaidh
c62f1bd550
Exclude products_reset_strategy_spec.rb from Rubocop's Metrics/ModuleLength check
2020-10-16 12:13:55 +01:00
Cillian O'Ruanaidh
2cc751cb30
When resetting stock to 0 on absent products in product import also reset the on demand setting
...
Before when you imported products and clicked the 'Set stock to zero for all existing products not present in the file' option it would set the on hand stock to 0 but if the variant was also set to be on demand the product would still be available for sale. This change makes sure the on demand setting is turned off too.
Fixes #6064 .
2020-10-16 11:38:49 +01:00
Luis Ramos
dbd41e9d31
Use ruby 2.4 as github actions do not support ruby 2.3.
2020-10-13 10:31:26 +01:00
Luis Ramos
87327dcf57
Add brakeman config
2020-10-13 10:31:13 +01:00
Arun Kumar Mohan
2ec35b6306
Remove unnecessary let declaration
2020-10-13 01:22:11 -05:00
Arun Kumar Mohan
e963ab4bd4
Replace FactoryBot.create with create
2020-10-13 01:21:47 -05:00
Arun Kumar Mohan
14eee1c9e4
Improve product specs' performance
2020-10-11 01:10:11 -05:00
Arun Kumar Mohan
ff049d33e7
Improve variant stock specs' performance
2020-10-10 00:43:27 -05:00
Arun Kumar Mohan
b02e25af0e
Improve shipment specs' performance
2020-10-09 23:28:32 -05:00
Arun Kumar Mohan
76293c335b
Improve payment specs' performance
2020-10-09 23:05:14 -05:00
Arun Kumar Mohan
01d2c3cb9e
Improve variant specs' performance
2020-10-09 22:11:34 -05:00
Arun Kumar Mohan
80c76606df
Improve line items specs' performance
2020-10-09 22:11:34 -05:00
Arun Kumar Mohan
b07fbec8c6
Improve credit card specs' performance
2020-10-09 22:11:34 -05:00
Arun Kumar Mohan
c4205fce34
Improve enterprise specs' performance
2020-10-09 22:11:34 -05:00
Arun Kumar Mohan
a959f8e745
Improve inventory reset strategy specs' performance
2020-10-09 22:11:34 -05:00
Arun Kumar Mohan
437c39f795
Improve taxon specs' performance
2020-10-09 22:11:34 -05:00
Arun Kumar Mohan
27f1aeb803
Improve shipping method specs' performance
2020-10-09 22:11:31 -05:00
Matt-Yorkley
6d169c1b08
Improve Webmock debugging
2020-10-05 17:11:34 +01:00