nanoc 3.7.4 → 3.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (284) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +19 -18
  3. data/LICENSE +1 -1
  4. data/NEWS.md +14 -0
  5. data/Rakefile +1 -1
  6. data/doc/yardoc_handlers/identifier.rb +1 -5
  7. data/lib/nanoc.rb +1 -3
  8. data/lib/nanoc/base.rb +1 -4
  9. data/lib/nanoc/base/checksummer.rb +10 -12
  10. data/lib/nanoc/base/compilation/checksum_store.rb +0 -4
  11. data/lib/nanoc/base/compilation/compiled_content_cache.rb +0 -4
  12. data/lib/nanoc/base/compilation/compiler.rb +27 -31
  13. data/lib/nanoc/base/compilation/compiler_dsl.rb +3 -7
  14. data/lib/nanoc/base/compilation/dependency_tracker.rb +2 -6
  15. data/lib/nanoc/base/compilation/filter.rb +1 -7
  16. data/lib/nanoc/base/compilation/item_rep_proxy.rb +0 -4
  17. data/lib/nanoc/base/compilation/item_rep_recorder_proxy.rb +0 -4
  18. data/lib/nanoc/base/compilation/outdatedness_checker.rb +0 -4
  19. data/lib/nanoc/base/compilation/outdatedness_reasons.rb +0 -6
  20. data/lib/nanoc/base/compilation/rule.rb +1 -5
  21. data/lib/nanoc/base/compilation/rule_context.rb +7 -11
  22. data/lib/nanoc/base/compilation/rule_memory_calculator.rb +0 -4
  23. data/lib/nanoc/base/compilation/rule_memory_store.rb +0 -4
  24. data/lib/nanoc/base/compilation/rules_collection.rb +5 -9
  25. data/lib/nanoc/base/context.rb +0 -3
  26. data/lib/nanoc/base/core_ext.rb +0 -1
  27. data/lib/nanoc/base/core_ext/array.rb +0 -2
  28. data/lib/nanoc/base/core_ext/hash.rb +0 -2
  29. data/lib/nanoc/base/core_ext/pathname.rb +0 -2
  30. data/lib/nanoc/base/core_ext/string.rb +0 -2
  31. data/lib/nanoc/base/directed_graph.rb +0 -4
  32. data/lib/nanoc/base/errors.rb +1 -39
  33. data/lib/nanoc/base/memoization.rb +0 -4
  34. data/lib/nanoc/base/notification_center.rb +1 -7
  35. data/lib/nanoc/base/plugin_registry.rb +4 -10
  36. data/lib/nanoc/base/result_data/item_rep.rb +8 -16
  37. data/lib/nanoc/base/source_data/code_snippet.rb +1 -5
  38. data/lib/nanoc/base/source_data/configuration.rb +0 -4
  39. data/lib/nanoc/base/source_data/data_source.rb +2 -5
  40. data/lib/nanoc/base/source_data/item.rb +3 -7
  41. data/lib/nanoc/base/source_data/item_array.rb +1 -5
  42. data/lib/nanoc/base/source_data/layout.rb +2 -6
  43. data/lib/nanoc/base/source_data/site.rb +20 -23
  44. data/lib/nanoc/base/store.rb +1 -5
  45. data/lib/nanoc/base/temp_filename_factory.rb +0 -4
  46. data/lib/nanoc/cli.rb +3 -5
  47. data/lib/nanoc/cli/ansi_string_colorizer.rb +6 -10
  48. data/lib/nanoc/cli/cleaning_stream.rb +2 -6
  49. data/lib/nanoc/cli/command_runner.rb +1 -5
  50. data/lib/nanoc/cli/commands/autocompile.rb +2 -6
  51. data/lib/nanoc/cli/commands/check.rb +0 -4
  52. data/lib/nanoc/cli/commands/compile.rb +12 -27
  53. data/lib/nanoc/cli/commands/create-item.rb +1 -5
  54. data/lib/nanoc/cli/commands/create-layout.rb +0 -4
  55. data/lib/nanoc/cli/commands/create-site.rb +2 -8
  56. data/lib/nanoc/cli/commands/deploy.rb +3 -7
  57. data/lib/nanoc/cli/commands/prune.rb +2 -6
  58. data/lib/nanoc/cli/commands/shell.rb +4 -8
  59. data/lib/nanoc/cli/commands/show-data.rb +3 -7
  60. data/lib/nanoc/cli/commands/show-plugins.rb +3 -7
  61. data/lib/nanoc/cli/commands/show-rules.rb +11 -15
  62. data/lib/nanoc/cli/commands/sync.rb +0 -4
  63. data/lib/nanoc/cli/commands/update.rb +1 -7
  64. data/lib/nanoc/cli/commands/validate-css.rb +0 -4
  65. data/lib/nanoc/cli/commands/validate-html.rb +0 -4
  66. data/lib/nanoc/cli/commands/validate-links.rb +0 -4
  67. data/lib/nanoc/cli/commands/view.rb +3 -7
  68. data/lib/nanoc/cli/commands/watch.rb +4 -10
  69. data/lib/nanoc/cli/error_handler.rb +9 -13
  70. data/lib/nanoc/cli/logger.rb +8 -12
  71. data/lib/nanoc/cli/stream_cleaners.rb +0 -4
  72. data/lib/nanoc/cli/stream_cleaners/abstract.rb +1 -5
  73. data/lib/nanoc/cli/stream_cleaners/ansi_colors.rb +0 -4
  74. data/lib/nanoc/cli/stream_cleaners/utf8.rb +1 -5
  75. data/lib/nanoc/data_sources.rb +2 -4
  76. data/lib/nanoc/data_sources/deprecated/delicious.rb +6 -10
  77. data/lib/nanoc/data_sources/deprecated/last_fm.rb +7 -11
  78. data/lib/nanoc/data_sources/deprecated/twitter.rb +2 -6
  79. data/lib/nanoc/data_sources/filesystem.rb +10 -13
  80. data/lib/nanoc/data_sources/filesystem_unified.rb +0 -4
  81. data/lib/nanoc/data_sources/filesystem_verbose.rb +0 -4
  82. data/lib/nanoc/data_sources/static.rb +4 -8
  83. data/lib/nanoc/extra.rb +2 -4
  84. data/lib/nanoc/extra/auto_compiler.rb +2 -6
  85. data/lib/nanoc/extra/checking.rb +0 -4
  86. data/lib/nanoc/extra/checking/check.rb +0 -4
  87. data/lib/nanoc/extra/checking/checks.rb +0 -2
  88. data/lib/nanoc/extra/checking/checks/css.rb +6 -6
  89. data/lib/nanoc/extra/checking/checks/external_links.rb +3 -11
  90. data/lib/nanoc/extra/checking/checks/html.rb +6 -6
  91. data/lib/nanoc/extra/checking/checks/internal_links.rb +3 -7
  92. data/lib/nanoc/extra/checking/checks/stale.rb +3 -7
  93. data/lib/nanoc/extra/checking/dsl.rb +0 -4
  94. data/lib/nanoc/extra/checking/issue.rb +0 -4
  95. data/lib/nanoc/extra/checking/runner.rb +4 -7
  96. data/lib/nanoc/extra/chick.rb +7 -17
  97. data/lib/nanoc/extra/core_ext.rb +0 -1
  98. data/lib/nanoc/extra/core_ext/pathname.rb +0 -4
  99. data/lib/nanoc/extra/core_ext/time.rb +0 -2
  100. data/lib/nanoc/extra/deployer.rb +0 -4
  101. data/lib/nanoc/extra/deployers.rb +0 -4
  102. data/lib/nanoc/extra/deployers/fog.rb +7 -11
  103. data/lib/nanoc/extra/deployers/rsync.rb +1 -5
  104. data/lib/nanoc/extra/file_proxy.rb +1 -5
  105. data/lib/nanoc/extra/filesystem_tools.rb +37 -12
  106. data/lib/nanoc/extra/jruby_nokogiri_warner.rb +0 -4
  107. data/lib/nanoc/extra/link_collector.rb +3 -7
  108. data/lib/nanoc/extra/piper.rb +0 -6
  109. data/lib/nanoc/extra/pruner.rb +1 -7
  110. data/lib/nanoc/extra/validators.rb +0 -4
  111. data/lib/nanoc/extra/validators/links.rb +0 -4
  112. data/lib/nanoc/extra/validators/w3c.rb +0 -4
  113. data/lib/nanoc/extra/vcs.rb +3 -7
  114. data/lib/nanoc/extra/vcses.rb +0 -2
  115. data/lib/nanoc/extra/vcses/bazaar.rb +0 -4
  116. data/lib/nanoc/extra/vcses/dummy.rb +0 -4
  117. data/lib/nanoc/extra/vcses/git.rb +0 -4
  118. data/lib/nanoc/extra/vcses/mercurial.rb +0 -4
  119. data/lib/nanoc/extra/vcses/subversion.rb +0 -4
  120. data/lib/nanoc/filters.rb +0 -2
  121. data/lib/nanoc/filters/asciidoc.rb +1 -5
  122. data/lib/nanoc/filters/bluecloth.rb +0 -2
  123. data/lib/nanoc/filters/coderay.rb +0 -2
  124. data/lib/nanoc/filters/coffeescript.rb +0 -4
  125. data/lib/nanoc/filters/colorize_syntax.rb +17 -15
  126. data/lib/nanoc/filters/erb.rb +1 -3
  127. data/lib/nanoc/filters/erubis.rb +2 -4
  128. data/lib/nanoc/filters/haml.rb +2 -4
  129. data/lib/nanoc/filters/handlebars.rb +0 -4
  130. data/lib/nanoc/filters/kramdown.rb +7 -4
  131. data/lib/nanoc/filters/less.rb +1 -3
  132. data/lib/nanoc/filters/markaby.rb +0 -2
  133. data/lib/nanoc/filters/maruku.rb +0 -2
  134. data/lib/nanoc/filters/mustache.rb +1 -5
  135. data/lib/nanoc/filters/pandoc.rb +0 -2
  136. data/lib/nanoc/filters/rainpress.rb +0 -2
  137. data/lib/nanoc/filters/rdiscount.rb +0 -2
  138. data/lib/nanoc/filters/rdoc.rb +0 -2
  139. data/lib/nanoc/filters/redcarpet.rb +0 -4
  140. data/lib/nanoc/filters/redcloth.rb +0 -2
  141. data/lib/nanoc/filters/relativize_paths.rb +2 -4
  142. data/lib/nanoc/filters/rubypants.rb +0 -2
  143. data/lib/nanoc/filters/sass.rb +2 -4
  144. data/lib/nanoc/filters/sass/sass_filesystem_importer.rb +0 -2
  145. data/lib/nanoc/filters/slim.rb +2 -6
  146. data/lib/nanoc/filters/typogruby.rb +0 -4
  147. data/lib/nanoc/filters/uglify_js.rb +0 -2
  148. data/lib/nanoc/filters/xsl.rb +1 -5
  149. data/lib/nanoc/filters/yui_compressor.rb +0 -4
  150. data/lib/nanoc/helpers.rb +0 -2
  151. data/lib/nanoc/helpers/blogging.rb +12 -20
  152. data/lib/nanoc/helpers/breadcrumbs.rb +0 -4
  153. data/lib/nanoc/helpers/capturing.rb +2 -10
  154. data/lib/nanoc/helpers/filtering.rb +0 -4
  155. data/lib/nanoc/helpers/html_escape.rb +3 -7
  156. data/lib/nanoc/helpers/link_to.rb +0 -4
  157. data/lib/nanoc/helpers/rendering.rb +8 -12
  158. data/lib/nanoc/helpers/tagging.rb +0 -4
  159. data/lib/nanoc/helpers/text.rb +1 -5
  160. data/lib/nanoc/helpers/xml_sitemap.rb +3 -7
  161. data/lib/nanoc/tasks/clean.rb +1 -7
  162. data/lib/nanoc/tasks/deploy/rsync.rake +0 -2
  163. data/lib/nanoc/tasks/validate.rake +0 -4
  164. data/lib/nanoc/version.rb +1 -3
  165. data/nanoc.gemspec +12 -9
  166. data/tasks/rubocop.rake +1 -1
  167. data/tasks/test.rake +6 -7
  168. data/test/base/checksummer_spec.rb +28 -44
  169. data/test/base/core_ext/array_spec.rb +1 -9
  170. data/test/base/core_ext/hash_spec.rb +7 -19
  171. data/test/base/core_ext/pathname_spec.rb +2 -4
  172. data/test/base/core_ext/string_spec.rb +0 -4
  173. data/test/base/temp_filename_factory_spec.rb +0 -8
  174. data/test/base/test_checksum_store.rb +0 -2
  175. data/test/base/test_code_snippet.rb +0 -2
  176. data/test/base/test_compiler.rb +15 -17
  177. data/test/base/test_compiler_dsl.rb +7 -9
  178. data/test/base/test_context.rb +2 -4
  179. data/test/base/test_data_source.rb +0 -2
  180. data/test/base/test_dependency_tracker.rb +0 -2
  181. data/test/base/test_directed_graph.rb +2 -4
  182. data/test/base/test_filter.rb +5 -7
  183. data/test/base/test_item.rb +17 -13
  184. data/test/base/test_item_array.rb +2 -4
  185. data/test/base/test_item_rep.rb +79 -73
  186. data/test/base/test_layout.rb +3 -5
  187. data/test/base/test_memoization.rb +13 -21
  188. data/test/base/test_notification_center.rb +0 -2
  189. data/test/base/test_outdatedness_checker.rb +34 -36
  190. data/test/base/test_plugin.rb +0 -2
  191. data/test/base/test_rule.rb +3 -5
  192. data/test/base/test_rule_context.rb +4 -6
  193. data/test/base/test_site.rb +9 -17
  194. data/test/base/test_store.rb +2 -6
  195. data/test/cli/commands/test_check.rb +1 -3
  196. data/test/cli/commands/test_compile.rb +24 -15
  197. data/test/cli/commands/test_create_item.rb +1 -3
  198. data/test/cli/commands/test_create_layout.rb +0 -2
  199. data/test/cli/commands/test_create_site.rb +0 -3
  200. data/test/cli/commands/test_deploy.rb +9 -11
  201. data/test/cli/commands/test_help.rb +0 -2
  202. data/test/cli/commands/test_info.rb +0 -2
  203. data/test/cli/commands/test_prune.rb +6 -8
  204. data/test/cli/commands/test_sync.rb +0 -2
  205. data/test/cli/commands/test_update.rb +0 -2
  206. data/test/cli/commands/test_watch.rb +4 -6
  207. data/test/cli/test_cleaning_stream.rb +4 -6
  208. data/test/cli/test_cli.rb +9 -5
  209. data/test/cli/test_error_handler.rb +9 -7
  210. data/test/cli/test_logger.rb +0 -2
  211. data/test/data_sources/test_filesystem.rb +8 -10
  212. data/test/data_sources/test_filesystem_unified.rb +35 -34
  213. data/test/data_sources/test_filesystem_verbose.rb +31 -33
  214. data/test/data_sources/test_static.rb +20 -21
  215. data/test/extra/checking/checks/test_css.rb +23 -2
  216. data/test/extra/checking/checks/test_external_links.rb +2 -4
  217. data/test/extra/checking/checks/test_html.rb +4 -3
  218. data/test/extra/checking/checks/test_internal_links.rb +1 -3
  219. data/test/extra/checking/checks/test_stale.rb +4 -6
  220. data/test/extra/checking/test_check.rb +0 -2
  221. data/test/extra/checking/test_dsl.rb +1 -3
  222. data/test/extra/checking/test_runner.rb +0 -2
  223. data/test/extra/core_ext/test_pathname.rb +0 -3
  224. data/test/extra/core_ext/test_time.rb +0 -2
  225. data/test/extra/deployers/test_fog.rb +13 -15
  226. data/test/extra/deployers/test_rsync.rb +4 -6
  227. data/test/extra/test_auto_compiler.rb +47 -25
  228. data/test/extra/test_file_proxy.rb +1 -3
  229. data/test/extra/test_filesystem_tools.rb +47 -7
  230. data/test/extra/test_link_collector.rb +0 -2
  231. data/test/extra/test_piper.rb +3 -5
  232. data/test/extra/test_vcs.rb +0 -2
  233. data/test/extra/validators/test_links.rb +0 -1
  234. data/test/extra/validators/test_w3c.rb +2 -4
  235. data/test/filters/test_asciidoc.rb +0 -2
  236. data/test/filters/test_bluecloth.rb +0 -2
  237. data/test/filters/test_coderay.rb +2 -4
  238. data/test/filters/test_coffeescript.rb +0 -2
  239. data/test/filters/test_colorize_syntax.rb +16 -18
  240. data/test/filters/test_erb.rb +12 -14
  241. data/test/filters/test_erubis.rb +4 -6
  242. data/test/filters/test_haml.rb +7 -9
  243. data/test/filters/test_handlebars.rb +10 -12
  244. data/test/filters/test_kramdown.rb +13 -1
  245. data/test/filters/test_less.rb +9 -11
  246. data/test/filters/test_markaby.rb +0 -2
  247. data/test/filters/test_maruku.rb +0 -2
  248. data/test/filters/test_mustache.rb +4 -6
  249. data/test/filters/test_pandoc.rb +1 -3
  250. data/test/filters/test_rainpress.rb +1 -3
  251. data/test/filters/test_rdiscount.rb +1 -3
  252. data/test/filters/test_rdoc.rb +0 -2
  253. data/test/filters/test_redcarpet.rb +6 -8
  254. data/test/filters/test_redcloth.rb +1 -3
  255. data/test/filters/test_relativize_paths.rb +29 -34
  256. data/test/filters/test_rubypants.rb +0 -2
  257. data/test/filters/test_sass.rb +8 -10
  258. data/test/filters/test_slim.rb +2 -4
  259. data/test/filters/test_typogruby.rb +0 -3
  260. data/test/filters/test_uglify_js.rb +2 -4
  261. data/test/filters/test_xsl.rb +16 -18
  262. data/test/filters/test_yui_compressor.rb +3 -5
  263. data/test/fixtures/vcr_cassettes/css_run_parse_error.yml +65 -0
  264. data/test/gem_loader.rb +1 -1
  265. data/test/helper.rb +11 -15
  266. data/test/helpers/test_blogging.rb +61 -63
  267. data/test/helpers/test_breadcrumbs.rb +0 -2
  268. data/test/helpers/test_capturing.rb +4 -6
  269. data/test/helpers/test_filtering.rb +2 -4
  270. data/test/helpers/test_html_escape.rb +0 -2
  271. data/test/helpers/test_link_to.rb +5 -6
  272. data/test/helpers/test_rendering.rb +2 -4
  273. data/test/helpers/test_tagging.rb +9 -11
  274. data/test/helpers/test_text.rb +6 -8
  275. data/test/helpers/test_xml_sitemap.rb +11 -13
  276. data/test/tasks/test_clean.rb +0 -2
  277. data/test/test_gem.rb +1 -3
  278. metadata +15 -14
  279. data/Gemfile.lock +0 -252
  280. data/lib/nanoc/base/core_ext/date.rb +0 -29
  281. data/lib/nanoc/base/ordered_hash.rb +0 -228
  282. data/lib/nanoc/extra/core_ext/enumerable.rb +0 -33
  283. data/test/base/core_ext/date_spec.rb +0 -15
  284. data/test/extra/core_ext/test_enumerable.rb +0 -28
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15684f17b89e23c06fbe52df15a80529390df3a1
4
- data.tar.gz: fcac628a29b82a5783020594f69a5b738d0fdc9b
3
+ metadata.gz: 271aacd59754102c8bd997df253a98ca21f7fac3
4
+ data.tar.gz: 37db9384d0b9dbcbc80bb22714d856766fa9af42
5
5
  SHA512:
