roo 2.6.0 → 2.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +5 -5
  2. data/.codeclimate.yml +17 -0
  3. data/.github/issue_template.md +16 -0
  4. data/.github/pull_request_template.md +14 -0
  5. data/.rubocop.yml +186 -0
  6. data/.travis.yml +14 -11
  7. data/CHANGELOG.md +64 -2
  8. data/Gemfile +2 -4
  9. data/LICENSE +2 -0
  10. data/README.md +36 -10
  11. data/lib/roo/base.rb +82 -225
  12. data/lib/roo/constants.rb +5 -3
  13. data/lib/roo/csv.rb +100 -97
  14. data/lib/roo/excelx/cell/base.rb +26 -12
  15. data/lib/roo/excelx/cell/boolean.rb +9 -6
  16. data/lib/roo/excelx/cell/date.rb +7 -7
  17. data/lib/roo/excelx/cell/datetime.rb +50 -44
  18. data/lib/roo/excelx/cell/empty.rb +3 -2
  19. data/lib/roo/excelx/cell/number.rb +44 -47
  20. data/lib/roo/excelx/cell/string.rb +3 -3
  21. data/lib/roo/excelx/cell/time.rb +17 -16
  22. data/lib/roo/excelx/cell.rb +10 -6
  23. data/lib/roo/excelx/comments.rb +3 -3
  24. data/lib/roo/excelx/coordinate.rb +11 -4
  25. data/lib/roo/excelx/extractor.rb +21 -3
  26. data/lib/roo/excelx/format.rb +38 -31
  27. data/lib/roo/excelx/images.rb +26 -0
  28. data/lib/roo/excelx/relationships.rb +12 -4
  29. data/lib/roo/excelx/shared.rb +10 -3
  30. data/lib/roo/excelx/shared_strings.rb +9 -15
  31. data/lib/roo/excelx/sheet.rb +49 -10
  32. data/lib/roo/excelx/sheet_doc.rb +89 -48
  33. data/lib/roo/excelx/styles.rb +3 -3
  34. data/lib/roo/excelx/workbook.rb +7 -3
  35. data/lib/roo/excelx.rb +50 -19
  36. data/lib/roo/formatters/base.rb +15 -0
  37. data/lib/roo/formatters/csv.rb +84 -0
  38. data/lib/roo/formatters/matrix.rb +23 -0
  39. data/lib/roo/formatters/xml.rb +31 -0
  40. data/lib/roo/formatters/yaml.rb +40 -0
  41. data/lib/roo/helpers/default_attr_reader.rb +20 -0
  42. data/lib/roo/helpers/weak_instance_cache.rb +41 -0
  43. data/lib/roo/open_office.rb +17 -9
  44. data/lib/roo/spreadsheet.rb +1 -1
  45. data/lib/roo/tempdir.rb +5 -10
  46. data/lib/roo/utils.rb +70 -20
  47. data/lib/roo/version.rb +1 -1
  48. data/lib/roo.rb +4 -1
  49. data/roo.gemspec +14 -11
  50. data/spec/lib/roo/base_spec.rb +45 -3
  51. data/spec/lib/roo/excelx/relationships_spec.rb +43 -0
  52. data/spec/lib/roo/excelx/sheet_doc_spec.rb +11 -0
  53. data/spec/lib/roo/excelx_spec.rb +150 -31
  54. data/spec/lib/roo/strict_spec.rb +43 -0
  55. data/spec/lib/roo/utils_spec.rb +25 -3
  56. data/spec/lib/roo/weak_instance_cache_spec.rb +92 -0
  57. data/spec/lib/roo_spec.rb +0 -0
  58. data/spec/spec_helper.rb +2 -6
  59. data/test/excelx/cell/test_attr_reader_default.rb +72 -0
  60. data/test/excelx/cell/test_base.rb +5 -0
  61. data/test/excelx/cell/test_datetime.rb +6 -6
  62. data/test/excelx/cell/test_empty.rb +11 -0
  63. data/test/excelx/cell/test_number.rb +9 -0
  64. data/test/excelx/cell/test_string.rb +20 -0
  65. data/test/excelx/cell/test_time.rb +5 -5
  66. data/test/excelx/test_coordinate.rb +51 -0
  67. data/test/formatters/test_csv.rb +136 -0
  68. data/test/formatters/test_matrix.rb +76 -0
  69. data/test/formatters/test_xml.rb +78 -0
  70. data/test/formatters/test_yaml.rb +20 -0
  71. data/test/helpers/test_accessing_files.rb +60 -0
  72. data/test/helpers/test_comments.rb +43 -0
  73. data/test/helpers/test_formulas.rb +9 -0
  74. data/test/helpers/test_labels.rb +103 -0
  75. data/test/helpers/test_sheets.rb +55 -0
  76. data/test/helpers/test_styles.rb +62 -0
  77. data/test/roo/test_base.rb +182 -0
  78. data/test/roo/test_csv.rb +88 -0
  79. data/test/roo/test_excelx.rb +330 -0
  80. data/test/roo/test_libre_office.rb +9 -0
  81. data/test/roo/test_open_office.rb +289 -0
  82. data/test/test_helper.rb +129 -14
  83. data/test/test_roo.rb +32 -1787
  84. metadata +81 -29
  85. data/.github/ISSUE_TEMPLATE +0 -10
  86. data/Gemfile_ruby2 +0 -29
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Preymesser
@@ -9,79 +9,100 @@ authors:
9
9
  - Ben Woosley
