simple-spreadsheet-extractor 0.18.0 → 0.18.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1f09b5a39ba002c7a3c35d18c830ac88d7453a962e615e5a776e5c091edfc50
|
4
|
+
data.tar.gz: 8253440c0c1b754d7d9d65d3114c8fc5c11ce543fac6785ba0e06f645b729b36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fcf27eb87ca55de77bc17062b078411168c0c388360b429ef537bf2fcaa6fc25e01c3d013252d2fa9276794aaa8f634a55903b6b45270dab1a27ccf65f8c8e8
|
7
|
+
data.tar.gz: 7a59b952710bc5d6f7846fe76a40cf856fcfacdee07bd1e5006f7ad2465fc637639292227d106cf7f4569aef42408c35d7740f6c57d55a833e7994caf1ba2d9f
|
data/jars/{simple-spreadsheet-extractor-0.18.0.jar → simple-spreadsheet-extractor-0.18.1.jar}
RENAMED
Binary file
|
data/lib/sysmodb/extractor.rb
CHANGED
@@ -6,7 +6,7 @@ module SysMODB
|
|
6
6
|
|
7
7
|
# handles the delegation to java
|
8
8
|
class Extractor
|
9
|
-
JAR_VERSION = '0.18.
|
9
|
+
JAR_VERSION = '0.18.1'.freeze
|
10
10
|
DEFAULT_PATH = File.dirname(__FILE__) + "/../../jars/simple-spreadsheet-extractor-#{JAR_VERSION}.jar"
|
11
11
|
|
12
12
|
def initialize(memory_allocation)
|
@@ -38,13 +38,15 @@ module SysMODB
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
def
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
41
|
+
def spreadsheet_extractor_command_line(filepath, format = 'xml', sheet = false, trim = false)
|
42
|
+
|
43
|
+
args = "-Xmx#{@memory_allocation} -jar #{(defined? SPREADSHEET_EXTRACTOR_JAR_PATH) ? SPREADSHEET_EXTRACTOR_JAR_PATH : DEFAULT_PATH}"
|
44
|
+
args += " -o :format"
|
45
|
+
args += " -s :sheet" if sheet
|
46
|
+
args += ' -t' if trim
|
47
|
+
args += " < :filepath"
|
48
|
+
args += " 2>:error_log_path"
|
49
|
+
Terrapin::CommandLine.new("java", args)
|
48
50
|
end
|
49
51
|
|
50
52
|
def is_windows?
|
@@ -52,11 +54,13 @@ module SysMODB
|
|
52
54
|
end
|
53
55
|
|
54
56
|
def execute_command_line(filepath, format = 'xml', sheet = nil, trim = false)
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
command_line = spreadsheet_extractor_command_line filepath, format, !!sheet, trim
|
58
|
+
Tempfile.create('spreadsheet-extraction-error-log') do |f|
|
59
|
+
begin
|
60
|
+
command_line.run(format: format, sheet: sheet, filepath: filepath, error_log_path: f.path).strip
|
61
|
+
rescue Terrapin::ExitStatusError, Terrapin::CommandNotFoundError
|
62
|
+
raise SpreadsheetExtractionException, f.read
|
63
|
+
end
|
60
64
|
end
|
61
65
|
end
|
62
66
|
|
data/lib/sysmodb/version.rb
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.add_dependency('libxml-ruby', '~> 2.9')
|
23
|
-
spec.add_dependency('terrapin','~>0
|
23
|
+
spec.add_dependency('terrapin','~>1.0')
|
24
24
|
|
25
25
|
spec.add_development_dependency('rubocop','~>1.25')
|
26
26
|
spec.add_development_dependency('rubycritic')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-spreadsheet-extractor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Owen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-02-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: libxml-ruby
|
@@ -32,14 +32,14 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '0
|
35
|
+
version: '1.0'
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '0
|
42
|
+
version: '1.0'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rubocop
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,7 +144,7 @@ files:
|
|
144
144
|
- jars/lib/xercesImpl-2.12.2.jar
|
145
145
|
- jars/lib/xml-apis-1.4.01.jar
|
146
146
|
- jars/lib/xmlbeans-5.1.1.jar
|
147
|
-
- jars/simple-spreadsheet-extractor-0.18.
|
147
|
+
- jars/simple-spreadsheet-extractor-0.18.1.jar
|
148
148
|
- lib/simple-spreadsheet-extractor.rb
|
149
149
|
- lib/sysmodb/extractor.rb
|
150
150
|
- lib/sysmodb/simple-spreadsheet-extractor.rb
|