6
- metadata.gz: 37fde883c3804bd00defeb90266326921e79a4077454402c511acd0988a948361642db481019fa3f29a8708a07abaa5accd8000f08e773363156fcd409b75fff
7
- data.tar.gz: fbb6f99a16f66438e70918a0f058b0f3089c41908595270d7d9e68ed5bb29be8feb9c1adff7207c096162a42e33fb15cfb47e7a53b3b08c58b3965eeab599dc7
6
+ metadata.gz: 2b38d502d8dc8d17401312089add955515c7807e1b85bf7c9993fa68350cf9201b859eb305425fa69e2cb13b40d10d2ac2487150d0a3678f444883fb069e0ad0
7
+ data.tar.gz: a468ae8a49f2d3a025f0946aae7a58ee8e4328b3f188c5052e6d64a91751fb55c41077e64d025adff3bac3dfa40c886ca2a77a33f9baa7489249158808e52a09
data/Gemfile CHANGED
@@ -1,45 +1,46 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- # FIXME we may be missing some mswin dependencies here
6
- all_rubies = Bundler::Dependency::PLATFORM_MAP.keys
7
- ruby_19_plus = [:ruby_19, :ruby_20, :ruby_21, :jruby] & all_rubies
8
- ruby_19_plus_without_jruby = [:ruby_19, :ruby_20, :ruby_21] & all_rubies
5
+ # FIXME: we may be missing some mswin dependencies here
9
6
 
