mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
run rubocop --auto-correct
This commit is contained in:
@@ -8,6 +8,7 @@ class CustomerFactory
|
||||
jane = users["Jane Customer"]
|
||||
maryse_shop = Enterprise.find_by_name("Maryse's Private Shop")
|
||||
return if Customer.where(user_id: jane, enterprise_id: maryse_shop).exists?
|
||||
|
||||
log "- #{jane.email}"
|
||||
Customer.create!(
|
||||
email: jane.email,
|
||||
|
||||
@@ -7,6 +7,7 @@ class FeeFactory
|
||||
log "Creating fees:"
|
||||
enterprises.each do |enterprise|
|
||||
next if enterprise.enterprise_fees.present?
|
||||
|
||||
log "- #{enterprise.name} charges markup"
|
||||
calculator = Calculator::FlatPercentPerItem.new(preferred_flat_percent: 10)
|
||||
create_fee(enterprise, calculator)
|
||||
|
||||
@@ -17,6 +17,7 @@ class PaymentMethodFactory
|
||||
|
||||
def create_payment_methods(enterprise)
|
||||
return if enterprise.payment_methods.present?
|
||||
|
||||
log "- #{enterprise.name}"
|
||||
create_cash_method(enterprise)
|
||||
create_card_method(enterprise)
|
||||
|
||||
@@ -17,6 +17,7 @@ class ShippingMethodFactory
|
||||
|
||||
def create_shipping_methods(enterprise)
|
||||
return if enterprise.shipping_methods.present?
|
||||
|
||||
log "- #{enterprise.name}"
|
||||
create_pickup(enterprise)
|
||||
create_delivery(enterprise)
|
||||
|
||||
@@ -16,6 +16,7 @@ class TaxonFactory
|
||||
|
||||
def create_taxon(taxonomy, taxon_name)
|
||||
return if Spree::Taxon.where(name: taxon_name).exists?
|
||||
|
||||
log "- #{taxon_name}"
|
||||
Spree::Taxon.create!(
|
||||
name: taxon_name,
|
||||
|
||||
Reference in New Issue
Block a user