From 1ac3f82f25569adaee8651cf72cb977fabe7c252 Mon Sep 17 00:00:00 2001 From: chopraanmol1 Date: Sun, 13 Jan 2019 20:47:50 +0530 Subject: [PATCH 1/2] Update Changelog and preparation for new release --- CHANGELOG.md | 25 ++++++++++++++++++++++++ lib/roo/excelx.rb | 2 +- lib/roo/excelx/sheet_doc.rb | 5 ++++- roo.gemspec | 2 +- spec/lib/roo/weak_instance_cache_spec.rb | 4 +++- 5 files changed, 34 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bbf616c..d93da953 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,33 @@ ## Unreleased +### Fixed +- Fixed inconsistent column length for CSV [375](https://github.com/roo-rb/roo/pull/375) +- Fixed formatted_value with `%` for Excelx [416](https://github.com/roo-rb/roo/pull/416) +- Improved Memory consumption and performance [434](https://github.com/roo-rb/roo/pull/434) [449](https://github.com/roo-rb/roo/pull/449) [454](https://github.com/roo-rb/roo/pull/454) [456](https://github.com/roo-rb/roo/pull/456) [458](https://github.com/roo-rb/roo/pull/458) [462](https://github.com/roo-rb/roo/pull/462) [466](https://github.com/roo-rb/roo/pull/466) +- Accept both Transitional and Strict Type for Excelx's worksheets [441](https://github.com/roo-rb/roo/pull/441) +- Fixed ruby warnings [442](https://github.com/roo-rb/roo/pull/442) [476](https://github.com/roo-rb/roo/pull/476) +- Restore support for URL as file identifier for CSV [462](https://github.com/roo-rb/roo/pull/462) +- Fixed missing location for Excelx's links [482](https://github.com/roo-rb/roo/pull/482) + +### Changed / Added +- Drop support for ruby 2.2.x and lower - Updated rubyzip version for fixing security issue. Now minimal version is 1.2.1 +- Roo::Excelx::Coordinate now inherits Array [458](https://github.com/roo-rb/roo/pull/458) +- Improved Roo::HeaderRowNotFoundError exception's message [461](https://github.com/roo-rb/roo/pull/461) +- Added `empty_cell` option which by default disable allocation for Roo::Excelx::Cell::Empty [464](https://github.com/roo-rb/roo/pull/464) +- Added support for variable number of decimals for Excelx's formatted_value [387](https://github.com/roo-rb/roo/pull/387) +- Added `disable_html_injection` option to disable html injection for shared string in `Roo::Excelx` [392](https://github.com/roo-rb/roo/pull/392) +- Added image extraction for Excelx [414](https://github.com/roo-rb/roo/pull/414) [397](https://github.com/roo-rb/roo/pull/397) +- Added support for `1e6` as scientific notation for Excelx [433](https://github.com/roo-rb/roo/pull/433) +- Added support for Integer as 0 based index for Excelx's `sheet_for` [455](https://github.com/roo-rb/roo/pull/455) +- Extended `no_hyperlinks` option for non streaming Excelx methods [459](https://github.com/roo-rb/roo/pull/459) +- Added `empty_cell` option to disable Roo::Excelx::Cell::Empty allocation for Excelx [464](https://github.com/roo-rb/roo/pull/464) +- Added support for Integer with leading zero for Roo:Excelx [479](https://github.com/roo-rb/roo/pull/479) +- Refactored Excelx code [453](https://github.com/roo-rb/roo/pull/453) [477](https://github.com/roo-rb/roo/pull/477) [483](https://github.com/roo-rb/roo/pull/483) [484](https://github.com/roo-rb/roo/pull/484) ### Deprecations - Roo::Excelx::Sheet#present_cells is deprecated [454](https://github.com/roo-rb/roo/pull/454) +- Roo::Utils.split_coordinate is deprecated [458](https://github.com/roo-rb/roo/pull/458) +- Roo::Excelx::Cell::Base#link is deprecated [457](https://github.com/roo-rb/roo/pull/457) ## [2.7.1] 2017-01-03 ### Fixed diff --git a/lib/roo/excelx.rb b/lib/roo/excelx.rb index 2bbdc0a1..f9f0ee26 100755 --- a/lib/roo/excelx.rb +++ b/lib/roo/excelx.rb @@ -40,7 +40,7 @@ def initialize(filename_or_stream, options = {}) sheet_options = {} sheet_options[:expand_merged_ranges] = (options[:expand_merged_ranges] || false) sheet_options[:no_hyperlinks] = (options[:no_hyperlinks] || false) - sheet_options[:empty_cells] = (options[:empty_cells] || false) + sheet_options[:empty_cell] = (options[:empty_cell] || false) shared_options = {} shared_options[:disable_html_wrapper] = (options[:disable_html_wrapper] || false) diff --git a/lib/roo/excelx/sheet_doc.rb b/lib/roo/excelx/sheet_doc.rb index 086ebac2..8b0c686e 100755 --- a/lib/roo/excelx/sheet_doc.rb +++ b/lib/roo/excelx/sheet_doc.rb @@ -78,10 +78,13 @@ def cell_value_type(type, format) # # hyperlink - a String for the hyperlink for the cell or nil when no # hyperlink is present. + # coordinate - a Roo::Excelx::Coordinate for the coordinate for the cell + # or nil to extract coordinate from cell_xml. + # empty_cell - an Optional Boolean value. # # Examples # - # cells_from_xml(, nil) + # cells_from_xml(, nil, nil) # # => # # Returns a type of . diff --git a/roo.gemspec b/roo.gemspec index 6d821e8a..c6740255 100644 --- a/roo.gemspec +++ b/roo.gemspec @@ -6,7 +6,7 @@ require 'roo/version' Gem::Specification.new do |spec| spec.name = 'roo' spec.version = Roo::VERSION - spec.authors = ['Thomas Preymesser', 'Hugh McGowan', 'Ben Woosley', 'Oleksandr Simonov', 'Steven Daniels'] + spec.authors = ['Thomas Preymesser', 'Hugh McGowan', 'Ben Woosley', 'Oleksandr Simonov', 'Steven Daniels', 'Anmol Chopra'] spec.email = ['ruby.ruby.ruby.roo@gmail.com', 'oleksandr@simonov.me'] spec.summary = 'Roo can access the contents of various spreadsheet files.' spec.description = "Roo can access the contents of various spreadsheet files. It can handle\n* OpenOffice\n* Excelx\n* LibreOffice\n* CSV" diff --git a/spec/lib/roo/weak_instance_cache_spec.rb b/spec/lib/roo/weak_instance_cache_spec.rb index 5adcb908..c2ad9b41 100644 --- a/spec/lib/roo/weak_instance_cache_spec.rb +++ b/spec/lib/roo/weak_instance_cache_spec.rb @@ -84,7 +84,9 @@ def force_gc end else def force_gc - GC.start + GC.start(full_mark: true, immediate_sweep: true) + sleep(0.1) + GC.start(full_mark: true, immediate_sweep: true) end end end \ No newline at end of file From c866fcda8af52c9a920d5d1c0753cfd4d8233d09 Mon Sep 17 00:00:00 2001 From: chopraanmol1 Date: Sun, 13 Jan 2019 20:56:23 +0530 Subject: [PATCH 2/2] version bump to 2.8.0 --- lib/roo/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roo/version.rb b/lib/roo/version.rb index bdd16dc1..7fd96d73 100644 --- a/lib/roo/version.rb +++ b/lib/roo/version.rb @@ -1,3 +1,3 @@ module Roo - VERSION = "2.7.1" + VERSION = "2.8.0" end