10
10
  - Oleksandr Simonov
11
11
  - Steven Daniels
12
+ - Anmol Chopra
12
13
  autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []
15
- date: 2016-12-28 00:00:00.000000000 Z
16
+ date: 2020-02-03 00:00:00.000000000 Z
16
17
  dependencies:
17
18
  - !ruby/object:Gem::Dependency
18
19
  name: nokogiri
19
20
  requirement: !ruby/object:Gem::Requirement
20
21
  requirements:
21
- - - ~>
22
+ - - "~>"
22
23
  - !ruby/object:Gem::Version
23
24
  version: '1'
24
25
  type: :runtime
25
26
  prerelease: false
26
27
  version_requirements: !ruby/object:Gem::Requirement
27
28
  requirements:
28
- - - ~>
29
+ - - "~>"
29
30
  - !ruby/object:Gem::Version
30
31
  version: '1'
31
32
  - !ruby/object:Gem::Dependency
32
33
  name: rubyzip
33
34
  requirement: !ruby/object:Gem::Requirement
34
35
  requirements:
35
- - - ~>
36
+ - - ">="
36
37
  - !ruby/object:Gem::Version
37
- version: '1.1'
38
- - - <
38
+ version: 1.3.0
39
+ - - "<"
39
40
  - !ruby/object:Gem::Version
40
- version: 2.0.0
41
+ version: 3.0.0
41
42
  type: :runtime
42
43
  prerelease: false
43
44
  version_requirements: !ruby/object:Gem::Requirement
44
45
  requirements:
45
- - - ~>
46
+ - - ">="
46
47
  - !ruby/object:Gem::Version
47
- version: '1.1'
48
- - - <
48
+ version: 1.3.0
49
+ - - "<"
49
50
  - !ruby/object:Gem::Version
50
- version: 2.0.0
51
+ version: 3.0.0
51
52
  - !ruby/object:Gem::Dependency
52
53
  name: rake
53
54
  requirement: !ruby/object:Gem::Requirement
54
55
  requirements:
55
- - - ~>
56
+ - - "~>"
56
57
  - !ruby/object:Gem::Version
57
58
  version: '10.1'
58
59
  type: :development
59
60
  prerelease: false
60
61
  version_requirements: !ruby/object:Gem::Requirement
61
62
  requirements:
62
- - - ~>
63
+ - - "~>"
63
64
  - !ruby/object:Gem::Version
64
65
  version: '10.1'
65
66
  - !ruby/object:Gem::Dependency
66
67
  name: minitest
67
68
  requirement: !ruby/object:Gem::Requirement
68
69
  requirements:
