mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Auto correct Rubocop's Layout/EmptyLinesAroundModuleBody cop
This commit is contained in:
@@ -336,23 +336,6 @@ Layout/EmptyLinesAroundClassBody:
|
||||
- 'lib/open_food_network/rack_request_blocker.rb'
|
||||
- 'lib/open_food_network/reports/bulk_coop_report.rb'
|
||||
|
||||
# Offense count: 11
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
||||
Layout/EmptyLinesAroundModuleBody:
|
||||
Exclude:
|
||||
- 'app/helpers/add_to_cart_helper.rb'
|
||||
- 'app/helpers/groups_helper.rb'
|
||||
- 'lib/open_food_network/column_preference_defaults.rb'
|
||||
- 'lib/open_food_network/group_buy_report.rb'
|
||||
- 'lib/open_food_network/order_cycle_form_applicator.rb'
|
||||
- 'lib/open_food_network/order_grouper.rb'
|
||||
- 'lib/open_food_network/variant_and_line_item_naming.rb'
|
||||
- 'spec/models/spree/ability_spec.rb'
|
||||
- 'spec/support/request/distribution_helper.rb'
|
||||
- 'spec/support/request/ui_component_helper.rb'
|
||||
|
||||
# Offense count: 55
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
||||
|
||||
@@ -18,5 +18,4 @@ module AddToCartHelper
|
||||
def available_order_cycles_for(order, product)
|
||||
DistributionChangeValidator.new(order).available_order_cycles_for(product)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
module GroupsHelper
|
||||
|
||||
def link_to_service(baseurl, name, html_options = {})
|
||||
return if name.blank?
|
||||
html_options = html_options.merge target: '_blank'
|
||||
@@ -19,5 +18,4 @@ module GroupsHelper
|
||||
def strip_url(url)
|
||||
url.andand.sub(/^https?:\/\//i, '')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
module OpenFoodNetwork
|
||||
module ColumnPreferenceDefaults
|
||||
|
||||
private
|
||||
|
||||
# NOTE: These methods define valid column names (via hash keys)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
module OpenFoodNetwork
|
||||
|
||||
GroupBuyVariantRow = Struct.new(:variant, :sum_quantities, :sum_max_quantities) do
|
||||
def to_row
|
||||
[variant.product.supplier.name, variant.product.name, I18n.t('admin.reports.unitsize'), variant.options_text, variant.weight, sum_quantities, sum_max_quantities]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
require 'open_food_network/order_cycle_permissions'
|
||||
|
||||
module OpenFoodNetwork
|
||||
|
||||
# There are two translator classes on the boundary between Angular and Rails: On the Angular side,
|
||||
# there is the OrderCycle#dataForSubmit method, and on the Rails side is this class. I think data
|
||||
# translation is more a responsibility of Angular, so I'd be inclined to refactor this class to move
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
module OpenFoodNetwork
|
||||
|
||||
class OrderGrouper
|
||||
def initialize(rules, column_constructors)
|
||||
@rules = rules
|
||||
|
||||
@@ -6,7 +6,6 @@ require 'open_food_network/option_value_namer'
|
||||
|
||||
module OpenFoodNetwork
|
||||
module VariantAndLineItemNaming
|
||||
|
||||
# Copied and modified from Spree::Variant
|
||||
def options_text
|
||||
values = self.option_values.joins(:option_type).order("#{Spree::OptionType.table_name}.position asc")
|
||||
|
||||
@@ -3,7 +3,6 @@ require "cancan/matchers"
|
||||
require 'support/cancan_helper'
|
||||
|
||||
module Spree
|
||||
|
||||
describe User do
|
||||
|
||||
describe "broad permissions" do
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
module OpenFoodNetwork
|
||||
module DistributionHelper
|
||||
|
||||
def select_distribution(distributor, order_cycle=nil)
|
||||
create_enterprise_group_for distributor
|
||||
visit root_path
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
module UIComponentHelper
|
||||
|
||||
def browse_as_medium
|
||||
page.driver.resize(1024, 768)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user