spreadsheet 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 992768cae61da12d700181640e3968fd5e10110bc04d0cc575820b0f63d6030e
4
- data.tar.gz: 682b9a07e067b830c9f78889c15f8c8d70c0f94caa2e91d5e5743beed731cb01
3
+ metadata.gz: f244d6b1694de3b2590286a2b047de226f36cd855dd534a2db47d221da62ec59
4
+ data.tar.gz: e7043746b2683555f602be54ad7e3b68495e5bf7e9abaae5df5c839c139ecc74
5
5
  SHA512:
6
- metadata.gz: aad8b496a030e98f5e7493c98f80ae090f15a7b2f80925217d189ec045fdd0bb61881bd8780c913a21e4eb3c481a477119d7a639a2253bc7ca918f5c48bee21e
7
- data.tar.gz: 96c1b47b1cb6bafdc0afd57e10e84df7d2aaf2eb5859f1557ffedfee135450d009db1f3805cf3c0fbf7c7bd2c1a1e2ab91cfc15b5af5e3445d315faa889ae5aa
6
+ metadata.gz: 97e1b3679d5693891b5a3caba131de68cbac2783067ebd4d318c457db924008b0100209a4d218ebd4357f80bf4cb70b8a1482ae5ea51fec1ec7fd23ccef89fd7
7
+ data.tar.gz: eee493446105db70f89be23210bafff8683c068cb1a0e319fe4ab356aa0af2ce4904d5e545e79eae4a15af898c9d5b69df9f6e0307a07f94ee5d3d7d09d9b083
data/bin/irb ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'irb' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("irb", "irb")
data/bin/racc ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'racc' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("racc", "racc")
data/bin/rdbg ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rdbg' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("debug", "rdbg")
data/bin/rdoc ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rdoc' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rdoc", "rdoc")
data/bin/ri ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'ri' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rdoc", "ri")
data/bin/rubocop ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rubocop' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rubocop", "rubocop")
data/bin/ruby-parse ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'ruby-parse' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("parser", "ruby-parse")
data/bin/ruby-rewrite ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'ruby-rewrite' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("parser", "ruby-rewrite")
data/bin/standardrb ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'standardrb' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("standard", "standardrb")
data/bin/test-unit ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'test-unit' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("test-unit", "test-unit")
@@ -20,7 +20,7 @@ module Spreadsheet
20
20
  class << self
21
21
  def updater *keys
22
22
  keys.each do |key|
23
- unless instance_methods.include? "unupdated_#{key}="
23
+ unless method_defined?("unupdated_#{key}=")
24
24
  alias_method :"unupdated_#{key}=", :"#{key}="
25
25
  define_method :"#{key}=" do |value|
26
26
  send :"unupdated_#{key}=", value
@@ -33,6 +33,7 @@ module Spreadsheet
33
33
  end
34
34
  include Datatypes
35
35
  include Enumerable
36
+
36
37
  attr_accessor :width, :worksheet
37
38
  attr_reader :default_format, :idx
38
39
  boolean :hidden, :collapsed
@@ -6,6 +6,7 @@ module Spreadsheet
6
6
  # attributes (boolean, colors and enumerations)
7
7
  module Datatypes
8
8
  include Compatibility
9
+
9
10
  def self.append_features mod
10
11
  super
11
12
  mod.module_eval do
@@ -142,7 +143,7 @@ module Spreadsheet
142
143
  define_method :"#{key}=" do |arg|
143
144
  if arg
144
145
  arg = aliases.fetch arg do
145
- aliases.fetch arg.to_s.downcase.gsub(/[ \-]/, "_").to_sym, arg
146
+ aliases.fetch arg.to_s.downcase.gsub(/[ -]/, "_").to_sym, arg
146
147
  end
147
148
  if values.any? { |val| val === arg }
148
149
  instance_variable_set(ivar_name(key), arg)
@@ -7,6 +7,7 @@ module Spreadsheet
7
7
  # Considered internal and subject to change without notice.
8
8
  module Offset
9
9
  include Compatibility
