roo 2.7.0 → 2.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +5 -5
  2. data/.github/issue_template.md +16 -0
  3. data/.github/pull_request_template.md +14 -0
  4. data/.rubocop.yml +186 -0
  5. data/.travis.yml +12 -7
  6. data/CHANGELOG.md +53 -2
  7. data/LICENSE +2 -0
  8. data/README.md +29 -13
  9. data/lib/roo/base.rb +69 -61
  10. data/lib/roo/constants.rb +5 -3
  11. data/lib/roo/csv.rb +20 -12
  12. data/lib/roo/excelx/cell/base.rb +26 -12
  13. data/lib/roo/excelx/cell/boolean.rb +9 -6
  14. data/lib/roo/excelx/cell/date.rb +7 -7
  15. data/lib/roo/excelx/cell/datetime.rb +14 -18
  16. data/lib/roo/excelx/cell/empty.rb +3 -2
  17. data/lib/roo/excelx/cell/number.rb +35 -34
  18. data/lib/roo/excelx/cell/string.rb +3 -3
  19. data/lib/roo/excelx/cell/time.rb +4 -3
  20. data/lib/roo/excelx/cell.rb +10 -6
  21. data/lib/roo/excelx/comments.rb +3 -3
  22. data/lib/roo/excelx/coordinate.rb +11 -4
  23. data/lib/roo/excelx/extractor.rb +21 -3
  24. data/lib/roo/excelx/format.rb +38 -31
  25. data/lib/roo/excelx/images.rb +26 -0
  26. data/lib/roo/excelx/relationships.rb +12 -4
  27. data/lib/roo/excelx/shared.rb +10 -3
  28. data/lib/roo/excelx/shared_strings.rb +9 -15
  29. data/lib/roo/excelx/sheet.rb +49 -10
  30. data/lib/roo/excelx/sheet_doc.rb +89 -48
  31. data/lib/roo/excelx/styles.rb +3 -3
  32. data/lib/roo/excelx/workbook.rb +7 -3
  33. data/lib/roo/excelx.rb +42 -16
  34. data/lib/roo/helpers/default_attr_reader.rb +20 -0
  35. data/lib/roo/helpers/weak_instance_cache.rb +41 -0
  36. data/lib/roo/open_office.rb +8 -6
  37. data/lib/roo/spreadsheet.rb +1 -1
  38. data/lib/roo/utils.rb +70 -20
  39. data/lib/roo/version.rb +1 -1
  40. data/lib/roo.rb +4 -1
  41. data/roo.gemspec +13 -11
  42. data/spec/lib/roo/base_spec.rb +45 -3
  43. data/spec/lib/roo/excelx/relationships_spec.rb +43 -0
  44. data/spec/lib/roo/excelx/sheet_doc_spec.rb +11 -0
  45. data/spec/lib/roo/excelx_spec.rb +150 -31
  46. data/spec/lib/roo/strict_spec.rb +43 -0
  47. data/spec/lib/roo/utils_spec.rb +25 -3
  48. data/spec/lib/roo/weak_instance_cache_spec.rb +92 -0
  49. data/spec/lib/roo_spec.rb +0 -0
  50. data/spec/spec_helper.rb +1 -1
  51. data/test/excelx/cell/test_attr_reader_default.rb +72 -0
  52. data/test/excelx/cell/test_base.rb +5 -0
  53. data/test/excelx/cell/test_datetime.rb +6 -6
  54. data/test/excelx/cell/test_empty.rb +11 -0
  55. data/test/excelx/cell/test_number.rb +9 -0
  56. data/test/excelx/cell/test_string.rb +20 -0
  57. data/test/excelx/cell/test_time.rb +4 -4
  58. data/test/excelx/test_coordinate.rb +51 -0
  59. data/test/formatters/test_csv.rb +19 -2
  60. data/test/formatters/test_xml.rb +13 -9
  61. data/test/helpers/test_accessing_files.rb +60 -0
  62. data/test/helpers/test_comments.rb +43 -0
  63. data/test/helpers/test_formulas.rb +9 -0
  64. data/test/helpers/test_labels.rb +103 -0
  65. data/test/helpers/test_sheets.rb +55 -0
  66. data/test/helpers/test_styles.rb +62 -0
  67. data/test/roo/test_base.rb +182 -0
  68. data/test/roo/test_csv.rb +37 -1
  69. data/test/roo/test_excelx.rb +157 -13
  70. data/test/roo/test_open_office.rb +196 -33
  71. data/test/test_helper.rb +66 -22
  72. data/test/test_roo.rb +32 -881
  73. metadata +32 -14
  74. data/.github/ISSUE_TEMPLATE +0 -10
  75. data/Gemfile_ruby2 +0 -30
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.7.0
4
+ version: 2.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Preymesser
@@ -9,10 +9,11 @@ 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-31 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
@@ -32,22 +33,22 @@ dependencies:
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
+ version: 1.3.0
38
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
+ version: 1.3.0
48
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
@@ -116,13 +117,14 @@ extensions: []
116
117
  extra_rdoc_files: []
