roo 1.13.2 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -0
  3. data/.simplecov +4 -0
  4. data/.travis.yml +13 -0
  5. data/CHANGELOG.md +515 -0
  6. data/Gemfile +16 -10
  7. data/Guardfile +24 -0
  8. data/LICENSE +3 -1
  9. data/README.md +254 -0
  10. data/Rakefile +23 -23
  11. data/examples/roo_soap_client.rb +28 -31
  12. data/examples/roo_soap_server.rb +4 -6
  13. data/examples/write_me.rb +9 -10
  14. data/lib/roo/base.rb +334 -395
  15. data/lib/roo/csv.rb +120 -113
  16. data/lib/roo/excelx/cell.rb +77 -0
  17. data/lib/roo/excelx/comments.rb +22 -0
  18. data/lib/roo/excelx/extractor.rb +22 -0
  19. data/lib/roo/excelx/relationships.rb +25 -0
  20. data/lib/roo/excelx/shared_strings.rb +37 -0
  21. data/lib/roo/excelx/sheet.rb +107 -0
  22. data/lib/roo/excelx/sheet_doc.rb +200 -0
  23. data/lib/roo/excelx/styles.rb +64 -0
  24. data/lib/roo/excelx/workbook.rb +59 -0
  25. data/lib/roo/excelx.rb +413 -597
  26. data/lib/roo/font.rb +17 -0
  27. data/lib/roo/libre_office.rb +5 -0
  28. data/lib/roo/link.rb +15 -0
  29. data/lib/roo/{openoffice.rb → open_office.rb} +681 -496
  30. data/lib/roo/spreadsheet.rb +20 -23
  31. data/lib/roo/utils.rb +78 -0
  32. data/lib/roo/version.rb +3 -0
  33. data/lib/roo.rb +18 -24
  34. data/roo.gemspec +20 -204
  35. data/spec/lib/roo/base_spec.rb +1 -4
  36. data/spec/lib/roo/csv_spec.rb +21 -13
  37. data/spec/lib/roo/excelx/format_spec.rb +7 -6
  38. data/spec/lib/roo/excelx_spec.rb +424 -11
  39. data/spec/lib/roo/libreoffice_spec.rb +16 -6
  40. data/spec/lib/roo/openoffice_spec.rb +13 -8
  41. data/spec/lib/roo/spreadsheet_spec.rb +40 -12
  42. data/spec/lib/roo/utils_spec.rb +106 -0
  43. data/spec/spec_helper.rb +2 -1
  44. data/test/test_generic_spreadsheet.rb +117 -139
  45. data/test/test_helper.rb +9 -56
  46. data/test/test_roo.rb +274 -478
  47. metadata +65 -303
  48. data/CHANGELOG +0 -417
  49. data/Gemfile.lock +0 -78
  50. data/README.markdown +0 -126
  51. data/VERSION +0 -1
  52. data/lib/roo/excel.rb +0 -355
  53. data/lib/roo/excel2003xml.rb +0 -300
  54. data/lib/roo/google.rb +0 -292
  55. data/lib/roo/roo_rails_helper.rb +0 -83
  56. data/lib/roo/worksheet.rb +0 -18
  57. data/scripts/txt2html +0 -67
  58. data/spec/lib/roo/excel2003xml_spec.rb +0 -15
  59. data/spec/lib/roo/excel_spec.rb +0 -17
  60. data/spec/lib/roo/google_spec.rb +0 -64
  61. data/test/files/1900_base.xls +0 -0
  62. data/test/files/1900_base.xlsx +0 -0
  63. data/test/files/1904_base.xls +0 -0
  64. data/test/files/1904_base.xlsx +0 -0
  65. data/test/files/Bibelbund.csv +0 -3741
  66. data/test/files/Bibelbund.ods +0 -0
  67. data/test/files/Bibelbund.xls +0 -0
  68. data/test/files/Bibelbund.xlsx +0 -0
  69. data/test/files/Bibelbund.xml +0 -62518
  70. data/test/files/Bibelbund1.ods +0 -0
  71. data/test/files/Pfand_from_windows_phone.xlsx +0 -0
  72. data/test/files/bad_excel_date.xls +0 -0
  73. data/test/files/bbu.ods +0 -0
  74. data/test/files/bbu.xls +0 -0
  75. data/test/files/bbu.xlsx +0 -0
  76. data/test/files/bbu.xml +0 -152
  77. data/test/files/bode-v1.ods.zip +0 -0
  78. data/test/files/bode-v1.xls.zip +0 -0
  79. data/test/files/boolean.csv +0 -2
  80. data/test/files/boolean.ods +0 -0
  81. data/test/files/boolean.xls +0 -0
  82. data/test/files/boolean.xlsx +0 -0
  83. data/test/files/boolean.xml +0 -112
  84. data/test/files/borders.ods +0 -0
  85. data/test/files/borders.xls +0 -0
  86. data/test/files/borders.xlsx +0 -0
  87. data/test/files/borders.xml +0 -144
  88. data/test/files/bug-numbered-sheet-names.xlsx +0 -0
  89. data/test/files/bug-row-column-fixnum-float.xls +0 -0
  90. data/test/files/bug-row-column-fixnum-float.xml +0 -127
  91. data/test/files/comments.ods +0 -0
  92. data/test/files/comments.xls +0 -0
  93. data/test/files/comments.xlsx +0 -0
  94. data/test/files/csvtypes.csv +0 -1
  95. data/test/files/datetime.ods +0 -0
  96. data/test/files/datetime.xls +0 -0
  97. data/test/files/datetime.xlsx +0 -0
  98. data/test/files/datetime.xml +0 -142
  99. data/test/files/datetime_floatconv.xls +0 -0
  100. data/test/files/datetime_floatconv.xml +0 -148
  101. data/test/files/dreimalvier.ods +0 -0
  102. data/test/files/emptysheets.ods +0 -0
  103. data/test/files/emptysheets.xls +0 -0
  104. data/test/files/emptysheets.xlsx +0 -0
  105. data/test/files/emptysheets.xml +0 -105
  106. data/test/files/excel2003.xml +0 -21140
  107. data/test/files/false_encoding.xls +0 -0
  108. data/test/files/false_encoding.xml +0 -132
  109. data/test/files/file_item_error.xlsx +0 -0
  110. data/test/files/formula.ods +0 -0
  111. data/test/files/formula.xls +0 -0
  112. data/test/files/formula.xlsx +0 -0
  113. data/test/files/formula.xml +0 -134
  114. data/test/files/formula_parse_error.xls +0 -0
  115. data/test/files/formula_parse_error.xml +0 -1833
  116. data/test/files/formula_string_error.xlsx +0 -0
  117. data/test/files/html-escape.ods +0 -0
  118. data/test/files/link.xls +0 -0
  119. data/test/files/link.xlsx +0 -0
  120. data/test/files/matrix.ods +0 -0
  121. data/test/files/matrix.xls +0 -0
  122. data/test/files/named_cells.ods +0 -0
  123. data/test/files/named_cells.xls +0 -0
  124. data/test/files/named_cells.xlsx +0 -0
  125. data/test/files/no_spreadsheet_file.txt +0 -1
  126. data/test/files/numbers1.csv +0 -18
  127. data/test/files/numbers1.ods +0 -0
  128. data/test/files/numbers1.xls +0 -0
  129. data/test/files/numbers1.xlsx +0 -0
  130. data/test/files/numbers1.xml +0 -312
  131. data/test/files/numeric-link.xlsx +0 -0
  132. data/test/files/only_one_sheet.ods +0 -0
  133. data/test/files/only_one_sheet.xls +0 -0
  134. data/test/files/only_one_sheet.xlsx +0 -0
  135. data/test/files/only_one_sheet.xml +0 -67
  136. data/test/files/paragraph.ods +0 -0
  137. data/test/files/paragraph.xls +0 -0
  138. data/test/files/paragraph.xlsx +0 -0
  139. data/test/files/paragraph.xml +0 -127
  140. data/test/files/prova.xls +0 -0
  141. data/test/files/ric.ods +0 -0
  142. data/test/files/simple_spreadsheet.ods +0 -0
  143. data/test/files/simple_spreadsheet.xls +0 -0
  144. data/test/files/simple_spreadsheet.xlsx +0 -0
  145. data/test/files/simple_spreadsheet.xml +0 -225
  146. data/test/files/simple_spreadsheet_from_italo.ods +0 -0
  147. data/test/files/simple_spreadsheet_from_italo.xls +0 -0
  148. data/test/files/simple_spreadsheet_from_italo.xml +0 -242
  149. data/test/files/so_datetime.csv +0 -7
  150. data/test/files/style.ods +0 -0
  151. data/test/files/style.xls +0 -0
  152. data/test/files/style.xlsx +0 -0
  153. data/test/files/style.xml +0 -154
  154. data/test/files/time-test.csv +0 -2
  155. data/test/files/time-test.ods +0 -0
  156. data/test/files/time-test.xls +0 -0
  157. data/test/files/time-test.xlsx +0 -0
  158. data/test/files/time-test.xml +0 -131
  159. data/test/files/type_excel.ods +0 -0
  160. data/test/files/type_excel.xlsx +0 -0
  161. data/test/files/type_excelx.ods +0 -0
  162. data/test/files/type_excelx.xls +0 -0
  163. data/test/files/type_openoffice.xls +0 -0
  164. data/test/files/type_openoffice.xlsx +0 -0
  165. data/test/files/whitespace.ods +0 -0
  166. data/test/files/whitespace.xls +0 -0
  167. data/test/files/whitespace.xlsx +0 -0
  168. data/test/files/whitespace.xml +0 -184
  169. data/test/rm_sub_test.rb +0 -12
  170. data/test/rm_test.rb +0 -7
  171. data/website/index.html +0 -385
  172. data/website/index.txt +0 -423
  173. data/website/javascripts/rounded_corners_lite.inc.js +0 -285
  174. data/website/stylesheets/screen.css +0 -130
  175. data/website/template.rhtml +0 -48
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2469a06f8110bdaa52d7a0aa1b9c5c870034b3d8
4
- data.tar.gz: 5211e3ae85961fc29376156120569220cbfbbe7b
3
+ metadata.gz: db86b4586034783940303cfd17a7ee5c60277a51
4
+ data.tar.gz: 2cf9222f2f2759f164164f745c72abe6b901df98
5
5
  SHA512:
