creek 2.4.2 → 2.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/creek.gemspec +1 -1
- data/lib/creek/shared_strings.rb +1 -1
- data/lib/creek/version.rb +1 -1
- data/spec/fixtures/sst.xml +10 -0
- data/spec/shared_string_spec.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e0adb7a48d121c8eaf3500f58e25d2be013ce5b24b6d647443ec3dd866fee31
|
4
|
+
data.tar.gz: f92ee6b1dc6195d7f64c4ea189e8f47af5674ca36c31e667a5db16aa50446d58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64384e3b96b50047dbad96f797ad9772dc3dbb5ba2c6f2e99467a55cf6460df883d9eb77ed2dc9eaf820ef81ebb373556328e0e48b6155f4a63180e59d2b630e
|
7
|
+
data.tar.gz: 5ae4f07b1eedc8ee58acaef4844f8b6abf02ef24d4e98298aa6ad842f31270ccb446908d886a55cb9b88d4e066b4c7a75cf03ab9648153243f518d6d774f7deb
|
data/creek.gemspec
CHANGED
data/lib/creek/shared_strings.rb
CHANGED
@@ -29,7 +29,7 @@ module Creek
|
|
29
29
|
dictionary = Hash.new
|
30
30
|
|
31
31
|
xml.css('si').each_with_index do |si, idx|
|
32
|
-
text_nodes = si.css('t')
|
32
|
+
text_nodes = si.css('>t, r t')
|
33
33
|
if text_nodes.count == 1 # plain text node
|
34
34
|
dictionary[idx] = Creek::Styles::Converter.unescape_string(text_nodes.first.content)
|
35
35
|
else # rich text nodes with text fragments
|
data/lib/creek/version.rb
CHANGED
data/spec/fixtures/sst.xml
CHANGED
@@ -78,4 +78,14 @@
|
|
78
78
|
<si>
|
79
79
|
<t>Cell with_x000D_escaped_x000D_characters</t>
|
80
80
|
</si>
|
81
|
+
<si>
|
82
|
+
<t>吉田兼好</t>
|
83
|
+
<rPh sb="0" eb="2">
|
84
|
+
<t xml:space="preserve">ヨシダ </t>
|
85
|
+
</rPh>
|
86
|
+
<rPh sb="2" eb="4">
|
87
|
+
<t xml:space="preserve">ケンコウ </t>
|
88
|
+
</rPh>
|
89
|
+
<phoneticPr fontId="1"/>
|
90
|
+
</si>
|
81
91
|
</sst>
|
data/spec/shared_string_spec.rb
CHANGED
@@ -7,13 +7,14 @@ describe 'shared strings' do
|
|
7
7
|
doc = Nokogiri::XML(shared_strings_xml_file)
|
8
8
|
dictionary = Creek::SharedStrings.parse_shared_string_from_document(doc)
|
9
9
|
|
10
|
-
expect(dictionary.keys.size).to eq(
|
10
|
+
expect(dictionary.keys.size).to eq(7)
|
11
11
|
expect(dictionary[0]).to eq('Cell A1')
|
12
12
|
expect(dictionary[1]).to eq('Cell B1')
|
13
13
|
expect(dictionary[2]).to eq('My Cell')
|
14
14
|
expect(dictionary[3]).to eq('Cell A2')
|
15
15
|
expect(dictionary[4]).to eq('Cell B2')
|
16
16
|
expect(dictionary[5]).to eq("Cell with\rescaped\rcharacters")
|
17
|
+
expect(dictionary[6]).to eq('吉田兼好')
|
17
18
|
end
|
18
19
|
|
19
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: creek
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pythonicrubyist
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '4.0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '4.0'
|
111
111
|
description: A Ruby gem that streams and parses large Excel(xlsx and xlsm) files fast
|
112
112
|
and efficiently.
|
113
113
|
email:
|