10
7
  gem 'adsf'
11
- gem 'bluecloth', :platforms => :ruby
8
+ gem 'bluecloth', platforms: :ruby
12
9
  gem 'builder'
13
10
  gem 'coderay'
14
11
  gem 'compass'
15
12
  gem 'coffee-script'
16
- gem 'coveralls', :require => false
13
+ gem 'coveralls', require: false
17
14
  gem 'erubis'
18
- gem 'fog', :platforms => ruby_19_plus
15
+ gem 'fog'
19
16
  gem 'haml'
20
- gem 'handlebars', :platforms => ruby_19_plus_without_jruby
17
+ gem 'handlebars', platforms: :ruby
21
18
  gem 'kramdown'
22
- gem 'less', '~> 2.0', :platforms => :ruby
23
- gem 'listen', :platforms => ruby_19_plus
19
+ gem 'less', '~> 2.0', platforms: :ruby
20
+ gem 'listen'
24
21
  gem 'markaby'
25
22
  gem 'maruku'
26
- gem 'mime-types', :platforms => ruby_19_plus
23
+ gem 'mime-types'
27
24
  gem 'minitest', '~> 4.0'
28
25
  gem 'mocha'
29
- gem 'mustache'
26
+ if RUBY_VERSION >= '2.0.0'
27
+ gem 'mustache', '~> 1.0'
28
+ else
29
+ gem 'mustache', '~> 0.99'
30
+ end
30
31
  gem 'nokogiri', '~> 1.6'
