Maikel Linke
be229c9002
Simplify email config by removing unused option
...
Spree used to give you more options to configure ActionMailer but our
setup is much simpler. We can remove unused code.
The removed option was never used by OFN and defaulted to true. We don't
need a database migration because the value isn't set in the database.
2021-01-14 12:05:41 +11: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
bfeebccbc5
Load Spree engine before configuring it
2020-11-04 12:15:45 +00:00
Matt-Yorkley
489529d30e
Merge pull request #5729 from luisramos0/image_settings
...
Remove Image settings page and standardise Paperclip styles
2020-10-22 15:58:14 +02:00
Luis Ramos
7cf6518175
Set default values for styles directly in the attachment property without using Spree::Config
...
Only use ENV vars for attachment path and url coming from ofn-install
2020-10-20 11:20:37 +01:00
Luis Ramos
6151c7420b
Move S3 attachment definitions to Spree::Image
2020-10-20 11:20:37 +01:00
Luis Ramos
fdd7049857
Reuse Spree::Image.set_attachment_definitions
2020-10-20 11:20:37 +01:00
Luis Ramos
b66ad71017
Move image settings config out of Spree::config initialization
2020-10-20 11:20:37 +01:00
Luis Ramos
98c5fdcf26
Reuse some code from Spree::Image in the spree initializer and extract some code to a class method so we can reuse afterwards
2020-10-20 11:20:37 +01:00
Luis Ramos
25ab5f7f24
Move reformat_styles to initializer, it's the only place where it is used
2020-10-20 11:20:37 +01:00
Luis Ramos
a5a55b3c10
Add settings initialization from previous image settings controller to spree initializer
2020-10-20 11:20:37 +01:00
Luis Ramos
bebffcc90f
Set new S3 and attachments configs from ofn-install
2020-10-20 11:20:37 +01:00
Luis Ramos
37f3861233
Remove require of a file no longer needed
2020-09-17 13:58:10 +01:00
Luis Ramos
9264badaaf
Merge pull request #5879 from luisramos0/payments
...
[Bye bye Spree] Bring models payment_method, credit_card and gateway from spree_core
2020-08-26 22:09:16 +01:00
Luis Ramos
d1b60e3778
Merge pull request #5905 from mkllnk/lost-decorators
...
Load previously lost decorator code and don't delete orders
2020-08-21 12:34:37 +01:00
Maikel Linke
23706ec1d6
Load our version of the Spree environment
...
We didn't actually change any logic in our version of the Spree
environment file but if we do that in the future, we want to be sure
that it takes effect. Our file was ignored and not loaded before.
2020-08-14 15:38:10 +10:00
Luis Ramos
b21a969502
Fix new credit_card_spec
2020-08-07 13:45:25 +01:00
Luis Ramos
d4c48e2b94
Merge OrderUpdate Delegator into Spree::OrderUpdater
2020-07-11 15:44:23 +01:00
Luis Ramos
f0b3ed0d79
Merge Spree::Stock::Package into OrderManagement::Stock::Package
2020-07-02 21:24:14 +01:00
Luis Ramos
943cb7bf05
Move Stock::Package to OrderManagement::Stock::Package
2020-07-02 21:24:14 +01:00
Matt-Yorkley
a5f541b59d
Update admin logo path
2020-06-27 08:53:05 +02:00
Matt-Yorkley
3896644a04
Remove attr_accessible declarations
...
Needed for using Strong Parameters in Rails 4
2020-02-22 14:03:16 +01:00
luisramos0
1681e8a572
Remove unused auth config
2019-07-08 14:06:01 +01:00
luisramos0
10e123a9c4
Move spree/authentication_helpers injection from spree initializers directly to the application_controller
...
Also, switch from using send to public_send making rubocop happier
2019-07-08 13:11:57 +01:00
luisramos0
17448699f9
Bring devise initializer from spree_auth_devise and fix spree initializer details
2019-07-05 22:45:59 +01:00
Matt-Yorkley
099914be40
Use OFN logo in admin area
2019-05-27 02:20:04 +01:00
luisramos0
85cf4fa3e6
Merge branch 'master' into 2-0-stable-May2
2019-05-02 11:27:53 +01:00
Matt-Yorkley
732d0f7cf4
Don't use s3 for images unless images bucket has been provisioned.
...
Sets the "use_s3" (for images) option based on presence of `s3_images_bucket` from ofn-install instead of presence of s3 keys, for instances that use s3 for backups but not for images.
2019-04-30 17:06:42 +01:00
luisramos0
8f39a18ca3
Merge branch 'master' into 2-0-stable-Apr15
2019-04-15 11:46:31 +01:00
Matt-Yorkley
7373fff190
Define default s3_protocol as 'https'
2019-04-10 19:23:16 +01:00
Matt-Yorkley
4912a9e258
Ensure ENV vars in applications.yml actually update stored Spree::Config preferences
2019-04-10 19:10:31 +01:00
Maikel Linke
9044bf60b9
Workaround Rails inheritance bug in Spree::Gateway
...
Due to a bug in ActiveRecord we need to load the tagging code in Gateway which
should have inherited it from its parent PaymentMethod.
We have to call it before loading the PaymentMethod decorator because the
tagging code won't load twice within the inheritance chain.
https://github.com/openfoodfoundation/openfoodnetwork/issues/3121
2019-02-13 14:47:44 +11:00
Matt-Yorkley
edbfd64a44
Set the Spree.user_class explicitly in spree initializer
2018-11-08 00:04:04 +00:00
luisramos0
90d7b7f4a0
Merge branch 'master' into 2-0-stable-oct-25
2018-10-25 14:28:58 +01:00
luisramos0
4380ff7bd7
Drop calculated_adjustments_decorator. This file was introduced in ofn's a0b740f52d. The change is already in spree 2.0.4, see here 2c82aab566 (diff-00aa4190da81ca29804a406252f1d0f4)
2018-10-12 23:09:36 +01:00
Matt-Yorkley
3e39f3e749
Disable logout on password change
2018-10-08 23:06:54 +01:00
Pau Perez
a0d2ec5666
Enable OFN's custom OrderUpdater
2018-07-25 13:51:01 +02:00
Pau Perez
776b5a23f6
Skip methods that distributor can't use in Package
...
This ensures that Spree's shipping methods take into account the ones
the order's distributor uses.
This reimplements what `#available_to_order_with_distributor_check?`
used to do and it doesn't work with Spree 2.0.4.
2018-05-02 13:58:25 +02:00
Hugo Daniel
e6b58c6db4
Remove ssl deprecated configuration
2018-04-17 16:10:40 +02:00
Pau Perez
52533fc04c
Rely on Spree's default value for requires_auth
2017-12-20 17:25:23 +11:00
Pau Perez
c646eb3939
Disable api auth as there is no Spree api key set
...
Although Spree::Api::Config[:requires_authentication] is set to false by
default for some unknown reason if not done explicitly Spree still
returns it as false.
This amends the change done in a87c89c83d ,
which introduced the bug. As there is no Spree api key set the auth
fails when getting taxons.
2017-12-20 17:25:23 +11:00
Enrico Stano
5a2c3f5c5c
Set Spree configuration related to locales before the promo environment gets initialized
2017-09-08 23:55:50 +10:00
enricostano
23585e6ea8
Initialize custom calculators using Spree API
...
Freely inspired by https://github.com/coopdevs/spree/blob/2-0-stable/core/lib/spree/core/engine.rb#L78
2017-09-08 23:55:49 +10:00
enricostano
a87c89c83d
Require authentication for API endpoints
...
Authentication and authorization layers (cancan) should not be mixed
c594d6111b
2017-09-08 23:55:49 +10:00
Rohan Mitchell
a0b740f52d
Generalise fix for missing EnterpriseFee::Calculator to any use of calculated_adjustments
2016-11-04 09:39:17 +11:00
Rob Harrington
b2e14711ac
Gateway providers inherit from decorated Gateway and PaymentMethod classes in production
...
Achieved by requiring payment method and gateway decorators in Spree initializer
2016-08-31 12:43:22 +10:00
Maikel Linke
e4f855b64a
Display calculator in payment method edit form
2016-05-25 14:56:52 +10:00
Paul Mackay
d4cf44a6dd
Use COUNTRY_CODE instead of COUNTRY in application.yml.
2015-03-29 17:06:05 +01:00
Paul Mackay
af9a7a2ed4
#443 : Support currency configuration. Fix LOCALE variable name.
2015-03-24 15:34:45 +00:00