Merge pull request #10928 from openfoodfoundation/dependabot/bundler/rubocop-1.52.0

chore(deps-dev): bump rubocop from 1.51.0 to 1.52.0
This commit is contained in:
jibees
2023-06-05 09:28:04 +02:00
committed by GitHub
4 changed files with 22 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 1400 --no-auto-gen-timestamp`
# using RuboCop version 1.51.0.
# using RuboCop version 1.52.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@@ -16,7 +16,7 @@ Gemspec/RequiredRubyVersion:
- 'engines/order_management/order_management.gemspec'
- 'engines/web/web.gemspec'
# Offense count: 28
# Offense count: 31
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_argument, with_fixed_indentation
@@ -62,11 +62,10 @@ Layout/BlockEndNewline:
- 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb'
- 'spec/system/admin/orders_spec.rb'
# Offense count: 3
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Layout/ClosingParenthesisIndentation:
Exclude:
- 'lib/reporting/queries/joins.rb'
- 'spec/system/admin/orders_spec.rb'
# Offense count: 1
@@ -141,7 +140,7 @@ Layout/LeadingCommentSpace:
Exclude:
- 'spec/system/admin/enterprises_spec.rb'
# Offense count: 115
# Offense count: 114
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: space, no_space
@@ -198,7 +197,7 @@ Layout/LineEndStringConcatenationIndentation:
- 'spec/system/consumer/cookies_spec.rb'
- 'spec/system/consumer/shopping/cart_spec.rb'
# Offense count: 643
# Offense count: 637
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
@@ -376,13 +375,12 @@ Layout/MultilineBlockLayout:
Exclude:
- 'engines/order_management/app/services/order_management/subscriptions/validator.rb'
# Offense count: 7
# Offense count: 6
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: symmetrical, new_line, same_line
Layout/MultilineMethodCallBraceLayout:
Exclude:
- 'lib/reporting/queries/joins.rb'
- 'spec/system/admin/orders_spec.rb'
- 'spec/system/admin/products_spec.rb'
@@ -414,7 +412,7 @@ Layout/TrailingEmptyLines:
Exclude:
- 'Rakefile'
# Offense count: 73
# Offense count: 76
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowInHeredoc.
Layout/TrailingWhitespace:
@@ -550,13 +548,17 @@ Lint/RedundantDirGlobSort:
- 'spec/base_spec_helper.rb'
- 'spec/system_helper.rb'
# Offense count: 1
# Offense count: 6
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowedMethods.
# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
Lint/RedundantSafeNavigation:
Exclude:
- 'app/models/report_blob.rb'
- 'app/models/spree/payment.rb'
- 'app/serializers/api/admin/subscription_line_item_serializer.rb'
- 'lib/open_food_network/address_finder.rb'
- 'lib/tasks/missing_payments.rake'
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
@@ -900,7 +902,7 @@ Rails/ActionOrder:
- 'app/controllers/spree/admin/variants_controller.rb'
- 'app/controllers/user_confirmations_controller.rb'
# Offense count: 15
# Offense count: 13
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Include.
# Include: app/models/**/*.rb
@@ -910,7 +912,6 @@ Rails/ActiveRecordCallbacksOrder:
- 'app/models/enterprise.rb'
- 'app/models/enterprise_group.rb'
- 'app/models/enterprise_relationship.rb'
- 'app/models/spree/line_item.rb'
- 'app/models/spree/order.rb'
- 'app/models/spree/payment.rb'
- 'app/models/spree/product.rb'
@@ -991,7 +992,7 @@ Rails/FilePath:
- 'spec/models/content_configuration_spec.rb'
- 'spec/support/downloads_helper.rb'
# Offense count: 11
# Offense count: 8
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasAndBelongsToMany:
@@ -999,12 +1000,9 @@ Rails/HasAndBelongsToMany:
- 'app/models/enterprise.rb'
- 'app/models/enterprise_group.rb'
- 'app/models/order_cycle.rb'
- 'app/models/spree/line_item.rb'
- 'app/models/spree/option_value.rb'
- 'app/models/spree/role.rb'
- 'app/models/spree/shipping_method.rb'
- 'app/models/spree/user.rb'
- 'app/models/spree/variant.rb'
- 'app/models/spree/zone.rb'
# Offense count: 47
@@ -1071,7 +1069,7 @@ Rails/I18nLocaleTexts:
Exclude:
- 'app/controllers/admin/stripe_accounts_controller.rb'
# Offense count: 27
# Offense count: 26
# Configuration parameters: IgnoreScopes, Include.
# Include: app/models/**/*.rb
Rails/InverseOf:
@@ -1081,7 +1079,6 @@ Rails/InverseOf:
- 'app/models/spree/country.rb'
- 'app/models/spree/inventory_unit.rb'
- 'app/models/spree/line_item.rb'
- 'app/models/spree/option_type.rb'
- 'app/models/spree/order.rb'
- 'app/models/spree/payment.rb'
- 'app/models/spree/price.rb'
@@ -1480,7 +1477,7 @@ Style/GlobalStdStream:
- 'lib/tasks/subscriptions/debug.rake'
- 'lib/tasks/subscriptions/test.rake'
# Offense count: 39
# Offense count: 38
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
Style/GuardClause:
@@ -1499,7 +1496,6 @@ Style/GuardClause:
- 'app/models/spree/order.rb'
- 'app/models/spree/preferences/preferable_class_methods.rb'
- 'app/services/order_syncer.rb'
- 'app/services/variant_units/variant_and_line_item_naming.rb'
- 'engines/order_management/app/services/order_management/order/updater.rb'
- 'lib/discourse/single_sign_on.rb'
- 'lib/open_food_network/order_cycle_form_applicator.rb'

View File

@@ -629,7 +629,7 @@ GEM
rswag-ui (2.9.0)
actionpack (>= 3.1, < 7.1)
railties (>= 3.1, < 7.1)
rubocop (1.51.0)
rubocop (1.52.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
@@ -639,7 +639,7 @@ GEM
rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.1)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-rails (2.19.1)
activesupport (>= 4.2.0)

View File

@@ -167,7 +167,7 @@ module ProductImport
def unit_fields_validation(entry)
unit_types = ['g', 'oz', 'lb', 'kg', 't', 'ml', 'l', 'kl', '']
unless entry.units&.present?
if entry.units.blank?
mark_as_invalid(entry, attribute: 'units',
error: I18n.t('admin.product_import.model.blank'))
end
@@ -180,7 +180,7 @@ module ProductImport
return if import_into_inventory?
# unit_type must be valid type
if entry.unit_type&.present?
if entry.unit_type.present?
unit_type = entry.unit_type.to_s.strip.downcase
unless unit_types.include?(unit_type)
mark_as_invalid(entry, attribute: 'unit_type',
@@ -190,7 +190,7 @@ module ProductImport
end
# variant_unit_name must be present if unit_type not present
return if entry.variant_unit_name&.present?
return if entry.variant_unit_name.present?
mark_as_invalid(entry, attribute: 'variant_unit_name',
error: I18n.t('admin.product_import.model.conditional_blank'))

View File

@@ -761,7 +761,7 @@ describe "As a consumer, I want to checkout my order" do
expect(page).to have_content(
"Note: if your order total is less than your voucher " \
"you may not be able to spend the remaining value."
"you may not be able to spend the remaining value."
)
end
end