run rubocop --auto-correct

This commit is contained in:
luisramos0
2019-11-10 18:42:43 +00:00
parent 5e99ecd9cc
commit 9404aacfb2
166 changed files with 441 additions and 206 deletions

View File

@@ -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,

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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,