roo 1.13.1 → 2.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) 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/.github/workflows/pull-request.yml +15 -0
  6. data/.github/workflows/ruby.yml +34 -0
  7. data/.gitignore +11 -0
  8. data/.rubocop.yml +186 -0
  9. data/.simplecov +4 -0
  10. data/CHANGELOG.md +702 -0
  11. data/Gemfile +18 -12
  12. data/Guardfile +23 -0
  13. data/LICENSE +5 -1
  14. data/README.md +328 -0
  15. data/Rakefile +23 -23
  16. data/examples/roo_soap_client.rb +28 -31
  17. data/examples/roo_soap_server.rb +4 -6
  18. data/examples/write_me.rb +9 -10
  19. data/lib/roo/base.rb +317 -504
  20. data/lib/roo/constants.rb +7 -0
  21. data/lib/roo/csv.rb +141 -113
  22. data/lib/roo/errors.rb +11 -0
  23. data/lib/roo/excelx/cell/base.rb +108 -0
  24. data/lib/roo/excelx/cell/boolean.rb +30 -0
  25. data/lib/roo/excelx/cell/date.rb +28 -0
  26. data/lib/roo/excelx/cell/datetime.rb +107 -0
  27. data/lib/roo/excelx/cell/empty.rb +20 -0
  28. data/lib/roo/excelx/cell/number.rb +99 -0
  29. data/lib/roo/excelx/cell/string.rb +19 -0
  30. data/lib/roo/excelx/cell/time.rb +44 -0
  31. data/lib/roo/excelx/cell.rb +110 -0
  32. data/lib/roo/excelx/comments.rb +55 -0
  33. data/lib/roo/excelx/coordinate.rb +19 -0
  34. data/lib/roo/excelx/extractor.rb +39 -0
  35. data/lib/roo/excelx/format.rb +71 -0
  36. data/lib/roo/excelx/images.rb +26 -0
  37. data/lib/roo/excelx/relationships.rb +33 -0
  38. data/lib/roo/excelx/shared.rb +39 -0
  39. data/lib/roo/excelx/shared_strings.rb +151 -0
  40. data/lib/roo/excelx/sheet.rb +151 -0
  41. data/lib/roo/excelx/sheet_doc.rb +257 -0
  42. data/lib/roo/excelx/styles.rb +64 -0
  43. data/lib/roo/excelx/workbook.rb +64 -0
  44. data/lib/roo/excelx.rb +407 -601
  45. data/lib/roo/font.rb +17 -0
  46. data/lib/roo/formatters/base.rb +15 -0
  47. data/lib/roo/formatters/csv.rb +84 -0
  48. data/lib/roo/formatters/matrix.rb +23 -0
  49. data/lib/roo/formatters/xml.rb +31 -0
  50. data/lib/roo/formatters/yaml.rb +40 -0
  51. data/lib/roo/helpers/default_attr_reader.rb +20 -0
  52. data/lib/roo/helpers/weak_instance_cache.rb +41 -0
  53. data/lib/roo/libre_office.rb +4 -0
  54. data/lib/roo/link.rb +34 -0
  55. data/lib/roo/open_office.rb +631 -0
  56. data/lib/roo/spreadsheet.rb +28 -23
  57. data/lib/roo/tempdir.rb +24 -0
  58. data/lib/roo/utils.rb +128 -0
  59. data/lib/roo/version.rb +3 -0
  60. data/lib/roo.rb +26 -24
  61. data/roo.gemspec +29 -202
  62. data/spec/helpers.rb +5 -0
  63. data/spec/lib/roo/base_spec.rb +291 -3
  64. data/spec/lib/roo/csv_spec.rb +38 -11
  65. data/spec/lib/roo/excelx/cell/time_spec.rb +15 -0
  66. data/spec/lib/roo/excelx/format_spec.rb +7 -6
  67. data/spec/lib/roo/excelx/relationships_spec.rb +43 -0
  68. data/spec/lib/roo/excelx/sheet_doc_spec.rb +11 -0
  69. data/spec/lib/roo/excelx_spec.rb +682 -6
  70. data/spec/lib/roo/libreoffice_spec.rb +16 -6
  71. data/spec/lib/roo/openoffice_spec.rb +30 -8
  72. data/spec/lib/roo/spreadsheet_spec.rb +60 -12
  73. data/spec/lib/roo/strict_spec.rb +43 -0
  74. data/spec/lib/roo/utils_spec.rb +119 -0
  75. data/spec/lib/roo/weak_instance_cache_spec.rb +92 -0
  76. data/spec/lib/roo_spec.rb +0 -0
  77. data/spec/spec_helper.rb +7 -6
  78. data/test/all_ss.rb +12 -11
  79. data/test/excelx/cell/test_attr_reader_default.rb +72 -0
  80. data/test/excelx/cell/test_base.rb +68 -0
  81. data/test/excelx/cell/test_boolean.rb +36 -0
  82. data/test/excelx/cell/test_date.rb +38 -0
  83. data/test/excelx/cell/test_datetime.rb +45 -0
  84. data/test/excelx/cell/test_empty.rb +18 -0
  85. data/test/excelx/cell/test_number.rb +90 -0
  86. data/test/excelx/cell/test_string.rb +48 -0
  87. data/test/excelx/cell/test_time.rb +30 -0
  88. data/test/excelx/test_coordinate.rb +51 -0
  89. data/test/formatters/test_csv.rb +136 -0
  90. data/test/formatters/test_matrix.rb +76 -0
  91. data/test/formatters/test_xml.rb +78 -0
  92. data/test/formatters/test_yaml.rb +20 -0
  93. data/test/helpers/test_accessing_files.rb +81 -0
  94. data/test/helpers/test_comments.rb +43 -0
  95. data/test/helpers/test_formulas.rb +9 -0
  96. data/test/helpers/test_labels.rb +103 -0
  97. data/test/helpers/test_sheets.rb +55 -0
  98. data/test/helpers/test_styles.rb +62 -0
  99. data/test/roo/test_base.rb +182 -0
  100. data/test/roo/test_csv.rb +88 -0
  101. data/test/roo/test_excelx.rb +360 -0
  102. data/test/roo/test_libre_office.rb +9 -0
  103. data/test/roo/test_open_office.rb +289 -0
  104. data/test/test_helper.rb +123 -59
  105. data/test/test_roo.rb +392 -2292
  106. metadata +153 -296
  107. data/CHANGELOG +0 -412
  108. data/Gemfile.lock +0 -78
  109. data/README.markdown +0 -126
  110. data/VERSION +0 -1
  111. data/lib/roo/excel.rb +0 -355
  112. data/lib/roo/excel2003xml.rb +0 -300
  113. data/lib/roo/google.rb +0 -292
  114. data/lib/roo/openoffice.rb +0 -496
  115. data/lib/roo/roo_rails_helper.rb +0 -83
  116. data/lib/roo/worksheet.rb +0 -18
  117. data/scripts/txt2html +0 -67
  118. data/spec/lib/roo/excel2003xml_spec.rb +0 -15
  119. data/spec/lib/roo/excel_spec.rb +0 -17
  120. data/spec/lib/roo/google_spec.rb +0 -64
  121. data/test/files/1900_base.xls +0 -0
  122. data/test/files/1900_base.xlsx +0 -0
  123. data/test/files/1904_base.xls +0 -0
  124. data/test/files/1904_base.xlsx +0 -0
  125. data/test/files/Bibelbund.csv +0 -3741
  126. data/test/files/Bibelbund.ods +0 -0
  127. data/test/files/Bibelbund.xls +0 -0
  128. data/test/files/Bibelbund.xlsx +0 -0
  129. data/test/files/Bibelbund.xml +0 -62518
  130. data/test/files/Bibelbund1.ods +0 -0
  131. data/test/files/Pfand_from_windows_phone.xlsx +0 -0
  132. data/test/files/bad_excel_date.xls +0 -0
  133. data/test/files/bbu.ods +0 -0
  134. data/test/files/bbu.xls +0 -0
  135. data/test/files/bbu.xlsx +0 -0
  136. data/test/files/bbu.xml +0 -152
  137. data/test/files/bode-v1.ods.zip +0 -0
  138. data/test/files/bode-v1.xls.zip +0 -0
  139. data/test/files/boolean.csv +0 -2
  140. data/test/files/boolean.ods +0 -0
  141. data/test/files/boolean.xls +0 -0
  142. data/test/files/boolean.xlsx +0 -0
  143. data/test/files/boolean.xml +0 -112
  144. data/test/files/borders.ods +0 -0
  145. data/test/files/borders.xls +0 -0
  146. data/test/files/borders.xlsx +0 -0
  147. data/test/files/borders.xml +0 -144
  148. data/test/files/bug-numbered-sheet-names.xlsx +0 -0
  149. data/test/files/bug-row-column-fixnum-float.xls +0 -0
  150. data/test/files/bug-row-column-fixnum-float.xml +0 -127
  151. data/test/files/comments.ods +0 -0
  152. data/test/files/comments.xls +0 -0
  153. data/test/files/comments.xlsx +0 -0
  154. data/test/files/csvtypes.csv +0 -1
  155. data/test/files/datetime.ods +0 -0
  156. data/test/files/datetime.xls +0 -0
  157. data/test/files/datetime.xlsx +0 -0
  158. data/test/files/datetime.xml +0 -142
  159. data/test/files/datetime_floatconv.xls +0 -0
  160. data/test/files/datetime_floatconv.xml +0 -148
  161. data/test/files/dreimalvier.ods +0 -0
  162. data/test/files/emptysheets.ods +0 -0
  163. data/test/files/emptysheets.xls +0 -0
  164. data/test/files/emptysheets.xlsx +0 -0
  165. data/test/files/emptysheets.xml +0 -105
  166. data/test/files/excel2003.xml +0 -21140
  167. data/test/files/false_encoding.xls +0 -0
  168. data/test/files/false_encoding.xml +0 -132
  169. data/test/files/file_item_error.xlsx +0 -0
  170. data/test/files/formula.ods +0 -0
  171. data/test/files/formula.xls +0 -0
  172. data/test/files/formula.xlsx +0 -0
  173. data/test/files/formula.xml +0 -134
  174. data/test/files/formula_parse_error.xls +0 -0
  175. data/test/files/formula_parse_error.xml +0 -1833
  176. data/test/files/formula_string_error.xlsx +0 -0
  177. data/test/files/html-escape.ods +0 -0
  178. data/test/files/link.xls +0 -0
  179. data/test/files/link.xlsx +0 -0
  180. data/test/files/matrix.ods +0 -0
  181. data/test/files/matrix.xls +0 -0
  182. data/test/files/named_cells.ods +0 -0
  183. data/test/files/named_cells.xls +0 -0
  184. data/test/files/named_cells.xlsx +0 -0
  185. data/test/files/no_spreadsheet_file.txt +0 -1
  186. data/test/files/numbers1.csv +0 -18
  187. data/test/files/numbers1.ods +0 -0
  188. data/test/files/numbers1.xls +0 -0
  189. data/test/files/numbers1.xlsx +0 -0
  190. data/test/files/numbers1.xml +0 -312
  191. data/test/files/only_one_sheet.ods +0 -0
  192. data/test/files/only_one_sheet.xls +0 -0
  193. data/test/files/only_one_sheet.xlsx +0 -0
  194. data/test/files/only_one_sheet.xml +0 -67
  195. data/test/files/paragraph.ods +0 -0
  196. data/test/files/paragraph.xls +0 -0
  197. data/test/files/paragraph.xlsx +0 -0
  198. data/test/files/paragraph.xml +0 -127
  199. data/test/files/prova.xls +0 -0
  200. data/test/files/ric.ods +0 -0
  201. data/test/files/simple_spreadsheet.ods +0 -0
  202. data/test/files/simple_spreadsheet.xls +0 -0
  203. data/test/files/simple_spreadsheet.xlsx +0 -0
  204. data/test/files/simple_spreadsheet.xml +0 -225
  205. data/test/files/simple_spreadsheet_from_italo.ods +0 -0
  206. data/test/files/simple_spreadsheet_from_italo.xls +0 -0
  207. data/test/files/simple_spreadsheet_from_italo.xml +0 -242
  208. data/test/files/so_datetime.csv +0 -7
  209. data/test/files/style.ods +0 -0
  210. data/test/files/style.xls +0 -0
  211. data/test/files/style.xlsx +0 -0
  212. data/test/files/style.xml +0 -154
  213. data/test/files/time-test.csv +0 -2
  214. data/test/files/time-test.ods +0 -0
  215. data/test/files/time-test.xls +0 -0
  216. data/test/files/time-test.xlsx +0 -0
  217. data/test/files/time-test.xml +0 -131
  218. data/test/files/type_excel.ods +0 -0
  219. data/test/files/type_excel.xlsx +0 -0
  220. data/test/files/type_excelx.ods +0 -0
  221. data/test/files/type_excelx.xls +0 -0
  222. data/test/files/type_openoffice.xls +0 -0
  223. data/test/files/type_openoffice.xlsx +0 -0
  224. data/test/files/whitespace.ods +0 -0
  225. data/test/files/whitespace.xls +0 -0
  226. data/test/files/whitespace.xlsx +0 -0
  227. data/test/files/whitespace.xml +0 -184
  228. data/test/rm_sub_test.rb +0 -12
  229. data/test/rm_test.rb +0 -7
  230. data/test/test_generic_spreadsheet.rb +0 -259
  231. data/website/index.html +0 -385
  232. data/website/index.txt +0 -423
  233. data/website/javascripts/rounded_corners_lite.inc.js +0 -285
  234. data/website/stylesheets/screen.css +0 -130
  235. data/website/template.rhtml +0 -48
