Auto correct Rubocop's Layout/FirstParameterIndentation cop

This commit is contained in:
Pau Perez
2018-04-09 17:39:22 +02:00
parent f5a5d735fd
commit 33ea2c0b07
3 changed files with 2 additions and 11 deletions

View File

@@ -379,15 +379,6 @@ Layout/ExtraSpacing:
- 'spec/spec_helper.rb'
- 'spec/support/request/web_helper.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
Layout/FirstParameterIndentation:
Exclude:
- 'lib/open_food_network/permissions.rb'
- 'spec/serializers/variant_serializer_spec.rb'
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles, IndentationWidth.

View File

@@ -69,7 +69,7 @@ module OpenFoodNetwork
granted_distributors = related_enterprises_granted(:add_to_order_cycle, by: managed_enterprises.is_primary_producer)
produced = Spree::Order.with_line_items_variants_and_products_outer.
where(
"spree_orders.distributor_id IN (?) AND spree_products.supplier_id IN (?)",
"spree_orders.distributor_id IN (?) AND spree_products.supplier_id IN (?)",
granted_distributors,
related_enterprises_granting(:add_to_order_cycle, to: granted_distributors).merge(managed_enterprises.is_primary_producer)
).pluck(:id)

View File

@@ -7,7 +7,7 @@ describe Api::VariantSerializer do
it "includes the expected attributes" do
expect(subject.attributes.keys).
to include(
:id,
:id,
:name_to_display,
:is_master,
:count_on_hand,