xsv 0.3.17 → 0.3.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -3
- data/lib/xsv/sheet_rows_handler.rb +4 -2
- data/lib/xsv/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75a753e746b55f6e75f168b41da7ded523a4373fab7ea4d696339efe8e05372e
|
4
|
+
data.tar.gz: 501389046d3a77d87e1287fba7e1d138fb5ca50fdfdbaffce7294e7131506970
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f569bae5677287af25722206784cba96057191cf518e868f1db719e53cdbe4dc75135925247f88b15337ea1cc8fb036a89ac0d2ffd88e4d4cebe63285ffa2326
|
7
|
+
data.tar.gz: 5a8b4084ca13108cbd9b3e4dab5eef27456aeb287241b600d65c78d0e0ef2cc5cd8fa54bf9ca3f1015d826d3e9740765f5bb9c3c349ea818591befd18ac5944d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -11,8 +11,9 @@ deals with minimal formatting and cannot create or modify documents.
|
|
11
11
|
Xsv is designed for worksheets with a single table of data, optionally
|
12
12
|
with a header row. It only casts values to basic Ruby types (integer, float,
|
13
13
|
date and time) and does not deal with most formatting or more advanced
|
14
|
-
functionality.
|
15
|
-
minimal RAM and CPU consumption
|
14
|
+
functionality. It strives for fast processing of large worksheets with
|
15
|
+
minimal RAM and CPU consumption and has been in production use since the earliest
|
16
|
+
versions.
|
16
17
|
|
17
18
|
Xsv stands for 'Excel Separated Values', because Excel just gets in the way.
|
18
19
|
|
@@ -36,7 +37,7 @@ Xsv targets ruby ~> 2.6 and depends on `rubyzip` and `ox`.
|
|
36
37
|
|
37
38
|
## Usage
|
38
39
|
|
39
|
-
Xsv has two modes of operation. By default it returns an array for
|
40
|
+
Xsv has two modes of operation. By default, it returns an array for
|
40
41
|
each row in the sheet:
|
41
42
|
|
42
43
|
```ruby
|
@@ -64,19 +64,21 @@ module Xsv
|
|
64
64
|
@state = name
|
65
65
|
@current_cell.clear
|
66
66
|
@current_value.clear
|
67
|
-
when :v
|
67
|
+
when :v, :is
|
68
68
|
@state = name
|
69
69
|
when :row
|
70
70
|
@state = name
|
71
71
|
@current_row = @empty_row.dup
|
72
72
|
@current_row_attrs.clear
|
73
|
+
when :t
|
74
|
+
@state = nil unless @state == :is
|
73
75
|
else
|
74
76
|
@state = nil
|
75
77
|
end
|
76
78
|
end
|
77
79
|
|
78
80
|
def text(value)
|
79
|
-
if @state == :v
|
81
|
+
if @state == :v || @state == :is
|
80
82
|
@current_value << value
|
81
83
|
end
|
82
84
|
end
|
data/lib/xsv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xsv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martijn Storck
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|