10
+
10
11
  attr_reader :changes, :offsets
11
12
  def initialize *args
12
13
  super
@@ -19,9 +20,10 @@ module Spreadsheet
19
20
  mod.module_eval do
20
21
  class << self
21
22
  include Compatibility
23
+
22
24
  def offset *keys
23
25
  keys.each do |key|
24
- attr_reader key unless instance_methods.include? method_name(key)
26
+ attr_reader key unless method_defined?(method_name(key))
25
27
  define_method :"#{key}=" do |value|
26
28
  @changes.store key, true
27
29
  instance_variable_set ivar_name(key), value
@@ -7,6 +7,7 @@ module Spreadsheet
7
7
  # of Excel grows and methods get moved here for disambiguation.
8
8
  module Biff8
9
9
  include Spreadsheet::Excel::Internals
10
+
10
11
  ##
11
12
  # When a String is too long for one Opcode, it is continued in a Continue
12
13
  # Opcode. Excel may reconsider compressing the remainder of the string.
@@ -18,6 +18,7 @@ module Spreadsheet
18
18
  class Reader
19
19
  include Spreadsheet::Encodings
20
20
  include Spreadsheet::Excel::Internals
21
+
21
22
  ROW_BLOCK_OPS = {
22
23
  blank: true, boolerr: true, dbcell: true, formula: true,
23
24
  label: true, labelsst: true, mulblank: true, mulrk: true,
@@ -1308,6 +1309,15 @@ module Spreadsheet
1308
1309
  xf = (flags & 0x0fff0000) >> 16
1309
1310
  attrs.store :default_format, @workbook.format(xf)
1310
1311
  end
1312
+ # When a ROW record claims no cells (`first_used` == `first_unused`) but
1313
+ # `set_missing_row_address` already recorded a valid offset from cell
1314
+ # records found earlier in the stream, preserve the original offset.
1315
+ # Some XLS writers emit ROW records after cell data with zeroed column
1316
+ # ranges; without this fix, `read_row` would seek to the wrong position.
1317
+ if first_used == first_unused && (existing = worksheet.row_addresses[index])
1318
+ attrs[:offset] = existing[:offset]
1319
+ attrs[:row_block] = existing[:row_block]
1320
+ end
1311
1321
  # TODO: Row spacing
1312
1322
  worksheet.set_row_address index, attrs
1313
1323
  end
@@ -1345,6 +1355,7 @@ module Spreadsheet
1345
1355
  def extend_internals version
1346
1356
  require "spreadsheet/excel/internals/biff%i" % version
1347
1357
  extend Internals.const_get("Biff%i" % version)
1358
+
1348
1359
  ## spreadsheets may not include a codepage record.
1349
1360
  @workbook.encoding = encoding 850 if version < 8
1350
1361
  rescue LoadError
@@ -6,6 +6,7 @@ module Spreadsheet
6
6
  # Shared String Table Entry
7
7
  class SstEntry
8
8
  include Spreadsheet::Encodings
9
+
9
10
  attr_accessor :chars, :phonetic, :richtext, :flags, :available,
10
11
  :continued_chars, :wide
11
12
  def initialize opts = {}
@@ -11,6 +11,7 @@ module Spreadsheet
11
11
  class Workbook < Spreadsheet::Workbook
12
12
  include Spreadsheet::Encodings
13
13
  include Spreadsheet::Excel::Offset
14
+
14
15
  BIFF_VERSIONS = {
15
16
  0x000 => 2,
16
17
  0x007 => 2,
@@ -10,8 +10,9 @@ module Spreadsheet
10
10
  # to use any of these.
11
11
  class Worksheet < Spreadsheet::Worksheet
12
12
  include Spreadsheet::Excel::Offset
13
+
13
14
  offset :dimensions
14
- attr_reader :offset, :ole, :links, :guts, :notes
15
+ attr_reader :offset, :ole, :links, :guts, :notes, :row_addresses
15
16
  def initialize opts = {}
16
17
  @row_addresses = nil
17
18
  super
@@ -9,6 +9,7 @@ module Spreadsheet
9
9
  # of Excel grows and methods get moved here for disambiguation.
10
10
  module Biff8
11
11
  include Spreadsheet::Encodings
12
+
12
13
  ##
13
14
  # Check whether the string _data_ can be compressed (i.e. every second byte
14
15
  # is a Null-byte) and perform compression.
@@ -9,6 +9,7 @@ module Spreadsheet
9
9
  # This class encapsulates everything that is needed to write an XF record.
10
10
  class Format < DelegateClass Spreadsheet::Format
11
11
  include Spreadsheet::Excel::Internals
12
+
12
13
  def self.boolean *args
13
14
  args.each do |key|
14
15
  define_method key do
@@ -14,6 +14,7 @@ module Spreadsheet
14
14
  include Spreadsheet::Excel::Writer::Biff8
15
15
  include Spreadsheet::Excel::Internals
16
16
  include Spreadsheet::Excel::Internals::Biff8
17
+
17
18
  attr_reader :worksheet
18
19
  def initialize workbook, worksheet
19
20
  @workbook = workbook
@@ -17,6 +17,7 @@ module Spreadsheet
17
17
  class Workbook < Spreadsheet::Writer
18
18
  include Spreadsheet::Excel::Writer::Biff8
19
19
  include Spreadsheet::Excel::Internals
20
+
20
21
  attr_reader :fonts, :date_base
21
22
  def initialize *args
22
23
  super
@@ -15,6 +15,7 @@ module Spreadsheet
15
15
  include Spreadsheet::Excel::Writer::Biff8
16
16
  include Spreadsheet::Excel::Internals
17
17
  include Spreadsheet::Excel::Internals::Biff8
18
+
18
19
  attr_reader :worksheet
19
20
  def initialize workbook, worksheet
20
21
  @workbook = workbook
@@ -32,7 +32,7 @@ module Spreadsheet
32
32
  end
33
33
 
34
34
  class Worksheet
35
- unless instance_methods.include? "new_format_column"
35
+ unless method_defined?(:new_format_column)
36
36
  alias_method :new_format_column, :format_column
37
37
  def format_column column, width = nil, format = nil
38
38
  if width.is_a? Format
@@ -7,6 +7,7 @@ module Spreadsheet
7
7
  class Font
8
8
  include Spreadsheet::Datatypes
9
9
  include Spreadsheet::Encodings
10
+
10
11
  attr_accessor :name
11
12
  ##
12
13
  # You can set the following boolean Font attributes
@@ -8,6 +8,7 @@ module Spreadsheet
8
8
  class Format
9
9
  include Spreadsheet::Datatypes
10
10
  include Spreadsheet::Encodings
11
+
11
12
  ##
12
13
  # You can set the following boolean attributes:
13
14
  # #cross_down:: Draws a Line from the top-left to the bottom-right
@@ -19,6 +19,7 @@ module Spreadsheet
19
19
  # but if you do, here is where you can find it.
20
20
  class Link < String
21
21
  include Encodings
22
+
22
23
  attr_accessor :target_frame, :url, :dos, :fragment
23
24
  def initialize url = "", description = url, fragment = nil
24
25
  super(description)
@@ -10,6 +10,7 @@ module Spreadsheet
10
10
  # #author :: The name of the author who wrote the note
11
11
  class Note
12
12
  include Encodings
13
+
13
14
  attr_accessor :author, :length, :obj_id, :row, :col, :text
14
15
  def initialize
15
16
  @author = nil
@@ -8,6 +8,7 @@ module Spreadsheet
8
8
  #
9
9
  class NoteObject
10
10
  include Encodings
11
+
11
12
  attr_accessor :obj_id, :text
12
13
  def initialize
13
14
  @obj_id = -1
@@ -18,10 +18,11 @@ module Spreadsheet
18
18
  # #height:: The height of this Row in points (defaults to 12).
19
19
  class Row < Array
20
20
  include Datatypes
21
+
21
22
  class << self
22
23
  def format_updater *keys
23
24
  keys.each do |key|
24
- unless instance_methods.include? "unupdated_#{key}="
25
+ unless method_defined?("unupdated_#{key}=")
25
26
  alias_method :"unupdated_#{key}=", :"#{key}="
26
27
  define_method :"#{key}=" do |value|
27
28
  send :"unupdated_#{key}=", value
@@ -3,5 +3,5 @@
3
3
  module Spreadsheet
4
4
  ##
5
5
  # The version of Spreadsheet you are using.
6
- VERSION = "1.3.4"
6
+ VERSION = "1.3.5"
7
7
  end
@@ -12,6 +12,7 @@ module Spreadsheet
12
12
  # Row#default_format or Worksheet#default_format.
13
13
  class Workbook
14
14
  include Spreadsheet::Encodings
15
+
15
16
  attr_reader :io, :worksheets, :formats, :fonts, :palette
16
17
  attr_accessor :active_worksheet, :encoding, :default_format, :version
17
18
  def initialize io = nil, opts = {default_format: Format.new}
@@ -28,6 +28,7 @@ module Spreadsheet
28
28
  include Spreadsheet::Encodings
29
29
  include Spreadsheet::Datatypes
30
30
  include Enumerable
31
+
31
32
  attr_accessor :name, :selected, :workbook, :password_hash
32
33
  attr_reader :rows, :columns, :merged_cells, :margins, :pagesetup
33
34
  attr_reader :froze_top, :froze_left
data/test/integration.rb CHANGED
@@ -1217,6 +1217,20 @@ module Spreadsheet
1217
1217
  assert_not_nil sheet[2, 1]
1218
1218
  end
1219
1219
 
1220
+ def test_row_record_with_empty_cell_range
1221
+ # Some XLS writers emit ROW records with `first_used` == `first_unused` (claiming
1222
+ # no cells) even though cell records (e.g. `LABELSST`) exist for that row
1223
+ # earlier in the stream. Previously this caused `read_row` to seek to the wrong
1224
+ # offset, returning an empty row despite valid cell data being present.
1225
+ path = File.join @data, "test_row_record_empty_range.xls"
1226
+ book = Spreadsheet.open path
1227
+ sheet = book.worksheet 0
1228
+ row0 = sheet.row(0).to_a.compact
1229
+ assert_operator row0.length, :>, 0, "Row 0 should not be empty"
1230
+ assert_equal "Name", row0[0]
1231
+ assert_equal ["Name", "Code", "Description", "Reference", "Date", "Quantity"], row0
1232
+ end
1233
+
1220
1234
  def test_changes
1221
1235
  path = File.join @data, "test_changes.xls"
1222
1236
  book = Spreadsheet.open path
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spreadsheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hannes F. Wyss, Masaomi Hatakeyama, Zeno R.R. Davatz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-29 00:00:00.000000000 Z
11
+ date: 2026-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger
@@ -134,9 +134,19 @@ files:
134
134
  - Manifest.txt
135
135
  - bin/bundle
136
136
  - bin/bundler
137
+ - bin/irb
137
138
  - bin/oletool
139
+ - bin/racc
138
140
  - bin/rake
141
+ - bin/rdbg
142
+ - bin/rdoc
143
+ - bin/ri
144
+ - bin/rubocop
145
+ - bin/ruby-parse
146
+ - bin/ruby-rewrite
139
147
  - bin/sow
148
+ - bin/standardrb
149
+ - bin/test-unit
140
150
  - bin/xlsopcodes
141
151
  - lib/parseexcel.rb
142
152
  - lib/parseexcel/parseexcel.rb
@@ -197,6 +207,7 @@ files:
197
207
  - test/data/test_missing_format.xls
198
208
  - test/data/test_missing_row.xls
199
209
  - test/data/test_pagesetup.xls
210
+ - test/data/test_row_record_empty_range.xls
200
211
  - test/data/test_sizes.xls
201
212
  - test/data/test_text_drawing.xls
202
213
  - test/data/test_version_excel5.xls