simple_text_extract 0.2.1 → 0.3.0

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: 83da9d28803f321b9a13aeaad4972211d40733b96f6b5fd085e52ab293a19d30
4
- data.tar.gz: 99769610f1adef1d8fbe46647c7253af7859029a362854f4c8d73ec45fa9d8da
3
+ metadata.gz: a5970667ea2f6f6ac902a474e59a7f90a0a19ea2078ece54ef01b75a391e2325
4
+ data.tar.gz: '01559ba36c772154566e78b374f0f1d6995ec9f179ed192d6b56afb1cef304f0'
5
5
  SHA512:
6
- metadata.gz: 6f8dc568cf35fe6519d24dfc9a97a2b3c4d68770d5d489a1a1c4f813307ff7cc2fb973a663656893b448fb2532198f36373827ef202887edb1ad73b0ef53d3e7
7
- data.tar.gz: d334282c216656d91cb038d020e4c1da67ca563b708bf4356f0005ff8d1ec2f1dae1ea58c5427828a2a593b2ef238325caab4fdbdf9d3575ca8ca5e14b1791ca
6
+ metadata.gz: df13326f81af45c023cac0e059a77fc54d958f9ccaf3c77d62a86d7d4746e71a8acfd7be56eacd2dde1fc29e35f134857b331585c9dd9903db6b479b0a8bcfc4
7
+ data.tar.gz: 4713fb6e3c52225b38acaa9bee1d4e2bb2bbf582fa943ed16fdc46bfaeb540cfa0056068282a5993206ecdd00fcbaf79796843d4acdc9f21c96edb72b909b7d3
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.3
1
+ 2.6.1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_text_extract (0.2.0)
4
+ simple_text_extract (0.2.1)
5
5
  roo (~> 2.8)
6
6
  spreadsheet (~> 1.1.8)
7
7
 
@@ -15,18 +15,18 @@ GEM
15
15
  minitest (5.11.3)
16
16
  mocha (1.8.0)
17
17
  metaclass (~> 0.0.1)
18
- nokogiri (1.10.1)
18
+ nokogiri (1.10.3)
19
19
  mini_portile2 (~> 2.4.0)
20
20
  pry (0.12.2)
21
21
  coderay (~> 1.1.0)
22
22
  method_source (~> 0.9.0)
23
23
  rake (10.5.0)
24
- roo (2.8.1)
24
+ roo (2.8.2)
25
25
  nokogiri (~> 1)
26
26
  rubyzip (>= 1.2.1, < 2.0.0)
27
- ruby-ole (1.2.12.1)
28
- rubyzip (1.2.2)
29
- spreadsheet (1.1.8)
27
+ ruby-ole (1.2.12.2)
28
+ rubyzip (1.2.3)
29
+ spreadsheet (1.1.9)
30
30
  ruby-ole (>= 1.0)
31
31
 
32
32
  PLATFORMS
data/Rakefile CHANGED
@@ -7,4 +7,4 @@ Rake::TestTask.new(:test) do |t|
7
7
  t.test_files = FileList["test/**/*_test.rb"]
8
8
  end
9
9
 
10
- task :default => :test
10
+ task default: :test
@@ -7,7 +7,7 @@ require "simple_text_extract/tempfile_extractor"
7
7
  require "simple_text_extract/format_extractor_factory"
8
8
 
9
9
  module SimpleTextExtract
10
- SUPPORTED_FILETYPES = ["xls", "xlsx", "doc", "docx", "txt", "pdf"]
10
+ SUPPORTED_FILETYPES = ["xls", "xlsx", "doc", "docx", "txt", "pdf"].freeze
11
11
 
12
12
  class Error < StandardError; end
13
13
 
@@ -6,7 +6,7 @@ module SimpleTextExtract
6
6
  def extract
7
7
  require "roo"
8
8
 
9
- spreadsheet = Roo::Spreadsheet.open(file)
9
+ spreadsheet = Roo::Spreadsheet.open(file, only_visible_sheets: true)
10
10
 
11
11
  text = []
12
12
 
@@ -10,7 +10,7 @@ require "simple_text_extract/format_extractor/doc"
10
10
 
11
11
  module SimpleTextExtract
12
12
  class FormatExtractorFactory
13
- def self.call(file) # rubocop:disable Metrics/MethodLength
13
+ def self.call(file) # rubocop:disable Metrics/MethodLength, Metrics/CyclomaticComplexity
14
14
  case file.path
15
15
  when /.txt$/i
16
16
  FormatExtractor::PlainText.new(file)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleTextExtract
4
- VERSION = "0.2.1"
4
+ VERSION = "0.3.0"
5
5
  end
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: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Weiland
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-28 00:00:00.000000000 Z
11
+ date: 2019-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roo
@@ -149,8 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - antiword
151
151
  - pdftotext/poppler
152
- rubyforge_project:
153
- rubygems_version: 2.7.6
152
+ rubygems_version: 3.0.1
154
153
  signing_key:
155
154
  specification_version: 4
156
155
  summary: Attempts to quickly extract text from various file types before resorting