31
32
  gem 'pandoc-ruby'
32
33
  gem 'pry'
33
- gem 'pygments.rb', :platforms => [:ruby, :mswin]
34
+ gem 'pygments.rb', platforms: [:ruby, :mswin]
34
35
  gem 'rack'
35
36
  gem 'rake'
36
37
  gem 'rainpress'
37
- gem 'rdiscount', :platforms => [:ruby, :mswin]
38
+ gem 'rdiscount', platforms: [:ruby, :mswin]
38
39
  gem 'rdoc'
39
- gem 'redcarpet', :platforms => ruby_19_plus_without_jruby + [:mswin]
40
+ gem 'redcarpet', platforms: [:ruby, :mswin]
40
41
  gem 'RedCloth'
41
42
  gem 'rouge'
42
- gem 'rubocop', :platforms => ruby_19_plus
43
+ gem 'rubocop'
43
44
  gem 'rubypants'
44
45
  gem 'sass', '~> 3.2.2'
45
46
  gem 'slim'
@@ -48,5 +49,5 @@ gem 'uglifier'
48
49
  gem 'vcr'
49
50
  gem 'w3c_validators'
50
51
  gem 'webmock'
51
- gem 'yuicompressor', :platforms => ruby_19_plus
52
+ gem 'yuicompressor'
52
53
  gem 'yard'
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2007-2013 Denis Defreyne and contributors
1
+ Copyright (c) 2007-2015 Denis Defreyne and contributors
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
data/NEWS.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # nanoc news
2
2
 
