Skip to content

Commit

Permalink
Ensure compatibility with Ruby 3.4 🎄 (#61)
Browse files Browse the repository at this point in the history
* Update dependencies

* Update to latest standardrb style

* Retain Ruby 2.7 compatibility, update changelog
  • Loading branch information
martijn authored Dec 25, 2024
1 parent bcf1641 commit 25a877c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Xsv Changelog

## 1.3.2 2024-12-25

- Xsv is now compatbile with Ruby 2.7 through 3.4, latest JRuby, and latest TruffleRuby
- Sheet#each_row returns Enumerator when no block is given (thanks @myabc)

## 1.3.1 2024-05-06

- Fix issue #56 with multiple nil headers
Expand Down
2 changes: 1 addition & 1 deletion lib/xsv/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def parse_time(number)
# Compensate for rounding errors
if minutes >= 60
hours += (minutes / 60)
minutes = minutes % 60
minutes %= 60
end

format("%02d:%02d", hours, minutes)
Expand Down
2 changes: 1 addition & 1 deletion test/workbook_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,6 @@ def test_first
def test_enumerable
@workbook = Xsv.open(File.read("test/files/office365-xl7.xlsx"))

assert_equal %w(Blad1 Blad2 Blad3), @workbook.map(&:name)
assert_equal %w[Blad1 Blad2 Blad3], @workbook.map(&:name)
end
end
7 changes: 4 additions & 3 deletions xsv.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Gem::Specification.new do |spec|
spec.add_dependency "rubyzip", ">= 1.3", "< 3"

spec.add_development_dependency "bundler", "< 3"
spec.add_development_dependency "rake", "~> 13.1.0"
spec.add_development_dependency "minitest", "~> 5.20.0"
spec.add_development_dependency "standard", "~> 1.32.1"
spec.add_development_dependency "rake", "~> 13.2"
spec.add_development_dependency "minitest", "~> 5.24"
# Maintain Ruby 2.7 compatibility
spec.add_development_dependency "standard", "1.37.0"
end

0 comments on commit 25a877c

Please sign in to comment.