spreadbase 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/lib/spreadbase/codecs/open_document_12.rb +6 -9
- data/lib/spreadbase/version.rb +1 -1
- data/spreadbase.gemspec +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 603c441b06a1eb85d926da95f9ce1c384fcd1642402e786fa7fc6106cd2e6def
|
4
|
+
data.tar.gz: 973d5b1f2908261266e760b028f7cc884e5c9e9ba651488d9c7396f9d39ec688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99e574f21843aa28699d5732942165e11f5b213a3dfe932f365b4f9bd0c0798fca7b4b49a84a755e2d9dbfabdfacab5cc3a840eb727ef09a9890d8f1255d470e
|
7
|
+
data.tar.gz: 1fbe613fa5c63cd02853ce36d8d423a2597ab536e560c6c14f79ca9e5c7b247fc9f643b7390561221c20346f54ac72954048b3d9e5f2e90b64f4b7f4c2718cfe
|
data/.travis.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'zip'
|
2
2
|
require 'rexml/document'
|
3
3
|
|
4
4
|
module SpreadBase # :nodoc:
|
@@ -37,11 +37,9 @@ module SpreadBase # :nodoc:
|
|
37
37
|
document_buffer = encode_to_content_xml(el_document, options)
|
38
38
|
zip_buffer = ''
|
39
39
|
|
40
|
-
Zip::
|
41
|
-
zip_file.
|
42
|
-
|
43
|
-
zip_file.add_buffer('META-INF/manifest.xml', MANIFEST_XML);
|
44
|
-
zip_file.add_buffer('content.xml', document_buffer);
|
40
|
+
Zip::File.open_buffer(zip_buffer) do | zip_file |
|
41
|
+
zip_file.get_output_stream('META-INF/manifest.xml') { |f| f << MANIFEST_XML }
|
42
|
+
zip_file.get_output_stream('content.xml') { |f| f << document_buffer }
|
45
43
|
end
|
46
44
|
|
47
45
|
zip_buffer
|
@@ -61,9 +59,8 @@ module SpreadBase # :nodoc:
|
|
61
59
|
# _returns_ the SpreadBase::Document instance.
|
62
60
|
#
|
63
61
|
def decode_archive(zip_buffer, options={})
|
64
|
-
|
65
|
-
|
66
|
-
end
|
62
|
+
io = StringIO.new(zip_buffer)
|
63
|
+
content_xml_data = Zip::File.new(io, false, true).read('content.xml')
|
67
64
|
|
68
65
|
decode_content_xml(content_xml_data, options)
|
69
66
|
end
|
data/lib/spreadbase/version.rb
CHANGED
data/spreadbase.gemspec
CHANGED
@@ -10,14 +10,14 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.platform = Gem::Platform::RUBY
|
11
11
|
s.required_ruby_version = '>= 2.3.0'
|
12
12
|
s.authors = ["Saverio Miroddi"]
|
13
|
-
s.date = '2020-
|
13
|
+
s.date = '2020-07-15'
|
14
14
|
s.email = ["saverio.pub2@gmail.com"]
|
15
15
|
s.homepage = "https://github.com/saveriomiroddi/spreadbase"
|
16
16
|
s.summary = %q{Library for reading/writing OpenOffice Calc documents.}
|
17
17
|
s.description = %q{Library for reading/writing OpenOffice Calc documents.}
|
18
18
|
s.license = "GPL-3.0"
|
19
19
|
|
20
|
-
s.add_runtime_dependency "
|
20
|
+
s.add_runtime_dependency "rubyzip", ">=1.3.0"
|
21
21
|
s.add_development_dependency "rspec", "~>3.9.0"
|
22
22
|
|
23
23
|
s.add_development_dependency "rake", "~>13.0"
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreadbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saverio Miroddi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rubyzip
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
|
-
rubygems_version: 3.0.
|
110
|
+
rubygems_version: 3.0.8
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: Library for reading/writing OpenOffice Calc documents.
|