Skip to content

Switch from culturecode-roo to stock roo 3#9

Open
rywall wants to merge 1 commit into
masterfrom
roo-3
Open

Switch from culturecode-roo to stock roo 3#9
rywall wants to merge 1 commit into
masterfrom
roo-3

Conversation

@rywall

@rywall rywall commented Jul 5, 2026

Copy link
Copy Markdown
Member

Problem

This gem depends on culturecode-roo, a fork of roo 2.0.2 whose only behavioural changes were reading "General" format cells as strings and tolerating empty sheets. The fork:

  • no longer runs on modern Ruby — it references Fixnum, removed in Ruby 3.2, so from_xlsx is broken for every consumer on Ruby 3.2+
  • pins rubyzip < 2.0, which conflicts with gems that need rubyzip >= 3 (e.g. kmz_compressor master)

Changes

Move to stock roo ~> 3.0 and preserve the fork's behaviour inside this gem:

  • Roo::Excelx::Format is patched (new roo_general_format.rb) to treat the General number format as a string type, so values like identification numbers round-trip exactly as typed ("1234", not 1234.0). Dates and explicitly-formatted numbers are unaffected.
  • from_xlsx skips empty sheets (stock roo raises when iterating them) and drops leading blank rows so sheets enumerate from first_row — the existing :start_row compensation depends on that.

Version bumped to 0.2.0.

Verification

Parsed a workbook containing General-format numbers, floats, dates, shared strings, and an empty sheet with both stacks — output is byte-identical to culturecode-roo 2.0.2 (under Ruby 3.1, where the fork still runs). Also verified end-to-end against the CARD database's import schema and upload template under Ruby 4.0 / Rails 8.1.

🤖 Generated with Claude Code

culturecode-roo is a fork of roo 2.0.2 whose only behavioural changes were
reading "General" format cells as strings and tolerating empty sheets. It
no longer runs on modern Ruby (it references Fixnum, removed in Ruby 3.2)
and its rubyzip < 2.0 pin conflicts with gems that need rubyzip >= 3
(e.g. kmz_compressor).

Move to stock roo ~> 3.0 and preserve the fork's behaviour inside this gem:

- Roo::Excelx::Format is patched to treat the General number format as a
  string type, so values like identification numbers round-trip exactly as
  typed ("1234", not 1234.0).
- from_xlsx skips empty sheets (roo raises when iterating them) and drops
  leading blank rows so sheets enumerate from first_row, which the
  :start_row compensation depends on.

Verified byte-identical parsing against culturecode-roo 2.0.2 on a workbook
containing General-format numbers, dates, strings, and an empty sheet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant