nanoc 4.4.5 → 4.4.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -2
  3. data/Gemfile.lock +37 -18
  4. data/NEWS.md +6 -0
  5. data/Rakefile +8 -20
  6. data/lib/nanoc/base/entities/code_snippet.rb +0 -2
  7. data/lib/nanoc/base/entities/item_rep.rb +4 -22
  8. data/lib/nanoc/base/entities/processing_actions/snapshot.rb +9 -7
  9. data/lib/nanoc/base/entities/rule_memory.rb +15 -7
  10. data/lib/nanoc/base/entities/snapshot_def.rb +2 -8
  11. data/lib/nanoc/base/repos/store.rb +2 -28
  12. data/lib/nanoc/base/services/checksummer.rb +9 -10
  13. data/lib/nanoc/base/services/compiler.rb +14 -16
  14. data/lib/nanoc/base/services/executor.rb +2 -13
  15. data/lib/nanoc/base/views/mixins/with_reps_view_mixin.rb +1 -1
  16. data/lib/nanoc/checking/checks/external_links.rb +2 -1
  17. data/lib/nanoc/cli/commands/compile.rb +8 -14
  18. data/lib/nanoc/extra/parallel_collection.rb +57 -0
  19. data/lib/nanoc/extra.rb +1 -0
  20. data/lib/nanoc/filters/mustache.rb +1 -1
  21. data/lib/nanoc/rule_dsl/recording_executor.rb +6 -34
  22. data/lib/nanoc/rule_dsl/rule_memory_calculator.rb +42 -12
  23. data/lib/nanoc/spec.rb +1 -1
  24. data/lib/nanoc/version.rb +1 -1
  25. data/nanoc.gemspec +1 -2
  26. data/spec/contributors_spec.rb +18 -0
  27. data/spec/nanoc/base/checksummer_spec.rb +381 -0
  28. data/spec/nanoc/base/compiler_spec.rb +181 -0
  29. data/spec/nanoc/base/entities/configuration_spec.rb +49 -0
  30. data/spec/nanoc/base/entities/content_spec.rb +193 -0
  31. data/spec/nanoc/base/entities/document_spec.rb +206 -0
  32. data/spec/nanoc/base/entities/identifier_spec.rb +460 -0
  33. data/spec/nanoc/base/entities/item_rep_spec.rb +226 -0
  34. data/spec/nanoc/base/entities/item_spec.rb +3 -0
  35. data/spec/nanoc/base/entities/layout_spec.rb +3 -0
  36. data/spec/nanoc/base/entities/lazy_value_spec.rb +106 -0
  37. data/spec/nanoc/base/entities/outdatedness_status_spec.rb +113 -0
  38. data/spec/nanoc/base/entities/pattern_spec.rb +125 -0
  39. data/spec/nanoc/base/entities/processing_action_spec.rb +9 -0
  40. data/spec/nanoc/base/entities/processing_actions/filter_spec.rb +18 -0
  41. data/spec/nanoc/base/entities/processing_actions/layout_spec.rb +18 -0
  42. data/spec/nanoc/base/entities/processing_actions/snapshot_spec.rb +32 -0
  43. data/spec/nanoc/base/entities/props_spec.rb +195 -0
  44. data/spec/nanoc/base/entities/rule_memory_spec.rb +131 -0
  45. data/spec/nanoc/base/entities/site_spec.rb +73 -0
  46. data/spec/nanoc/base/feature_spec.rb +107 -0
  47. data/spec/nanoc/base/filter_spec.rb +99 -0
  48. data/spec/nanoc/base/item_rep_writer_spec.rb +131 -0
  49. data/spec/nanoc/base/plugin_registry_spec.rb +29 -0
  50. data/spec/nanoc/base/repos/checksum_store_spec.rb +133 -0
  51. data/spec/nanoc/base/repos/compiled_content_cache_spec.rb +55 -0
  52. data/spec/nanoc/base/repos/config_loader_spec.rb +243 -0
  53. data/spec/nanoc/base/repos/dependency_store_spec.rb +195 -0
  54. data/spec/nanoc/base/repos/site_loader_spec.rb +214 -0
  55. data/spec/nanoc/base/services/dependency_tracker_spec.rb +238 -0
  56. data/spec/nanoc/base/services/executor_spec.rb +495 -0
  57. data/spec/nanoc/base/services/item_rep_router_spec.rb +134 -0
  58. data/spec/nanoc/base/services/item_rep_selector_spec.rb +169 -0
  59. data/spec/nanoc/base/services/outdatedness_checker_spec.rb +370 -0
  60. data/spec/nanoc/base/services/outdatedness_rules_spec.rb +432 -0
  61. data/spec/nanoc/base/services/pruner_spec.rb +105 -0
  62. data/spec/nanoc/base/services/temp_filename_factory_spec.rb +87 -0
  63. data/spec/nanoc/base/views/config_view_spec.rb +96 -0
  64. data/spec/nanoc/base/views/document_view_spec.rb +332 -0
  65. data/spec/nanoc/base/views/identifiable_collection_view_spec.rb +190 -0
  66. data/spec/nanoc/base/views/item_collection_with_reps_view_spec.rb +18 -0
  67. data/spec/nanoc/base/views/item_collection_without_reps_view_spec.rb +18 -0
  68. data/spec/nanoc/base/views/item_rep_collection_view_spec.rb +143 -0
  69. data/spec/nanoc/base/views/item_rep_view_spec.rb +265 -0
  70. data/spec/nanoc/base/views/item_view_spec.rb +341 -0
  71. data/spec/nanoc/base/views/layout_collection_view_spec.rb +18 -0
  72. data/spec/nanoc/base/views/layout_view_spec.rb +14 -0
  73. data/spec/nanoc/base/views/mutable_config_view_spec.rb +16 -0
  74. data/spec/nanoc/base/views/mutable_document_view_spec.rb +92 -0
  75. data/spec/nanoc/base/views/mutable_identifiable_collection_view_spec.rb +36 -0
  76. data/spec/nanoc/base/views/mutable_item_collection_view_spec.rb +49 -0
  77. data/spec/nanoc/base/views/mutable_item_view_spec.rb +22 -0
  78. data/spec/nanoc/base/views/mutable_layout_collection_view_spec.rb +49 -0
  79. data/spec/nanoc/base/views/mutable_layout_view_spec.rb +13 -0
  80. data/spec/nanoc/base/views/post_compile_item_rep_collection_view_spec.rb +4 -0
  81. data/spec/nanoc/base/views/post_compile_item_rep_view_spec.rb +137 -0
  82. data/spec/nanoc/base/views/post_compile_item_view_spec.rb +56 -0
  83. data/spec/nanoc/cli/commands/compile/file_action_printer_spec.rb +76 -0
  84. data/spec/nanoc/cli/commands/compile/timing_recorder_spec.rb +66 -0
  85. data/spec/nanoc/cli/commands/compile_spec.rb +64 -0
  86. data/spec/nanoc/cli/commands/deploy_spec.rb +327 -0
  87. data/spec/nanoc/cli/commands/shell_spec.rb +54 -0
  88. data/spec/nanoc/cli/commands/show_data_spec.rb +126 -0
  89. data/spec/nanoc/cli/commands/show_rules_spec.rb +112 -0
  90. data/spec/nanoc/cli/commands/view_spec.rb +58 -0
  91. data/spec/nanoc/data_sources/filesystem_spec.rb +56 -0
  92. data/spec/nanoc/deploying/fog_spec.rb +193 -0
  93. data/spec/nanoc/extra/parallel_collection_spec.rb +108 -0
  94. data/spec/nanoc/filters/colorize_syntax/rouge_spec.rb +195 -0
  95. data/spec/nanoc/filters/less_spec.rb +120 -0
  96. data/spec/nanoc/helpers/blogging_spec.rb +216 -0
  97. data/spec/nanoc/helpers/breadcrumbs_spec.rb +133 -0
  98. data/spec/nanoc/helpers/capturing_spec.rb +181 -0
  99. data/spec/nanoc/helpers/child_parent_spec.rb +105 -0
  100. data/spec/nanoc/helpers/filtering_spec.rb +72 -0
  101. data/spec/nanoc/helpers/html_escape_spec.rb +35 -0
  102. data/spec/nanoc/helpers/link_to_spec.rb +275 -0
  103. data/spec/nanoc/helpers/rendering_spec.rb +141 -0
  104. data/spec/nanoc/helpers/tagging_spec.rb +104 -0
  105. data/spec/nanoc/helpers/text_spec.rb +58 -0
  106. data/spec/nanoc/integration/outdatedness_integration_spec.rb +208 -0
  107. data/spec/nanoc/regressions/gh_1015_spec.rb +17 -0
  108. data/spec/nanoc/regressions/gh_1031_spec.rb +54 -0
  109. data/spec/nanoc/regressions/gh_1035_spec.rb +33 -0
  110. data/spec/nanoc/regressions/gh_1040_spec.rb +22 -0
  111. data/spec/nanoc/regressions/gh_761_spec.rb +23 -0
  112. data/spec/nanoc/regressions/gh_767_spec.rb +19 -0
  113. data/spec/nanoc/regressions/gh_769_spec.rb +30 -0
  114. data/spec/nanoc/regressions/gh_776_spec.rb +43 -0
  115. data/spec/nanoc/regressions/gh_787_spec.rb +19 -0
  116. data/spec/nanoc/regressions/gh_795_spec.rb +19 -0
  117. data/spec/nanoc/regressions/gh_804_spec.rb +26 -0
  118. data/spec/nanoc/regressions/gh_807_spec.rb +17 -0
  119. data/spec/nanoc/regressions/gh_809_spec.rb +17 -0
  120. data/spec/nanoc/regressions/gh_813_spec.rb +22 -0
  121. data/spec/nanoc/regressions/gh_815_spec.rb +18 -0
  122. data/spec/nanoc/regressions/gh_828_spec.rb +23 -0
  123. data/spec/nanoc/regressions/gh_833_spec.rb +14 -0
  124. data/spec/nanoc/regressions/gh_841_spec.rb +15 -0
  125. data/spec/nanoc/regressions/gh_867_spec.rb +15 -0
  126. data/spec/nanoc/regressions/gh_882_spec.rb +29 -0
  127. data/spec/nanoc/regressions/gh_885_spec.rb +30 -0
  128. data/spec/nanoc/regressions/gh_891_spec.rb +26 -0
  129. data/spec/nanoc/regressions/gh_913_spec.rb +24 -0
  130. data/spec/nanoc/regressions/gh_928_spec.rb +5 -0
  131. data/spec/nanoc/regressions/gh_937_spec.rb +25 -0
  132. data/spec/nanoc/regressions/gh_942_spec.rb +21 -0
  133. data/spec/nanoc/regressions/gh_947_spec.rb +21 -0
  134. data/spec/nanoc/regressions/gh_948_spec.rb +16 -0
  135. data/spec/nanoc/regressions/gh_951_spec.rb +19 -0
  136. data/spec/nanoc/regressions/gh_954_spec.rb +33 -0
  137. data/spec/nanoc/regressions/gh_970a_spec.rb +17 -0
  138. data/spec/nanoc/regressions/gh_970b_spec.rb +50 -0
  139. data/spec/nanoc/regressions/gh_974_spec.rb +17 -0
  140. data/spec/nanoc/regressions/gh_981_spec.rb +21 -0
  141. data/spec/nanoc/rule_dsl/recording_executor_spec.rb +142 -0
  142. data/spec/nanoc/rule_dsl/rule_context_spec.rb +177 -0
  143. data/spec/nanoc/rule_dsl/rule_memory_calculator_spec.rb +233 -0
  144. data/spec/nanoc/rule_dsl/rules_collection_spec.rb +299 -0
  145. data/spec/regression_filenames_spec.rb +16 -0
  146. data/spec/spec_helper.rb +173 -0
  147. data/test/base/core_ext/array_spec.rb +2 -0
  148. data/test/base/core_ext/hash_spec.rb +2 -0
  149. data/test/base/core_ext/string_spec.rb +2 -0
  150. data/test/base/test_code_snippet.rb +2 -0
  151. data/test/base/test_compiler.rb +2 -0
  152. data/test/base/test_context.rb +4 -2
  153. data/test/base/test_data_source.rb +2 -0
  154. data/test/base/test_dependency_tracker.rb +2 -0
  155. data/test/base/test_directed_graph.rb +2 -0
  156. data/test/base/test_filter.rb +7 -5
  157. data/test/base/test_item.rb +2 -0
  158. data/test/base/test_item_array.rb +3 -1
  159. data/test/base/test_layout.rb +2 -0
  160. data/test/base/test_memoization.rb +2 -0
  161. data/test/base/test_notification_center.rb +2 -0
  162. data/test/base/test_outdatedness_checker.rb +2 -0
  163. data/test/base/test_plugin.rb +2 -0
  164. data/test/base/test_site.rb +2 -0
  165. data/test/base/test_store.rb +2 -0
  166. data/test/checking/checks/test_css.rb +2 -0
  167. data/test/checking/checks/test_external_links.rb +4 -2
  168. data/test/checking/checks/test_html.rb +2 -0
  169. data/test/checking/checks/test_internal_links.rb +5 -3
  170. data/test/checking/checks/test_mixed_content.rb +2 -0
  171. data/test/checking/checks/test_stale.rb +2 -0
  172. data/test/checking/test_check.rb +2 -0
  173. data/test/checking/test_dsl.rb +2 -0
  174. data/test/checking/test_runner.rb +2 -0
  175. data/test/cli/commands/test_check.rb +2 -0
  176. data/test/cli/commands/test_compile.rb +2 -0
  177. data/test/cli/commands/test_create_site.rb +2 -0
  178. data/test/cli/commands/test_help.rb +2 -0
  179. data/test/cli/commands/test_info.rb +2 -0
  180. data/test/cli/commands/test_prune.rb +2 -0
  181. data/test/cli/test_cleaning_stream.rb +2 -0
  182. data/test/cli/test_cli.rb +11 -9
  183. data/test/cli/test_error_handler.rb +2 -0
  184. data/test/cli/test_logger.rb +2 -0
  185. data/test/data_sources/test_filesystem.rb +8 -6
  186. data/test/data_sources/test_filesystem_tools.rb +2 -0
  187. data/test/deploying/test_fog.rb +2 -0
  188. data/test/deploying/test_rsync.rb +4 -2
  189. data/test/extra/core_ext/test_pathname.rb +2 -0
  190. data/test/extra/core_ext/test_time.rb +2 -0
  191. data/test/extra/test_link_collector.rb +2 -0
  192. data/test/extra/test_piper.rb +2 -0
  193. data/test/filters/colorize_syntax/test_coderay.rb +2 -0
  194. data/test/filters/colorize_syntax/test_common.rb +2 -0
  195. data/test/filters/colorize_syntax/test_pygmentize.rb +2 -0
  196. data/test/filters/colorize_syntax/test_pygments.rb +2 -0
  197. data/test/filters/colorize_syntax/test_simon.rb +2 -0
  198. data/test/filters/test_asciidoc.rb +2 -0
  199. data/test/filters/test_bluecloth.rb +2 -0
  200. data/test/filters/test_coffeescript.rb +2 -0
  201. data/test/filters/test_erb.rb +7 -5
  202. data/test/filters/test_erubis.rb +6 -4
  203. data/test/filters/test_haml.rb +7 -5
  204. data/test/filters/test_handlebars.rb +2 -0
  205. data/test/filters/test_kramdown.rb +2 -0
  206. data/test/filters/test_markaby.rb +2 -0
  207. data/test/filters/test_maruku.rb +2 -0
  208. data/test/filters/test_mustache.rb +4 -2
  209. data/test/filters/test_pandoc.rb +2 -0
  210. data/test/filters/test_rainpress.rb +2 -0
  211. data/test/filters/test_rdiscount.rb +2 -0
  212. data/test/filters/test_rdoc.rb +2 -0
  213. data/test/filters/test_redcarpet.rb +2 -0
  214. data/test/filters/test_redcloth.rb +2 -0
  215. data/test/filters/test_relativize_paths.rb +2 -0
  216. data/test/filters/test_rubypants.rb +2 -0
  217. data/test/filters/test_sass.rb +4 -2
  218. data/test/filters/test_slim.rb +4 -2
  219. data/test/filters/test_typogruby.rb +2 -0
  220. data/test/filters/test_uglify_js.rb +2 -0
  221. data/test/filters/test_xsl.rb +2 -0
  222. data/test/filters/test_yui_compressor.rb +5 -3
  223. data/test/helpers/test_blogging.rb +2 -0
  224. data/test/helpers/test_capturing.rb +2 -0
  225. data/test/helpers/test_link_to.rb +2 -0
  226. data/test/helpers/test_xml_sitemap.rb +2 -0
  227. data/test/rule_dsl/test_action_provider.rb +2 -0
  228. data/test/rule_dsl/test_compiler_dsl.rb +6 -4
  229. data/test/rule_dsl/test_rule.rb +2 -0
  230. data/test/rule_dsl/test_rules_collection.rb +2 -0
  231. data/test/test_gem.rb +2 -0
  232. metadata +124 -17
  233. data/test/base/test_item_rep.rb +0 -156
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.5
4
+ version: 4.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-24 00:00:00.000000000 Z
11
+ date: 2016-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cri
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.0'
55
- - !ruby/object:Gem::Dependency
56
- name: parallel
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.9'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.9'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: bundler
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -264,6 +250,7 @@ files:
264
250
  - lib/nanoc/extra/core_ext/time.rb
265
251
  - lib/nanoc/extra/jruby_nokogiri_warner.rb
266
252
  - lib/nanoc/extra/link_collector.rb
253
+ - lib/nanoc/extra/parallel_collection.rb
267
254
  - lib/nanoc/extra/piper.rb
268
255
  - lib/nanoc/filters.rb
269
256
  - lib/nanoc/filters/asciidoc.rb
@@ -318,6 +305,127 @@ files:
318
305
  - lib/nanoc/spec.rb
319
306
  - lib/nanoc/version.rb
320
307
  - nanoc.gemspec
308
+ - spec/contributors_spec.rb
309
+ - spec/nanoc/base/checksummer_spec.rb
310
+ - spec/nanoc/base/compiler_spec.rb
311
+ - spec/nanoc/base/entities/configuration_spec.rb
312
+ - spec/nanoc/base/entities/content_spec.rb
313
+ - spec/nanoc/base/entities/document_spec.rb
314
+ - spec/nanoc/base/entities/identifier_spec.rb
315
+ - spec/nanoc/base/entities/item_rep_spec.rb
316
+ - spec/nanoc/base/entities/item_spec.rb
317
+ - spec/nanoc/base/entities/layout_spec.rb
318
+ - spec/nanoc/base/entities/lazy_value_spec.rb
319
+ - spec/nanoc/base/entities/outdatedness_status_spec.rb
320
+ - spec/nanoc/base/entities/pattern_spec.rb
321
+ - spec/nanoc/base/entities/processing_action_spec.rb
322
+ - spec/nanoc/base/entities/processing_actions/filter_spec.rb
323
+ - spec/nanoc/base/entities/processing_actions/layout_spec.rb
324
+ - spec/nanoc/base/entities/processing_actions/snapshot_spec.rb
325
+ - spec/nanoc/base/entities/props_spec.rb
326
+ - spec/nanoc/base/entities/rule_memory_spec.rb
327
+ - spec/nanoc/base/entities/site_spec.rb
328
+ - spec/nanoc/base/feature_spec.rb
329
+ - spec/nanoc/base/filter_spec.rb
330
+ - spec/nanoc/base/item_rep_writer_spec.rb
331
+ - spec/nanoc/base/plugin_registry_spec.rb
332
+ - spec/nanoc/base/repos/checksum_store_spec.rb
333
+ - spec/nanoc/base/repos/compiled_content_cache_spec.rb
334
+ - spec/nanoc/base/repos/config_loader_spec.rb
335
+ - spec/nanoc/base/repos/dependency_store_spec.rb
336
+ - spec/nanoc/base/repos/site_loader_spec.rb
337
+ - spec/nanoc/base/services/dependency_tracker_spec.rb
338
+ - spec/nanoc/base/services/executor_spec.rb
339
+ - spec/nanoc/base/services/item_rep_router_spec.rb
340
+ - spec/nanoc/base/services/item_rep_selector_spec.rb
341
+ - spec/nanoc/base/services/outdatedness_checker_spec.rb
342
+ - spec/nanoc/base/services/outdatedness_rules_spec.rb
343
+ - spec/nanoc/base/services/pruner_spec.rb
344
+ - spec/nanoc/base/services/temp_filename_factory_spec.rb
345
+ - spec/nanoc/base/views/config_view_spec.rb
346
+ - spec/nanoc/base/views/document_view_spec.rb
347
+ - spec/nanoc/base/views/identifiable_collection_view_spec.rb
348
+ - spec/nanoc/base/views/item_collection_with_reps_view_spec.rb
349
+ - spec/nanoc/base/views/item_collection_without_reps_view_spec.rb
350
+ - spec/nanoc/base/views/item_rep_collection_view_spec.rb
351
+ - spec/nanoc/base/views/item_rep_view_spec.rb
352
+ - spec/nanoc/base/views/item_view_spec.rb
353
+ - spec/nanoc/base/views/layout_collection_view_spec.rb
354
+ - spec/nanoc/base/views/layout_view_spec.rb
355
+ - spec/nanoc/base/views/mutable_config_view_spec.rb
356
+ - spec/nanoc/base/views/mutable_document_view_spec.rb
357
+ - spec/nanoc/base/views/mutable_identifiable_collection_view_spec.rb
358
+ - spec/nanoc/base/views/mutable_item_collection_view_spec.rb
359
+ - spec/nanoc/base/views/mutable_item_view_spec.rb
360
+ - spec/nanoc/base/views/mutable_layout_collection_view_spec.rb
361
+ - spec/nanoc/base/views/mutable_layout_view_spec.rb
362
+ - spec/nanoc/base/views/post_compile_item_rep_collection_view_spec.rb
363
+ - spec/nanoc/base/views/post_compile_item_rep_view_spec.rb
364
+ - spec/nanoc/base/views/post_compile_item_view_spec.rb
365
+ - spec/nanoc/cli/commands/compile/file_action_printer_spec.rb
366
+ - spec/nanoc/cli/commands/compile/timing_recorder_spec.rb
367
+ - spec/nanoc/cli/commands/compile_spec.rb
368
+ - spec/nanoc/cli/commands/deploy_spec.rb
369
+ - spec/nanoc/cli/commands/shell_spec.rb
370
+ - spec/nanoc/cli/commands/show_data_spec.rb
371
+ - spec/nanoc/cli/commands/show_rules_spec.rb
372
+ - spec/nanoc/cli/commands/view_spec.rb
373
+ - spec/nanoc/data_sources/filesystem_spec.rb
374
+ - spec/nanoc/deploying/fog_spec.rb
375
+ - spec/nanoc/extra/parallel_collection_spec.rb
376
+ - spec/nanoc/filters/colorize_syntax/rouge_spec.rb
377
+ - spec/nanoc/filters/less_spec.rb
378
+ - spec/nanoc/helpers/blogging_spec.rb
379
+ - spec/nanoc/helpers/breadcrumbs_spec.rb
380
+ - spec/nanoc/helpers/capturing_spec.rb
381
+ - spec/nanoc/helpers/child_parent_spec.rb
382
+ - spec/nanoc/helpers/filtering_spec.rb
383
+ - spec/nanoc/helpers/html_escape_spec.rb
384
+ - spec/nanoc/helpers/link_to_spec.rb
385
+ - spec/nanoc/helpers/rendering_spec.rb
386
+ - spec/nanoc/helpers/tagging_spec.rb
387
+ - spec/nanoc/helpers/text_spec.rb
388
+ - spec/nanoc/integration/outdatedness_integration_spec.rb
389
+ - spec/nanoc/regressions/gh_1015_spec.rb
390
+ - spec/nanoc/regressions/gh_1031_spec.rb
391
+ - spec/nanoc/regressions/gh_1035_spec.rb
392
+ - spec/nanoc/regressions/gh_1040_spec.rb
393
+ - spec/nanoc/regressions/gh_761_spec.rb
394
+ - spec/nanoc/regressions/gh_767_spec.rb
395
+ - spec/nanoc/regressions/gh_769_spec.rb
396
+ - spec/nanoc/regressions/gh_776_spec.rb
397
+ - spec/nanoc/regressions/gh_787_spec.rb
398
+ - spec/nanoc/regressions/gh_795_spec.rb
399
+ - spec/nanoc/regressions/gh_804_spec.rb
400
+ - spec/nanoc/regressions/gh_807_spec.rb
401
+ - spec/nanoc/regressions/gh_809_spec.rb
402
+ - spec/nanoc/regressions/gh_813_spec.rb
403
+ - spec/nanoc/regressions/gh_815_spec.rb
404
+ - spec/nanoc/regressions/gh_828_spec.rb
405
+ - spec/nanoc/regressions/gh_833_spec.rb
406
+ - spec/nanoc/regressions/gh_841_spec.rb
407
+ - spec/nanoc/regressions/gh_867_spec.rb
408
+ - spec/nanoc/regressions/gh_882_spec.rb
409
+ - spec/nanoc/regressions/gh_885_spec.rb
410
+ - spec/nanoc/regressions/gh_891_spec.rb
411
+ - spec/nanoc/regressions/gh_913_spec.rb
412
+ - spec/nanoc/regressions/gh_928_spec.rb
413
+ - spec/nanoc/regressions/gh_937_spec.rb
414
+ - spec/nanoc/regressions/gh_942_spec.rb
415
+ - spec/nanoc/regressions/gh_947_spec.rb
416
+ - spec/nanoc/regressions/gh_948_spec.rb
417
+ - spec/nanoc/regressions/gh_951_spec.rb
418
+ - spec/nanoc/regressions/gh_954_spec.rb
419
+ - spec/nanoc/regressions/gh_970a_spec.rb
420
+ - spec/nanoc/regressions/gh_970b_spec.rb
421
+ - spec/nanoc/regressions/gh_974_spec.rb
422
+ - spec/nanoc/regressions/gh_981_spec.rb
423
+ - spec/nanoc/rule_dsl/recording_executor_spec.rb
424
+ - spec/nanoc/rule_dsl/rule_context_spec.rb
425
+ - spec/nanoc/rule_dsl/rule_memory_calculator_spec.rb
426
+ - spec/nanoc/rule_dsl/rules_collection_spec.rb
427
+ - spec/regression_filenames_spec.rb
428
+ - spec/spec_helper.rb
321
429
  - test/base/core_ext/array_spec.rb
322
430
  - test/base/core_ext/hash_spec.rb
323
431
  - test/base/core_ext/pathname_spec.rb
@@ -331,7 +439,6 @@ files:
331
439
  - test/base/test_filter.rb
332
440
  - test/base/test_item.rb
333
441
  - test/base/test_item_array.rb
334
- - test/base/test_item_rep.rb
335
442
  - test/base/test_layout.rb
336
443
  - test/base/test_memoization.rb
337
444
  - test/base/test_notification_center.rb
@@ -1,156 +0,0 @@
1
- class Nanoc::Int::ItemRepTest < Nanoc::TestCase
2
- def test_compiled_content_with_only_last_available
3
- # Create rep
4
- item = Nanoc::Int::Item.new(
5
- 'blah blah blah', {}, '/'
6
- )
7
- rep = Nanoc::Int::ItemRep.new(item, :donkeys)
8
- rep.snapshot_contents = {
9
- last: Nanoc::Int::TextualContent.new('last content'),
10
- }
11
- rep.expects(:compiled?).returns(true)
12
-
13
- # Check
14
- assert_equal 'last content', rep.compiled_content
15
- end
16
-
17
- def test_compiled_content_with_pre_and_last_available
18
- # Create rep
19
- item = Nanoc::Int::Item.new(
20
- 'blah blah blah', {}, '/'
21
- )
22
- rep = Nanoc::Int::ItemRep.new(item, :donkeys)
23
- rep.snapshot_contents = {
24
- pre: Nanoc::Int::TextualContent.new('pre content'),
25
- last: Nanoc::Int::TextualContent.new('last content'),
26
- }
27
- rep.expects(:compiled?).returns(true)
28
-
29
- # Check
30
- assert_equal 'pre content', rep.compiled_content
31
- end
32
-
33
- def test_compiled_content_with_custom_snapshot
34
- # Create rep
35
- item = Nanoc::Int::Item.new(
36
- 'blah blah blah', {}, '/'
37
- )
38
- rep = Nanoc::Int::ItemRep.new(item, :donkeys)
39
- rep.snapshot_contents = {
40
- pre: Nanoc::Int::TextualContent.new('pre content'),
41
- last: Nanoc::Int::TextualContent.new('last content'),
42
- }
43
- rep.expects(:compiled?).returns(true)
44
-
45
- # Check
46
- assert_equal 'last content', rep.compiled_content(snapshot: :last)
47
- end
48
-
49
- def test_compiled_content_with_invalid_snapshot
50
- # Create rep
51
- item = Nanoc::Int::Item.new(
52
- 'blah blah blah', {}, '/'
53
- )
54
- rep = Nanoc::Int::ItemRep.new(item, :donkeys)
55
- rep.snapshot_contents = {
56
- pre: Nanoc::Int::TextualContent.new('pre content'),
57
- last: Nanoc::Int::TextualContent.new('last content'),
58
- }
59
-
60
- # Check
61
- assert_raises Nanoc::Int::Errors::NoSuchSnapshot do
62
- rep.compiled_content(snapshot: :klsjflkasdfl)
63
- end
64
- end
65
-
66
- def test_compiled_content_with_uncompiled_content
67
- # Create rep
68
- item = Nanoc::Int::Item.new(
69
- 'blah blah', {}, '/'
70
- )
71
- rep = Nanoc::Int::ItemRep.new(item, :donkeys)
72
- rep.expects(:compiled?).returns(false)
73
-
74
- # Check
75
- assert_raises(FiberError) do
76
- rep.compiled_content
77
- end
78
- end
79
-
80
- def test_compiled_content_with_moving_pre_snapshot
81
- # Create rep
82
- item = Nanoc::Int::Item.new(
83
- 'blah blah', {}, '/'
84
- )
85
- rep = Nanoc::Int::ItemRep.new(item, :donkeys)
86
- rep.expects(:compiled?).returns(false)
87
- rep.snapshot_contents = {
88
- pre: Nanoc::Int::TextualContent.new('pre!'),
89
- last: Nanoc::Int::TextualContent.new('last!'),
90
- }
91
-
92
- # Check
93
- assert_raises(FiberError) do
94
- rep.compiled_content(snapshot: :pre)
95
- end
96
- end
97
-
98
- def test_compiled_content_with_non_moving_pre_snapshot
99
- # Create rep
100
- item = Nanoc::Int::Item.new(
101
- 'blah blah', {}, '/'
102
- )
103
- rep = Nanoc::Int::ItemRep.new(item, :donkeys)
104
- rep.expects(:compiled?).returns(false)
105
- rep.snapshot_defs = [
106
- Nanoc::Int::SnapshotDef.new(:pre, true),
107
- ]
108
- rep.snapshot_contents = {
109
- pre: Nanoc::Int::TextualContent.new('pre!'),
110
- post: Nanoc::Int::TextualContent.new('post!'),
111
- last: Nanoc::Int::TextualContent.new('last!'),
112
- }
113
-
114
- # Check
115
- assert_equal 'pre!', rep.compiled_content(snapshot: :pre)
116
- end
117
-
118
- def test_compiled_content_with_multiple_pre_snapshots
119
- # Create rep
120
- item = Nanoc::Int::Item.new(
121
- 'blah blah', {}, '/'
122
- )
123
- rep = Nanoc::Int::ItemRep.new(item, :donkeys)
124
- rep.expects(:compiled?).returns(false)
125
- rep.snapshot_defs = [
126
- Nanoc::Int::SnapshotDef.new(:pre, false),
127
- Nanoc::Int::SnapshotDef.new(:pre, true),
128
- ]
129
- rep.snapshot_contents = {
130
- pre: Nanoc::Int::TextualContent.new('pre!'),
131
- post: Nanoc::Int::TextualContent.new('post!'),
132
- last: Nanoc::Int::TextualContent.new('last!'),
133
- }
134
-
135
- # Check
136
- assert_equal 'pre!', rep.compiled_content(snapshot: :pre)
137
- end
138
-
139
- def test_access_compiled_content_of_binary_item
140
- content = Nanoc::Int::BinaryContent.new(File.expand_path('content/somefile.dat'))
141
- item = Nanoc::Int::Item.new(content, {}, '/somefile/')
142
-
143
- item_rep = Nanoc::Int::ItemRep.new(item, :foo)
144
- item_rep.expects(:compiled?).returns(true)
145
-
146
- assert_raises(Nanoc::Int::Errors::CannotGetCompiledContentOfBinaryItem) do
147
- item_rep.compiled_content
148
- end
149
- end
150
-
151
- private
152
-
153
- def create_rep_for(item, name)
154
- Nanoc::Int::ItemRep.new(item, name)
155
- end
156
- end