data/CHANGELOG DELETED
@@ -1,412 +0,0 @@
1
- == 1.13.1 2013-12-23
2
-
3
- * bugfixes
4
- * Fix that Excelx creation could blow up due to nil rels files. #90
5
-
6
- == 1.13.0 2013-12-05
7
-
8
- * enhancements
9
- * Support extracting link data from Excel and Excelx spreadsheets,
10
- via Excel#read_cell(_content) and Excelx#hyperlink(?). #47
11
- * Support setting the Excel Spreadsheet mode via the :mode option. #88
12
- * Support Spreadsheet.open with a declared :extension that includes a leading '.'. #73
13
- * Enable file type detection for URI's with parameters / anchors. #51
14
-
15
- * bugfixes
16
- * Fix that CSV#each_row could overwrite the filename when run against a uri. #77
17
- * Fix that #to_matrix wasn't respecting the sheet argument. #87
18
-
19
- == 1.12.2 2013-09-11
20
-
21
- * 1 enhancement
22
- * Support rubyzip >= 1.0.0. #65
23
- * Fix typo in deprecation notices. #63
24
-
25
- == 1.12.1 2013-08-18
26
-
27
- * 1 enhancement
28
- * Support :boolean fields for CSV export via #cell_to_csv. #59
29
-
30
- * 2 bugfixes
31
- * Fix that Excelx would error on files with gaps in the numbering of their
32
- internal sheet#.xml files. #58
33
- * Fix that Base#info to preserve the original value of #default_sheet. #44
34
-
35
- == 1.12.0 2013-08-18
36
-
37
- * 3 deprecations
38
- * Rename Openoffice -> OpenOffice, Libreoffice -> LibreOffice, Csv -> CSV, and redirect the old names to the new constants
39
- * Enable Roo::Excel, Excel2003XML, Excelx, OpenOffice to accept an options hash, and deprecate the old method argument based approach to supplying them options
40
- * Roo's roo_rails_helper, aka the `spreadsheet` html-generating view method is currently deprecated with no replacement. If you find it helpful, tell http://github.com/Empact or extract it yourself.
41
-
42
- * 9 enhancements
43
- * Add Roo::Excelx#load_xml so that people can customize to their data, e.g. #23
44
- * Enable passing csv_options to Roo::CSV, which are passed through to the underlying CSV call.
45
- * Enable passing options through from Roo::Spreadsheet to any Roo type.
46
- * Enable passing an :extension option to Roo::Spreadsheet.new, which will override the extension detected on in the path #15
47
- * Switch from google-spreadsheet-ruby to google_drive for Roo::Google access #40
48
- * Make all the classes consistent in that #read_cells is only effective if the sheet has not been read.
49
- * Roo::Google supports login via oauth :access_token. #61
50
- * Roo::Excel now exposes its Spreadsheet workbook via #workbook
51
- * Pull #load_xml down into Roo::Base, and use it in Excel2003XML and OpenOffice.
52
-
53
- * 2 changes
54
- * #formula? now returns truthy or falsey, rather than true/false.
55
- * Base#longest_sheet was moved to Excel, as it only worked under Excel
56
-
57
- * 1 bugfix
58
- * Fix that Roo::CSV#parse(headers: true) would blow up. #37
59
-
60
- == 1.11.2 2013-04-10
61
-
62
- * 4 bugfixes
63
- * Fix that Roo::Spreadsheet.open wasn't tolerant to case differences.
64
- * Fix that Roo::Excel2003XML loading was broken #27
65
- * Enable loading Roo::Csv files from uris, just as other file types #31
66
- * Fix that Excelx "m/d/yy h:mm" was improperly being interpreted as date rather
67
- than datetime #29
68
-
69
- == 1.11.1 2013-03-18
70
-
71
- * 1 bugfix
72
- * Exclude test/log/roo.log test log file from the gemspec in order to avoid a
73
- rubygems warning: #26
74
-
75
- == 1.11.0 2013-03-14
76
-
77
- * 3 enhancements
78
- * Support ruby 2.0.0 by replacing Iconv with String#encode #19
79
- * Excelx: Loosen the format detection rules such that more are
80
- successfully detected #20
81
- * Delete the roo binary, which was useless and not declared in the gemspec
82
-
83
- * 1 change
84
- * Drop support for ruby 1.8.x or lower. Required in order to easily support 2.0.0.
85
-
86
- == 1.10.3 2013-03-03
87
-
88
- * 1 bugfix
89
- * Support both nokogiri 1.5.5 and 1.5.6 (Karsten Richter) #18
90
-
91
- * 1 enhancement
92
- * Relax our nokogiri dependency back to 1.4.0, as we have no particular reason
93
- to require a newer version.
94
-
95
- == 1.10.2 2013-02-03
96
-
97
- * 2 bugfixes
98
- * Support opening URIs with query strings https://github.com/Empact/roo/commit/abf94bdb59cabc16d4f7764025e88e3661983525
99
- * Support both http: & https: urls https://github.com/Empact/roo/commit/fc5c5899d96dd5f9fbb68125d0efc8ce9be2c7e1
100
-
101
- == 1.10.1 2011-11-14
102
-
103
- * 2 bugfixes
104
- * forgot dependency 'rubyzip'
105
- * at least one external application does create xlsx-files with different internal file names which differ from the original file names of Excel. Solution: ignore lower-/upper case in file names.
106
-
107
- == 1.10.0 2011-10-10
108
-
109
- * 4 enhancements
110
- * New class Csv.
111
- * Openoffice, Libreoffice: new method 'labels'
112
- * Excelx: implemented all methods concerning labels
113
- * Openoffice, Excelx: new methods concerning comments (comment, comment? and comments)
114
-
115
- * 2 bugfixes
116
- * XLSX: some cells were not recognized correctly from a spreadsheet file from a windows mobile phone.
117
- * labels: Moved to a separate methode. There were problems if there was an access to a label before read_cells were called.
118
-
119
- == 1.9.7 2011-08-27
120
-
121
- * 1 bugfix
122
- * Openoffice: Better way for extracting formula strings, some characters were deleted at the formula string.
123
-
124
- == 1.9.6 2011-08-03
125
-
126
- * 1 enhancement
127
- * new class Libreoffice (Libreoffice should do exactly the same as the Openoffice
128
- class. It's just another name. Technically, Libreoffice is inherited from
129
- the Openoffice class with no new methods.
130
- * 3 bugfixes
131
- * Openoffice: file type check, deletion of temporary files not in ensure clause
132
- * Cell type :datetime was not handled in the to_csv method
133
- * Better deletion of temporary directories if something went wrong
134
-
135
- == 1.9.5 2011-06-25
136
-
137
- * 1 enhancement
138
- * Method #formulas moved to generic-spreadsheet class (the Excel version is
139
- overwritten because the spreadsheet gem currently does not support
140
- formulas.
141
- * 3 bugfixes
142
- * Openoffice/Excelx/Google: #formulas of an empty sheet should not result
143
- in an error message. Instead it should return an empty array.
144
- * Openoffice/Excelx/Google: #to_yaml of an empty sheet should not result
145
- in an error message. Instead it should return an empty string.
146
- * Openoffice/Excelx/Google: #to_matrix of an empty sheet should not result
147
- in an error message. Instead it should return an empty matrix.
148
-
149
- == 1.9.4 2011-06-23
150
-
151
- * 1 enhancement
152
- * removed gem 'builder'. Functionality goes to gem 'nokogiri'.
153
- * 3 bugfixes
154
- * Excel: remove temporary files if spreadsheed-file is not an excel file
155
- and an exception was raised
156
- * Excelx: a referenced cell with a string had the content 0.0 not the
157
- correct string
158
- * Fixed a problem with a date cell which was not recognized as a Date
159
- object (see 2011-05-21 in excelx.rb)
160
-
161
- == 1.9.3 2010-02-12
162
-
163
- * 1 enhancements
164
- * new method 'to_matrix'
165
- * 1 bugfix
166
- * missing dependencies defined
167
-
168
- == 1.9.2 2009-12-08
169
-
170
- * 1 bugfix
171
- * double quoting of '"' fixed
172
-
173
- == 1.9.1 2009-11-10
174
-
175
- * 2 bugfixes
176
- * syntax in nokogiri methods
177
- * missing dependency ...rubyzip
178
-
179
- == 1.9.0 2009-10-29
180
-
181
- * 4 enhancements
182
- * Ruby 1.9 compatible
183
- * oo.aa42 as a shortcut of oo.cell('aa',42)
184
- * oo.aa42('sheet1') as a shortcut of oo.cell('aa',42,'sheet1')
185
- * oo.anton as a reference to a cell labelled 'anton' (or any other label name)
186
- (currently only for Openoffice spreadsheets)
187
-
188
- == 1.2.3 2009-01-04
189
-
190
- * bugfix
191
- * fixed encoding in #cell at exported Google-spreadsheets (.xls)
192
-
193
- == 1.2.2 2008-12-14
194
-
195
- * 2 enhancements
196
- * added celltype :datetime in Excelx
197
- * added celltype :datetime in Google
198
-
199
- == 1.2.1 2008-11-13
200
-
201
- * 1 enhancement
202
- * added celltype :datetime in Openoffice and Excel
203
-
204
- == 1.2.0 2008-08-24
205
- * 3 major enhancements
206
- * Excelx: improved the detection of cell type and conversion into roo types
207
- * All: to_csv: changed boundaries from first_row,1..last_row,last_column to 1,1..last_row,last_column
208
- * All: Environment variable "ROO_TMP" indicate where temporary directories will be created (if not set the default is the current working directory)
209
- * 2 bugfixes
210
- * Excel: improved the detection of last_row/last_column (parseexcel-gem bug?)
211
- * Excel/Excelx/Openoffice: temporary directories were not removed at opening a file of the wrong type
212
- == 1.1.0 2008-07-26
213
- * 2 major enhancements
214
- * Excel: speed improvements
215
- * Changed the behavior of reading files with the wrong type
216
- * 3 bugfixes
217
- * Google: added normalize in set_value method
218
- * Excel: last_row in Excel class did not work properly under some circumstances
219
- * all: fixed a bug in #to_xml if there is an empty sheet
220
- == 1.0.2 2008-07-04
221
- * 2 bugfixes
222
- * Excelx: fixed a bug when there are .xml.rels files in the XLSX archive
223
- * Excelx: fixed a bug with celltype recognition (see comment with "2008-07-03")
224
- == 1.0.1 2008-06-30
225
- * 1 bugfix
226
- * Excel: row/column method Fixnum/Float confusion
227
- == 1.0.0 2008-05-28
228
- * 2 major enhancements
229
- * support of Excel's new .xlsx file format
230
- * method #to_xml for exporting a spreadsheet to an xml representation
231
- * 1 bugfix
232
- * fixed a bug with excel-spreadsheet character conversion under Macintosh Darwin
233
- == 0.9.4 2008-04-22
234
- * 1 bugfix
235
- * fixed a bug with excel-spreadsheet character conversion under Solaris
236
- == 0.9.3 2008-03-25
237
- * 1 bugfix
238
- * no more tmp directories if an invalid spreadsheet file was openend
239
- == 0.9.2 2008-03-24
240
- * 1 enhancement
241
- * new celltype :time
242
- * 1 bugfix
243
- * time values like '23:15' are handled as seconds from midnight
244
- == 0.9.1 2008-03-23
245
- * 1 enhancement
246
- * additional 'sheet' parameter in Google#set_value
247
- * 1 bugfix
248
- * fixed a bug within Google#set_value. thanks to davecahill <dpcahill@gmail.com> for the patch.
249
- == 0.9.0 2008-01-24
250
- * 1 enhancement:
251
- * better support of roo spreadsheets in rails views
252
- == 0.8.5 2008-01-16
253
- * 1 bugfix
254
- * fixed a bug within #to_cvs and explicit call of a sheet
255
- == 0.8.4 2008-01-01
256
- * 1 bugfix
257
- * fixed 'find_by_condition' for excel sheets (header_line= --> GenericSpredsheet)
258
- == 0.8.3 2007-12-31
259
- * 2 bugfixes
260
- * another fix for the encoding issue in excel sheet-names
261
- * reactived the Excel#find method which has been disappeared in the last restructoring, moved to GenericSpreadsheet
262
- == 0.8.2 2007-12-28
263
- * 1 enhancement:
264
- * basename() only in method #info
265
- * 2 bugfixes
266
- * changed logging-method to mysql-database in test code with AR, table column 'class' => 'class_name'
267
- * reactived the Excel#to_csv method which has been disappeared in the last restructoring
268
- == 0.8.1 2007-12-22
269
- * 3 bugfixes
270
- * fixed a bug with first/last-row/column in empty sheet
271
- * #info prints now '- empty -' if a sheet within a document is empty
272
- * tried to fix the iconv conversion problem
273
- == 0.8.0 2007-12-15
274
- * 2 enhancements:
275
- * Google online spreadsheets were implemented
276
- * some methods common to more than one class were factored out to the GenericSpreadsheet (virtual) class
277
- == 0.7.0 2007-11-23
278
- * 6 enhancements:
279
- * Openoffice/Excel: the most methods can be called with an option 'sheet'
280
- parameter which will be used instead of the default sheet
281
- * Excel: improved the speed of CVS output
282
- * Openoffice/Excel: new method #column
283
- * Openoffice/Excel: new method #find
284
- * Openoffice/Excel: new method #info
285
- * better exception if a spreadsheet file does not exist
286
- == 0.6.1 2007-10-06
287
- * 2 enhancements:
288
- * Openoffice: percentage-values are now treated as numbers (not strings)
289
- * Openoffice: refactoring
290
- * 1 bugfix
291
- * Openoffice: repeating date-values in a line are now handled correctly
292
- == 0.6.0 2007-10-06
293
- * 1 enhancement:
294
- * csv-output to stdout or file
295
- == 0.5.4 2007-08-27
296
- * 1 bugfix
297
- * Openoffice: fixed a bug with internal representation of a spreadsheet (thanks to Ric Kamicar for the patch)
298
- == 0.5.3 2007-08-26
299
- * 2 enhancements:
300
- * Openoffice: can now read zip-ed files
301
- * Openoffice: can now read files from http://-URL over the net
302
- == 0.5.2 2007-08-26
303
- * 1 bugfix
304
- * excel: removed debugging output
305
- == 0.5.1 2007-08-26
306
- * 4 enhancements:
307
- * Openoffice: Exception if an illegal sheet-name is selected
308
- * Openoffice/Excel: no need to set a default_sheet if there is only one in
309
- the document
310
- * Excel: can now read zip-ed files
311
- * Excel: can now read files from http://-URL over the net
312
-
313
- == 0.5.0 2007-07-20
314
- * 3 enhancements:
315
- * Excel-objects: the methods default_sheet= and sheets can now handle names instead of numbers
316
- * changed the celltype methods to return symbols, not strings anymore (possible values are :formula, :float, :string, :date, :percentage (if you need strings you can convert it with .to_s)
317
- * tests can now run on the client machine (not only my machine), if there are not public released files involved these tests are skipped
318
-
319
- == 0.4.1 2007-06-27
320
- * 1 bugfix
321
- * there was ONE false require-statement which led to misleading error messageswhen this gem was used
322
-
323
- == 0.4.0 2007-06-27
324
- * 7 enhancements:
325
- * robustness: Exception if no default_sheet was set
326
- * new method reload() implemented
327
- * about 15 % more method documentation
328
- * optimization: huge increase of speed (no need to use fixed borders anymore)
329
- * added the method 'formulas' which gives you all formulas in a spreadsheet
330
- * added the method 'set' which can set cells to a certain value
331
- * added the method 'to_yaml' which can produce output for importing in a (rails) database
332
- * 4 bugfixes
333
- * ..row_as_letter methods were nonsense - removed
334
- * @cells_read should be reset if the default_sheet is changed
335
- * error in excel-part: strings are now converted to utf-8 (the parsexcel-gem gave me an error with my test data, which could not converted to .to_s using latin1 encoding)
336
- * fixed bug when default_sheet is changed
337
-
338
- == 0.3.0 2007-06-20
339
- * 1 enhancement:
340
- * Openoffice: formula support
341
-
342
- == 0.2.7 2007-06-20
343
- * 1 bugfix:
344
- * Excel: float-numbers were truncated to integer
345
-
346
- == 0.2.6 2007-06-19
347
- * 1 bugfix:
348
- * Openoffice: two or more consecutive cells with string content failed
349
-
350
- == 0.2.5 2007-06-17
351
-
352
- * 2 enhancements:
353
- * Excel: row method implemented
354
- * more tests
355
- * 1 bugfix:
356
- * Openoffice: row method fixed
357
-
358
- == 0.2.4 2007-06-16
359
- * 1 bugfix:
360
- * ID 11605 Two cols with same value: crash roo (openoffice version only)
361
-
362
- == 0.2.3 2007-06-02
363
- * 3 enhancements:
364
- * more robust call att Excel#default_sheet= when called with a name
365
- * new method empty?
366
- * refactoring
367
- * 1 bugfix:
368
- * bugfix in Excel#celltype
369
- * bugfix (running under windows only) in closing the temp file before removing it
370
-
371
- == 0.2.2 2007-06-01
372
- * 1 bugfix:
373
- * correct pathname for running with windows
374
-
375
-
376
- == 0.2.2 2007-06-01
377
- * 1 bugfix:
378
- * incorrect dependencies fixed
379
-
380
- == 0.2.0 2007-06-01
381
- * 1 major enhancement:
382
- * support for MS-Excel Spreadsheets
383
-
384
- == 0.1.2 2007-05-31
385
- * 1 major enhancement:
386
- * cells with more than one character, like 'AA' can now be handled
387
-
388
- == 0.1.1 2007-05-31
389
- * 1 Bugfix
390
- * Bugfix in first/last methods
391
-
392
- == 0.1.0 2007-05-31
393
-
394
- * 1 major enhancement:
395
- * new methods first/last row/column
396
- * new method officeversion
397
-
398
- == 0.0.3 2007-05-30
399
-
400
- * 1 minor enhancement:
401
- * new method row()
402
-
403
- == 0.0.2 2007-05-30
404
-
405
- * 2 major enhancement:
406
- * fixed some bugs
407
- * more ways to access a cell
408
-
409
- == 0.0.1 2007-05-25
410
-
411
- * 1 major enhancement:
412
- * Initial release
data/Gemfile.lock DELETED
@@ -1,78 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- addressable (2.3.5)
5
- crack (0.4.1)
6
- safe_yaml (~> 0.9.0)
7
- diff-lcs (1.2.1)
8
- faraday (0.8.7)
9
- multipart-post (~> 1.1)
10
- git (1.2.5)
11
- google_drive (0.3.6)
12
- nokogiri (>= 1.4.4, != 1.5.2, != 1.5.1)
13
- oauth (>= 0.3.6)
14
- oauth2 (>= 0.5.0)
15
- httpauth (0.2.0)
16
- jeweler (1.8.3)
17
- bundler (~> 1.0)
18
- git (>= 1.2.5)
19
- rake
20
- rdoc
21
- json (1.7.7)
22
- json (1.7.7-java)
23
- jwt (0.1.8)
24
- multi_json (>= 1.5)
25
- multi_json (1.7.3)
26
- multi_xml (0.5.3)
27
- multipart-post (1.2.0)
28
- nokogiri (1.5.6)
29
- nokogiri (1.5.6-java)
30
- oauth (0.4.7)
31
- oauth2 (0.9.1)
32
- faraday (~> 0.8)
33
- httpauth (~> 0.1)
34
- jwt (~> 0.1.4)
35
- multi_json (~> 1.0)
36
- multi_xml (~> 0.5)
37
- rack (~> 1.2)
38
- rack (1.5.2)
39
- rake (0.9.2.2)
40
- rdoc (3.12.2)
41
- json (~> 1.4)
42
- rspec (2.13.0)
43
- rspec-core (~> 2.13.0)
44
- rspec-expectations (~> 2.13.0)
45
- rspec-mocks (~> 2.13.0)
46
- rspec-core (2.13.1)
47
- rspec-expectations (2.13.0)
48
- diff-lcs (>= 1.1.3, < 2.0)
49
- rspec-mocks (2.13.0)
50
- ruby-ole (1.2.11.6)
51
- rubyzip (1.0.0)
52
- safe_yaml (0.9.4)
53
- shoulda (3.0.1)
54
- shoulda-context (~> 1.0.0)
55
- shoulda-matchers (~> 1.0.0)
56
- shoulda-context (1.0.0)
57
- shoulda-matchers (1.0.0)
58
- spreadsheet (0.8.2)
59
- ruby-ole (>= 1.0)
60
- vcr (2.5.0)
61
- webmock (1.13.0)
62
- addressable (>= 2.2.7)
63
- crack (>= 0.3.2)
64
-
65
- PLATFORMS
66
- java
67
- ruby
68
-
69
- DEPENDENCIES
70
- google_drive
71
- jeweler
72
- nokogiri
73
- rspec
74
- rubyzip
75
- shoulda
76
- spreadsheet (> 0.6.4)
77
- vcr
78
- webmock
data/README.markdown DELETED
@@ -1,126 +0,0 @@
1
- # README for Roo
2
-
3
- Roo implements read access for all spreadsheet types and read/write access for
4
- Google spreadsheets. It can handle
5
- * OpenOffice
6
- * Excel
7
- * Google spreadsheets
8
- * Excelx
9
- * LibreOffice
10
- * CSV
11
-
12
- ## Notes
13
-
14
- ### XLS
15
-
16
- There is no support for formulas in Roo for .xls files - you can get the result
17
- of a formula but not the formula itself.
18
-
19
- ### Google Spreadsheet
20
-
21
- Using Roo to access Google spreadsheets requires you install the 'google-spreadsheet-ruby' gem separately.
22
-
23
- ## License
24
-
25
- While Roo is licensed under the MIT / Expat license, please note that the 'spreadsheet' gem [is released under](https://github.com/zdavatz/spreadsheet/blob/master/LICENSE.txt) the GPLv3 license.
26
-
27
- ## Usage:
28
-
29
- ```ruby
30
- require 'roo'
31
-
32
- s = Roo::OpenOffice.new("myspreadsheet.ods") # loads an OpenOffice Spreadsheet
33
- s = Roo::Excel.new("myspreadsheet.xls") # loads an Excel Spreadsheet
34
- s = Roo::Google.new("myspreadsheetkey_at_google") # loads a Google Spreadsheet
35
- s = Roo::Excelx.new("myspreadsheet.xlsx") # loads an Excel Spreadsheet for Excel .xlsx files
36
- s = Roo::CSV.new("mycsv.csv") # loads a CSV file
37
-
38
- # You can use CSV to load TSV files, or files of a certain encoding by passing
39
- # in options under the :csv_options key
40
- s = Roo::CSV.new("mytsv.tsv", csv_options: {col_sep: "\t"}) # TSV
41
- s = Roo::CSV.new("mycsv.csv", csv_options: {encoding: Encoding::ISO_8859_1}) # csv with explicit encoding
42
-
43
- s.default_sheet = s.sheets.first # first sheet in the spreadsheet file will be used
44
-
45
- # s.sheets is an array which holds the names of the sheets within
46
- # a spreadsheet.
47
- # you can also write
48
- # s.default_sheet = s.sheets[3] or
49
- # s.default_sheet = 'Sheet 3'
50
-
51
- s.cell(1,1) # returns the content of the first row/first cell in the sheet
52
- s.cell('A',1) # same cell
53
- s.cell(1,'A') # same cell
54
- s.cell(1,'A',s.sheets[0]) # same cell
55
-
56
- # almost all methods have an optional argument 'sheet'.
57
- # If this parameter is omitted, the default_sheet will be used.
58
-
59
- s.info # prints infos about the spreadsheet file
60
-
61
- s.first_row # the number of the first row
62
- s.last_row # the number of the last row
63
- s.first_column # the number of the first column
64
- s.last_column # the number of the last column
65
-
66
- # limited font information is available
67
-
68
- s.font(1,1).bold?
69
- s.font(1,1).italic?
70
- s.font(1,1).underline?
71
-
72
-
73
- # Spreadsheet.open can accept both files and paths
74
-
75
- xls = Roo::Spreadsheet.open('./new_prices.xls')
76
-
77
- # If the File.path or provided path string does not have an extension, you can optionally
78
- # provide one as a string or symbol
79
-
80
- xls = Roo::Spreadsheet.open('./rails_temp_upload', extension: :xls)
81
-
82
- # no more setting xls.default_sheet, just use this
83
-
84
- xls.sheet('Info').row(1)
85
- xls.sheet(0).row(1)
86
-
87
- # excel likes to create random "Data01" sheets for macros
88
- # use this to find the sheet with the most data to parse
89
-
90
- xls.longest_sheet
91
-
92
- # this excel file has multiple worksheets, let's iterate through each of them and process
93
-
94
- xls.each_with_pagename do |name, sheet|
95
- p sheet.row(1)
96
- end
97
-
98
- # pull out a hash of exclusive column data (get rid of useless columns and save memory)
99
-
100
- xls.each(:id => 'UPC',:qty => 'ATS') {|hash| arr << hash}
101
- #=> hash will appear like {:upc=>727880013358, :qty => 12}
102
-
103
- # NOTE: .parse does the same as .each, except it returns an array (similar to each vs. map)
104
-
105
- # not sure exactly what a column will be named? try a wildcard search with the character *
106
- # regex characters are allowed ('^price\s')
107
- # case insensitive
108
-
109
- xls.parse(:id => 'UPC*SKU',:qty => 'ATS*\sATP\s*QTY$')
110
-
111
- # if you need to locate the header row and assign the header names themselves,
112
- # use the :header_search option
113
-
114
- xls.parse(:header_search => ['UPC*SKU','ATS*\sATP\s*QTY$'])
115
- #=> each element will appear in this fashion:
116
- #=> {"UPC" => 123456789012, "STYLE" => "987B0", "COLOR" => "blue", "QTY" => 78}
117
-
118
- # want to strip out annoying unicode characters and surrounding white space?
119
-
120
- xls.parse(:clean => true)
121
-
122
- # another bonus feature is a patch to prevent the Spreadsheet gem from parsing
123
- # thousands and thousands of blank lines. i got fed up after watching my computer
124
- # nearly catch fire for 4 hours for a spreadsheet with only 200 ACTUAL lines
125
- # - located in lib/roo/worksheet.rb
126
- ```
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.13.1