3
+ ## 3.7.5 (2015-01-12)
4
+
5
+ Enhancements:
6
+
7
+ * Allowed extra patterns to be specified in the data source configuration, so that dotfiles are no longer necessary ignored (e.g. `extra_files: ['.htaccess']`) (#492, #498) [Andy Drop, Michal Papis]
8
+ * Removed Ruby 1.8.x support ([details](https://groups.google.com/forum/#!topic/nanoc/pSL1i15EFz8)) (#517)
9
+ * Improved CSS and HTML error messages (#484, #504)
10
+ * Let kramdown filter print warnings (#459, #519)
11
+
12
+ Fixes:
13
+
14
+ * Fixed HTML class names for recent Rouge versions (#502)
15
+ * Fixed crash when using items or layouts in attributes (#469, #518)
16
+
3
17
  ## 3.7.4 (2014-11-23)
4
18
 
5
19
  Enhancements:
data/Rakefile CHANGED
@@ -11,4 +11,4 @@ require 'nanoc'
11
11
  Dir.glob('tasks/**/*.rake').each { |r| Rake.application.add_import r }
12
12
 
13
13
  # Set default task
14
- task :default => :test
14
+ task default: :test
@@ -1,5 +1,4 @@
1
1
  class NanocIdentifierHandler < ::YARD::Handlers::Ruby::AttributeHandler
2
-
3
2
  # e.g. identifier :foo, :bar
4
3
 
5
4
  handles method_call(:identifier), method_call(:identifiers)
@@ -9,11 +8,9 @@ class NanocIdentifierHandler < ::YARD::Handlers::Ruby::AttributeHandler
9
8
  identifiers = statement.parameters(false).map { |param| param.jump(:ident)[0] }
10
9
  namespace['nanoc_identifiers'] = identifiers
11
10
  end
12
-
13
11
  end
14
12
 
15
13
  class NanocRegisterFilterHandler < ::YARD::Handlers::Ruby::AttributeHandler
16
-
17
14
  # e.g. Nanoc::Filter.register '::Nanoc::Filters::AsciiDoc', :asciidoc
18
15
 
19
16
  handles method_call(:register)
@@ -21,7 +18,7 @@ class NanocRegisterFilterHandler < ::YARD::Handlers::Ruby::AttributeHandler
21
18
 
22
19
  def process
23
20
  target = statement.jump(:const_path_ref)
24
- return if target != s(:const_path_ref, s(:var_ref, s(:const, "Nanoc")), s(:const, "Filter"))
21
+ return if target != s(:const_path_ref, s(:var_ref, s(:const, 'Nanoc')), s(:const, 'Filter'))
25
22
 
26
23
  class_name = statement.jump(:string_literal).jump(:tstring_content)[0]
27
24
  identifier = statement.jump(:symbol_literal).jump(:ident)[0]
@@ -30,5 +27,4 @@ class NanocRegisterFilterHandler < ::YARD::Handlers::Ruby::AttributeHandler
30
27
  obj['nanoc_identifiers'] ||= []
31
28
  obj['nanoc_identifiers'] << identifier
32
29
  end
33
-
34
30
  end
@@ -1,14 +1,13 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Nanoc
4
-
5
4
  # @return [String] A string containing information about this nanoc version
6
5
  # and its environment (Ruby engine and version, Rubygems version if any).
7
6
  def self.version_information
8
7
  gem_info = defined?(Gem) ? "with RubyGems #{Gem::VERSION}" : 'without RubyGems'
9
8
  engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
10
9
  res = ''
11
- res << "nanoc #{Nanoc::VERSION} © 2007-2014 Denis Defreyne.\n"
10
+ res << "nanoc #{Nanoc::VERSION} © 2007-2015 Denis Defreyne.\n"
12
11
  res << "Running #{engine} #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) on #{RUBY_PLATFORM} #{gem_info}.\n"
13
12
  res
14
13
  end
@@ -17,7 +16,6 @@ module Nanoc
17
16
  def self.on_windows?
18
17
  RUBY_PLATFORM =~ /windows|bccwin|cygwin|djgpp|mingw|mswin|wince/i
19
18
  end
20
-
21
19
  end
22
20
 
23
21
  Nanoc3 = Nanoc
@@ -1,9 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Nanoc
4
-
5
4
  require 'nanoc/base/core_ext'
6
- require 'nanoc/base/ordered_hash'
7
5
 
8
6
  # Load helper classes
9
7
  autoload 'Context', 'nanoc/base/context'
@@ -46,7 +44,6 @@ module Nanoc
46
44
  autoload 'RulesCollection', 'nanoc/base/compilation/rules_collection'
47
45
 
48
46
  # Deprecated; use PluginRepository instead
49
- # TODO [in nanoc 4.0] remove me
47
+ # TODO: [in nanoc 4.0] remove me
50
48
  autoload 'Plugin', 'nanoc/base/plugin_registry'
51
-
52
49
  end
@@ -1,15 +1,12 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Nanoc
4
-
5
4
  # Creates checksums for given objects.
6
5
  #
7
6
  # A checksum is a string, such as “mL+TaqNsEeiPkWloPgCtAofT1yg=”, that is used
8
7
  # to determine whether a piece of data has changed.
9
8
  class Checksummer
10
-
11
9
  class << self
12
-
13
10
  # @param obj The object to create a checksum for
14
11
  #
15
12
  # @return [String] The digest
@@ -21,23 +18,28 @@ module Nanoc
21
18
 
22
19
  private
23
20
 
24
- def update(obj, digest)
21
+ def update(obj, digest, visited = Set.new)
25
22
  digest.update(obj.class.to_s)
26
23
 
24
+ if visited.include?(obj)
25
+ digest.update('recur')
26
+ return
27
+ end
28
+
27
29
  case obj
28
30
  when String
29
31
  digest.update(obj)
30
32
  when Array
31
33
  obj.each do |el|
32
34
  digest.update('elem')
33
- update(el, digest)
35
+ update(el, digest, visited + [obj])
34
36
  end
35
37
  when Hash
36
38
  obj.each do |key, value|
37
39
  digest.update('key')
38
- update(key, digest)
40
+ update(key, digest, visited + [obj])
39
41
  digest.update('value')
40
- update(value, digest)
42
+ update(value, digest, visited + [obj])
41
43
  end
42
44
  when Pathname
43
45
  filename = obj.to_s
@@ -62,7 +64,7 @@ module Nanoc
62
64
  digest.update('attributes')
63
65
  attributes = obj.attributes.dup
64
66
  attributes.delete(:file)
65
- update(attributes, digest)
67
+ update(attributes, digest, visited + [obj])
66
68
  else
67
69
  data = begin
68
70
  Marshal.dump(obj)
@@ -72,11 +74,7 @@ module Nanoc
72
74
 
73
75
  digest.update(data)
74
76
  end
75
-
76
77
  end
77
-
78
78
  end
79
-
80
79
  end
81
-
82
80
  end
@@ -1,13 +1,11 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Nanoc
4
-
5
4
  # Stores checksums for objects in order to be able to detect whether a file
6
5
  # has changed since the last site compilation.
7
6
  #
8
7
  # @api private
9
8
  class ChecksumStore < ::Nanoc::Store
10
-
11
9
  # @option params [Nanoc::Site] site The site where this checksum store
12
10
  # belongs to
13
11
  def initialize(params = {})
@@ -51,7 +49,5 @@ module Nanoc
51
49
  def data=(new_data)
52
50
  @checksums = new_data
53
51
  end
54
-
55
52
  end
56
-
57
53
  end
@@ -1,13 +1,11 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Nanoc
4
-
5
4
  # Represents a cache than can be used to store already compiled content,
6
5
  # to prevent it from being needlessly recompiled.
7
6
  #
8
7
  # @api private
9
8
  class CompiledContentCache < ::Nanoc::Store
10
-
11
9
  def initialize
12
10
  super('tmp/compiled_content', 1)
13
11
 
@@ -56,7 +54,5 @@ module Nanoc
56
54
  def data=(new_data)
57
55
  @cache = new_data
58
56
  end
59
-
60
57
  end
61
-
62
58
  end
@@ -1,7 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Nanoc
4
-
5
4
  # Responsible for compiling a site’s item representations.
6
5
  #
7
6
  # The compilation process makes use of notifications (see
@@ -39,7 +38,6 @@ module Nanoc
39
38
  # * `processing_ended` — indicates that the compiler has finished processing
40
39
  # the specified object.
41
40
  class Compiler
42
-
43
41
  extend Nanoc::Memoization
44
42
 
45
43
  # @group Accessors
@@ -125,7 +123,7 @@ module Nanoc
125
123
  route_reps
126
124
 
127
125
  # Load auxiliary stores
128
- stores.each { |s| s.load }
126
+ stores.each(&:load)
129
127
 
130
128
  @loaded = true
131
129
  rescue => e
@@ -144,7 +142,7 @@ module Nanoc
144
142
  return if @unloading
145
143
  @unloading = true
146
144
 
147
- stores.each { |s| s.unload }
145
+ stores.each(&:unload)
148
146
 
149
147
  @stack = []
150
148
 
@@ -175,7 +173,7 @@ module Nanoc
175
173
  end
176
174
 
177
175
  # Store
178
- stores.each { |s| s.store }
176
+ stores.each(&:store)
179
177
  end
180
178
 
181
179
  # Returns the dependency tracker for this site, creating it first if it
@@ -220,7 +218,7 @@ module Nanoc
220
218
  raise Nanoc::Errors::NoMatchingCompilationRuleFound.new(item) if matching_rules.empty?
221
219
 
222
220
  # Create reps
223
- rep_names = matching_rules.map { |r| r.rep_name }.uniq
221
+ rep_names = matching_rules.map(&:rep_name).uniq
224
222
  rep_names.each do |rep_name|
225
223
  item.reps << ItemRep.new(item, rep_name)
226
224
  end
@@ -238,7 +236,7 @@ module Nanoc
238
236
 
239
237
  rules.each_pair do |snapshot, rule|
240
238
  # Get basic path by applying matching rule
241
- basic_path = rule.apply_to(rep, :compiler => self)
239
+ basic_path = rule.apply_to(rep, compiler: self)
242
240
  next if basic_path.nil?
243
241
  if basic_path !~ %r{^/}
244
242
  raise "The path returned for the #{rep.inspect} item representation, “#{basic_path}”, does not start with a slash. Please ensure that all routing rules return a path that starts with a slash."
@@ -270,28 +268,28 @@ module Nanoc
270
268
  # @api private
271
269
  def assigns_for(rep)
272
270
  if rep.binary?
273
- content_or_filename_assigns = { :filename => rep.temporary_filenames[:last] }
271
+ content_or_filename_assigns = { filename: rep.temporary_filenames[:last] }
274
272
  else
275
- content_or_filename_assigns = { :content => rep.content[:last] }
273
+ content_or_filename_assigns = { content: rep.content[:last] }
276
274
  end
277
275
 
278
276
  content_or_filename_assigns.merge({
279
- :item => rep.item,
280
- :rep => rep,
281
- :item_rep => rep,
282
- :items => site.items,
283
- :layouts => site.layouts,
284
- :config => site.config,
285
- :site => site
277
+ item: rep.item,
278
+ rep: rep,
279
+ item_rep: rep,
280
+ items: site.items,
281
+ layouts: site.layouts,
282
+ config: site.config,
283
+ site: site
286
284
  })
287
285
  end
288
286
 
289
287
  # @return [Nanoc::OutdatednessChecker] The outdatedness checker
290
288
  def outdatedness_checker
291
289
  Nanoc::OutdatednessChecker.new(
292
- :site => @site,
293
- :checksum_store => checksum_store,
294
- :dependency_tracker => dependency_tracker)
290
+ site: @site,
291
+ checksum_store: checksum_store,
292
+ dependency_tracker: dependency_tracker)
295
293
  end
296
294
  memoize :outdatedness_checker
297
295
 
@@ -305,7 +303,7 @@ module Nanoc
305
303
 
306
304
  # @return [Array<Nanoc::ItemRep>] The site’s item representations
307
305
  def reps
308
- items.map { |i| i.reps }.flatten
306
+ items.map(&:reps).flatten
309
307
  end
310
308
  memoize :reps
311
309
 
@@ -383,8 +381,8 @@ module Nanoc
383
381
  else
384
382
  # Recalculate content
385
383
  rep.snapshot(:raw)
386
- rep.snapshot(:pre, :final => false)
387
- rules_collection.compilation_rule_for(rep).apply_to(rep, :compiler => self)
384
+ rep.snapshot(:pre, final: false)
385
+ rules_collection.compilation_rule_for(rep).apply_to(rep, compiler: self)
388
386
  rep.snapshot(:post) if rep.has_snapshot?(:post)
389
387
  rep.snapshot(:last)
390
388
  end
@@ -419,10 +417,10 @@ module Nanoc
419
417
  # Returns a preprocessor context, creating one if none exists yet.
420
418
  def preprocessor_context
421
419
  Nanoc::Context.new({
422
- :site => @site,
423
- :config => @site.config,
424
- :items => @site.items,
425
- :layouts => @site.layouts
420
+ site: @site,
421
+ config: @site.config,
422
+ items: @site.items,
423
+ layouts: @site.layouts
426
424
  })
427
425
  end
428
426
  memoize :preprocessor_context
@@ -435,19 +433,19 @@ module Nanoc
435
433
 
436
434
  # @return [ChecksumStore] The checksum store
437
435
  def checksum_store
438
- Nanoc::ChecksumStore.new(:site => @site)
436
+ Nanoc::ChecksumStore.new(site: @site)
439
437
  end
440
438
  memoize :checksum_store
441
439
 
442
440
  # @return [RuleMemoryStore] The rule memory store
443
441
  def rule_memory_store
444
- Nanoc::RuleMemoryStore.new(:site => @site)
442
+ Nanoc::RuleMemoryStore.new(site: @site)
445
443
  end
446
444
  memoize :rule_memory_store
447
445
 
448
446
  # @return [RuleMemoryCalculator] The rule memory calculator
449
447
  def rule_memory_calculator
450
- Nanoc::RuleMemoryCalculator.new(:rules_collection => rules_collection)
448
+ Nanoc::RuleMemoryCalculator.new(rules_collection: rules_collection)
451
449
  end
452
450
  memoize :rule_memory_calculator
453
451
 
@@ -461,7 +459,5 @@ module Nanoc
461
459
  rule_memory_store
462
460
  ]
463
461
  end
464
-
465
462
  end
466
-
467
463
  end