69
- - - ~>
70
+ - - "~>"
70
71
  - !ruby/object:Gem::Version
71
72
  version: '5.4'
72
- - - '>='
73
+ - - ">="
73
74
  - !ruby/object:Gem::Version
74
75
  version: 5.4.3
75
76
  type: :development
76
77
  prerelease: false
77
78
  version_requirements: !ruby/object:Gem::Requirement
78
79
  requirements:
79
- - - ~>
80
+ - - "~>"
80
81
  - !ruby/object:Gem::Version
81
82
  version: '5.4'
82
- - - '>='
83
+ - - ">="
83
84
  - !ruby/object:Gem::Version
84
85
  version: 5.4.3
86
+ - !ruby/object:Gem::Dependency
87
+ name: rack
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - "~>"
91
+ - !ruby/object:Gem::Version
92
+ version: '1.6'
93
+ - - "<"
94
+ - !ruby/object:Gem::Version
95
+ version: 2.0.0
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '1.6'
103
+ - - "<"
104
+ - !ruby/object:Gem::Version
105
+ version: 2.0.0
85
106
  description: |-
86
107
  Roo can access the contents of various spreadsheet files. It can handle
87
108
  * OpenOffice
@@ -95,13 +116,15 @@ executables: []
95
116
  extensions: []
96
117
  extra_rdoc_files: []
97
118
  files:
98
- - .github/ISSUE_TEMPLATE
99
- - .gitignore
100
- - .simplecov
101
- - .travis.yml
119
+ - ".codeclimate.yml"
120
+ - ".github/issue_template.md"
121
+ - ".github/pull_request_template.md"
122
+ - ".gitignore"
123
+ - ".rubocop.yml"
124
+ - ".simplecov"
125
+ - ".travis.yml"
102
126
  - CHANGELOG.md
103
127
  - Gemfile
104
- - Gemfile_ruby2
105
128
  - Guardfile
106
129
  - LICENSE
107
130
  - README.md
@@ -128,6 +151,7 @@ files:
128
151
  - lib/roo/excelx/coordinate.rb
129
152
  - lib/roo/excelx/extractor.rb
130
153
  - lib/roo/excelx/format.rb
154
+ - lib/roo/excelx/images.rb
131
155
  - lib/roo/excelx/relationships.rb
132
156
  - lib/roo/excelx/shared.rb
133
157
  - lib/roo/excelx/shared_strings.rb
@@ -136,6 +160,13 @@ files:
136
160
  - lib/roo/excelx/styles.rb
137
161
  - lib/roo/excelx/workbook.rb
138
162
  - lib/roo/font.rb
163
+ - lib/roo/formatters/base.rb
164
+ - lib/roo/formatters/csv.rb
165
+ - lib/roo/formatters/matrix.rb
166
+ - lib/roo/formatters/xml.rb
167
+ - lib/roo/formatters/yaml.rb
168
+ - lib/roo/helpers/default_attr_reader.rb
169
+ - lib/roo/helpers/weak_instance_cache.rb
139
170
  - lib/roo/libre_office.rb
140
171
  - lib/roo/link.rb
141
172
  - lib/roo/open_office.rb
@@ -151,13 +182,19 @@ files:
151
182
  - spec/lib/roo/base_spec.rb
152
183
  - spec/lib/roo/csv_spec.rb
153
184
  - spec/lib/roo/excelx/format_spec.rb
185
+ - spec/lib/roo/excelx/relationships_spec.rb
186
+ - spec/lib/roo/excelx/sheet_doc_spec.rb
154
187
  - spec/lib/roo/excelx_spec.rb
155
188
  - spec/lib/roo/libreoffice_spec.rb
156
189
  - spec/lib/roo/openoffice_spec.rb
157
190
  - spec/lib/roo/spreadsheet_spec.rb
191
+ - spec/lib/roo/strict_spec.rb
158
192
  - spec/lib/roo/utils_spec.rb
193
+ - spec/lib/roo/weak_instance_cache_spec.rb
194
+ - spec/lib/roo_spec.rb
159
195
  - spec/spec_helper.rb
160
196
  - test/all_ss.rb
