simple_text_extract 3.0.0 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 411c821b9a0f6ab4f5b95d0104786fbca88c42ab97fa4bd41e8443baae7c80a3
4
- data.tar.gz: e6034b96a08ed5bea7abc61e0fb0c762e4c16c44a1e4d54adbc7eff2d9a8bcab
3
+ metadata.gz: 388ec404e856a47441f3bb3e23873d70eff4fabf86d96afcfeb6f7ad324e262d
4
+ data.tar.gz: 054f2cdb252b91ae14bdc678af1b75d433bfc6266d68ccace27ce4ec829c6484
5
5
  SHA512:
6
- metadata.gz: 87d96e6217062b72e104ac1165475d3af497937532fe7f03364128086f6ab61d490d650d60030813783ba32c418bbab564455dc0659882724e6711d9a612cc4d
7
- data.tar.gz: 645af90b82616a06805603d2417498890f6fbb53c0d2661934b9ec40d686550c97a42b5bbcc9cf8fe90c049367e45a2e8dd76af8f29d375d8f501beed5be4b16
6
+ metadata.gz: 5c5a9d4f02bd00f32495803f60b2552d084f204a39df5c239d29e9be2c04013ae44b865c805c750c3a52a51a5e9b93a358e97d386a351aa16460664e048bac61
7
+ data.tar.gz: f7bc4192659abaf6653f58c01b446e11e483dddad2efb91ebf077a88767346f50997d87ba8af5d4ab26e7ac2ed7bf6a4393fecf75b78b1968662a266e251a84e
data/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
- ## 2.0.0 (2023-04-14)
1
+ ## 3.0.1 (2023-04-17)
2
+
3
+ - Coerces filename in `SimpleTextExtract.supports?(filename:)` to string.
4
+
5
+ ## 3.0.1 (2023-04-17)
6
+
7
+ - Fixes printing of Roo::Excelx::Cell::Empty for empty rows
8
+
9
+ ## 3.0.0 (2023-04-14)
2
10
 
3
11
  - [BREAKING CHANGE] Improves format of text extracts to better support post processing into sentences/rows. This will only cause issues if you have tests/code that relies on the specific format of whitespace characters in the resulting extracts. For example, the docx extract will now preserve newline characters.
4
12
  - Improves memory allocation for xlsx files using `Roo#each_row_streaming`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_text_extract (3.0.0)
4
+ simple_text_extract (3.0.2)
5
5
  roo (~> 2.10.0)
6
6
  rubyzip (~> 2.3.2)
7
7
  spreadsheet (~> 1.3.0)
@@ -88,10 +88,13 @@ class SimpleTextExtract::Extract
88
88
 
89
89
  text = []
90
90
 
91
- spreadsheet.sheets.each do |name|
92
- text << name
91
+ spreadsheet.sheets.each_with_index do |name, i|
92
+ text << "# Sheet Index: #{i}"
93
+ text << "# Sheet Name: #{name}"
93
94
 
94
- spreadsheet.sheet(name)&.each_row_streaming { |row| text << row.join(" ") }
95
+ spreadsheet.sheet(name)&.each_row_streaming do |row|
96
+ text << row.filter(&:present?).join(" ")
97
+ end
95
98
  end
96
99
 
97
100
  text.join("\n")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleTextExtract
4
- VERSION = "3.0.0"
4
+ VERSION = "3.0.2"
5
5
  end
@@ -13,7 +13,7 @@ module SimpleTextExtract
13
13
  end
14
14
 
15
15
  def self.supports?(filename: nil)
16
- SUPPORTED_FILETYPES.include?(filename.split(".").last)
16
+ SUPPORTED_FILETYPES.include?(filename.to_s.split(".").last)
17
17
  end
18
18
 
19
19
  def self.missing_dependency?(command)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_text_extract
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Weiland
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-14 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roo