6
- metadata.gz: bbae1e0e681f369f4ec0ee8c71a880c3b6fe24cc815cde0b337bd63e77a0103edf04b77de320a212e772a8ac1a68ad9ee5f5be3b52672806fbc18592536db83d
7
- data.tar.gz: 91a54b399f41ee9d459b9bb3868c5cd2990963297c274f4dc5f4a78034137a8c617f9ac34db75418e8f0989683219637cb9a096536259e9cb76fe9cca780b132
6
+ metadata.gz: 442e05a8bffdc839c45a8684e8882f4327098387617b76027b6b5c0543c2a7b4be284c511c35f8333c9bc1147e31350d1f6f67174fc62e5b7fc45520ab0ad307
7
+ data.tar.gz: 4ba67602e5772cae52f41ea0357ddd6835d25c35be57797307a6194a46ad977d7922b884b4fa826c91efd8533c6f3e56995e8cb0a13146a32e4a3ee7d5e42ae9
data/.gitignore ADDED
@@ -0,0 +1,7 @@
1
+ /pkg/
2
+ /log/
3
+ /coverage/
4
+ .ruby-version
5
+ .project
6
+ *.lock
7
+ .idea
data/.simplecov ADDED
@@ -0,0 +1,4 @@
1
+ SimpleCov.start do
2
+ add_filter 'spec'
3
+ add_filter 'test'
4
+ end
data/.travis.yml ADDED
@@ -0,0 +1,13 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 2.1
5
+ - 2.2.0
6
+ - ruby-head
7
+ - jruby-19mode # JRuby in 1.9 mode
8
+ - rbx-2
9
+ matrix:
10
+ allow_failures:
11
+ - rvm: ruby-head
12
+ - rvm: jruby-19mode
13
+ bundler_args: --without local_development
data/CHANGELOG.md ADDED
@@ -0,0 +1,515 @@
1
+ ## [2.0.1] - 2015-06-01
2
+ ### Added
3
+ - Return an enumerator when calling '#each' without a block [#219](https://github.com/roo-rb/roo/pull/219)
4
+ - Added Roo::Base#close to delete any temp directories[#211](https://github.com/roo-rb/roo/pull/211)
5
+ - Offset option for excelx #each_row. [#214](https://github.com/roo-rb/roo/pull/214)
6
+ - Allow Roo::Excelx to open streams [#209](https://github.com/roo-rb/roo/pull/209)
7
+
8
+ ### Fixed
9
+ - Use gsub instead of tr for double quote escaping [#212](https://github.com/roo-rb/roo/pull/212), [#212-patch](https://github.com/roo-rb/roo/commit/fcc9a015868ebf9d42cbba5b6cfdaa58b81ecc01)
10
+ - Fixed Changelog links and release data. [#204](https://github.com/roo-rb/roo/pull/204), [#206](https://github.com/roo-rb/roo/pull/206)
11
+ - Allow Pathnames to be used when opening files. [#207](https://github.com/roo-rb/roo/pull/207)
12
+
13
+ ### Removed
14
+ - Removed the scripts folder. [#213](https://github.com/roo-rb/roo/pull/213)
15
+
16
+ ## [2.0.0] - 2015-04-24
17
+ ### Added
18
+ - Added optional support for hidden sheets in Excelx and LibreOffice files [#177](https://github.com/roo-rb/roo/pull/177)
19
+ - Roo::OpenOffice can be used to open encrypted workbooks. [#157](https://github.com/roo-rb/roo/pull/157)
20
+ - Added streaming for parsing of large Excelx Sheets. [#69](https://github.com/roo-rb/roo/pull/69)
21
+ - Added Roo::Base#first_last_row_col_for_sheet [a0dd800](https://github.com/roo-rb/roo/commit/a0dd800d5cf0de052583afa91bf82f8802ede9a0)
22
+ - Added Roo::Base#collect_last_row_col_for_sheet [a0dd800](https://github.com/roo-rb/roo/commit/a0dd800d5cf0de052583afa91bf82f8802ede9a0)
23
+ - Added Roo::Base::MAX_ROW_COL, Roo::Base::MIN_ROW_COL [a0dd800](https://github.com/roo-rb/roo/commit/a0dd800d5cf0de052583afa91bf82f8802ede9a0)
24
+ - Extract Roo::Font to replace equivalent uses in Excelx and OpenOffice. [23e19de](https://github.com/roo-rb/roo/commit/23e19de1ccc64b2b02a80090ff6666008a29c43b)
25
+ - Roo::Utils [3169a0e](https://github.com/roo-rb/roo/commit/3169a0e803ce742d2cbf9be834d27a5098a68638)
26
+ - Roo::ExcelxComments [0a43341](https://github.com/roo-rb/roo/commit/0a433413210b5559dc92d743a72a1f38ee775f5f)
27
+ [0a43341](https://github.com/roo-rb/roo/commit/0a433413210b5559dc92d743a72a1f38ee775f5f)
28
+ - Roo::Excelx::Relationships [0a43341](https://github.com/roo-rb/roo/commit/0a433413210b5559dc92d743a72a1f38ee775f5f)
29
+ - Roo::Excelx::SheetDoc [0a43341](https://github.com/roo-rb/roo/commit/0a433413210b5559dc92d743a72a1f38ee775f5f)
30
+ [c2bb7b8](https://github.com/roo-rb/roo/commit/c2bb7b8614f4ff1dff6b7bdbda0ded125ae549c7)
31
+ +- Roo::Excelx::Styles [c2bb7b8](https://github.com/roo-rb/roo/commit/c2bb7b8614f4ff1dff6b7bdbda0ded125ae549c7)
32
+ +- Roo::Excelx::Workbook [c2bb7b8](https://github.com/roo-rb/roo/commit/c2bb7b8614f4ff1dff6b7bdbda0ded125ae549c7)
33
+ - Switch from Spreadsheet::Link to Roo::Link [ee67321](https://github.com/roo-rb/roo/commit/ee6732144f3616631d19ade0c5490e1678231ce2)
34
+ - Roo::Base#to_csv: Added separator parameter (defaults to ",") [#102](https://github.com/roo-rb/roo/pull/102)
35
+ - Added development development gems [#104](https://github.com/roo-rb/roo/pull/104)
36
+
37
+ ### Changed
38
+ - Reduced size of published gem. [#194](https://github.com/roo-rb/roo/pull/194)
39
+ - Stream the reading of the dimensions [#192](https://github.com/roo-rb/roo/pull/192)
40
+ - Return `nil` when a querying a cell that doesn't exist (instead of a NoMethodError) [#192](https://github.com/roo-rb/roo/pull/192), [#165](https://github.com/roo-rb/roo/pull/165)
41
+ - Roo::OpenOffice#formula? now returns a `Boolean` instead of a `String` or `nil` [#191](https://github.com/roo-rb/roo/pull/191)
42
+ - Added a less verbose Roo::Base#inspect. It no longer returns the entire object. [#188](https://github.com/roo-rb/roo/pull/188), [#186](https://github.com/roo-rb/roo/pull/186)
43
+ - Memoize Roo::Utils.split_coordinate [#180](https://github.com/roo-rb/roo/pull/180)
44
+ - Roo::Base: use regular expressions for extracting headers [#173](https://github.com/roo-rb/roo/pull/173)
45
+ - Roo::Base: memoized `first_row`/`last_row` `first_column`/`last_column` and changed the default value of the `sheet` argument from `nil` to `default_sheet` [a0dd800](https://github.com/roo-rb/roo/commit/a0dd800d5cf0de052583afa91bf82f8802ede9a0)
46
+ - Roo::Base: changed the order of arguments for `to_csv` to (filename = nil, separator = ',', sheet = default_sheet) from (filename=nil,sheet=nil) [1e82a21](https://github.com/roo-rb/roo/commit/1e82a218087ba34379ae7312214911b104333e2c)
47
+ - In OpenOffice / LibreOffice, load the content xml lazily. Leave the tmpdir open so that reading may take place after initialize. The OS will be responsible for cleaning it up. [adb204b](https://github.com/roo-rb/roo/commit/a74157adb204bc93d289c5708e8e79e143d09037)
48
+ - Lazily initialize @default_sheet, to avoid reading the sheets earlier than necessary. Use the #default_sheet accessor instead. [704e3dc](https://github.com/roo-rb/roo/commit/704e3dca1692d84ac4877f04a7e46238772d423b)
49
+ - Roo::Base#default_sheet is no longer an attr_reader [704e3dc](https://github.com/roo-rb/roo/commit/704e3dca1692d84ac4877f04a7e46238772d423b)
50
+ - In Excelx, load styles, shared strings and the workbook lazily. Leave the tmpdir open so that reading may take place after initialize. The OS will be responsible for cleaning it up. [a973237](https://github.com/roo-rb/roo/commit/a9732372f531e435a3330d8ab5bd44ce2cb57b0b), [4834e20c](https://github.com/roo-rb/roo/commit/4834e20c6c4d2086414c43f8b0cc2d1413b45a61), [e49a1da](https://github.com/roo-rb/roo/commit/e49a1da22946918992873e8cd5bacc15ea2c73c4)
51
+ - Change the tmpdir prefix from oo_ to roo_ [102d5fc](https://github.com/roo-rb/roo/commit/102d5fce30b46e928807bc60f607f81956ed898b)
52
+ - Accept the tmpdir_root option in Roo::Excelx [0e325b6](https://github.com/roo-rb/roo/commit/0e325b68f199ff278b26bd621371ed42fa999f24)
53
+ - Refactored Excelx#comment? [0fb90ec](https://github.com/roo-rb/roo/commit/0fb90ecf6a8f422ef16a7105a1d2c42d611556c3)
54
+ - Refactored Roo::Base#find, #find_by_row, #find_by_conditions. [1ccedab](https://github.com/roo-rb/roo/commit/1ccedab3fb656f4614f0a85e9b0a286ad83f5c1e)
55
+ - Extended Roo::Spreadsheet.open so that it accepts Tempfiles and other arguments responding to `path`. Note they require an :extension option to be declared, as the tempfile mangles the extension. [#84](https://github.com/roo-rb/roo/pull/84).
56
+
57
+ ### Fixed
58
+ - Process sheets from Numbers 3.1 xlsx files in the right order. [#196](https://github.com/roo-rb/roo/pull/196), [#181](https://github.com/roo-rb/roo/pull/181), [#114](https://github.com/roo-rb/roo/pull/114)
59
+ - Fixed comments for xlsx files exported from Google [#197](https://github.com/roo-rb/roo/pull/197)
60
+ - Fixed Roo::Excelx#celltype to return :link when appropriate.
61
+ - Fixed type coercion of ids. [#192](https://github.com/roo-rb/roo/pull/192)
62
+ - Clean option only removes spaces and control characters instead of removing all characters outside of the ASCII range. [#176](https://github.com/roo-rb/roo/pull/176)
63
+ - Fixed parse method with `clean` option [#184](https://github.com/roo-rb/roo/pull/184)
64
+ - Fixed some memory issues.
65
+ - Fixed Roo::Utils.number_to_letter [#180](https://github.com/roo-rb/roo/pull/180)
66
+ - Fixed merged cells return value. Instead of only the top-left cell returning a value, all merged cells return that value instead of returning nil. [#171](https://github.com/roo-rb/roo/pull/171)
67
+ - Handle headers with brackets [#162](https://github.com/roo-rb/roo/pull/162)
68
+ - Roo::Base#sheet method was not returning the sheet specified when using either an index or name [#160](https://github.com/roo-rb/roo/pull/160)
69
+ - Properly process paths with spaces. [#142](https://github.com/roo-rb/roo/pull/142), [#121](https://github.com/roo-rb/roo/pull/121), [#94](https://github.com/roo-rb/roo/pull/94), [4e7d7d1](https://github.com/roo-rb/roo/commit/4e7d7d18d37654b0c73b229f31ea0d305c7e90ff)
70
+ - Disambiguate #open call in Excelx#extract_file. [#125](https://github.com/roo-rb/roo/pull/125)
71
+ - Fixed that #parse-ing with a hash of columns not in the document would fail mysteriously. [#129](https://github.com/roo-rb/roo/pull/129)
72
+ - Fixed Excelx issue when reading hyperlinks [#123](https://github.com/roo-rb/roo/pull/123)
73
+ - Fixed invalid test case [#124](https://github.com/roo-rb/roo/pull/124)
74
+ - Fixed error in test helper file_diff [56e2e61](https://github.com/roo-rb/roo/commit/56e2e61d1ad9185d8ab0d4af4b32928f07fdaad0)
75
+ - Stopped `inspect` from being called recursively. [#115](https://github.com/roo-rb/roo/pull/115)
76
+ - Fixes for Excelx Datetime cells. [#104](https://github.com/roo-rb/roo/pull/104), [#120](https://github.com/roo-rb/roo/pull/120)
77
+ - Prevent ArgumentError when using `find` [#100](https://github.com/roo-rb/roo/pull/100)
78
+ - Export to_csv converts link cells to url [#93](https://github.com/roo-rb/roo/pull/93), [#108](https://github.com/roo-rb/roo/pull/108)
79
+
80
+ ### Removed
81
+ - Roo::Excel - Extracted to roo-xls gem. [a7edbec](https://github.com/roo-rb/roo/commit/a7edbec2eb44344611f82cff89a82dac31ec0d79)
82
+ - Roo::Excel2003XML - Extracted to roo-xls gem. [a7edbec](https://github.com/roo-rb/roo/commit/a7edbec2eb44344611f82cff89a82dac31ec0d79)
83
+ - Roo::Google - Extracted to roo-google gem. [a7edbec](https://github.com/roo-rb/roo/commit/a7edbec2eb44344611f82cff89a82dac31ec0d79)
84
+ - Roo::OpenOffice::Font - Refactored into Roo::Font
85
+ - Removed Roo::OpenOffice.extract_content [a74157a](https://github.com/roo-rb/roo/commit/a74157adb204bc93d289c5708e8e79e143d09037)
86
+ - Removed OpenOffice.process_zipfile [835368e](https://github.com/roo-rb/roo/commit/835368e1d29c1530f00bf9caa07704b17370e38f)
87
+ - Roo::OpenOffice#comment?
88
+ - Roo::ZipFile - Removed the Roo::ZipFile abstraction. Roo now depends on rubyzip 1.0.0+ [d466950](https://github.com/roo-rb/roo/commit/d4669503b5b80c1d30f035177a2b0e4b56fc49ce)
89
+ - SpreadSheet::Worksheet - Extracted to roo-xls gem. [a7edbec](https://github.com/roo-rb/roo/commit/a7edbec2eb44344611f82cff89a82dac31ec0d79)
90
+ - Spreadsheet - Extracted to roo-xls gem. [a7edbec](https://github.com/roo-rb/roo/commit/a7edbec2eb44344611f82cff89a82dac31ec0d79)
91
+
92
+ ## [1.13.2] - 2013-12-23
93
+ ### Fixed
94
+ - Fix that Excelx link-cells would blow up if the value wasn't a string. Due to the way Spreadsheet::Link is implemented the link text must be treated as a string. #92
95
+
96
+ ## [1.13.1] - 2013-12-23
97
+ ### Fixed
98
+ - Fix that Excelx creation could blow up due to nil rels files. #90
99
+
100
+ ## [1.13.0] - 2013-12-05
101
+ ### Changed / Added
102
+ - Support extracting link data from Excel and Excelx spreadsheets,
103
+ via Excel#read_cell() and Excelx#hyperlink(?). #47
104
+ - Support setting the Excel Spreadsheet mode via the :mode option. #88
105
+ - Support Spreadsheet.open with a declared :extension that includes a leading '.'. #73
106
+ - Enable file type detection for URI's with parameters / anchors. #51
107
+
108
+ ### Fixed
109
+ - Fix that CSV#each_row could overwrite the filename when run against a uri. #77
110
+ - Fix that #to_matrix wasn't respecting the sheet argument. #87
111
+
112
+ ## [1.12.2] - 2013-09-11
113
+ ### Changed / Added
114
+ - Support rubyzip >= 1.0.0. #65
115
+ - Fix typo in deprecation notices. #63
116
+
117
+ ## [1.12.1] - 2013-08-18
118
+ ### Changed / Added
119
+ - Support :boolean fields for CSV export via #cell_to_csv. #59
120
+
121
+ ### Fixed
122
+ - Fix that Excelx would error on files with gaps in the numbering of their
123
+ internal sheet#.xml files. #58
124
+ - Fix that Base#info to preserve the original value of #default_sheet. #44
125
+
126
+ ## [1.12.0] - 2013-08-18
127
+ ### Deprecated
128
+ - Rename Openoffice -> OpenOffice, Libreoffice -> LibreOffice, Csv -> CSV, and redirect the old names to the new constants
129
+ - Enable Roo::Excel, Excel2003XML, Excelx, OpenOffice to accept an options hash, and deprecate the old method argument based approach to supplying them options
130
+ - 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.
131
+
132
+ ### Changed / Added
133
+ - Add Roo::Excelx#load_xml so that people can customize to their data, e.g. #23
134
+ - Enable passing csv_options to Roo::CSV, which are passed through to the underlying CSV call.
135
+ - Enable passing options through from Roo::Spreadsheet to any Roo type.
136
+ - Enable passing an :extension option to Roo::Spreadsheet.new, which will override the extension detected on in the path #15
137
+ - Switch from google-spreadsheet-ruby to google_drive for Roo::Google access #40
138
+ - Make all the classes consistent in that #read_cells is only effective if the sheet has not been read.
139
+ - Roo::Google supports login via oauth :access_token. #61
140
+ - Roo::Excel now exposes its Spreadsheet workbook via #workbook
141
+ - Pull #load_xml down into Roo::Base, and use it in Excel2003XML and OpenOffice.
142
+
143
+ ### Changed
144
+ - #formula? now returns truthy or falsey, rather than true/false.
145
+ - Base#longest_sheet was moved to Excel, as it only worked under Excel
146
+
147
+ ### Fixed
148
+ - Fix that Roo::CSV#parse(headers: true) would blow up. #37
149
+
150
+ ## [1.11.2] - 2013-04-10
151
+
152
+ ### Fixed
153
+ - Fix that Roo::Spreadsheet.open wasn't tolerant to case differences.
154
+ - Fix that Roo::Excel2003XML loading was broken #27
155
+ - Enable loading Roo::Csv files from uris, just as other file types #31
156
+ - Fix that Excelx "m/d/yy h:mm" was improperly being interpreted as date rather
157
+ than datetime #29
158
+
159
+ ## [1.11.1] - 2013-03-18
160
+ ### Fixed
161
+ - Exclude test/log/roo.log test log file from the gemspec in order to avoid a
162
+ rubygems warning: #26
163
+
164
+ ## [1.11.0] - 2013-03-14
165
+ ### Changed / Added
166
+ - Support ruby 2.0.0 by replacing Iconv with String#encode #19
167
+ - Excelx: Loosen the format detection rules such that more are
168
+ successfully detected #20
169
+ - Delete the roo binary, which was useless and not declared in the gemspec
170
+
171
+ ### Changed
172
+ - Drop support for ruby 1.8.x or lower. Required in order to easily support 2.0.0.
173
+
174
+ ## [1.10.3] - 2013-03-03
175
+ ### Fixed
176
+ - Support both nokogiri 1.5.5 and 1.5.6 (Karsten Richter) #18
177
+
178
+ ### Changed / Added
179
+ - Relax our nokogiri dependency back to 1.4.0, as we have no particular reason
180
+ to require a newer version.
181
+
182
+ ## [1.10.2] - 2013-02-03
183
+ ### Fixed
184
+ - Support opening URIs with query strings https://github.com/Empact/roo/commit/abf94bdb59cabc16d4f7764025e88e3661983525
185
+ - Support both http: & https: urls https://github.com/Empact/roo/commit/fc5c5899d96dd5f9fbb68125d0efc8ce9be2c7e1
186
+
187
+ ## [1.10.1] - 2011-11-14
188
+ ### Fixed
189
+ - forgot dependency 'rubyzip'
190
+ - 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.
191
+
192
+ ## [1.10.0] - 2011-10-10
193
+ ### Changed / Added
194
+ - New class Csv.
195
+ - Openoffice, Libreoffice: new method 'labels'
196
+ - Excelx: implemented all methods concerning labels
197
+ - Openoffice, Excelx: new methods concerning comments (comment, comment? and comments)
198
+
199
+ ### Fixed
200
+ - XLSX: some cells were not recognized correctly from a spreadsheet file from a windows mobile phone.
201
+ - labels: Moved to a separate methode. There were problems if there was an access to a label before read_cells were called.
202
+
203
+ ## [1.9.7] - 2011-08-27
204
+ ### Fixed
205
+ - Openoffice: Better way for extracting formula strings, some characters were deleted at the formula string.
206
+
207
+ ## [1.9.6] - 2011-08-03
208
+ ### Changed / Added
209
+ - new class Libreoffice (Libreoffice should do exactly the same as the Openoffice
210
+ class. It's just another name. Technically, Libreoffice is inherited from
211
+ the Openoffice class with no new methods.
212
+
213
+ ### Fixed
214
+ - Openoffice: file type check, deletion of temporary files not in ensure clause
215
+ - Cell type :datetime was not handled in the to_csv method
216
+ - Better deletion of temporary directories if something went wrong
217
+
218
+ ## [1.9.5] - 2011-06-25
219
+ ### Changed / Added
220
+ - Method #formulas moved to generic-spreadsheet class (the Excel version is
221
+ overwritten because the spreadsheet gem currently does not support
222
+ formulas.
223
+
224
+ ### Fixed
225
+ - Openoffice/Excelx/Google: #formulas of an empty sheet should not result
226
+ in an error message. Instead it should return an empty array.
227
+ - Openoffice/Excelx/Google: #to_yaml of an empty sheet should not result
228
+ in an error message. Instead it should return an empty string.
229
+ - Openoffice/Excelx/Google: #to_matrix of an empty sheet should not result
230
+ in an error message. Instead it should return an empty matrix.
231
+
232
+ ## [1.9.4] - 2011-06-23
233
+ ### Changed / Added
234
+ - removed gem 'builder'. Functionality goes to gem 'nokogiri'.
235
+
236
+ ### Fixed
237
+ - Excel: remove temporary files if spreadsheed-file is not an excel file
238
+ and an exception was raised
239
+ - Excelx: a referenced cell with a string had the content 0.0 not the
240
+ correct string
241
+ - Fixed a problem with a date cell which was not recognized as a Date
242
+ object (see 2011-05-21 in excelx.rb)
243
+
244
+ ## [1.9.3] - 2010-02-12
245
+ ### Changed / Added
246
+ - new method 'to_matrix'
247
+
248
+ ### Fixed
249
+ - missing dependencies defined
250
+
251
+ ## [1.9.2] - 2009-12-08
252
+ ### Fixed
253
+ - double quoting of '"' fixed
254
+
255
+ ## [1.9.1] - 2009-11-10
256
+ ### Fixed
257
+ - syntax in nokogiri methods
258
+ - missing dependency ...rubyzip
259
+
260
+ ## [1.9.0] - 2009-10-29
261
+ ### Changed / Added
262
+ - Ruby 1.9 compatible
263
+ - oo.aa42 as a shortcut of oo.cell('aa',42)
264
+ - oo.aa42('sheet1') as a shortcut of oo.cell('aa',42,'sheet1')
265
+ - oo.anton as a reference to a cell labelled 'anton' (or any other label name)
266
+ (currently only for Openoffice spreadsheets)
267
+
268
+ ## [1.2.3] - 2009-01-04
269
+ ### Fixed
270
+ - fixed encoding in #cell at exported Google-spreadsheets (.xls)
271
+
272
+ ## [1.2.2] - 2008-12-14
273
+ ### Changed / Added
274
+ - added celltype :datetime in Excelx
275
+ - added celltype :datetime in Google
276
+
277
+ ## [1.2.1] - 2008-11-13
278
+ ### Changed / Added
279
+ - added celltype :datetime in Openoffice and Excel
280
+
281
+ ## [1.2.0] - 2008-08-24
282
+ ### Changed / Added
283
+ - Excelx: improved the detection of cell type and conversion into roo types
284
+ - All: to_csv: changed boundaries from first_row,1..last_row,last_column to 1,1..last_row,last_column
285
+ - All: Environment variable "ROO_TMP" indicate where temporary directories will be created (if not set the default is the current working directory)
286
+
287
+ ### Fixed
288
+ - Excel: improved the detection of last_row/last_column (parseexcel-gem bug?)
289
+ - Excel/Excelx/Openoffice: temporary directories were not removed at opening a file of the wrong type
290
+
291
+ ## [1.1.0] - 2008-07-26
292
+ ### Changed / Added
293
+ - Excel: speed improvements
294
+ - Changed the behavior of reading files with the wrong type
295
+
296
+ ### Fixed
297
+ - Google: added normalize in set_value method
298
+ - Excel: last_row in Excel class did not work properly under some circumstances
299
+ - all: fixed a bug in #to_xml if there is an empty sheet
300
+
301
+ ## [1.0.2] - 2008-07-04
302
+ ### Fixed
303
+ - Excelx: fixed a bug when there are .xml.rels files in the XLSX archive
304
+ - Excelx: fixed a bug with celltype recognition (see comment with "2008-07-03")
305
+
306
+ ## [1.0.1] - 2008-06-30
307
+ ### Fixed
308
+ - Excel: row/column method Fixnum/Float confusion
309
+
310
+ ## [1.0.0] - 2008-05-28
311
+ ### Changed / Added
312
+ - support of Excel's new .xlsx file format
313
+ - method #to_xml for exporting a spreadsheet to an xml representation
314
+
315
+ ### Fixed
316
+ - fixed a bug with excel-spreadsheet character conversion under Macintosh Darwin
317
+
318
+ ## [0.9.4] - 2008-04-22
319
+ ### Fixed
320
+ - fixed a bug with excel-spreadsheet character conversion under Solaris
321
+
322
+ ## [0.9.3] - 2008-03-25
323
+ ### Fixed
324
+ - no more tmp directories if an invalid spreadsheet file was openend
325
+
326
+ ## [0.9.2] - 2008-03-24
327
+ ### Changed / Added
328
+ - new celltype :time
329
+
330
+ ### Fixed
331
+ - time values like '23:15' are handled as seconds from midnight
332
+
333
+ ## [0.9.1] - 2008-03-23
334
+ ### Changed / Added
335
+ - additional 'sheet' parameter in Google#set_value
336
+
337
+ ### Fixed
338
+ - fixed a bug within Google#set_value. thanks to davecahill <dpcahill@gmail.com> for the patch.
339
+
340
+ ## [0.9.0] - 2008-01-24
341
+ ### Changed / Added
342
+ - better support of roo spreadsheets in rails views
343
+
344
+ ## [0.8.5] - 2008-01-16
345
+ ### Fixed
346
+ - fixed a bug within #to_cvs and explicit call of a sheet
347
+
348
+ ## [0.8.4] - 2008-01-01
349
+ ### Fixed
350
+ - fixed 'find_by_condition' for excel sheets (header_line= --> GenericSpredsheet)
351
+
352
+ ## [0.8.3] - 2007-12-31
353
+ ### Fixed
354
+ - another fix for the encoding issue in excel sheet-names
355
+ - reactived the Excel#find method which has been disappeared in the last restructoring, moved to GenericSpreadsheet
356
+
357
+ ## [0.8.2] - 2007-12-28
358
+ ### Changed / Added
359
+ - basename() only in method #info
360
+
361
+ ### Fixed
362
+ - changed logging-method to mysql-database in test code with AR, table column 'class' => 'class_name'
363
+ - reactived the Excel#to_csv method which has been disappeared in the last restructoring
364
+
365
+ ## [0.8.1] - 2007-12-22
366
+ ### Fixed
367
+ - fixed a bug with first/last-row/column in empty sheet
368
+ - #info prints now '- empty -' if a sheet within a document is empty
369
+ - tried to fix the iconv conversion problem
370
+
371
+ ## [0.8.0] - 2007-12-15
372
+ ### Changed / Added
373
+ - Google online spreadsheets were implemented
374
+ - some methods common to more than one class were factored out to the GenericSpreadsheet (virtual) class
375
+
376
+ ## [0.7.0] - 2007-11-23
377
+ ### Changed / Added
378
+ - Openoffice/Excel: the most methods can be called with an option 'sheet'
379
+ parameter which will be used instead of the default sheet
380
+ - Excel: improved the speed of CVS output
381
+ - Openoffice/Excel: new method #column
382
+ - Openoffice/Excel: new method #find
383
+ - Openoffice/Excel: new method #info
384
+ - better exception if a spreadsheet file does not exist
385
+
386
+ ## [0.6.1] - 2007-10-06
387
+ ### Changed / Added
388
+ - Openoffice: percentage-values are now treated as numbers (not strings)
389
+ - Openoffice: refactoring
390
+
391
+ ### Fixed
392
+ - Openoffice: repeating date-values in a line are now handled correctly
393
+
394
+ ## [0.6.0] - 2007-10-06
395
+ ### Changed / Added
396
+ - csv-output to stdout or file
397
+
398
+ ## [0.5.4] - 2007-08-27
399
+ ### Fixed
400
+ - Openoffice: fixed a bug with internal representation of a spreadsheet (thanks to Ric Kamicar for the patch)
401
+
402
+ ## [0.5.3] - 2007-08-26
403
+ ### Changed / Added
404
+ - Openoffice: can now read zip-ed files
405
+ - Openoffice: can now read files from http://-URL over the net
406
+
407
+ ## [0.5.2] - 2007-08-26
408
+ ### Fixed
409
+ - excel: removed debugging output
410
+
411
+ ## [0.5.1] - 2007-08-26
412
+ ### Changed / Added
413
+ - Openoffice: Exception if an illegal sheet-name is selected
414
+ - Openoffice/Excel: no need to set a default_sheet if there is only one in
415
+ the document
416
+ - Excel: can now read zip-ed files
417
+ - Excel: can now read files from http://-URL over the net
418
+
419
+ ## [0.5.0] - 2007-07-20
420
+ ### Changed / Added
421
+ - Excel-objects: the methods default_sheet= and sheets can now handle names instead of numbers
422
+ ### Changedd 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)
423
+ - tests can now run on the client machine (not only my machine), if there are not public released files involved these tests are skipped
424
+
425
+ ## [0.4.1] - 2007-06-27
426
+ ### Fixed
427
+ - there was ONE false require-statement which led to misleading error messageswhen this gem was used
428
+
429
+ ## [0.4.0] - 2007-06-27
430
+ ### Changed / Added
431
+ - robustness: Exception if no default_sheet was set
432
+ - new method reload() implemented
433
+ - about 15 % more method documentation
434
+ - optimization: huge increase of speed (no need to use fixed borders anymore)
435
+ - added the method 'formulas' which gives you all formulas in a spreadsheet
436
+ - added the method 'set' which can set cells to a certain value
437
+ - added the method 'to_yaml' which can produce output for importing in a (rails) database
438
+
439
+ ### Fixed
440
+ - ..row_as_letter methods were nonsense - removed
441
+ - @cells_read should be reset if the default_sheet is changed
442
+ - 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)
443
+ - fixed bug when default_sheet is changed
444
+
445
+ ## [0.3.0] - 2007-06-20
446
+ ### Changed / Added
447
+ - Openoffice: formula support
448
+
449
+ ## [0.2.7] - 2007-06-20
450
+ ### Fixed
451
+ - Excel: float-numbers were truncated to integer
452
+
453
+ ## [0.2.6] - 2007-06-19
454
+ ### Fixed
455
+ - Openoffice: two or more consecutive cells with string content failed
456
+
457
+ ## [0.2.5] - 2007-06-17
458
+ ### Changed / Added
459
+ - Excel: row method implemented
460
+ - more tests
461
+
462
+ ### Fixed
463
+ - Openoffice: row method fixed
464
+
465
+ ## [0.2.4] - 2007-06-16
466
+ ### Fixed
467
+ - ID 11605 Two cols with same value: crash roo (openoffice version only)
468
+
469
+ ## [0.2.3] - 2007-06-02
470
+ ### Changed / Added
471
+ - more robust call att Excel#default_sheet= when called with a name
472
+ - new method empty?
473
+ - refactoring
474
+
475
+ ### Fixed
476
+ - bugfix in Excel#celltype
477
+ - bugfix (running under windows only) in closing the temp file before removing it
478
+
479
+ ## [0.2.2] - 2007-06-01
480
+ ### Fixed
481
+ - correct pathname for running with windows
482
+
483
+ ## [0.2.2] - 2007-06-01
484
+ ### Fixed
485
+ - incorrect dependencies fixed
486
+
487
+ ## [0.2.0] - 2007-06-01
488
+ ### Changed / Added
489
+ - support for MS-Excel Spreadsheets
490
+
491
+ ## [0.1.2] - 2007-05-31
492
+ ### Changed / Added
493
+ - cells with more than one character, like 'AA' can now be handled
494
+
495
+ ## [0.1.1] - 2007-05-31
496
+ ### Fixed
497
+ - bugfixes in first/last methods
498
+
499
+ ## [0.1.0] - 2007-05-31
500
+ ### Changed / Added
501
+ - new methods first/last row/column
502
+ - new method officeversion
503
+
504
+ ## [0.0.3] - 2007-05-30
505
+ ### Changed / Added
506
+ - new method row()
507
+
508
+ ## [0.0.2] - 2007-05-30
509
+ ### Changed / Added
510
+ - fixed some bugs
511
+ - more ways to access a cell
512
+
513
+ ## [0.0.1] - 2007-05-25
514
+ ### Changed / Added
515
+ - Initial release
data/Gemfile CHANGED
@@ -1,18 +1,24 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
- gem 'spreadsheet', '> 0.6.4'
4
- gem 'nokogiri'
5
- gem 'rubyzip'
6
-
7
- group :development do
8
- gem 'google_drive'
9
- gem 'jeweler'
10
- end
3
+ gemspec
11
4
 
12
5
  group :test do
13
6
  # additional testing libs
14
7
  gem 'webmock'
15
8
  gem 'shoulda'
16
- gem 'rspec'
9
+ gem 'rspec', '>= 3.0.0'
17
10
  gem 'vcr'
11
+ gem 'simplecov', '>= 0.9.0', require: false
12
+ gem 'coveralls', require: false
13
+ end
14
+
15
+ group :local_development do
16
+ gem 'terminal-notifier-guard', require: false if RUBY_PLATFORM.downcase.include?('darwin')
17
+ gem 'guard-rspec', '>= 4.3.1', require: false
18
+ gem 'guard-minitest', require: false
19
+ gem 'guard-bundler', require: false
20
+ gem 'guard-preek', require: false
21
+ gem 'guard-rubocop', require: false
22
+ gem 'guard-reek', github: 'pericles/guard-reek', require: false
23
+ gem 'pry'
18
24
  end
data/Guardfile ADDED
@@ -0,0 +1,24 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard :minitest, test_folders: ['test'] do
5
+ watch(%r{^test/(.*)\/?test_(.*)\.rb$})
6
+ watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
7
+ watch(%r{^test/test_helper\.rb$}) { 'test' }
8
+ end
9
+
10
+ # Note: The cmd option is now required due to the increasing number of ways
11
+ # rspec may be run, below are examples of the most common uses.
12
+ # * bundler: 'bundle exec rspec'
13
+ # * bundler binstubs: 'bin/rspec'
14
+ # * spring: 'bin/rsspec' (This will use spring if running and you have
15
+ # installed the spring binstubs per the docs)
16
+ # * zeus: 'zeus rspec' (requires the server to be started separetly)
17
+ # * 'just' rspec: 'rspec'
18
+ guard :rspec, cmd: 'bundle exec rspec' do
19
+ watch(%r{^spec/.+_spec\.rb$})
20
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
21
+ watch('spec/spec_helper.rb') { "spec" }
22
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
23
+ end
24
+
data/LICENSE CHANGED
@@ -1,4 +1,6 @@
1
- Copyright (c) 2008-2013 Thomas Preymesser, Ben Woosley
1
+ Copyright (c) 2008-2014 Thomas Preymesser, Ben Woosley
2
+
3
+ MIT License
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining
4
6
  a copy of this software and associated documentation files (the