mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Fixes some rubocop linting offenses - part III
This commit is contained in:
@@ -6,12 +6,6 @@
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Layout/EmptyLines:
|
||||
Exclude:
|
||||
- 'app/services/products_renderer.rb'
|
||||
|
||||
# Offense count: 16
|
||||
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
||||
Lint/EmptyBlock:
|
||||
@@ -28,17 +22,6 @@ Lint/EmptyBlock:
|
||||
- 'spec/jobs/subscription_placement_job_spec.rb'
|
||||
- 'spec/models/product_import/entry_validator_spec.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Configuration parameters: AllowComments.
|
||||
Lint/EmptyClass:
|
||||
Exclude:
|
||||
- 'spec/lib/reports/report_loader_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Lint/FloatComparison:
|
||||
Exclude:
|
||||
- 'app/models/spree/gateway/pay_pal_express.rb'
|
||||
|
||||
# Offense count: 24
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
||||
Metrics/AbcSize:
|
||||
|
||||
@@ -84,7 +84,7 @@ module Spree
|
||||
end
|
||||
|
||||
def refund(payment, amount)
|
||||
refund_type = payment.amount == amount.to_f ? "Full" : "Partial"
|
||||
refund_type = payment.amount == amount.to_d ? "Full" : "Partial"
|
||||
refund_transaction = provider.build_refund_transaction(
|
||||
TransactionID: payment.source.transaction_id,
|
||||
RefundType: refund_type,
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
require 'open_food_network/scope_product_to_hub'
|
||||
|
||||
|
||||
class ProductsRenderer
|
||||
include Pagy::Backend
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ require 'spec_helper'
|
||||
module Reporting
|
||||
module Reports
|
||||
module Bananas
|
||||
class Base; end
|
||||
class Green; end
|
||||
class Yellow; end
|
||||
const_set "Base", Class.new
|
||||
const_set "Green", Class.new
|
||||
const_set "Yellow", Class.new
|
||||
end
|
||||
|
||||
module Orange
|
||||
class OrangeReport; end
|
||||
const_set "OrangeReport", Class.new
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user