From 9f35dacbd2d5bd6e24deb95f117f90cc3de48691 Mon Sep 17 00:00:00 2001 From: Rubocop Challenger Date: Tue, 23 Jan 2024 23:33:24 +0000 Subject: [PATCH 1/3] :police_car: regenerate rubocop todo --- .rubocop_todo.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6127c6a..7a3cdc0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 180` -# on 2024-01-16 23:33:30 UTC using RuboCop version 1.60.0. +# on 2024-01-23 23:33:23 UTC using RuboCop version 1.60.1. # 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 @@ -291,16 +291,6 @@ Style/Alias: - 'lib/excel_templating/excel_abstraction/cell_range.rb' - 'lib/excel_templating/excel_abstraction/row.rb' -# Offense count: 2 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames. -# RedundantRestArgumentNames: args, arguments -# RedundantKeywordRestArgumentNames: kwargs, options, opts -# RedundantBlockArgumentNames: blk, block, proc -Style/ArgumentsForwarding: - Exclude: - - 'lib/excel_templating/document.rb' - # Offense count: 7 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods. From 3409838226d61da7d4ef8b9ca4f7923309f506f1 Mon Sep 17 00:00:00 2001 From: Rubocop Challenger Date: Tue, 23 Jan 2024 23:33:27 +0000 Subject: [PATCH 2/3] :police_car: Style/BlockDelimiters --- .rubocop_todo.yml | 14 -------------- .../document/data_source_registry.rb | 4 ++-- spec/cell_validation_spec.rb | 12 ++++++------ spec/column_validation_spec.rb | 4 ++-- spec/excel_abstraction/spread_sheet_spec.rb | 4 ++-- spec/excel_templating_spec.rb | 4 ++-- 6 files changed, 14 insertions(+), 28 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 7a3cdc0..e218bc9 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -291,20 +291,6 @@ Style/Alias: - 'lib/excel_templating/excel_abstraction/cell_range.rb' - 'lib/excel_templating/excel_abstraction/row.rb' -# Offense count: 7 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods. -# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces -# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object -# FunctionalMethods: let, let!, subject, watch -# AllowedMethods: lambda, proc, it -Style/BlockDelimiters: - Exclude: - - 'lib/excel_templating/document/data_source_registry.rb' - - 'spec/cell_validation_spec.rb' - - 'spec/column_validation_spec.rb' - - 'spec/excel_abstraction/spread_sheet_spec.rb' - - 'spec/excel_templating_spec.rb' # Offense count: 2 # This cop supports safe autocorrection (--autocorrect). diff --git a/lib/excel_templating/document/data_source_registry.rb b/lib/excel_templating/document/data_source_registry.rb index 9710489..26670e6 100644 --- a/lib/excel_templating/document/data_source_registry.rb +++ b/lib/excel_templating/document/data_source_registry.rb @@ -37,9 +37,9 @@ def has_registry?(source_symbol) # @return [TrueClass|FalseClass] def any_data_sheet_symbols? - select {|info| + select do |info| info.data_sheet? - }.any? + end.any? end # @return [Array] diff --git a/spec/cell_validation_spec.rb b/spec/cell_validation_spec.rb index 4b199e0..132fa53 100644 --- a/spec/cell_validation_spec.rb +++ b/spec/cell_validation_spec.rb @@ -20,14 +20,14 @@ class SimpleCellValidatedDocument < ExcelTemplating::Document subject { SimpleCellValidatedDocument.new(data) } - let(:data) { + let(:data) do { all_sheets: { valid_value: "foo", } } - } + end describe "#render" do it do @@ -59,7 +59,7 @@ class SimpleFromDataValidatedDocument < ExcelTemplating::Document subject { SimpleFromDataValidatedDocument.new(data) } - let(:data) { + let(:data) do { all_sheets: { @@ -67,7 +67,7 @@ class SimpleFromDataValidatedDocument < ExcelTemplating::Document valid_value: "foo", } } - } + end describe "#render" do it do @@ -92,14 +92,14 @@ class InlineCellValidatedDocument < ExcelTemplating::Document subject { InlineCellValidatedDocument.new(data) } - let(:data) { + let(:data) do { all_sheets: { valid_value: "foo", } } - } + end describe "#render" do it do diff --git a/spec/column_validation_spec.rb b/spec/column_validation_spec.rb index a852eda..dd3a096 100644 --- a/spec/column_validation_spec.rb +++ b/spec/column_validation_spec.rb @@ -22,7 +22,7 @@ class SimpleColumnValidatedDocument < ExcelTemplating::Document subject { SimpleColumnValidatedDocument.new(data) } - let(:data) { + let(:data) do { all_sheets: {}, 1 => { @@ -32,7 +32,7 @@ class SimpleColumnValidatedDocument < ExcelTemplating::Document ] } } - } + end describe "#render" do it do diff --git a/spec/excel_abstraction/spread_sheet_spec.rb b/spec/excel_abstraction/spread_sheet_spec.rb index 3e9699b..5baa2e5 100644 --- a/spec/excel_abstraction/spread_sheet_spec.rb +++ b/spec/excel_abstraction/spread_sheet_spec.rb @@ -24,9 +24,9 @@ file.write subject.to_s file.close - expect { + expect do Roo::Excel.new(file.path, packed: nil, file_warning: :ignore) - }.to_not raise_exception + end.to_not raise_exception File.unlink(file.path) expect(subject).to be_closed diff --git a/spec/excel_templating_spec.rb b/spec/excel_templating_spec.rb index 9c97c2f..1c7acbc 100644 --- a/spec/excel_templating_spec.rb +++ b/spec/excel_templating_spec.rb @@ -43,7 +43,7 @@ class AlphalistClass < ExcelTemplating::Document let(:organization_name) { "The Coffee Bean and Tea Leaf" } let(:year) { 1971 } - let(:data) { + let(:data) do { all_sheets: { @@ -126,7 +126,7 @@ class AlphalistClass < ExcelTemplating::Document } } - } + end describe "#render" do it do From 854077406c2e3a7499302b9674298cec42be09a6 Mon Sep 17 00:00:00 2001 From: Rubocop Challenger Date: Tue, 23 Jan 2024 23:33:30 +0000 Subject: [PATCH 3/3] :police_car: regenerate rubocop todo --- .rubocop_todo.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index e218bc9..a75cb48 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 180` -# on 2024-01-23 23:33:23 UTC using RuboCop version 1.60.1. +# on 2024-01-23 23:33:29 UTC using RuboCop version 1.60.1. # 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 @@ -148,14 +148,13 @@ Layout/SpaceBeforeBlockBraces: - 'spec/excel_abstraction/cell_spec.rb' - 'spec/excel_abstraction/row_spec.rb' -# Offense count: 2 +# Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. # SupportedStyles: space, no_space # SupportedStylesForEmptyBraces: space, no_space Layout/SpaceInsideBlockBraces: Exclude: - - 'lib/excel_templating/document/data_source_registry.rb' - 'spec/excel_abstraction/cell_reference_spec.rb' # Offense count: 38 @@ -291,7 +290,6 @@ Style/Alias: - 'lib/excel_templating/excel_abstraction/cell_range.rb' - 'lib/excel_templating/excel_abstraction/row.rb' - # Offense count: 2 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowOnConstant, AllowOnSelfClass.