197
+ - test/excelx/cell/test_attr_reader_default.rb
161
198
  - test/excelx/cell/test_base.rb
162
199
  - test/excelx/cell/test_boolean.rb
163
200
  - test/excelx/cell/test_date.rb
@@ -166,9 +203,25 @@ files:
166
203
  - test/excelx/cell/test_number.rb
167
204
  - test/excelx/cell/test_string.rb
168
205
  - test/excelx/cell/test_time.rb
206
+ - test/excelx/test_coordinate.rb
207
+ - test/formatters/test_csv.rb
208
+ - test/formatters/test_matrix.rb
209
+ - test/formatters/test_xml.rb
210
+ - test/formatters/test_yaml.rb
211
+ - test/helpers/test_accessing_files.rb
212
+ - test/helpers/test_comments.rb
213
+ - test/helpers/test_formulas.rb
214
+ - test/helpers/test_labels.rb
215
+ - test/helpers/test_sheets.rb
216
+ - test/helpers/test_styles.rb
217
+ - test/roo/test_base.rb
218
+ - test/roo/test_csv.rb
219
+ - test/roo/test_excelx.rb
220
+ - test/roo/test_libre_office.rb
221
+ - test/roo/test_open_office.rb
169
222
  - test/test_helper.rb
170
223
  - test/test_roo.rb
171
- homepage: http://github.com/roo-rb/roo
224
+ homepage: https://github.com/roo-rb/roo
172
225
  licenses:
173
226
  - MIT
174
227
  metadata: {}
@@ -178,17 +231,16 @@ require_paths:
178
231
  - lib
179
232
  required_ruby_version: !ruby/object:Gem::Requirement
180
233
  requirements:
181
- - - '>='
234
+ - - ">="
182
235
  - !ruby/object:Gem::Version
183
- version: '0'
236
+ version: 2.3.0
184
237
  required_rubygems_version: !ruby/object:Gem::Requirement
185
238
  requirements:
186
- - - '>='
239
+ - - ">="
187
240
  - !ruby/object:Gem::Version
188
241
  version: '0'
189
242
  requirements: []
190
- rubyforge_project:
191
- rubygems_version: 2.0.14
243
+ rubygems_version: 3.0.6
192
244
  signing_key:
193
245
  specification_version: 4
194
246
  summary: Roo can access the contents of various spreadsheet files.
@@ -1,10 +0,0 @@
1
- Thanks for filing an issue. Following these instructions will help us solve your problem sooner.
2
-
3
- 1. Describe the issue.
4
- 2. Create a gist for this issue (Sample gist: https://gist.github.com/stevendaniels/98a05849036e99bb8b3c)?
5
-
6
- Here are some instructions for creating such a gist.
7
-
8
- 1. Create a gist (https://gist.github.com) with code that creates the error.
9
- 2. Clone the gist repo locally, add a stripped down version of the offending spreadsheet to the gist repo, and push the gist's changes master.
10
- 3. Paste the gist url here.
data/Gemfile_ruby2 DELETED
@@ -1,29 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem 'nokogiri', "< 1.7.0"
6
-
7
- group :test do
8
- # additional testing libs
9
- gem 'webmock'
10
- gem 'shoulda'
11
- gem 'rspec', '>= 3.0.0'
12
- gem 'vcr'
13
- gem 'simplecov', '>= 0.9.0', require: false
14
- gem 'coveralls', require: false
15
- # gem "pry"
16
- gem "activesupport", "~> 4.2.0"
17
- end
18
-
19
- group :local_development do
20
- gem "listen", "~> 3.0.6"
21
- gem 'terminal-notifier-guard', require: false if RUBY_PLATFORM.downcase.include?('darwin')
22
- gem 'guard-rspec', '>= 4.3.1', require: false
23
- gem 'guard-minitest', require: false
24
- gem 'guard-bundler', require: false
25
- gem 'guard-preek', require: false
26
- gem 'guard-rubocop', require: false
27
- gem 'guard-reek', github: 'pericles/guard-reek', require: false
28
- gem 'pry'
29
- end