diff --git a/lib/open_food_network/orders_and_fulfillments_report/customer_totals_report.rb b/lib/open_food_network/orders_and_fulfillments_report/customer_totals_report.rb index fd8276a6b1..24a5769a57 100644 --- a/lib/open_food_network/orders_and_fulfillments_report/customer_totals_report.rb +++ b/lib/open_food_network/orders_and_fulfillments_report/customer_totals_report.rb @@ -1,3 +1,4 @@ +# rubocop:disable Metrics/ClassLength module OpenFoodNetwork class OrdersAndFulfillmentsReport class CustomerTotalsReport @@ -11,6 +12,8 @@ module OpenFoodNetwork @context = context end + # rubocop:disable Metrics/AbcSize + # rubocop:disable Metrics/MethodLength def header [I18n.t(:report_header_hub), I18n.t(:report_header_customer), I18n.t(:report_header_email), I18n.t(:report_header_phone), I18n.t(:report_header_producer), @@ -33,7 +36,11 @@ module OpenFoodNetwork I18n.t(:report_header_billing_city), I18n.t(:report_header_billing_postcode), I18n.t(:report_header_billing_state)] end + # rubocop:enable Metrics/AbcSize + # rubocop:enable Metrics/MethodLength + # rubocop:disable Metrics/AbcSize + # rubocop:disable Metrics/MethodLength def rules [ { @@ -100,7 +107,13 @@ module OpenFoodNetwork } ] end + # rubocop:enable Metrics/AbcSize + # rubocop:enable Metrics/MethodLength + # rubocop:disable Metrics/AbcSize + # rubocop:disable Metrics/CyclomaticComplexity + # rubocop:disable Metrics/MethodLength + # rubocop:disable Metrics/PerceivedComplexity def columns rsa = proc { |line_items| line_items.first.order.shipping_method.andand.delivery? } [ @@ -171,6 +184,11 @@ module OpenFoodNetwork proc { |line_items| line_items.first.order.bill_address.andand.state } ] end + # rubocop:enable Metrics/AbcSize + # rubocop:enable Metrics/CyclomaticComplexity + # rubocop:enable Metrics/MethodLength + # rubocop:enable Metrics/PerceivedComplexity end end end +# rubocop:enable Metrics/ClassLength diff --git a/lib/open_food_network/orders_and_fulfillments_report/distributor_totals_by_supplier_report.rb b/lib/open_food_network/orders_and_fulfillments_report/distributor_totals_by_supplier_report.rb index fb9fd1195d..e9ee219ac8 100644 --- a/lib/open_food_network/orders_and_fulfillments_report/distributor_totals_by_supplier_report.rb +++ b/lib/open_food_network/orders_and_fulfillments_report/distributor_totals_by_supplier_report.rb @@ -17,6 +17,8 @@ module OpenFoodNetwork I18n.t(:report_header_shipping_method)] end + # rubocop:disable Metrics/AbcSize + # rubocop:disable Metrics/MethodLength def rules [ { @@ -48,7 +50,10 @@ module OpenFoodNetwork } ] end + # rubocop:enable Metrics/AbcSize + # rubocop:enable Metrics/MethodLength + # rubocop:disable Metrics/AbcSize def columns [proc { |line_items| line_items.first.order.distributor.name }, proc { |line_items| line_items.first.variant.product.supplier.name }, @@ -60,6 +65,7 @@ module OpenFoodNetwork proc { |_line_items| "" }, proc { |_line_items| I18n.t(:report_header_shipping_method) }] end + # rubocop:enable Metrics/AbcSize end end end diff --git a/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_by_distributor_report.rb b/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_by_distributor_report.rb index ddbaccee93..dd578058e2 100644 --- a/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_by_distributor_report.rb +++ b/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_by_distributor_report.rb @@ -18,6 +18,8 @@ module OpenFoodNetwork I18n.t(:report_header_total_cost), I18n.t(:report_header_shipping_method)] end + # rubocop:disable Metrics/AbcSize + # rubocop:disable Metrics/MethodLength def rules [ { @@ -48,7 +50,10 @@ module OpenFoodNetwork } ] end + # rubocop:enable Metrics/AbcSize + # rubocop:enable Metrics/MethodLength + # rubocop:disable Metrics/AbcSize def columns [ supplier_name, @@ -61,6 +66,7 @@ module OpenFoodNetwork proc { |_line_items| I18n.t(:report_header_shipping_method) } ] end + # rubocop:enable Metrics/AbcSize end end end diff --git a/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_report.rb b/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_report.rb index 1de1e2b058..666cc1473e 100644 --- a/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_report.rb +++ b/lib/open_food_network/orders_and_fulfillments_report/supplier_totals_report.rb @@ -19,6 +19,7 @@ module OpenFoodNetwork I18n.t(:report_header_incoming_transport)] end + # rubocop:disable Metrics/MethodLength def rules [ { @@ -35,7 +36,9 @@ module OpenFoodNetwork } ] end + # rubocop:enable Metrics/MethodLength + # rubocop:disable Metrics/MethodLength def columns [ supplier_name, @@ -49,6 +52,7 @@ module OpenFoodNetwork proc { |_line_items| I18n.t(:report_header_incoming_transport) } ] end + # rubocop:enable Metrics/MethodLength end end end