spreadsheet_architect 5.0.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -3
  3. data/README.md +22 -17
  4. data/lib/spreadsheet_architect/class_methods/xlsx.rb +0 -2
  5. data/lib/spreadsheet_architect/utils/xlsx.rb +3 -3
  6. data/lib/spreadsheet_architect/version.rb +1 -1
  7. metadata +5 -540
  8. data/lib/spreadsheet_architect/axlsx_string_width_patch.rb +0 -23
  9. data/test/dummy_app/Rakefile +0 -7
  10. data/test/dummy_app/app/assets/config/manifest.js +0 -3
  11. data/test/dummy_app/app/assets/javascripts/application.js +0 -0
  12. data/test/dummy_app/app/assets/stylesheets/application.css +0 -3
  13. data/test/dummy_app/app/controllers/application_controller.rb +0 -3
  14. data/test/dummy_app/app/controllers/spreadsheets_controller.rb +0 -77
  15. data/test/dummy_app/app/models/active_model_object.rb +0 -15
  16. data/test/dummy_app/app/models/application_record.rb +0 -3
  17. data/test/dummy_app/app/models/custom_columns_method_post.rb +0 -29
  18. data/test/dummy_app/app/models/custom_post.rb +0 -28
  19. data/test/dummy_app/app/models/legacy_plain_ruby_object.rb +0 -14
  20. data/test/dummy_app/app/models/plain_ruby_object.rb +0 -12
  21. data/test/dummy_app/app/models/post.rb +0 -6
  22. data/test/dummy_app/app/views/layouts/application.html.erb +0 -14
  23. data/test/dummy_app/config/application.rb +0 -58
  24. data/test/dummy_app/config/boot.rb +0 -10
  25. data/test/dummy_app/config/database.yml +0 -25
  26. data/test/dummy_app/config/environment.rb +0 -5
  27. data/test/dummy_app/config/environments/test.rb +0 -41
  28. data/test/dummy_app/config/initializers/backtrace_silencers.rb +0 -7
  29. data/test/dummy_app/config/initializers/inflections.rb +0 -10
  30. data/test/dummy_app/config/initializers/mime_types.rb +0 -5
  31. data/test/dummy_app/config/initializers/secret_token.rb +0 -11
  32. data/test/dummy_app/config/initializers/session_store.rb +0 -8
  33. data/test/dummy_app/config/initializers/spreadsheet_architect.rb +0 -11
  34. data/test/dummy_app/config/initializers/wrap_parameters.rb +0 -14
  35. data/test/dummy_app/config/locales/en.yml +0 -5
  36. data/test/dummy_app/config/routes.rb +0 -6
  37. data/test/dummy_app/config/secrets.yml +0 -22
  38. data/test/dummy_app/config.ru +0 -4
  39. data/test/dummy_app/db/migrate/20170103234524_add_posts.rb +0 -10
  40. data/test/dummy_app/db/schema.rb +0 -23
  41. data/test/dummy_app/db/test.sqlite3 +0 -0
  42. data/test/dummy_app/log/test.log +0 -113964
  43. data/test/dummy_app/tmp/2.0.1/integration/alt_xlsx.xlsx +0 -0
  44. data/test/dummy_app/tmp/2.0.1/integration/csv.csv +0 -6
  45. data/test/dummy_app/tmp/2.0.1/integration/ods.ods +0 -0
  46. data/test/dummy_app/tmp/2.0.1/integration/xlsx.xlsx +0 -0
  47. data/test/dummy_app/tmp/2.0.1/kitchen_sink.ods +0 -0
  48. data/test/dummy_app/tmp/2.0.1/kitchen_sink.xlsx +0 -0
  49. data/test/dummy_app/tmp/2.0.1/models/ActiveModelObject/data.csv +0 -3
  50. data/test/dummy_app/tmp/2.0.1/models/ActiveModelObject/data.ods +0 -0
  51. data/test/dummy_app/tmp/2.0.1/models/ActiveModelObject/data.xlsx +0 -0
  52. data/test/dummy_app/tmp/2.0.1/models/ActiveModelObject/empty.csv +0 -1
  53. data/test/dummy_app/tmp/2.0.1/models/ActiveModelObject/empty.ods +0 -0
  54. data/test/dummy_app/tmp/2.0.1/models/ActiveModelObject/empty.xlsx +0 -0
  55. data/test/dummy_app/tmp/2.0.1/models/ActiveModelObject/instances.csv +0 -6
  56. data/test/dummy_app/tmp/2.0.1/models/ActiveModelObject/instances.ods +0 -0
  57. data/test/dummy_app/tmp/2.0.1/models/ActiveModelObject/instances.xlsx +0 -0
  58. data/test/dummy_app/tmp/2.0.1/models/CustomColumnsMethodPost/data.csv +0 -3
  59. data/test/dummy_app/tmp/2.0.1/models/CustomColumnsMethodPost/data.ods +0 -0
  60. data/test/dummy_app/tmp/2.0.1/models/CustomColumnsMethodPost/data.xlsx +0 -0
  61. data/test/dummy_app/tmp/2.0.1/models/CustomColumnsMethodPost/empty.csv +0 -0
  62. data/test/dummy_app/tmp/2.0.1/models/CustomColumnsMethodPost/empty.ods +0 -0
  63. data/test/dummy_app/tmp/2.0.1/models/CustomColumnsMethodPost/empty.xlsx +0 -0
  64. data/test/dummy_app/tmp/2.0.1/models/CustomColumnsMethodPost/instances.csv +0 -6
  65. data/test/dummy_app/tmp/2.0.1/models/CustomColumnsMethodPost/instances.ods +0 -0
  66. data/test/dummy_app/tmp/2.0.1/models/CustomColumnsMethodPost/instances.xlsx +0 -0
  67. data/test/dummy_app/tmp/2.0.1/models/CustomPost/data.csv +0 -3
  68. data/test/dummy_app/tmp/2.0.1/models/CustomPost/data.ods +0 -0
  69. data/test/dummy_app/tmp/2.0.1/models/CustomPost/data.xlsx +0 -0
  70. data/test/dummy_app/tmp/2.0.1/models/CustomPost/empty.csv +0 -1
  71. data/test/dummy_app/tmp/2.0.1/models/CustomPost/empty.ods +0 -0
  72. data/test/dummy_app/tmp/2.0.1/models/CustomPost/empty.xlsx +0 -0
  73. data/test/dummy_app/tmp/2.0.1/models/CustomPost/instances.csv +0 -6
  74. data/test/dummy_app/tmp/2.0.1/models/CustomPost/instances.ods +0 -0
  75. data/test/dummy_app/tmp/2.0.1/models/CustomPost/instances.xlsx +0 -0
  76. data/test/dummy_app/tmp/2.0.1/models/LegacyPlainRubyObject/data.csv +0 -3
  77. data/test/dummy_app/tmp/2.0.1/models/LegacyPlainRubyObject/data.ods +0 -0
  78. data/test/dummy_app/tmp/2.0.1/models/LegacyPlainRubyObject/data.xlsx +0 -0
  79. data/test/dummy_app/tmp/2.0.1/models/LegacyPlainRubyObject/empty.csv +0 -1
  80. data/test/dummy_app/tmp/2.0.1/models/LegacyPlainRubyObject/empty.ods +0 -0
  81. data/test/dummy_app/tmp/2.0.1/models/LegacyPlainRubyObject/empty.xlsx +0 -0
  82. data/test/dummy_app/tmp/2.0.1/models/LegacyPlainRubyObject/instances.csv +0 -6
  83. data/test/dummy_app/tmp/2.0.1/models/LegacyPlainRubyObject/instances.ods +0 -0
  84. data/test/dummy_app/tmp/2.0.1/models/LegacyPlainRubyObject/instances.xlsx +0 -0
  85. data/test/dummy_app/tmp/2.0.1/models/PlainRubyObject/data.csv +0 -3
  86. data/test/dummy_app/tmp/2.0.1/models/PlainRubyObject/data.ods +0 -0
  87. data/test/dummy_app/tmp/2.0.1/models/PlainRubyObject/data.xlsx +0 -0
  88. data/test/dummy_app/tmp/2.0.1/models/PlainRubyObject/empty.csv +0 -1
  89. data/test/dummy_app/tmp/2.0.1/models/PlainRubyObject/empty.ods +0 -0
  90. data/test/dummy_app/tmp/2.0.1/models/PlainRubyObject/empty.xlsx +0 -0
  91. data/test/dummy_app/tmp/2.0.1/models/PlainRubyObject/instances.csv +0 -6
  92. data/test/dummy_app/tmp/2.0.1/models/PlainRubyObject/instances.ods +0 -0
  93. data/test/dummy_app/tmp/2.0.1/models/PlainRubyObject/instances.xlsx +0 -0
  94. data/test/dummy_app/tmp/2.0.1/models/Post/data.csv +0 -3
  95. data/test/dummy_app/tmp/2.0.1/models/Post/data.ods +0 -0
  96. data/test/dummy_app/tmp/2.0.1/models/Post/data.xlsx +0 -0
  97. data/test/dummy_app/tmp/2.0.1/models/Post/empty.csv +0 -0
  98. data/test/dummy_app/tmp/2.0.1/models/Post/empty.ods +0 -0
  99. data/test/dummy_app/tmp/2.0.1/models/Post/empty.xlsx +0 -0
  100. data/test/dummy_app/tmp/2.0.1/models/Post/instances.csv +0 -6
  101. data/test/dummy_app/tmp/2.0.1/models/Post/instances.ods +0 -0
  102. data/test/dummy_app/tmp/2.0.1/models/Post/instances.xlsx +0 -0
  103. data/test/dummy_app/tmp/2.0.1/multi_sheet.ods +0 -0
  104. data/test/dummy_app/tmp/2.0.1/multi_sheet.xlsx +0 -0
  105. data/test/dummy_app/tmp/3.0.0.pre/integration/alt_xlsx.xlsx +0 -0
  106. data/test/dummy_app/tmp/3.0.0.pre/integration/csv.csv +0 -6
  107. data/test/dummy_app/tmp/3.0.0.pre/integration/ods.ods +0 -0
  108. data/test/dummy_app/tmp/3.0.0.pre/integration/xlsx.xlsx +0 -0
  109. data/test/dummy_app/tmp/3.0.0.pre/kitchen_sink.ods +0 -0
  110. data/test/dummy_app/tmp/3.0.0.pre/kitchen_sink.xlsx +0 -0
  111. data/test/dummy_app/tmp/3.0.0.pre/models/ActiveModelObject/data.csv +0 -3
  112. data/test/dummy_app/tmp/3.0.0.pre/models/ActiveModelObject/data.ods +0 -0
  113. data/test/dummy_app/tmp/3.0.0.pre/models/ActiveModelObject/data.xlsx +0 -0
  114. data/test/dummy_app/tmp/3.0.0.pre/models/ActiveModelObject/empty.csv +0 -1
  115. data/test/dummy_app/tmp/3.0.0.pre/models/ActiveModelObject/empty.ods +0 -0
  116. data/test/dummy_app/tmp/3.0.0.pre/models/ActiveModelObject/empty.xlsx +0 -0
  117. data/test/dummy_app/tmp/3.0.0.pre/models/ActiveModelObject/instances.csv +0 -6
  118. data/test/dummy_app/tmp/3.0.0.pre/models/ActiveModelObject/instances.ods +0 -0
  119. data/test/dummy_app/tmp/3.0.0.pre/models/ActiveModelObject/instances.xlsx +0 -0
  120. data/test/dummy_app/tmp/3.0.0.pre/models/CustomColumnsMethodPost/data.csv +0 -3
  121. data/test/dummy_app/tmp/3.0.0.pre/models/CustomColumnsMethodPost/data.ods +0 -0
  122. data/test/dummy_app/tmp/3.0.0.pre/models/CustomColumnsMethodPost/data.xlsx +0 -0
  123. data/test/dummy_app/tmp/3.0.0.pre/models/CustomColumnsMethodPost/empty.csv +0 -0
  124. data/test/dummy_app/tmp/3.0.0.pre/models/CustomColumnsMethodPost/empty.ods +0 -0
  125. data/test/dummy_app/tmp/3.0.0.pre/models/CustomColumnsMethodPost/empty.xlsx +0 -0
  126. data/test/dummy_app/tmp/3.0.0.pre/models/CustomColumnsMethodPost/instances.csv +0 -6
  127. data/test/dummy_app/tmp/3.0.0.pre/models/CustomColumnsMethodPost/instances.ods +0 -0
  128. data/test/dummy_app/tmp/3.0.0.pre/models/CustomColumnsMethodPost/instances.xlsx +0 -0
  129. data/test/dummy_app/tmp/3.0.0.pre/models/CustomPost/data.csv +0 -3
  130. data/test/dummy_app/tmp/3.0.0.pre/models/CustomPost/data.ods +0 -0
  131. data/test/dummy_app/tmp/3.0.0.pre/models/CustomPost/data.xlsx +0 -0
  132. data/test/dummy_app/tmp/3.0.0.pre/models/CustomPost/empty.csv +0 -1
  133. data/test/dummy_app/tmp/3.0.0.pre/models/CustomPost/empty.ods +0 -0
  134. data/test/dummy_app/tmp/3.0.0.pre/models/CustomPost/empty.xlsx +0 -0
  135. data/test/dummy_app/tmp/3.0.0.pre/models/CustomPost/instances.csv +0 -6
  136. data/test/dummy_app/tmp/3.0.0.pre/models/CustomPost/instances.ods +0 -0
  137. data/test/dummy_app/tmp/3.0.0.pre/models/CustomPost/instances.xlsx +0 -0
  138. data/test/dummy_app/tmp/3.0.0.pre/models/LegacyPlainRubyObject/data.csv +0 -3
  139. data/test/dummy_app/tmp/3.0.0.pre/models/LegacyPlainRubyObject/data.ods +0 -0
  140. data/test/dummy_app/tmp/3.0.0.pre/models/LegacyPlainRubyObject/data.xlsx +0 -0
  141. data/test/dummy_app/tmp/3.0.0.pre/models/LegacyPlainRubyObject/empty.csv +0 -0
  142. data/test/dummy_app/tmp/3.0.0.pre/models/LegacyPlainRubyObject/empty.ods +0 -0
  143. data/test/dummy_app/tmp/3.0.0.pre/models/LegacyPlainRubyObject/empty.xlsx +0 -0
  144. data/test/dummy_app/tmp/3.0.0.pre/models/LegacyPlainRubyObject/instances.csv +0 -6
  145. data/test/dummy_app/tmp/3.0.0.pre/models/LegacyPlainRubyObject/instances.ods +0 -0
  146. data/test/dummy_app/tmp/3.0.0.pre/models/LegacyPlainRubyObject/instances.xlsx +0 -0
  147. data/test/dummy_app/tmp/3.0.0.pre/models/PlainRubyObject/data.csv +0 -3
  148. data/test/dummy_app/tmp/3.0.0.pre/models/PlainRubyObject/data.ods +0 -0
  149. data/test/dummy_app/tmp/3.0.0.pre/models/PlainRubyObject/data.xlsx +0 -0
  150. data/test/dummy_app/tmp/3.0.0.pre/models/PlainRubyObject/empty.csv +0 -0
  151. data/test/dummy_app/tmp/3.0.0.pre/models/PlainRubyObject/empty.ods +0 -0
  152. data/test/dummy_app/tmp/3.0.0.pre/models/PlainRubyObject/empty.xlsx +0 -0
  153. data/test/dummy_app/tmp/3.0.0.pre/models/PlainRubyObject/instances.csv +0 -6
  154. data/test/dummy_app/tmp/3.0.0.pre/models/PlainRubyObject/instances.ods +0 -0
  155. data/test/dummy_app/tmp/3.0.0.pre/models/PlainRubyObject/instances.xlsx +0 -0
  156. data/test/dummy_app/tmp/3.0.0.pre/models/Post/data.csv +0 -3
  157. data/test/dummy_app/tmp/3.0.0.pre/models/Post/data.ods +0 -0
  158. data/test/dummy_app/tmp/3.0.0.pre/models/Post/data.xlsx +0 -0
  159. data/test/dummy_app/tmp/3.0.0.pre/models/Post/empty.csv +0 -1
  160. data/test/dummy_app/tmp/3.0.0.pre/models/Post/empty.ods +0 -0
  161. data/test/dummy_app/tmp/3.0.0.pre/models/Post/empty.xlsx +0 -0
  162. data/test/dummy_app/tmp/3.0.0.pre/models/Post/instances.csv +0 -6
  163. data/test/dummy_app/tmp/3.0.0.pre/models/Post/instances.ods +0 -0
  164. data/test/dummy_app/tmp/3.0.0.pre/models/Post/instances.xlsx +0 -0
  165. data/test/dummy_app/tmp/3.0.0.pre/multi_sheet.ods +0 -0
  166. data/test/dummy_app/tmp/3.0.0.pre/multi_sheet.xlsx +0 -0
  167. data/test/dummy_app/tmp/axlsx-master/integration/alt_xlsx.xlsx +0 -0
  168. data/test/dummy_app/tmp/axlsx-master/integration/csv.csv +0 -6
  169. data/test/dummy_app/tmp/axlsx-master/integration/ods.ods +0 -0
  170. data/test/dummy_app/tmp/axlsx-master/integration/xlsx.xlsx +0 -0
  171. data/test/dummy_app/tmp/axlsx-master/kitchen_sink.ods +0 -0
  172. data/test/dummy_app/tmp/axlsx-master/kitchen_sink.xlsx +0 -0
  173. data/test/dummy_app/tmp/axlsx-master/models/ActiveModelObject/data.csv +0 -4
  174. data/test/dummy_app/tmp/axlsx-master/models/ActiveModelObject/data.ods +0 -0
  175. data/test/dummy_app/tmp/axlsx-master/models/ActiveModelObject/data.xlsx +0 -0
  176. data/test/dummy_app/tmp/axlsx-master/models/ActiveModelObject/empty.csv +0 -1
  177. data/test/dummy_app/tmp/axlsx-master/models/ActiveModelObject/empty.ods +0 -0
  178. data/test/dummy_app/tmp/axlsx-master/models/ActiveModelObject/empty.xlsx +0 -0
  179. data/test/dummy_app/tmp/axlsx-master/models/ActiveModelObject/instances.csv +0 -6
  180. data/test/dummy_app/tmp/axlsx-master/models/ActiveModelObject/instances.ods +0 -0
  181. data/test/dummy_app/tmp/axlsx-master/models/ActiveModelObject/instances.xlsx +0 -0
  182. data/test/dummy_app/tmp/axlsx-master/models/CustomColumnsMethodPost/data.csv +0 -4
  183. data/test/dummy_app/tmp/axlsx-master/models/CustomColumnsMethodPost/data.ods +0 -0
  184. data/test/dummy_app/tmp/axlsx-master/models/CustomColumnsMethodPost/data.xlsx +0 -0
  185. data/test/dummy_app/tmp/axlsx-master/models/CustomColumnsMethodPost/empty.csv +0 -1
  186. data/test/dummy_app/tmp/axlsx-master/models/CustomColumnsMethodPost/empty.ods +0 -0
  187. data/test/dummy_app/tmp/axlsx-master/models/CustomColumnsMethodPost/empty.xlsx +0 -0
  188. data/test/dummy_app/tmp/axlsx-master/models/CustomColumnsMethodPost/instances.csv +0 -6
  189. data/test/dummy_app/tmp/axlsx-master/models/CustomColumnsMethodPost/instances.ods +0 -0
  190. data/test/dummy_app/tmp/axlsx-master/models/CustomColumnsMethodPost/instances.xlsx +0 -0
  191. data/test/dummy_app/tmp/axlsx-master/models/CustomPost/data.csv +0 -4
  192. data/test/dummy_app/tmp/axlsx-master/models/CustomPost/data.ods +0 -0
  193. data/test/dummy_app/tmp/axlsx-master/models/CustomPost/data.xlsx +0 -0
  194. data/test/dummy_app/tmp/axlsx-master/models/CustomPost/empty.csv +0 -1
  195. data/test/dummy_app/tmp/axlsx-master/models/CustomPost/empty.ods +0 -0
  196. data/test/dummy_app/tmp/axlsx-master/models/CustomPost/empty.xlsx +0 -0
  197. data/test/dummy_app/tmp/axlsx-master/models/CustomPost/instances.csv +0 -6
  198. data/test/dummy_app/tmp/axlsx-master/models/CustomPost/instances.ods +0 -0
  199. data/test/dummy_app/tmp/axlsx-master/models/CustomPost/instances.xlsx +0 -0
  200. data/test/dummy_app/tmp/axlsx-master/models/LegacyPlainRubyObject/data.csv +0 -4
  201. data/test/dummy_app/tmp/axlsx-master/models/LegacyPlainRubyObject/data.ods +0 -0
  202. data/test/dummy_app/tmp/axlsx-master/models/LegacyPlainRubyObject/data.xlsx +0 -0
  203. data/test/dummy_app/tmp/axlsx-master/models/LegacyPlainRubyObject/empty.csv +0 -1
  204. data/test/dummy_app/tmp/axlsx-master/models/LegacyPlainRubyObject/empty.ods +0 -0
  205. data/test/dummy_app/tmp/axlsx-master/models/LegacyPlainRubyObject/empty.xlsx +0 -0
  206. data/test/dummy_app/tmp/axlsx-master/models/LegacyPlainRubyObject/instances.csv +0 -6
  207. data/test/dummy_app/tmp/axlsx-master/models/LegacyPlainRubyObject/instances.ods +0 -0
  208. data/test/dummy_app/tmp/axlsx-master/models/LegacyPlainRubyObject/instances.xlsx +0 -0
  209. data/test/dummy_app/tmp/axlsx-master/models/PlainRubyObject/data.csv +0 -4
  210. data/test/dummy_app/tmp/axlsx-master/models/PlainRubyObject/data.ods +0 -0
  211. data/test/dummy_app/tmp/axlsx-master/models/PlainRubyObject/data.xlsx +0 -0
  212. data/test/dummy_app/tmp/axlsx-master/models/PlainRubyObject/empty.csv +0 -1
  213. data/test/dummy_app/tmp/axlsx-master/models/PlainRubyObject/empty.ods +0 -0
  214. data/test/dummy_app/tmp/axlsx-master/models/PlainRubyObject/empty.xlsx +0 -0
  215. data/test/dummy_app/tmp/axlsx-master/models/PlainRubyObject/instances.csv +0 -6
  216. data/test/dummy_app/tmp/axlsx-master/models/PlainRubyObject/instances.ods +0 -0
  217. data/test/dummy_app/tmp/axlsx-master/models/PlainRubyObject/instances.xlsx +0 -0
  218. data/test/dummy_app/tmp/axlsx-master/models/Post/data.csv +0 -4
  219. data/test/dummy_app/tmp/axlsx-master/models/Post/data.ods +0 -0
  220. data/test/dummy_app/tmp/axlsx-master/models/Post/data.xlsx +0 -0
  221. data/test/dummy_app/tmp/axlsx-master/models/Post/empty.csv +0 -1
  222. data/test/dummy_app/tmp/axlsx-master/models/Post/empty.ods +0 -0
  223. data/test/dummy_app/tmp/axlsx-master/models/Post/empty.xlsx +0 -0
  224. data/test/dummy_app/tmp/axlsx-master/models/Post/instances.csv +0 -6
  225. data/test/dummy_app/tmp/axlsx-master/models/Post/instances.ods +0 -0
  226. data/test/dummy_app/tmp/axlsx-master/models/Post/instances.xlsx +0 -0
  227. data/test/dummy_app/tmp/axlsx-master/multi_sheet.ods +0 -0
  228. data/test/dummy_app/tmp/axlsx-master/multi_sheet.xlsx +0 -0
  229. data/test/integration/application_test.rb +0 -38
  230. data/test/models/all_models_test.rb +0 -108
  231. data/test/test_helper.rb +0 -87
  232. data/test/unit/ods/general_test.rb +0 -121
  233. data/test/unit/rails/formats_test.rb +0 -15
  234. data/test/unit/spreadsheet_architect/exceptions_test.rb +0 -195
  235. data/test/unit/spreadsheet_architect/spreadsheet_architect_test.rb +0 -15
  236. data/test/unit/spreadsheet_architect/utils/ods_test.rb +0 -58
  237. data/test/unit/spreadsheet_architect/utils/xlsx_test.rb +0 -114
  238. data/test/unit/spreadsheet_architect/utils_test.rb +0 -197
  239. data/test/unit/xlsx/freeze_test.rb +0 -79
  240. data/test/unit/xlsx/general_test.rb +0 -199
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c88ecaffa3abed6ef127dc13d42c612ebf224c6d8552590d68ae544af2713f93
4
- data.tar.gz: d0e864c2f50e99040f932da595b7270dd0e9c0161fc1189e6d99cb43126f6b5a
3
+ metadata.gz: ee7b9dd8d17310dd0bd673b0cab5dd6d098ec264273a4f149ce4ec9d7d94e5a9
4
+ data.tar.gz: '078a43ed925d5dbdfba5ae954235a2f408d1415499633316ae0e02ac81e9709f'
5
5
  SHA512:
6
- metadata.gz: dfc0caea596d57bd5aa88cd3b5ff3cebfca8b1299d1660e9995ca93837746d21420a90e0f427df9b3f8e73c13914a24b137572c005ee16fafdeeb6ddaf18b95d
7
- data.tar.gz: c31f408e271453d46454e4f85ad2437a2539e39973186a8889c917a338f9e5f57f9ef3f3f28797955d61f8daa6a7100ffb46624ab3974c4bfd9273cc5cacba29
6
+ metadata.gz: 26f7ed771240d97d512bc03ee39ffdf089d55ba0cf911a9dde5962be284aab7feb1183008bf82b97fc5ddb4c09137a4b9448dfda9f8dc035399c778123745ccd
7
+ data.tar.gz: 4dc96c75de5dfa63b3a9919a9e7d37dcadf2463ac941f1cbf6cfbdb385191fe254c40de52c79d33225576108a07c6873ebef6be6a721212a379a37814d04c77e
data/CHANGELOG.md CHANGED
@@ -1,10 +1,14 @@
1
1
  CHANGELOG
2
2
  ---------
3
3
 
4
- - **Unreleased** - [View Diff](https://github.com/westonganger/spreadsheet_architect/compare/v5.0.0...master)
4
+ - **Unreleased** - [View Diff](https://github.com/westonganger/spreadsheet_architect/compare/v5.0.1...master)
5
5
  - Nothing yet
6
6
 
7
- - **5.0.0** - [View Diff](https://github.com/westonganger/spreadsheet_architect/compare/v4.2.0...v5.0.0)
7
+ - **v5.0.1** - [View Diff](https://github.com/westonganger/spreadsheet_architect/compare/v5.0.0...v5.0.1)
8
+ - [#53](https://github.com/westonganger/spreadsheet_architect/pull/53) - Remove legacy string_width patch for axlsx 3.1 and below
9
+ - [#57](https://github.com/westonganger/spreadsheet_architect/pull/57) - Fix typo in error message for `:conditional_row_styles`
10
+
11
+ - **5.0.0** - Oct 30, 2022 - [View Diff](https://github.com/westonganger/spreadsheet_architect/compare/v4.2.0...v5.0.0)
8
12
  - [#52](https://github.com/westonganger/spreadsheet_architect/pull/52) - Update to caxlsx v3.3.0+ which now contains the axlsx_styler code, so we drop the dependency on axlsx_styler
9
13
  - [#38](https://github.com/westonganger/spreadsheet_architect/pull/38) - **Breaking Change** - Add `escape_formulas` option for xlsx spreadsheets. This is a breaking change because we default to `escape_formulas: true` whereas before there was no formula escaping at all. The reasoning for this breaking change is that creating spreadsheets where many of the fields contain direct user input are a large majority compared to use cases that involve formulas.
10
14
  - [#39](https://github.com/westonganger/spreadsheet_architect/pull/39) - Add option `use_zero_based_row_index: true` (Default `false`) which allows you to use zero-based row indexes instead of the default 1-based row indexes. Recomended to set this option for the whole project. The original reason it was designed to be 1-based is because spreadsheet row numbers literally start with 1. However this tends to be unituitive for the developer because columns use zero based indexes because they use letter-based notation instead.
@@ -25,7 +29,7 @@ CHANGELOG
25
29
  - Raise ArgumentError when invalid option names are given
26
30
 
27
31
  - **4.0.1** - Nov 20, 2020 - [View Diff](https://github.com/westonganger/spreadsheet_architect/compare/v4.0.0...v4.0.1)
28
- - Fix bug with `headers: false` where a blank header row is still added
32
+ - Fix bug with `headers: false` where a blank header row is still added
29
33
  - Fix Bug for older version of `caxlsx` v2.0.2
30
34
 
31
35
  - **4.0.0** - Mar 3, 2020 - [View Diff](https://github.com/westonganger/spreadsheet_architect/compare/v3.3.1...v4.0.0)
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Spreadsheet Architect
2
2
 
3
3
  <a href="https://badge.fury.io/rb/spreadsheet_architect" target="_blank"><img height="21" style='border:0px;height:21px;' border='0' src="https://badge.fury.io/rb/spreadsheet_architect.svg" alt="Gem Version"></a>
4
- <a href='https://github.com/westonganger/spreadsheet_architect/actions' target='_blank'><img src="https://github.com/westonganger/spreadsheet_architect/workflows/Tests/badge.svg" style="max-width:100%;" height='21' style='border:0px;height:21px;' border='0' alt="CI Status"></a>
5
- <a href='https://rubygems.org/gems/spreadsheet_architect' target='_blank'><img height='21' style='border:0px;height:21px;' src='https://ruby-gem-downloads-badge.herokuapp.com/spreadsheet_architect?label=rubygems&type=total&total_label=downloads&color=brightgreen' border='0' alt='RubyGems Downloads' /></a>
4
+ <a href='https://github.com/westonganger/spreadsheet_architect/actions' target='_blank'><img src="https://github.com/westonganger/spreadsheet_architect/actions/workflows/test.yml/badge.svg?branch=master" style="max-width:100%;" height='21' style='border:0px;height:21px;' border='0' alt="CI Status"></a>
5
+ <a href='https://rubygems.org/gems/spreadsheet_architect' target='_blank'><img height='21' style='border:0px;height:21px;' src='https://img.shields.io/gem/dt/spreadsheet_architect?color=brightgreen&label=Rubygems%20Downloads' border='0' alt='RubyGems Downloads' /></a>
6
6
 
7
7
  Spreadsheet Architect is a library that allows you to create XLSX, ODS, or CSV spreadsheets super easily from ActiveRecord relations, plain Ruby objects, or tabular data.
8
8
 
@@ -25,7 +25,7 @@ gem 'spreadsheet_architect'
25
25
 
26
26
  ### Tabular (Array) Data
27
27
 
28
- The simplest and preffered usage is to simply create the data array yourself.
28
+ The simplest and preferred usage is to simply create the data array yourself.
29
29
 
30
30
  ```ruby
31
31
  headers = ['Col 1','Col 2','Col 3']
@@ -35,7 +35,7 @@ SpreadsheetArchitect.to_ods(headers: headers, data: data)
35
35
  SpreadsheetArchitect.to_csv(headers: headers, data: data)
36
36
  ```
37
37
 
38
- Using this style will allow you to utilize any custom performance optimizations during your data generation process. This will come in handy when the spreadsheets get large and things start to get slow. One of my favourites for Rails is [light_record](https://github.com/Paxa/light_record)
38
+ Using this style will allow you to utilize any custom performance optimizations during your data generation process. This will come in handy when the spreadsheets get large and any loss in performance starts to matter.
39
39
 
40
40
  ### Rails Relations or an Array of plain Ruby object instances
41
41
 
@@ -91,16 +91,16 @@ If you want to use a different method name then `spreadsheet_columns` you can pa
91
91
  Post.to_xlsx(instances: posts, spreadsheet_columns: :my_special_method)
92
92
  ```
93
93
 
94
- Alternatively, you can pass a Proc to the `spreadsheet_columns` option. For those purists that really dont want to define any extra `spreadsheet_columns` instance method on your model, this option can help you work with that methodology.
94
+ Alternatively, you can pass a proc to the `spreadsheet_columns` option. For those purists that really dont want to define any extra `spreadsheet_columns` instance method on your model, this option can help you work with that methodology.
95
95
 
96
96
  ```ruby
97
- Post.to_xlsx(instances: posts, spreadsheet_columns: Proc.new{|instance|
97
+ Post.to_xlsx(instances: posts, spreadsheet_columns: ->(instance){
98
98
  [
99
99
  ['Title', :title],
100
100
  ['Content', instance.content.strip],
101
101
  ['Author', (instance.author.name if instance.author)],
102
102
  ['Published?', (instance.published ? 'Yes' : 'No')],
103
- :published_at, # uses the method name as header title Einstance. 'Published At'
103
+ :published_at, # uses the method name as header title Ex. 'Published At'
104
104
  ['# of Views', :number_of_views, :float],
105
105
  ['Rating', :rating],
106
106
  ['Category/Tags', "#{instance.category.name} - #{instance.tags.collect(&:name).join(', ')}"],
@@ -171,7 +171,7 @@ class PostsController < ActionController::Base
171
171
  format.html
172
172
  format.xlsx { render xlsx: @posts.to_xlsx(headers: false) }
173
173
  format.ods { render ods: Post.to_ods(instances: @posts) }
174
- format.csv{ render csv: @posts.to_csv(headers: false), file_name: 'articles' }
174
+ format.csv{ render csv: @posts.to_csv(headers: false), filename: 'articles' }
175
175
  end
176
176
  end
177
177
  end
@@ -213,18 +213,18 @@ end
213
213
  |**sheet_name**<br>*String*|`Sheet1`||
214
214
  |**header_style**<br>*Hash*|`{background_color: "AAAAAA", color: "FFFFFF", align: :center, font_name: 'Arial', font_size: 10, bold: false, italic: false, underline: false}`|See all available style options [here](./docs/axlsx_style_reference.md)|
215
215
  |**row_style**<br>*Hash*|`{background_color: nil, color: "000000", align: :left, font_name: 'Arial', font_size: 10, bold: false, italic: false, underline: false, format_code: nil}`|Styles for non-header rows. See all available style options [here](./docs/axlsx_style_reference.md)|
216
- |**column_styles**<br>*Array*||[See this example for usage](./test/unit/kitchen_sink_test.rb)|
217
- |**range_styles**<br>*Array*||[See this example for usage](./test/unit/kitchen_sink_test.rb)|
218
- |**conditional_row_styles**<br>*Array*||[See this example for usage](./test/unit/kitchen_sink_test.rb). The if/unless proc will called with the following args: `row_index`, `row_data`|
219
- |**merges**<br>*Array*||Merge cells. [See this example for usage](./test/unit/kitchen_sink_test.rb). Warning merges cannot overlap eachother, if you attempt to do so Excel will claim your spreadsheet is corrupt and refuse to open your spreadsheet.|
220
- |**borders**<br>*Array*||[See this example for usage](./test/unit/kitchen_sink_test.rb)|
216
+ |**column_styles**<br>*Array*||[See the kitchen sink example for usage](./test/unit/xlsx/general_test.rb)|
217
+ |**range_styles**<br>*Array*||[See the kitchen sink example for usage](./test/unit/xlsx/general_test.rb)|
218
+ |**conditional_row_styles**<br>*Array*||[See the kitchen sink example for usage](./test/unit/xlsx/general_test.rb). The if/unless proc will called with the following args: `row_index`, `row_data`|
219
+ |**merges**<br>*Array*||Merge cells. [See the kitchen sink example for usage](./test/unit/xlsx/general_test.rb). Warning merges cannot overlap eachother, if you attempt to do so Excel will claim your spreadsheet is corrupt and refuse to open your spreadsheet.|
220
+ |**borders**<br>*Array*||[See the kitchen sink example for usage](./test/unit/xlsx/general_test.rb)|
221
221
  |**column_types**<br>*Array*||Valid types for XLSX are :string, :integer, :float, :date, :time, :boolean, :hyperlink, nil = auto determine. You may also pass a Proc which evaluates to any of the valid types, for example `->(cell_val){ cell_val.start_with?('http') ? :hyperlink : :string }`|
222
222
  |**column_widths**<br>*Array*||Sometimes you may want explicit column widths. Use nil if you want a column to autofit again.|
223
223
  |**freeze_headers**<br>*Boolean*||Make all header rows frozen/fixed so they do not scroll.|
224
224
  |**freeze**<br>*Hash*||Make all specified row and/or column frozen/fixed so they do not scroll. See [example usage](./test/unit/xlsx_freeze_test.rb)|
225
225
  |**skip_defaults**<br>*Boolean*|`false`|Removes defaults and default styles. Particularily useful for heavily customized spreadsheets where the default styles get in the way.|
226
226
  |**escape_formulas**<br>*Boolean* or *Array*|`true`|Pass a single boolean to apply to all cells, or an array of booleans to control column-by-column. Advisable to be set true when involved with untrusted user input. See [an example of the underlying functionality](https://github.com/caxlsx/caxlsx/blob/master/examples/escape_formula_example.md). NOTE: Header row cells are not escaped. |
227
- |**use_zero_based_row_index**<br>*Boolean*|`false`|Allows you to use zero-based row indexes when defining `range_styles`, `merges`, etc. Recomended to set this option for the whole project rather than per call. The original reason it was designed to be 1-based is because spreadsheet row numbers actually start with 1.|
227
+ |**use_zero_based_row_index**<br>*Boolean*|`false`|Allows you to use zero-based row indexes when defining `range_styles`, `merges`, etc. Recommended to set this option for the whole project rather than per call. The original reason it was designed to be 1-based is because spreadsheet row numbers actually start with 1.|
228
228
 
229
229
  ## `to_axlsx_spreadsheet(options={}, axlsx_package_to_join=nil)`
230
230
  Same options as `to_xlsx`
@@ -241,7 +241,7 @@ Same options as `to_xlsx`
241
241
  |**header_style**<br>*Hash*|`{background_color: "AAAAAA", color: "FFFFFF", align: :center, font_size: 10, bold: true}`|Note: Currently ODS only supports these options|
242
242
  |**row_style**<br>*Hash*|`{background_color: nil, color: "000000", align: :left, font_size: 10, bold: false}`|Styles for non-header rows. Currently ODS only supports these options|
243
243
  |**column_types**<br>*Array*||Valid types for ODS are :string, :float, :date, :time, :boolean, :hyperlink, nil = auto determine. Due to [RODF Issue #19](https://github.com/thiagoarrais/rodf/issues/19), :date/:time will be converted to :string. You may also pass a Proc which evaluates to any of the valid types, for example `->(cell_val){ cell_val.start_with?('http') ? :hyperlink : :string }` |
244
- |**skip_defaults**<br>*Boolean*|`false`|Skip defaults and default styles. Particularily useful for heavily customized spreadsheets where the default styles get in the way.|
244
+ |**skip_defaults**<br>*Boolean*|`false`|Skip defaults and default styles. Particularly useful for heavily customized spreadsheets where the default styles get in the way.|
245
245
 
246
246
  ## `to_rodf_spreadsheet(options={}, spreadsheet_to_join=nil)`
247
247
  Same options as `to_ods`
@@ -307,12 +307,17 @@ SpreadsheetArchitect.default_options = {
307
307
  ```
308
308
 
309
309
  # Kitchen Sink Examples with Styling for XLSX and ODS
310
- See this example: [test/unit/kitchen_sink_test.rb](./test/unit/kitchen_sink_test.rb)
310
+
311
+ See `test "kitchen sink"` for [XLSX](./test/unit/xlsx/general_test.rb) and [ODS](./test/unit/ods/general_test.rb)
311
312
 
312
313
  # Axlsx Style Reference
313
314
 
314
315
  I have compiled a list of all available style options for axlsx here: [docs/axlsx_style_reference.md](./docs/axlsx_style_reference.md)
315
316
 
317
+ # Tips for Reducing Memory Usage
318
+ - Use the `:data` option instead of active record relations
319
+ - Utilize the [`light_record`](https://github.com/Paxa/light_record) gem
320
+
316
321
  # Testing / Validating your Spreadsheets
317
322
 
318
323
  A wise word of advice, when testing your spreadsheets I recommend to use Excel instead of LibreOffice. This is because I have seen through testing, that where LibreOffice seems to just let most incorrect things just slide on through, Excel will not even open the spreadsheet as apparently it is much more strict about the spreadsheet validations. This will help you better identify any incorrect styling or customization issues.
@@ -324,7 +329,7 @@ We use the `appraisal` gem for testing multiple versions of `axlsx`. Please use
324
329
  1. `bundle exec appraisal install`
325
330
  2. `bundle exec appraisal rake test`
326
331
 
327
- At this time the spreadsheets generated by the test suite are manually inspected. After running the tests, the test output can be viewed at `tmp/#{alxsx_version}/*`
332
+ At this time the spreadsheets generated by the test suite are manually inspected. After running the tests, the test output can be viewed in `tmp/`
328
333
 
329
334
  # Credits
330
335
 
@@ -1,7 +1,5 @@
1
1
  require 'axlsx'
2
2
 
3
- require 'spreadsheet_architect/axlsx_string_width_patch'
4
-
5
3
  module SpreadsheetArchitect
6
4
  module ClassMethods
7
5
 
@@ -183,11 +183,11 @@ module SpreadsheetArchitect
183
183
 
184
184
  conditional_row_styles.each do |x|
185
185
  if x[:if] && x[:unless]
186
- raise SpreadsheetArchitect::Exceptions::ArgumentError.new('Cannot pass both :if and :unless within the same :conditonal_row_styles entry')
186
+ raise SpreadsheetArchitect::Exceptions::ArgumentError.new('Cannot pass both :if and :unless within the same :conditional_row_styles entry')
187
187
  elsif !x[:if] && !x[:unless]
188
- raise SpreadsheetArchitect::Exceptions::ArgumentError.new('Must pass either :if or :unless within the each :conditonal_row_styles entry')
188
+ raise SpreadsheetArchitect::Exceptions::ArgumentError.new('Must pass either :if or :unless within the each :conditional_row_styles entry')
189
189
  elsif !x[:styles]
190
- raise SpreadsheetArchitect::Exceptions::ArgumentError.new('Must pass the :styles option within a :conditonal_row_styles entry')
190
+ raise SpreadsheetArchitect::Exceptions::ArgumentError.new('Must pass the :styles option within a :conditional_row_styles entry')
191
191
  end
192
192
 
193
193
  conditions_met = (x[:if] || x[:unless]).call(row_data, row_index)
@@ -1,3 +1,3 @@
1
1
  module SpreadsheetArchitect
2
- VERSION = "5.0.0"
2
+ VERSION = "5.0.1".freeze
3
3
  end