workbook 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/workbook/modules/type_parser.rb +5 -3
- data/lib/workbook/version.rb +1 -1
- data/test/artifacts/failing_import1.xls +0 -0
- data/test/test_modules_type_parser.rb +6 -2
- metadata +102 -122
@@ -97,14 +97,16 @@ module Workbook
|
|
97
97
|
rv
|
98
98
|
end
|
99
99
|
end
|
100
|
-
|
100
|
+
|
101
|
+
# converts 'true' or 'false' strings in `true` or `false` values
|
102
|
+
# return [Proc] that returns a boolean value if it is considered as such
|
101
103
|
def string_boolean_converter
|
102
104
|
proc do |v|
|
103
105
|
dv = v.downcase
|
104
106
|
if dv == "true"
|
105
|
-
|
107
|
+
v = true
|
106
108
|
elsif dv == "false"
|
107
|
-
|
109
|
+
v = false
|
108
110
|
end
|
109
111
|
v
|
110
112
|
end
|
data/lib/workbook/version.rb
CHANGED
Binary file
|
@@ -17,7 +17,8 @@ module Modules
|
|
17
17
|
""=>nil,
|
18
18
|
" "=>nil,
|
19
19
|
"mailto:sadf@asdf.as"=>"sadf@asdf.as",
|
20
|
-
"012-3456789"=>"012-3456789"
|
20
|
+
"012-3456789"=>"012-3456789",
|
21
|
+
"TRUE"=>true
|
21
22
|
}
|
22
23
|
end
|
23
24
|
|
@@ -49,7 +50,10 @@ module Modules
|
|
49
50
|
r[1] = Workbook::Cell.new ""
|
50
51
|
r[1].parse!
|
51
52
|
assert_equal(nil,r[1].value)
|
52
|
-
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_once_failing_files
|
56
|
+
w = Workbook::Book.open("test/artifacts/failing_import1.xls") # TRUE wasn't parsed properly
|
53
57
|
end
|
54
58
|
end
|
55
59
|
end
|
metadata
CHANGED
@@ -1,134 +1,121 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: workbook
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
- 0
|
10
|
-
version: 0.3.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Maarten Brouwers
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-01-10 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: spreadsheet
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 9
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
- 7
|
33
|
-
- 5
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
34
21
|
version: 0.7.5
|
35
22
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: fastercsv
|
39
23
|
prerelease: false
|
40
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
25
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
- 0
|
48
|
-
version: "0"
|
49
|
-
type: :runtime
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.7.5
|
30
|
+
- !ruby/object:Gem::Dependency
|
52
31
|
name: rchardet
|
53
|
-
|
54
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
55
33
|
none: false
|
56
|
-
requirements:
|
34
|
+
requirements:
|
57
35
|
- - ~>
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
segments:
|
61
|
-
- 1
|
62
|
-
- 3
|
63
|
-
version: "1.3"
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.3'
|
64
38
|
type: :runtime
|
65
|
-
version_requirements: *id003
|
66
|
-
- !ruby/object:Gem::Dependency
|
67
|
-
name: rake
|
68
39
|
prerelease: false
|
69
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
70
41
|
none: false
|
71
|
-
requirements:
|
72
|
-
- -
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.3'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
78
54
|
type: :runtime
|
79
|
-
version_requirements: *id004
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: rubyXL
|
82
55
|
prerelease: false
|
83
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
84
57
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rubyXL
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
92
70
|
type: :runtime
|
93
|
-
version_requirements: *id005
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: nokogiri
|
96
71
|
prerelease: false
|
97
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
98
73
|
none: false
|
99
|
-
requirements:
|
100
|
-
- -
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: nokogiri
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
106
86
|
type: :runtime
|
107
|
-
version_requirements: *id006
|
108
|
-
- !ruby/object:Gem::Dependency
|
109
|
-
name: rubyzip
|
110
87
|
prerelease: false
|
111
|
-
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
112
89
|
none: false
|
113
|
-
requirements:
|
114
|
-
- -
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rubyzip
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
120
102
|
type: :runtime
|
121
|
-
|
122
|
-
|
123
|
-
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
description: Workbook contains workbooks, as in a table, contains rows, contains cells,
|
111
|
+
reads/writes excels and csv's and tab separated, and offers basic diffing and sorting
|
112
|
+
capabilities.
|
113
|
+
email:
|
124
114
|
- gem@murb.nl
|
125
115
|
executables: []
|
126
|
-
|
127
116
|
extensions: []
|
128
|
-
|
129
117
|
extra_rdoc_files: []
|
130
|
-
|
131
|
-
files:
|
118
|
+
files:
|
132
119
|
- .gitignore
|
133
120
|
- .travis.yml
|
134
121
|
- .yardoc/checksums
|
@@ -204,6 +191,7 @@ files:
|
|
204
191
|
- test/artifacts/excel_different_types.txt
|
205
192
|
- test/artifacts/excel_different_types.xls
|
206
193
|
- test/artifacts/excel_different_types.xlsx
|
194
|
+
- test/artifacts/failing_import1.xls
|
207
195
|
- test/artifacts/native_xlsx.xlsx
|
208
196
|
- test/artifacts/sheetduplication.xls
|
209
197
|
- test/artifacts/simple_csv.csv
|
@@ -229,41 +217,32 @@ files:
|
|
229
217
|
- test/test_template.rb
|
230
218
|
- test/test_writers_xls_writer.rb
|
231
219
|
- workbook.gemspec
|
232
|
-
has_rdoc: true
|
233
220
|
homepage: http://murb.nl/blog?tags=workbook
|
234
221
|
licenses: []
|
235
|
-
|
236
222
|
post_install_message:
|
237
223
|
rdoc_options: []
|
238
|
-
|
239
|
-
require_paths:
|
224
|
+
require_paths:
|
240
225
|
- lib
|
241
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
226
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
242
227
|
none: false
|
243
|
-
requirements:
|
244
|
-
- -
|
245
|
-
- !ruby/object:Gem::Version
|
246
|
-
|
247
|
-
|
248
|
-
- 0
|
249
|
-
version: "0"
|
250
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
228
|
+
requirements:
|
229
|
+
- - ! '>='
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
version: '0'
|
232
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
251
233
|
none: false
|
252
|
-
requirements:
|
253
|
-
- -
|
254
|
-
- !ruby/object:Gem::Version
|
255
|
-
|
256
|
-
segments:
|
257
|
-
- 0
|
258
|
-
version: "0"
|
234
|
+
requirements:
|
235
|
+
- - ! '>='
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
version: '0'
|
259
238
|
requirements: []
|
260
|
-
|
261
239
|
rubyforge_project: workbook
|
262
|
-
rubygems_version: 1.
|
240
|
+
rubygems_version: 1.8.23
|
263
241
|
signing_key:
|
264
242
|
specification_version: 3
|
265
|
-
summary: Workbook is a datastructure to contain books of tables (an anlogy used in
|
266
|
-
|
243
|
+
summary: Workbook is a datastructure to contain books of tables (an anlogy used in
|
244
|
+
e.g. Excel)
|
245
|
+
test_files:
|
267
246
|
- test/artifacts/book_with_tabs_and_colours.xls
|
268
247
|
- test/artifacts/book_with_tabs_and_colours.xlsx
|
269
248
|
- test/artifacts/complex_types.xls
|
@@ -271,6 +250,7 @@ test_files:
|
|
271
250
|
- test/artifacts/excel_different_types.txt
|
272
251
|
- test/artifacts/excel_different_types.xls
|
273
252
|
- test/artifacts/excel_different_types.xlsx
|
253
|
+
- test/artifacts/failing_import1.xls
|
274
254
|
- test/artifacts/native_xlsx.xlsx
|
275
255
|
- test/artifacts/sheetduplication.xls
|
276
256
|
- test/artifacts/simple_csv.csv
|