Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -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-24 23:33:27 UTC using RuboCop version 1.60.2.
# 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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -639,13 +629,6 @@ Style/TrivialAccessors:
Exclude:
- 'lib/excel_templating/document.rb'

# Offense count: 6
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: MinSize, WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
EnforcedStyle: brackets

# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
Expand Down
6 changes: 3 additions & 3 deletions spec/cell_validation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SimpleCellValidatedDocument < ExcelTemplating::Document
size: 10,
align: :left,
)
list_source :valid_foos, title: "Foos", list: ["foo", "bar"]
list_source :valid_foos, title: "Foos", list: %w[foo bar]
sheet 1 do
validate_cell row: 2, column: 1, with: :valid_foos
end
Expand Down Expand Up @@ -63,7 +63,7 @@ class SimpleFromDataValidatedDocument < ExcelTemplating::Document
{
all_sheets:
{
valid_foos: ["foo", "bar"],
valid_foos: %w[foo bar],
valid_value: "foo",
}
}
Expand All @@ -84,7 +84,7 @@ class SimpleFromDataValidatedDocument < ExcelTemplating::Document
class InlineCellValidatedDocument < ExcelTemplating::Document
template "spec/assets/valid_cell.mustache.xlsx"
title "Valid cell test"
list_source :valid_foos, title: "Foos", list: ["foo", "bar"], inline: true
list_source :valid_foos, title: "Foos", list: %w[foo bar], inline: true
sheet 1 do
validate_cell row: 2, column: 1, with: :valid_foos
end
Expand Down
2 changes: 1 addition & 1 deletion spec/column_validation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SimpleColumnValidatedDocument < ExcelTemplating::Document
size: 10,
align: :left,
)
list_source :valid_foos, title: "Foos", list: ["foo", "bar"]
list_source :valid_foos, title: "Foos", list: %w[foo bar]
sheet 1 do
repeat_row 2, with: :foo_data do
validate_column 1, with: :valid_foos
Expand Down
4 changes: 2 additions & 2 deletions spec/excel_abstraction/sheet_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
it "sets the headers" do
test_excel_file do |file|
excel = create_excel(file, spreadsheet) do
subject.header(["Foo", "Bar"])
subject.header(%w[Foo Bar])
end

expect(excel.cell("A", 1)).to eq "Foo"
Expand All @@ -49,7 +49,7 @@
it "sets the cell values" do
test_excel_file do |file|
excel = create_excel(file, spreadsheet) do
subject.cells(["Foo", "Bar"])
subject.cells(%w[Foo Bar])
end

expect(excel.cell("A", 1)).to eq "Foo"
Expand Down