Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Fixnum, removed in Ruby 3.2, sofrom_xlsxis broken for every consumer on Ruby 3.2+rubyzip < 2.0, which conflicts with gems that need rubyzip >= 3 (e.g. kmz_compressor master)Changes
Move to stock
roo ~> 3.0and preserve the fork's behaviour inside this gem:Roo::Excelx::Formatis patched (newroo_general_format.rb) to treat the General number format as a string type, so values like identification numbers round-trip exactly as typed ("1234", not1234.0). Dates and explicitly-formatted numbers are unaffected.from_xlsxskips empty sheets (stock roo raises when iterating them) and drops leading blank rows so sheets enumerate fromfirst_row— the existing:start_rowcompensation 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