From 49e379faf23b4b938b8296bcecfdd727c2af03ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20B=C4=85k?= Date: Mon, 22 Jun 2020 10:31:31 +0200 Subject: [PATCH 1/8] Using worksheet without block --- README.md | 7 ++++++ lib/xlsxtream/workbook.rb | 36 ++++++++++++++++----------- test/xlsxtream/workbook_test.rb | 43 ++++++++++++++++++++++++++++++--- 3 files changed, 68 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index e0c51fb..30f812c 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,13 @@ xlsx.write_worksheet(name: 'SheetWithAutoFormat', auto_format: true) do |sheet| sheet << ['true', '11.85', '2050-01-01T12:00', '1984-01-01'] end +# You can also create worksheet without a block, using the `add_worksheet` method. +# It can be only used sequentially, so remember to manually close the worksheet +# when you are done (before opening a new one). +worksheet = xls.add_worksheet(name: 'SheetWithoutBlock') +worksheet << ['some', 'data'] +worksheet.close + # Writes metadata and ZIP archive central directory xlsx.close # Close IO object diff --git a/lib/xlsxtream/workbook.rb b/lib/xlsxtream/workbook.rb index 35b8bc5..88fcee6 100644 --- a/lib/xlsxtream/workbook.rb +++ b/lib/xlsxtream/workbook.rb @@ -58,27 +58,18 @@ def initialize(output, options = {}) @worksheets = Hash.new { |hash, name| hash[name] = hash.size + 1 } end - def write_worksheet(name = nil, options = {}) - if name.is_a? Hash and options.empty? - options = name - name = nil - end - use_sst = options.fetch(:use_shared_strings, @options[:use_shared_strings]) - auto_format = options.fetch(:auto_format, @options[:auto_format]) - columns = options.fetch(:columns, @options[:columns]) - sst = use_sst ? @sst : nil + def add_worksheet(*args) + build_worksheet(*args) + end - name = name || options[:name] || "Sheet#{@worksheets.size + 1}" - sheet_id = @worksheets[name] - @io.add_file "xl/worksheets/sheet#{sheet_id}.xml" + def write_worksheet(*args) + worksheet = build_worksheet(*args) - worksheet = Worksheet.new(@io, :sst => sst, :auto_format => auto_format, :columns => columns) yield worksheet if block_given? worksheet.close nil end - alias_method :add_worksheet, :write_worksheet def close write_workbook @@ -93,6 +84,23 @@ def close end private + def build_worksheet(name = nil, options = {}) + if name.is_a? Hash and options.empty? + options = name + name = nil + end + + use_sst = options.fetch(:use_shared_strings, @options[:use_shared_strings]) + auto_format = options.fetch(:auto_format, @options[:auto_format]) + columns = options.fetch(:columns, @options[:columns]) + sst = use_sst ? @sst : nil + + name = name || options[:name] || "Sheet#{@worksheets.size + 1}" + sheet_id = @worksheets[name] + @io.add_file "xl/worksheets/sheet#{sheet_id}.xml" + + Worksheet.new(@io, :sst => sst, :auto_format => auto_format, :columns => columns) + end def write_root_rels @io.add_file "_rels/.rels" diff --git a/test/xlsxtream/workbook_test.rb b/test/xlsxtream/workbook_test.rb index bdc9fd1..4ba52e6 100644 --- a/test/xlsxtream/workbook_test.rb +++ b/test/xlsxtream/workbook_test.rb @@ -50,7 +50,7 @@ def test_empty_workbook def test_workbook_with_sheet iow_spy = io_wrapper_spy Workbook.open(iow_spy) do |wb| - wb.add_worksheet + wb.write_worksheet end expected = { 'xl/worksheets/sheet1.xml' => @@ -80,10 +80,45 @@ def test_workbook_with_sheet end end + def test_workbook_with_sheet_without_block + iow_spy = io_wrapper_spy + Workbook.open(iow_spy) do |wb| + ws = wb.add_worksheet + ws << ['foo'] + ws.close + end + expected = { + 'xl/worksheets/sheet1.xml' => + ''"\r\n" \ + '' \ + 'foo' \ + '', + 'xl/workbook.xml' => + ''"\r\n" \ + '' \ + '' \ + '' \ + '' \ + '' \ + '', + 'xl/_rels/workbook.xml.rels' => + ''"\r\n" \ + '' \ + '' \ + '' \ + '' + } + actual = iow_spy + expected.keys.each do |path| + assert_equal expected[path], actual[path] + end + end + def test_workbook_with_sst iow_spy = io_wrapper_spy Workbook.open(iow_spy) do |wb| - wb.add_worksheet(nil, use_shared_strings: true) do |ws| + wb.write_worksheet(nil, use_shared_strings: true) do |ws| ws << ['foo'] end end @@ -239,7 +274,7 @@ def test_worksheet_name_as_option def test_add_columns_via_workbook_options iow_spy = io_wrapper_spy Workbook.open(iow_spy, { :columns => [ {}, {}, { :width_pixels => 42 } ] } ) do |wb| - wb.add_worksheet {} + wb.write_worksheet {} end expected = \ @@ -258,7 +293,7 @@ def test_add_columns_via_workbook_options def test_add_columns_via_workbook_options_and_add_rows iow_spy = io_wrapper_spy Workbook.open(iow_spy, { :columns => [ {}, {}, { :width_pixels => 42 } ] } ) do |wb| - wb.add_worksheet do |ws| + wb.write_worksheet do |ws| ws << ['foo'] ws.add_row ['bar'] end From ae5cd390c14367aea9d97ba7948a1814cdb61bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Sandstr=C3=B6m?= Date: Mon, 22 Jun 2020 15:30:37 +0200 Subject: [PATCH 2/8] Track worksheet directly --- lib/xlsxtream/workbook.rb | 24 ++++++++++++++---------- lib/xlsxtream/worksheet.rb | 6 +++++- test/xlsxtream/worksheet_test.rb | 22 ++++++++++++++++------ 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/lib/xlsxtream/workbook.rb b/lib/xlsxtream/workbook.rb index 88fcee6..8cc0de8 100644 --- a/lib/xlsxtream/workbook.rb +++ b/lib/xlsxtream/workbook.rb @@ -55,7 +55,7 @@ def initialize(output, options = {}) @io = IO::ZipTricks.new(output) end @sst = SharedStringTable.new - @worksheets = Hash.new { |hash, name| hash[name] = hash.size + 1 } + @worksheets = [] end def add_worksheet(*args) @@ -95,11 +95,15 @@ def build_worksheet(name = nil, options = {}) columns = options.fetch(:columns, @options[:columns]) sst = use_sst ? @sst : nil - name = name || options[:name] || "Sheet#{@worksheets.size + 1}" - sheet_id = @worksheets[name] + sheet_id = @worksheets.size + 1 + name = name || options[:name] || "Sheet#{sheet_id}" + @io.add_file "xl/worksheets/sheet#{sheet_id}.xml" - Worksheet.new(@io, :sst => sst, :auto_format => auto_format, :columns => columns) + worksheet = Worksheet.new(@io, sheet_id, name, :sst => sst, :auto_format => auto_format, :columns => columns) + @worksheets << worksheet + + worksheet end def write_root_rels @@ -121,8 +125,8 @@ def write_workbook XML - @worksheets.each do |name, sheet_id| - @io << %'' + @worksheets.each do |worksheet| + @io << %'' end @io << XML.strip(<<-XML) @@ -197,8 +201,8 @@ def write_workbook_rels @io.add_file "xl/_rels/workbook.xml.rels" @io << XML.header @io << '' - @worksheets.each do |name, sheet_id| - @io << %'' + @worksheets.each do |worksheet| + @io << %'' end @io << %'' @io << %'' unless @sst.empty? @@ -216,8 +220,8 @@ def write_content_types XML @io << '' unless @sst.empty? - @worksheets.each_value do |sheet_id| - @io << %'' + @worksheets.each do |worksheet| + @io << %'' end @io << '' end diff --git a/lib/xlsxtream/worksheet.rb b/lib/xlsxtream/worksheet.rb index 786e33e..7ee68f2 100644 --- a/lib/xlsxtream/worksheet.rb +++ b/lib/xlsxtream/worksheet.rb @@ -4,8 +4,12 @@ module Xlsxtream class Worksheet - def initialize(io, options = {}) + attr_reader :id, :name + + def initialize(io, id, name, options = {}) @io = io + @id = id + @name = name @rownum = 1 @options = options diff --git a/test/xlsxtream/worksheet_test.rb b/test/xlsxtream/worksheet_test.rb index 7a7c59b..792f046 100644 --- a/test/xlsxtream/worksheet_test.rb +++ b/test/xlsxtream/worksheet_test.rb @@ -7,7 +7,7 @@ module Xlsxtream class WorksheetTest < Minitest::Test def test_empty_worksheet io = StringIO.new - ws = Worksheet.new(io) + ws = Worksheet.new(io, 1, 'test') ws.close expected = \ ''"\r\n" \ @@ -17,7 +17,7 @@ def test_empty_worksheet def test_add_row io = StringIO.new - ws = Worksheet.new(io) + ws = Worksheet.new(io, 1, 'test') ws << ['foo'] ws.add_row ['bar'] ws.close @@ -33,7 +33,7 @@ def test_add_row def test_add_row_with_sst_option io = StringIO.new mock_sst = { 'foo' => 0 } - ws = Worksheet.new(io, :sst => mock_sst) + ws = Worksheet.new(io, 1, 'test', :sst => mock_sst) ws << ['foo'] ws.close expected = \ @@ -46,7 +46,7 @@ def test_add_row_with_sst_option def test_add_row_with_auto_format_option io = StringIO.new - ws = Worksheet.new(io, :auto_format => true) + ws = Worksheet.new(io, 1, 'test', :auto_format => true) ws << ['1.5'] ws.close expected = \ @@ -59,7 +59,7 @@ def test_add_row_with_auto_format_option def test_add_columns_via_worksheet_options io = StringIO.new - ws = Worksheet.new(io, { :columns => [ {}, {}, { :width_pixels => 42 } ] } ) + ws = Worksheet.new(io, 1, 'test', { :columns => [ {}, {}, { :width_pixels => 42 } ] } ) ws.close expected = \ ''"\r\n" \ @@ -74,7 +74,7 @@ def test_add_columns_via_worksheet_options def test_add_columns_via_worksheet_options_and_add_rows io = StringIO.new - ws = Worksheet.new(io, { :columns => [ {}, {}, { :width_pixels => 42 } ] } ) + ws = Worksheet.new(io, 1, 'test', { :columns => [ {}, {}, { :width_pixels => 42 } ] } ) ws << ['foo'] ws.add_row ['bar'] ws.close @@ -91,5 +91,15 @@ def test_add_columns_via_worksheet_options_and_add_rows '' assert_equal expected, io.string end + + def test_respond_to_id + ws = Worksheet.new(StringIO.new, 1, 'test') + assert_equal 1, ws.id + end + + def test_respond_to_name + ws = Worksheet.new(StringIO.new, 1, 'test') + assert_equal 'test', ws.name + end end end From 7d10f74cbcb4db50709efdf46f4eb6f553bf2c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Sandstr=C3=B6m?= Date: Mon, 22 Jun 2020 15:31:23 +0200 Subject: [PATCH 3/8] Raise for non-sequential writing --- lib/xlsxtream/workbook.rb | 5 +++++ lib/xlsxtream/worksheet.rb | 6 ++++++ test/xlsxtream/workbook_test.rb | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/lib/xlsxtream/workbook.rb b/lib/xlsxtream/workbook.rb index 8cc0de8..efdc2db 100644 --- a/lib/xlsxtream/workbook.rb +++ b/lib/xlsxtream/workbook.rb @@ -59,6 +59,11 @@ def initialize(output, options = {}) end def add_worksheet(*args) + + unless @worksheets.all? { |ws| ws.closed? } + fail Error, "Close the current worksheet before adding a new one" + end + build_worksheet(*args) end diff --git a/lib/xlsxtream/worksheet.rb b/lib/xlsxtream/worksheet.rb index 7ee68f2..ed1c4e0 100644 --- a/lib/xlsxtream/worksheet.rb +++ b/lib/xlsxtream/worksheet.rb @@ -11,6 +11,7 @@ def initialize(io, id, name, options = {}) @id = id @name = name @rownum = 1 + @closed = false @options = options write_header @@ -24,6 +25,11 @@ def <<(row) def close write_footer + @closed = true + end + + def closed? + @closed end private diff --git a/test/xlsxtream/workbook_test.rb b/test/xlsxtream/workbook_test.rb index 4ba52e6..fa9b420 100644 --- a/test/xlsxtream/workbook_test.rb +++ b/test/xlsxtream/workbook_test.rb @@ -4,6 +4,7 @@ require 'tempfile' require 'xlsxtream/workbook' require 'xlsxtream/io/hash' +require 'xlsxtream/errors' module Xlsxtream class WorksheetTest < Minitest::Test @@ -223,6 +224,23 @@ def test_write_multiple_worksheets end end + def test_must_write_sequentially + iow_spy1 = io_wrapper_spy + + Workbook.open(iow_spy1) do |wb| + wb.add_worksheet.tap { |ws| ws.close } + wb.add_worksheet.tap { |ws| ws.close } + end + + iow_spy2 = io_wrapper_spy + assert_raises(Xlsxtream::Error) do + Workbook.open(iow_spy2) do |wb| + wb.add_worksheet + wb.add_worksheet # adding a second worksheet without closing + end + end + end + def test_write_named_worksheet iow_spy = io_wrapper_spy Workbook.open(iow_spy) do |wb| From 46b3496b22787be452fd9c7025ab9050aea61fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Sandstr=C3=B6m?= Date: Mon, 22 Jun 2020 15:32:26 +0200 Subject: [PATCH 4/8] Backwards-compatiblity for add_worksheet This method was never documented (private) so it's unlikely that anyone was relying on it. But in case they did we continue supporting this use-case and emit a warning. --- lib/xlsxtream/workbook.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/xlsxtream/workbook.rb b/lib/xlsxtream/workbook.rb index efdc2db..49310a4 100644 --- a/lib/xlsxtream/workbook.rb +++ b/lib/xlsxtream/workbook.rb @@ -59,6 +59,14 @@ def initialize(output, options = {}) end def add_worksheet(*args) + if block_given? + # This method used to be an alias for `write_worksheet`. This was never publicly documented, + # but to avoid breaking this private API we keep the old behaviour when called with a block. + if defined?(Warning) # Warning doesn't exist in ruby < 2.4 + Warning.warn "Use #write_worksheet to pass a block, passing a block to add_worksheet is deprecated" + end + return write_worksheet(*args, &block) + end unless @worksheets.all? { |ws| ws.closed? } fail Error, "Close the current worksheet before adding a new one" From dbfe5e91ea8fbfa1501e536baab6f6870d8c83b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Bu=CC=88nemann?= Date: Sat, 27 Jun 2020 18:52:32 +0200 Subject: [PATCH 5/8] Fix calling add_workbook with a block (deprecated) and add the code location to the deprecation warning to help track down the location of the deprecated call. --- lib/xlsxtream/workbook.rb | 4 ++-- test/xlsxtream/workbook_test.rb | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/lib/xlsxtream/workbook.rb b/lib/xlsxtream/workbook.rb index 49310a4..fdc59af 100644 --- a/lib/xlsxtream/workbook.rb +++ b/lib/xlsxtream/workbook.rb @@ -58,12 +58,12 @@ def initialize(output, options = {}) @worksheets = [] end - def add_worksheet(*args) + def add_worksheet(*args, &block) if block_given? # This method used to be an alias for `write_worksheet`. This was never publicly documented, # but to avoid breaking this private API we keep the old behaviour when called with a block. if defined?(Warning) # Warning doesn't exist in ruby < 2.4 - Warning.warn "Use #write_worksheet to pass a block, passing a block to add_worksheet is deprecated" + Warning.warn "#{caller.first}: Use #write_worksheet to pass a block, passing a block to add_worksheet is deprecated." end return write_worksheet(*args, &block) end diff --git a/test/xlsxtream/workbook_test.rb b/test/xlsxtream/workbook_test.rb index fa9b420..7cc017b 100644 --- a/test/xlsxtream/workbook_test.rb +++ b/test/xlsxtream/workbook_test.rb @@ -81,6 +81,39 @@ def test_workbook_with_sheet end end + def test_deprecated_add_workbook_with_block + iow_spy = io_wrapper_spy + Workbook.open(iow_spy) do |wb| + wb.add_worksheet {} + end + expected = { + 'xl/worksheets/sheet1.xml' => + ''"\r\n" \ + '' \ + '' \ + '', + 'xl/workbook.xml' => + ''"\r\n" \ + '' \ + '' \ + '' \ + '' \ + '' \ + '', + 'xl/_rels/workbook.xml.rels' => + ''"\r\n" \ + '' \ + '' \ + '' \ + '' + } + actual = iow_spy + expected.keys.each do |path| + assert_equal expected[path], actual[path] + end + end + def test_workbook_with_sheet_without_block iow_spy = io_wrapper_spy Workbook.open(iow_spy) do |wb| From 08c610befe4efaaf53764825f7c464a23f8a0aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Bu=CC=88nemann?= Date: Sat, 27 Jun 2020 19:44:33 +0200 Subject: [PATCH 6/8] Make worksheet id and name optional --- lib/xlsxtream/workbook.rb | 2 +- lib/xlsxtream/worksheet.rb | 14 +++++++++----- test/xlsxtream/worksheet_test.rb | 16 ++++++++-------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/lib/xlsxtream/workbook.rb b/lib/xlsxtream/workbook.rb index fdc59af..a8ba2fc 100644 --- a/lib/xlsxtream/workbook.rb +++ b/lib/xlsxtream/workbook.rb @@ -113,7 +113,7 @@ def build_worksheet(name = nil, options = {}) @io.add_file "xl/worksheets/sheet#{sheet_id}.xml" - worksheet = Worksheet.new(@io, sheet_id, name, :sst => sst, :auto_format => auto_format, :columns => columns) + worksheet = Worksheet.new(@io, :id => sheet_id, :name => name, :sst => sst, :auto_format => auto_format, :columns => columns) @worksheets << worksheet worksheet diff --git a/lib/xlsxtream/worksheet.rb b/lib/xlsxtream/worksheet.rb index ed1c4e0..c4e8b41 100644 --- a/lib/xlsxtream/worksheet.rb +++ b/lib/xlsxtream/worksheet.rb @@ -4,12 +4,8 @@ module Xlsxtream class Worksheet - attr_reader :id, :name - - def initialize(io, id, name, options = {}) + def initialize(io, options = {}) @io = io - @id = id - @name = name @rownum = 1 @closed = false @options = options @@ -32,6 +28,14 @@ def closed? @closed end + def id + @options[:id] + end + + def name + @options[:name] + end + private def write_header diff --git a/test/xlsxtream/worksheet_test.rb b/test/xlsxtream/worksheet_test.rb index 792f046..9f2aa3b 100644 --- a/test/xlsxtream/worksheet_test.rb +++ b/test/xlsxtream/worksheet_test.rb @@ -7,7 +7,7 @@ module Xlsxtream class WorksheetTest < Minitest::Test def test_empty_worksheet io = StringIO.new - ws = Worksheet.new(io, 1, 'test') + ws = Worksheet.new(io) ws.close expected = \ ''"\r\n" \ @@ -17,7 +17,7 @@ def test_empty_worksheet def test_add_row io = StringIO.new - ws = Worksheet.new(io, 1, 'test') + ws = Worksheet.new(io) ws << ['foo'] ws.add_row ['bar'] ws.close @@ -33,7 +33,7 @@ def test_add_row def test_add_row_with_sst_option io = StringIO.new mock_sst = { 'foo' => 0 } - ws = Worksheet.new(io, 1, 'test', :sst => mock_sst) + ws = Worksheet.new(io, :sst => mock_sst) ws << ['foo'] ws.close expected = \ @@ -46,7 +46,7 @@ def test_add_row_with_sst_option def test_add_row_with_auto_format_option io = StringIO.new - ws = Worksheet.new(io, 1, 'test', :auto_format => true) + ws = Worksheet.new(io, :auto_format => true) ws << ['1.5'] ws.close expected = \ @@ -59,7 +59,7 @@ def test_add_row_with_auto_format_option def test_add_columns_via_worksheet_options io = StringIO.new - ws = Worksheet.new(io, 1, 'test', { :columns => [ {}, {}, { :width_pixels => 42 } ] } ) + ws = Worksheet.new(io, { :columns => [ {}, {}, { :width_pixels => 42 } ] } ) ws.close expected = \ ''"\r\n" \ @@ -74,7 +74,7 @@ def test_add_columns_via_worksheet_options def test_add_columns_via_worksheet_options_and_add_rows io = StringIO.new - ws = Worksheet.new(io, 1, 'test', { :columns => [ {}, {}, { :width_pixels => 42 } ] } ) + ws = Worksheet.new(io, { :columns => [ {}, {}, { :width_pixels => 42 } ] } ) ws << ['foo'] ws.add_row ['bar'] ws.close @@ -93,12 +93,12 @@ def test_add_columns_via_worksheet_options_and_add_rows end def test_respond_to_id - ws = Worksheet.new(StringIO.new, 1, 'test') + ws = Worksheet.new(StringIO.new, id: 1) assert_equal 1, ws.id end def test_respond_to_name - ws = Worksheet.new(StringIO.new, 1, 'test') + ws = Worksheet.new(StringIO.new, name: 'test') assert_equal 'test', ws.name end end From 2a490dc6f9179923df7e936618f5858495fae0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Bu=CC=88nemann?= Date: Sat, 27 Jun 2020 20:37:44 +0200 Subject: [PATCH 7/8] Use native ruby deprecation warnings and hide the warning during test runs. This allows to hide the warning using eg. RUBYOPT=-W0. --- lib/xlsxtream/workbook.rb | 4 +--- test/xlsxtream/workbook_test.rb | 11 ++++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/xlsxtream/workbook.rb b/lib/xlsxtream/workbook.rb index a8ba2fc..1fdb04b 100644 --- a/lib/xlsxtream/workbook.rb +++ b/lib/xlsxtream/workbook.rb @@ -62,9 +62,7 @@ def add_worksheet(*args, &block) if block_given? # This method used to be an alias for `write_worksheet`. This was never publicly documented, # but to avoid breaking this private API we keep the old behaviour when called with a block. - if defined?(Warning) # Warning doesn't exist in ruby < 2.4 - Warning.warn "#{caller.first}: Use #write_worksheet to pass a block, passing a block to add_worksheet is deprecated." - end + Kernel.warn "#{caller.first[/.*:\d+:(?=in `)/]} warning: Calling #{self.class}#add_worksheet with a block is deprecated, use #write_worksheet instead." return write_worksheet(*args, &block) end diff --git a/test/xlsxtream/workbook_test.rb b/test/xlsxtream/workbook_test.rb index 7cc017b..6974194 100644 --- a/test/xlsxtream/workbook_test.rb +++ b/test/xlsxtream/workbook_test.rb @@ -84,7 +84,9 @@ def test_workbook_with_sheet def test_deprecated_add_workbook_with_block iow_spy = io_wrapper_spy Workbook.open(iow_spy) do |wb| - wb.add_worksheet {} + silence_warnings do + wb.add_worksheet {} + end end expected = { 'xl/worksheets/sheet1.xml' => @@ -483,5 +485,12 @@ def io_wrapper_spy IO::Hash.new(StringIO.new) end + def silence_warnings + old_verbose, $VERBOSE = $VERBOSE, nil + yield + ensure + $VERBOSE = old_verbose + end + end end From 32c04e90d9218887babe6cbc5ecd909e02ec4e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Bu=CC=88nemann?= Date: Sat, 27 Jun 2020 20:58:55 +0200 Subject: [PATCH 8/8] Remove redundant errors include in workbook test since it is already included by the workbook source. --- test/xlsxtream/workbook_test.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/xlsxtream/workbook_test.rb b/test/xlsxtream/workbook_test.rb index 6974194..a589cae 100644 --- a/test/xlsxtream/workbook_test.rb +++ b/test/xlsxtream/workbook_test.rb @@ -4,7 +4,6 @@ require 'tempfile' require 'xlsxtream/workbook' require 'xlsxtream/io/hash' -require 'xlsxtream/errors' module Xlsxtream class WorksheetTest < Minitest::Test