117
118
  files:
118
119
  - ".codeclimate.yml"
119
- - ".github/ISSUE_TEMPLATE"
120
+ - ".github/issue_template.md"
121
+ - ".github/pull_request_template.md"
120
122
  - ".gitignore"
123
+ - ".rubocop.yml"
121
124
  - ".simplecov"
122
125
  - ".travis.yml"
123
126
  - CHANGELOG.md
124
127
  - Gemfile
125
- - Gemfile_ruby2
126
128
  - Guardfile
127
129
  - LICENSE
128
130
  - README.md
@@ -149,6 +151,7 @@ files:
149
151
  - lib/roo/excelx/coordinate.rb
150
152
  - lib/roo/excelx/extractor.rb
151
153
  - lib/roo/excelx/format.rb
154
+ - lib/roo/excelx/images.rb
152
155
  - lib/roo/excelx/relationships.rb
153
156
  - lib/roo/excelx/shared.rb
154
157
  - lib/roo/excelx/shared_strings.rb
@@ -162,6 +165,8 @@ files:
162
165
  - lib/roo/formatters/matrix.rb
163
166
  - lib/roo/formatters/xml.rb
164
167
  - lib/roo/formatters/yaml.rb
168
+ - lib/roo/helpers/default_attr_reader.rb
169
+ - lib/roo/helpers/weak_instance_cache.rb
165
170
  - lib/roo/libre_office.rb
166
171
  - lib/roo/link.rb
167
172
  - lib/roo/open_office.rb
@@ -177,13 +182,19 @@ files:
177
182
  - spec/lib/roo/base_spec.rb
178
183
  - spec/lib/roo/csv_spec.rb
179
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
180
187
  - spec/lib/roo/excelx_spec.rb
181
188
  - spec/lib/roo/libreoffice_spec.rb
182
189
  - spec/lib/roo/openoffice_spec.rb
183
190
  - spec/lib/roo/spreadsheet_spec.rb
191
+ - spec/lib/roo/strict_spec.rb
184
192
  - spec/lib/roo/utils_spec.rb
193
+ - spec/lib/roo/weak_instance_cache_spec.rb
194
+ - spec/lib/roo_spec.rb
185
195
  - spec/spec_helper.rb
186
196
  - test/all_ss.rb
197
+ - test/excelx/cell/test_attr_reader_default.rb
187
198
  - test/excelx/cell/test_base.rb
188
199
  - test/excelx/cell/test_boolean.rb
189
200
  - test/excelx/cell/test_date.rb
@@ -192,17 +203,25 @@ files:
192
203
  - test/excelx/cell/test_number.rb
193
204
  - test/excelx/cell/test_string.rb
194
205
  - test/excelx/cell/test_time.rb
206
+ - test/excelx/test_coordinate.rb
195
207
  - test/formatters/test_csv.rb
196
208
  - test/formatters/test_matrix.rb
197
209
  - test/formatters/test_xml.rb
198
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
199
218
  - test/roo/test_csv.rb
200
219
  - test/roo/test_excelx.rb
201
220
  - test/roo/test_libre_office.rb
202
221
  - test/roo/test_open_office.rb
203
222
  - test/test_helper.rb
204
223
  - test/test_roo.rb
205
- homepage: http://github.com/roo-rb/roo
224
+ homepage: https://github.com/roo-rb/roo
206
225
  licenses:
207
226
  - MIT
208
227
  metadata: {}
@@ -214,15 +233,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
233
  requirements:
215
234
  - - ">="
216
235
  - !ruby/object:Gem::Version
217
- version: '0'
236
+ version: 2.3.0
218
237
  required_rubygems_version: !ruby/object:Gem::Requirement
219
238
  requirements:
220
239
  - - ">="
221
240
  - !ruby/object:Gem::Version
222
241
  version: '0'
223
242
  requirements: []
224
- rubyforge_project:
225
- rubygems_version: 2.6.8
243
+ rubygems_version: 3.0.6
226
244
  signing_key:
227
245
  specification_version: 4
228
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,30 +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 'shoulda'
10
- gem 'rspec', '>= 3.0.0'
11
- gem 'simplecov', '>= 0.9.0', require: false
12
- gem 'coveralls', require: false
13
- gem "activesupport", "~> 4.2.0"
14
- gem "tins", '~> 1.6.0'
15
- gem "term-ansicolor", "~> 1.3.2"
16
- gem "minitest-reporters"
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 'rb-readline'
29
- gem 'pry'
30
- end