middleman-core 4.5.0 → 4.6.0

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 (364) hide show
  1. checksums.yaml +4 -4
  2. data/.simplecov +0 -2
  3. data/.yardopts +1 -2
  4. data/Rakefile +1 -1
  5. data/features/builder.feature +4 -4
  6. data/features/content_type.feature +1 -1
  7. data/features/data.feature +5 -0
  8. data/features/front-matter.feature +21 -0
  9. data/features/minify_javascript.feature +38 -39
  10. data/features/preview_changes.feature +11 -0
  11. data/features/sass_in_slim.feature +2 -2
  12. data/features/support/env.rb +8 -0
  13. data/fixtures/asset-hash-app/source/apple-touch-icon.png +0 -0
  14. data/fixtures/asset-hash-app/source/favicon.ico +0 -0
  15. data/fixtures/asset-hash-app/source/fonts/fontawesome-webfont.woff +0 -0
  16. data/fixtures/asset-hash-app/source/fonts/fontawesome-webfont.woff2 +0 -0
  17. data/fixtures/asset-hash-app/source/images/100px.gif +0 -0
  18. data/fixtures/asset-hash-app/source/images/100px.jpg +0 -0
  19. data/fixtures/asset-hash-app/source/images/100px.png +0 -0
  20. data/fixtures/asset-hash-app/source/images/200px.jpg +0 -0
  21. data/fixtures/asset-hash-app/source/images/300px.jpg +0 -0
  22. data/fixtures/asset-hash-host-app/source/images/100px.gif +0 -0
  23. data/fixtures/asset-hash-host-app/source/images/100px.jpg +0 -0
  24. data/fixtures/asset-hash-host-app/source/images/100px.png +0 -0
  25. data/fixtures/asset-hash-minified-app/source/images/100px.jpg +0 -0
  26. data/fixtures/asset-hash-prefix/source/javascripts/application.js.map +0 -0
  27. data/fixtures/asset-hash-remove-filename/source/javascripts/application.js.map +0 -0
  28. data/fixtures/asset-hash-source-map/source/javascripts/application.js.map +0 -0
  29. data/fixtures/asset-host-app/source/.htaccess +0 -0
  30. data/fixtures/asset-host-app/source/images/blank0.gif +0 -0
  31. data/fixtures/asset-host-app/source/images/blank1.gif +0 -0
  32. data/fixtures/asset-host-app/source/images/blank10.gif +0 -0
  33. data/fixtures/asset-host-app/source/images/blank100.gif +0 -0
  34. data/fixtures/asset-host-app/source/images/blank101.gif +0 -0
  35. data/fixtures/asset-host-app/source/images/blank1010.gif +0 -0
  36. data/fixtures/asset-host-app/source/images/blank102.gif +0 -0
  37. data/fixtures/asset-host-app/source/images/blank1020.gif +0 -0
  38. data/fixtures/asset-host-app/source/images/blank1021.gif +0 -0
  39. data/fixtures/asset-host-app/source/images/blank1022.gif +0 -0
  40. data/fixtures/asset-host-app/source/images/blank1023.gif +0 -0
  41. data/fixtures/asset-host-app/source/images/blank1024.gif +0 -0
  42. data/fixtures/asset-host-app/source/images/blank103.gif +0 -0
  43. data/fixtures/asset-host-app/source/images/blank1030.gif +0 -0
  44. data/fixtures/asset-host-app/source/images/blank1031.gif +0 -0
  45. data/fixtures/asset-host-app/source/images/blank1032.gif +0 -0
  46. data/fixtures/asset-host-app/source/images/blank1033.gif +0 -0
  47. data/fixtures/asset-host-app/source/images/blank1034.gif +0 -0
  48. data/fixtures/asset-host-app/source/images/blank104.gif +0 -0
  49. data/fixtures/asset-host-app/source/images/blank1043.gif +0 -0
  50. data/fixtures/asset-host-app/source/images/blank1054.gif +0 -0
  51. data/fixtures/asset-host-app/source/images/blank2.gif +0 -0
  52. data/fixtures/asset-host-app/source/images/blank20.gif +0 -0
  53. data/fixtures/asset-host-app/source/images/blank21.gif +0 -0
  54. data/fixtures/asset-host-app/source/images/blank22.gif +0 -0
  55. data/fixtures/asset-host-app/source/images/blank23.gif +0 -0
  56. data/fixtures/asset-host-app/source/images/blank24.gif +0 -0
  57. data/fixtures/asset-host-app/source/images/blank3.gif +0 -0
  58. data/fixtures/asset-host-app/source/images/blank30.gif +0 -0
  59. data/fixtures/asset-host-app/source/images/blank31.gif +0 -0
  60. data/fixtures/asset-host-app/source/images/blank32.gif +0 -0
  61. data/fixtures/asset-host-app/source/images/blank33.gif +0 -0
  62. data/fixtures/asset-host-app/source/images/blank34.gif +0 -0
  63. data/fixtures/asset-host-app/source/images/blank4.gif +0 -0
  64. data/fixtures/asset-host-app/source/images/blank43.gif +0 -0
  65. data/fixtures/asset-host-app/source/images/blank54.gif +0 -0
  66. data/fixtures/auto-css-app/source/stylesheets/auto-css/index.css +0 -0
  67. data/fixtures/auto-js-directory-index-app/config.rb +0 -0
  68. data/fixtures/automatic-alt-tags-app/config.rb +0 -0
  69. data/fixtures/automatic-directory-matcher-app/source/root-plain.html +0 -0
  70. data/fixtures/automatic-directory-matcher-app/source/root.html.erb +0 -0
  71. data/fixtures/automatic-directory-matcher-app/source/sub--sub--sub-plain.html +0 -0
  72. data/fixtures/automatic-directory-matcher-app/source/sub--sub--sub.html.erb +0 -0
  73. data/fixtures/automatic-directory-matcher-app/source/sub--sub-plain.html +0 -0
  74. data/fixtures/automatic-directory-matcher-app/source/sub--sub.html.erb +0 -0
  75. data/fixtures/automatic-image-size-app/config.rb +0 -0
  76. data/fixtures/build-with-errors-app/source/index.html.erb +0 -0
  77. data/fixtures/cache-buster-app/config.rb +0 -0
  78. data/fixtures/chained-app/config.rb +0 -0
  79. data/fixtures/clean-app/config-empty.rb +0 -0
  80. data/fixtures/clean-app/source/real.html +0 -0
  81. data/fixtures/clean-app/source/should_be_ignored.html +0 -0
  82. data/fixtures/clean-app/source/should_be_ignored2.html +0 -0
  83. data/fixtures/clean-app/source/should_be_ignored3.html +0 -0
  84. data/fixtures/clean-dir-app/source/about.html +0 -0
  85. data/fixtures/clean-nested-app/config.rb +0 -0
  86. data/fixtures/clean-nested-app/source/about.html +0 -0
  87. data/fixtures/clean-nested-app/source/nested/nested.html +0 -0
  88. data/fixtures/coffeescript-app/config.rb +0 -0
  89. data/fixtures/content-type-app/source/.htaccess +0 -0
  90. data/fixtures/content-type-app/source/README +0 -0
  91. data/fixtures/content-type-app/source/javascripts/app.js +0 -0
  92. data/fixtures/content-type-app/source/stylesheets/site.css +0 -0
  93. data/fixtures/csspie/config.rb +0 -0
  94. data/fixtures/custom-layout-app2/config.rb +0 -0
  95. data/fixtures/custom-src-app/src/index.html +0 -0
  96. data/fixtures/data-with-aliases-app/config.rb +3 -0
  97. data/fixtures/data-with-aliases-app/data/pages.yml +9 -0
  98. data/fixtures/data-with-aliases-app/source/index.html.erb +1 -0
  99. data/fixtures/data-with-aliases-app/source/layout.erb +5 -0
  100. data/fixtures/default-alt-tags-app/config.rb +0 -0
  101. data/fixtures/default-alt-tags-app/source/images/blank.gif +0 -0
  102. data/fixtures/different-engine-layout/config.rb +0 -0
  103. data/fixtures/different-engine-partial/config.rb +0 -0
  104. data/fixtures/different-engine-partial/source/index.html.erb +0 -0
  105. data/fixtures/different-engine-partial/source/shared/_footer.str +0 -0
  106. data/fixtures/different-engine-partial/source/shared/_header.erb +0 -0
  107. data/fixtures/dynamic-pages-app/source/real.html +0 -0
  108. data/fixtures/dynamic-pages-app/source/should_be_ignored.html +0 -0
  109. data/fixtures/dynamic-pages-app/source/should_be_ignored2.html +0 -0
  110. data/fixtures/dynamic-pages-app/source/should_be_ignored3.html +0 -0
  111. data/fixtures/dynamic-pages-app/source/should_be_ignored4.html +0 -0
  112. data/fixtures/dynamic-pages-app/source/should_be_ignored5.html +0 -0
  113. data/fixtures/dynamic-pages-app/source/should_be_ignored6.html +0 -0
  114. data/fixtures/dynamic-pages-app/source/should_be_ignored7.html +0 -0
  115. data/fixtures/dynamic-pages-app/source/should_be_ignored8.html +0 -0
  116. data/fixtures/ember-cli-app/source/javascripts/file.js +0 -0
  117. data/fixtures/ember-cli-app/test-app/app/components/.gitkeep +0 -0
  118. data/fixtures/ember-cli-app/test-app/app/controllers/.gitkeep +0 -0
  119. data/fixtures/ember-cli-app/test-app/app/helpers/.gitkeep +0 -0
  120. data/fixtures/ember-cli-app/test-app/app/models/.gitkeep +0 -0
  121. data/fixtures/ember-cli-app/test-app/app/routes/.gitkeep +0 -0
  122. data/fixtures/ember-cli-app/test-app/app/styles/.gitkeep +0 -0
  123. data/fixtures/ember-cli-app/test-app/app/templates/.gitkeep +0 -0
  124. data/fixtures/ember-cli-app/test-app/app/templates/components/.gitkeep +0 -0
  125. data/fixtures/ember-cli-app/test-app/app/views/.gitkeep +0 -0
  126. data/fixtures/ember-cli-app/test-app/public/.gitkeep +0 -0
  127. data/fixtures/ember-cli-app/test-app/tests/unit/.gitkeep +0 -0
  128. data/fixtures/empty-app/not-config.rb +0 -0
  129. data/fixtures/engine-matching-layout/config.rb +0 -0
  130. data/fixtures/env-app/config.rb +0 -0
  131. data/fixtures/extensionless-text-files-app/config.rb +0 -0
  132. data/fixtures/extensionless-text-files-app/source/CNAME +0 -0
  133. data/fixtures/extensionless-text-files-app/source/LICENSE +0 -0
  134. data/fixtures/extensionless-text-files-app/source/README +0 -0
  135. data/fixtures/extensionless-text-files-app/source/index.html +0 -0
  136. data/fixtures/external-helpers/source/automatic.html.erb +0 -0
  137. data/fixtures/external-helpers/source/index.html.erb +0 -0
  138. data/fixtures/external-pipeline-error/source/javascripts/file.js +0 -0
  139. data/fixtures/fonts-app/config.rb +0 -0
  140. data/fixtures/fonts-app/source/fonts/blank/blank.otf +0 -0
  141. data/fixtures/frontmatter-neighbor-app/source/raw-front-matter-toml.html +0 -0
  142. data/fixtures/frontmatter-neighbor-app/source/raw-front-matter.php +0 -0
  143. data/fixtures/frontmatter-settings-app/source/layouts/override.erb +0 -0
  144. data/fixtures/frontmatter-settings-neighbor-app/source/layouts/override.erb +0 -0
  145. data/fixtures/frontmatter-settings-neighbor-app/source/override_layout.html.erb +0 -0
  146. data/fixtures/frontmatter-settings-neighbor-app/source/page_mentioned.html.erb +0 -0
  147. data/fixtures/generator-test/config.rb +1 -14
  148. data/fixtures/gzip-app/source/index.html +0 -0
  149. data/fixtures/i18n-alt-root-app/source/lang_data/hello.html.erb +0 -0
  150. data/fixtures/i18n-alt-root-app/source/lang_data/index.html.erb +0 -0
  151. data/fixtures/i18n-alt-root-app/source/layout.erb +0 -0
  152. data/fixtures/i18n-test-app/data/defaults_en.yml +0 -0
  153. data/fixtures/i18n-test-app/data/defaults_es.yml +0 -0
  154. data/fixtures/i18n-test-app/data/en_defaults.yml +0 -0
  155. data/fixtures/i18n-test-app/source/_country.en.erb +0 -0
  156. data/fixtures/i18n-test-app/source/_country.es.erb +0 -0
  157. data/fixtures/i18n-test-app/source/_site.erb +0 -0
  158. data/fixtures/i18n-test-app/source/images/president.en.svg +0 -0
  159. data/fixtures/i18n-test-app/source/images/president.es.svg +0 -0
  160. data/fixtures/i18n-test-app/source/localizable/_state.en.erb +0 -0
  161. data/fixtures/i18n-test-app/source/localizable/_state.es.erb +0 -0
  162. data/fixtures/i18n-test-app/source/localizable/fallback.html.erb +0 -0
  163. data/fixtures/i18n-test-app/source/localizable/hello.html.erb +0 -0
  164. data/fixtures/i18n-test-app/source/localizable/images/flag.en.svg +0 -0
  165. data/fixtures/i18n-test-app/source/localizable/images/flag.es.svg +0 -0
  166. data/fixtures/i18n-test-app/source/localizable/index.html.erb +0 -0
  167. data/fixtures/i18n-test-app/source/localizable/partials/_greeting.en.erb +0 -0
  168. data/fixtures/i18n-test-app/source/localizable/partials/_greeting.es.erb +0 -0
  169. data/fixtures/ignore-app/source/about.html.erb +0 -0
  170. data/fixtures/ignore-app/source/images/icon/messages.png +0 -0
  171. data/fixtures/ignore-app/source/images/pic.png +0 -0
  172. data/fixtures/ignore-app/source/images/portrait.jpg +0 -0
  173. data/fixtures/ignore-app/source/index.html.erb +0 -0
  174. data/fixtures/ignore-app/source/plain.html +0 -0
  175. data/fixtures/ignore-app/source/reports/another.html +0 -0
  176. data/fixtures/ignore-app/source/reports/index.html +0 -0
  177. data/fixtures/import-app/bower_components/jquery/dist/jquery.min.map +0 -0
  178. data/fixtures/import-app/bower_components/jquery/src/sizzle/dist/sizzle.min.map +0 -0
  179. data/fixtures/import-app/source/test.html +0 -0
  180. data/fixtures/import-app/static.html +0 -0
  181. data/fixtures/indexable-app/source/.htaccess +0 -0
  182. data/fixtures/indexable-app/source/.htpasswd +0 -0
  183. data/fixtures/indexable-app/source/.nojekyll +0 -0
  184. data/fixtures/indexable-app/source/a_folder/needs_index.html +0 -0
  185. data/fixtures/indexable-app/source/leave_me_alone.html +0 -0
  186. data/fixtures/indexable-app/source/needs_index.html +0 -0
  187. data/fixtures/indexable-app/source/regular/index.html +0 -0
  188. data/fixtures/javascript-app/config.rb +0 -0
  189. data/fixtures/large-build-app/source/.htaccess +0 -0
  190. data/fixtures/large-build-app/source/.htpasswd +0 -0
  191. data/fixtures/large-build-app/source/other_layout.erb +0 -0
  192. data/fixtures/large-build-app/source/spaces in file.html.erb +0 -0
  193. data/fixtures/link-to-app/config.rb +0 -0
  194. data/fixtures/liquid-app/config.rb +0 -0
  195. data/fixtures/liquid-app/source/_liquid_partial.liquid +0 -0
  196. data/fixtures/liquid-app/source/liquid_master.html.liquid +0 -0
  197. data/fixtures/markdown-app/source/filter_html.html.markdown +0 -0
  198. data/fixtures/markdown-app/source/highlighted.html.markdown +0 -0
  199. data/fixtures/markdown-app/source/img.html.markdown +0 -0
  200. data/fixtures/markdown-app/source/link.html.markdown +0 -0
  201. data/fixtures/markdown-app/source/mailto.html.markdown +0 -0
  202. data/fixtures/markdown-app/source/quote.html.markdown +0 -0
  203. data/fixtures/markdown-app/source/safe_links.html.markdown +0 -0
  204. data/fixtures/markdown-app/source/underline.html.markdown +0 -0
  205. data/fixtures/markdown-in-haml-app/config.rb +0 -0
  206. data/fixtures/markdown-in-slim-app/config.rb +0 -0
  207. data/fixtures/minify-css-app/source/stylesheets/bourbon/css3/_selection.scss +0 -0
  208. data/fixtures/minify-css-app/source/stylesheets/report.css +0 -0
  209. data/fixtures/minify-js-app/config.rb +0 -0
  210. data/fixtures/missing-tilt-library-app/source/danger-zone/more-wiki.html.wiki +0 -0
  211. data/fixtures/missing-tilt-library-app/source/safe-zone/my-wiki.html.wiki +0 -0
  212. data/fixtures/missing-tilt-library-app/source/textile-source.html.textile +0 -0
  213. data/fixtures/missing-tilt-library-app/source/wiki-source.html.wiki +0 -0
  214. data/fixtures/more-extensionless-text-files-app/source/CNAME +0 -0
  215. data/fixtures/more-extensionless-text-files-app/source/LICENSE +0 -0
  216. data/fixtures/more-extensionless-text-files-app/source/README +0 -0
  217. data/fixtures/more-extensionless-text-files-app/source/index.html +0 -0
  218. data/fixtures/more-ignore-app/source/about.html.erb +0 -0
  219. data/fixtures/more-ignore-app/source/images/icon/messages.png +0 -0
  220. data/fixtures/more-ignore-app/source/images/pic.png +0 -0
  221. data/fixtures/more-ignore-app/source/images/portrait.jpg +0 -0
  222. data/fixtures/more-ignore-app/source/index.html.erb +0 -0
  223. data/fixtures/more-ignore-app/source/plain.html +0 -0
  224. data/fixtures/more-ignore-app/source/reports/another.html +0 -0
  225. data/fixtures/more-ignore-app/source/reports/index.html +0 -0
  226. data/fixtures/more-preview-app/config.rb +0 -0
  227. data/fixtures/more-preview-app/source/content.html.erb +0 -0
  228. data/fixtures/more-preview-app/source/layout.erb +0 -0
  229. data/fixtures/more-traversal-app/source/directory-indexed/sub2/index.html.erb +0 -0
  230. data/fixtures/more-traversal-app/source/directory-indexed/sub3/deep.html.erb +0 -0
  231. data/fixtures/more-traversal-app/source/directory-indexed.html.erb +0 -0
  232. data/fixtures/more-traversal-app/source/index.html.erb +0 -0
  233. data/fixtures/more-traversal-app/source/proxied.html.erb +0 -0
  234. data/fixtures/more-traversal-app/source/root.html.erb +0 -0
  235. data/fixtures/more-traversal-app/source/sub/index.html.erb +0 -0
  236. data/fixtures/more-traversal-app/source/sub/sibling.html.erb +0 -0
  237. data/fixtures/more-traversal-app/source/sub/sibling2.html.erb +0 -0
  238. data/fixtures/more-traversal-app/source/sub/sub2/index.html.erb +0 -0
  239. data/fixtures/more-traversal-app/source/sub/sub3/deep.html.erb +0 -0
  240. data/fixtures/multiple-data-sources-app/data/two.yml +0 -0
  241. data/fixtures/multiple-data-sources-app/data1/data1.yml +0 -0
  242. data/fixtures/multiple-data-sources-app/data2/data2.yml +0 -0
  243. data/fixtures/multiple-data-sources-app/data2/two.yml +0 -0
  244. data/fixtures/multiple-layouts/config.rb +0 -0
  245. data/fixtures/multiple-sources-app/source/index.html.erb +0 -0
  246. data/fixtures/multiple-sources-app/source/override-in-two.html.erb +0 -0
  247. data/fixtures/multiple-sources-app/source0/override-in-one.html.erb +0 -0
  248. data/fixtures/multiple-sources-app/source1/index1.html.erb +0 -0
  249. data/fixtures/multiple-sources-app/source1/override-in-one.html.erb +0 -0
  250. data/fixtures/multiple-sources-app/source2/index2.html.erb +0 -0
  251. data/fixtures/multiple-sources-app/source2/override-in-two.html.erb +0 -0
  252. data/fixtures/multiple-sources-with-duplicate-file-names-app/source/index.html.erb +0 -0
  253. data/fixtures/multiple-sources-with-duplicate-file-names-app/source2/index.html.erb +0 -0
  254. data/fixtures/nested-data-app/data/examples/deeper/stuff.yml +0 -0
  255. data/fixtures/nested-data-app/data/examples/more.yml +0 -0
  256. data/fixtures/no-layout/config.rb +0 -0
  257. data/fixtures/page-classes-app/source/1-folder/1-inside-with-numeric.html.erb +0 -0
  258. data/fixtures/page-classes-app/source/1-starts-with-numeric.html.erb +0 -0
  259. data/fixtures/page-classes-app/source/2-starts-with-numeric-custom.html.erb +0 -0
  260. data/fixtures/page-helper-layout-block-app/source/index.html.erb +0 -0
  261. data/fixtures/page-helper-layout-block-app/source/path/child.html.erb +0 -0
  262. data/fixtures/page-helper-layout-block-app/source/path/index.html.erb +0 -0
  263. data/fixtures/paginate-app/config.rb +0 -0
  264. data/fixtures/partial-chained_templates-app/config.rb +0 -0
  265. data/fixtures/partials-app/config.rb +0 -0
  266. data/fixtures/partials-app/source/_code_snippet.html +0 -0
  267. data/fixtures/partials-app/source/_locals.erb +0 -0
  268. data/fixtures/partials-app/source/_main.erb +0 -0
  269. data/fixtures/partials-app/source/_main.str +0 -0
  270. data/fixtures/partials-app/source/shared/_footer.erb +0 -0
  271. data/fixtures/partials-app/source/shared/_header.erb +0 -0
  272. data/fixtures/partials-app/source/shared/_snippet.html.erb +0 -0
  273. data/fixtures/partials-app/source/static_underscore.html.erb +0 -0
  274. data/fixtures/partials-app/source/sub/_local.erb +0 -0
  275. data/fixtures/partials-app/source/svg.html.erb +0 -0
  276. data/fixtures/passthrough-app/source/.htaccess +0 -0
  277. data/fixtures/preview-app/config.rb +0 -0
  278. data/fixtures/preview-app/source/content.html.erb +0 -0
  279. data/fixtures/preview-app/source/layout.erb +0 -0
  280. data/fixtures/proxy-pages-app/source/real.html +0 -0
  281. data/fixtures/proxy-pages-app/source/should_be_ignored3.html +0 -0
  282. data/fixtures/proxy-pages-app/source/should_be_ignored6.html +0 -0
  283. data/fixtures/proxy-pages-app/source/should_be_ignored7.html +0 -0
  284. data/fixtures/proxy-pages-app/source/should_be_ignored8.html +0 -0
  285. data/fixtures/related-files-app/config.rb +0 -0
  286. data/fixtures/related-files-app/source/index.html.erb +0 -0
  287. data/fixtures/related-files-app/source/partials/_test.erb +0 -0
  288. data/fixtures/related-files-app/source/partials/_test2.haml +0 -0
  289. data/fixtures/related-files-app/source/stylesheets/_include3.sass +0 -0
  290. data/fixtures/related-files-app/source/stylesheets/_include4.scss +0 -0
  291. data/fixtures/related-files-app/source/stylesheets/include1.css +0 -0
  292. data/fixtures/related-files-app/source/stylesheets/include2.css.scss +0 -0
  293. data/fixtures/related-files-app/source/stylesheets/site.css.scss +0 -0
  294. data/fixtures/relative-app/config.rb +0 -0
  295. data/fixtures/relative-assets-app/source/fonts/roboto/roboto-regular-webfont.eot +0 -0
  296. data/fixtures/relative-assets-app/source/fonts/roboto/roboto-regular-webfont.svg +0 -0
  297. data/fixtures/relative-assets-app/source/fonts/roboto/roboto-regular-webfont.ttf +0 -0
  298. data/fixtures/relative-assets-app/source/fonts/roboto/roboto-regular-webfont.woff +0 -0
  299. data/fixtures/relative-assets-app/source/images/blank2.gif +0 -0
  300. data/fixtures/sass-in-slim-app/config.rb +0 -0
  301. data/fixtures/scss-app/config.rb +0 -0
  302. data/fixtures/scss-app/source/stylesheets/error.css.sass +0 -0
  303. data/fixtures/sinatra-app/config.rb +2 -0
  304. data/fixtures/strip-url-app/config.rb +0 -0
  305. data/fixtures/stylus-preview-app/config.rb +0 -0
  306. data/fixtures/traversal-app/source/.htaccess +0 -0
  307. data/fixtures/traversal-app/source/directory-indexed/sub2/index.html.erb +0 -0
  308. data/fixtures/traversal-app/source/directory-indexed/sub3/deep.html.erb +0 -0
  309. data/fixtures/traversal-app/source/directory-indexed.html.erb +0 -0
  310. data/fixtures/traversal-app/source/index.html.erb +0 -0
  311. data/fixtures/traversal-app/source/proxied.html.erb +0 -0
  312. data/fixtures/traversal-app/source/root.html.erb +0 -0
  313. data/fixtures/traversal-app/source/sub/index.html.erb +0 -0
  314. data/fixtures/traversal-app/source/sub/sibling.html.erb +0 -0
  315. data/fixtures/traversal-app/source/sub/sibling2.html.erb +0 -0
  316. data/fixtures/traversal-app/source/sub/sub2/index.html.erb +0 -0
  317. data/fixtures/traversal-app/source/sub/sub3/deep.html.erb +0 -0
  318. data/fixtures/wildcard-app/source/admin/index.html.erb +0 -0
  319. data/fixtures/wildcard-app/source/admin/page.html.erb +0 -0
  320. data/fixtures/wildcard-app/source/index.html.erb +0 -0
  321. data/fixtures/wildcard-directory-index-app/source/admin/index.html.erb +0 -0
  322. data/fixtures/wildcard-directory-index-app/source/admin/page.html.erb +0 -0
  323. data/fixtures/wildcard-directory-index-app/source/index.html.erb +0 -0
  324. data/lib/middleman-core/application.rb +0 -13
  325. data/lib/middleman-core/builder.rb +3 -3
  326. data/lib/middleman-core/contracts.rb +0 -1
  327. data/lib/middleman-core/core_extensions/collections/lazy_root.rb +1 -1
  328. data/lib/middleman-core/core_extensions/collections/lazy_step.rb +1 -1
  329. data/lib/middleman-core/extensions/minify_javascript.rb +1 -1
  330. data/lib/middleman-core/file_renderer.rb +1 -7
  331. data/lib/middleman-core/meta_pages/assets/glyphicons-halflings.png +0 -0
  332. data/lib/middleman-core/meta_pages/assets/sitemap.js +0 -0
  333. data/lib/middleman-core/preview_server/server_hostname.rb +0 -2
  334. data/lib/middleman-core/preview_server.rb +3 -2
  335. data/lib/middleman-core/rack.rb +6 -6
  336. data/lib/middleman-core/renderers/coffee_script.rb +2 -6
  337. data/lib/middleman-core/renderers/erb.rb +15 -3
  338. data/lib/middleman-core/renderers/haml.rb +1 -3
  339. data/lib/middleman-core/renderers/kramdown.rb +7 -11
  340. data/lib/middleman-core/renderers/less.rb +10 -26
  341. data/lib/middleman-core/renderers/liquid.rb +1 -1
  342. data/lib/middleman-core/renderers/redcarpet.rb +4 -14
  343. data/lib/middleman-core/renderers/sass.rb +3 -10
  344. data/lib/middleman-core/renderers/sass_functions.rb +2 -2
  345. data/lib/middleman-core/renderers/slim.rb +9 -1
  346. data/lib/middleman-core/sources/source_watcher.rb +1 -1
  347. data/lib/middleman-core/step_definitions/commandline_steps.rb +14 -14
  348. data/lib/middleman-core/step_definitions/server_steps.rb +1 -1
  349. data/lib/middleman-core/step_definitions.rb +3 -0
  350. data/lib/middleman-core/template_renderer.rb +2 -2
  351. data/lib/middleman-core/util/data.rb +4 -5
  352. data/lib/middleman-core/util/paths.rb +2 -1
  353. data/lib/middleman-core/util.rb +6 -0
  354. data/lib/middleman-core/version.rb +1 -1
  355. data/lib/middleman-core.rb +0 -2
  356. data/middleman-core.gemspec +16 -15
  357. data/spec/middleman-core/binary_spec/middleman +0 -0
  358. data/spec/middleman-core/binary_spec/middleman.png +0 -0
  359. data/spec/middleman-core/binary_spec/stars.svgz +0 -0
  360. data/spec/spec_helper.rb +2 -2
  361. metadata +1176 -56
  362. data/.gemtest +0 -0
  363. data/.rspec +0 -1
  364. data/cucumber.yml +0 -2
@@ -10,7 +10,7 @@ class Middleman::Extensions::MinifyJavascript < ::Middleman::Extension
10
10
  require 'uglifier'
11
11
  ::Uglifier.new
12
12
  }, 'Set the JS compressor to use.'
13
- option :content_types, %w(application/javascript), 'Content types of resources that contain JS'
13
+ option :content_types, %w(text/javascript), 'Content types of resources that contain JS'
14
14
  option :inline_content_types, %w(text/html text/php), 'Content types of resources that contain inline JS'
15
15
 
16
16
  def ready
@@ -67,15 +67,9 @@ module Middleman
67
67
  end
68
68
 
69
69
  # Read compiled template from disk or cache
70
- template = ::Tilt.new(path, 1, options) { body }
71
- # template = cache.fetch(:compiled_template, extension, options, body) do
72
- # ::Tilt.new(path, 1, options) { body }
73
- # end
70
+ template = ::Tilt.new(path, 1, options) { body.dup }
74
71
 
75
72
  # Render using Tilt
76
- # content = ::Middleman::Util.instrument 'render.tilt', path: path do
77
- # template.render(context, locs, &block)
78
- # end
79
73
  content = template.render(context, locs, &block)
80
74
 
81
75
  # Allow hooks to manipulate the result after render
File without changes
@@ -19,9 +19,7 @@ module Middleman
19
19
  end
20
20
 
21
21
  def self.match?(name)
22
- # rubocop:disable Style/CaseEquality
23
22
  name != 'localhost' && /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?\.?$/ === name
24
- # rubocop:enable Style/CaseEquality
25
23
  end
26
24
 
27
25
  alias to_browser to_s
@@ -8,7 +8,6 @@ require 'middleman-core/preview_server/server_information'
8
8
  require 'middleman-core/preview_server/server_url'
9
9
  require 'middleman-core/preview_server/server_information_callback_proxy'
10
10
 
11
- # rubocop:disable GlobalVars
12
11
  module Middleman
13
12
  class PreviewServer
14
13
  class << self
@@ -315,7 +314,9 @@ module Middleman
315
314
  @webrick ||= setup_webrick(@options[:debug] || false)
316
315
 
317
316
  rack_app = ::Middleman::Rack.new(@app).to_app
318
- @webrick.mount '/', ::Rack::Handler::WEBrick, rack_app
317
+
318
+ require "rackup/handler/webrick"
319
+ @webrick.mount '/', ::Rackup::Handler::WEBrick, rack_app
319
320
  end
320
321
 
321
322
  # Detach the current Middleman::Application instance
@@ -1,5 +1,5 @@
1
1
  require 'rack'
2
- require 'rack/file'
2
+ require 'rack/files'
3
3
  require 'rack/lint'
4
4
  require 'rack/head'
5
5
  require 'rack/utils'
@@ -106,7 +106,7 @@ module Middleman
106
106
  # If this path is a binary file, send it immediately
107
107
  return send_file(resource, env) if resource.binary?
108
108
 
109
- res['Content-Type'] = resource.content_type || 'text/plain'
109
+ res['content-type'] = resource.content_type || 'text/plain'
110
110
 
111
111
  begin
112
112
  # Write out the contents of the page
@@ -134,7 +134,7 @@ module Middleman
134
134
 
135
135
  # Immediately send static file
136
136
  def send_file(resource, env)
137
- file = ::Rack::File.new nil
137
+ file = ::Rack::Files.new nil
138
138
  path = resource.file_descriptor[:full_path]
139
139
  if !file.respond_to?(:path=)
140
140
  request = ::Rack::Request.new(env)
@@ -144,11 +144,11 @@ module Middleman
144
144
  response = file.serving(env)
145
145
  end
146
146
  status = response[0]
147
- response[1]['Content-Encoding'] = 'gzip' if %w(.svgz .gz).include?(resource.ext)
148
- # Do not set Content-Type if status is 1xx, 204, 205 or 304, otherwise
147
+ response[1]['content-encoding'] = 'gzip' if %w(.svgz .gz).include?(resource.ext)
148
+ # Do not set content-type if status is 1xx, 204, 205 or 304, otherwise
149
149
  # Rack will throw an error (500)
150
150
  if !(100..199).cover?(status) && ![204, 205, 304].include?(status)
151
- response[1]['Content-Type'] = resource.content_type || 'application/octet-stream'
151
+ response[1]['content-type'] = resource.content_type || 'application/octet-stream'
152
152
  end
153
153
  halt response
154
154
  end
@@ -21,14 +21,10 @@ module Middleman
21
21
  # Make the current Middleman app accessible to the template
22
22
  cattr_accessor :middleman_app
23
23
 
24
- # Add exception messaging
25
- # @param [Class] context
26
- # @param [Hash] locals
27
- # @return [String]
28
- def evaluate(context, locals, &block)
24
+ def prepare
29
25
  return super unless middleman_app.server?
30
26
 
31
- begin
27
+ @output = begin
32
28
  super
33
29
  rescue ::ExecJS::RuntimeError => e
34
30
  e.to_s
@@ -6,14 +6,26 @@ module Middleman
6
6
  ::Tilt.prefer(Template, :erb)
7
7
  end
8
8
 
9
- class Template < ::Tilt::ErubisTemplate
9
+ class Template < ::Tilt::ErubiTemplate
10
+ def initialize(*args, &block)
11
+ super
12
+
13
+ @context = @options[:context]
14
+ end
15
+
10
16
  ##
11
- # In preamble we need a flag `__in_erb_template` and SafeBuffer for padrino apps.
17
+ # In preamble we need a flag `__in_erb_template` for padrino apps.
12
18
  #
13
19
  def precompiled_preamble(locals)
14
20
  original = super
15
21
  "__in_erb_template = true\n" << original
16
- # .rpartition("\n").first << "#{@outvar} = _buf = ActiveSupport::SafeBuffer.new\n"
22
+ end
23
+
24
+ ##
25
+ # Force the template the use the configured encoding.
26
+ #
27
+ def precompiled_template(locals)
28
+ super.dup.force_encoding(@context.app.config[:encoding])
17
29
  end
18
30
  end
19
31
  end
@@ -23,7 +23,7 @@ module Middleman
23
23
  def initialize(*args, &block)
24
24
  super
25
25
 
26
- @context = @options[:context] if @options.key?(:context)
26
+ @context = @options[:context]
27
27
  end
28
28
 
29
29
  def prepare; end
@@ -62,7 +62,6 @@ module Middleman
62
62
  ::Haml::TempleEngine.define_options context: nil
63
63
  end
64
64
 
65
- # rubocop:disable NestedMethodDefinition
66
65
  [::Haml::Filters::Sass, ::Haml::Filters::Scss, ::Haml::Filters::Markdown].each do |f|
67
66
  f.class_exec do
68
67
  if respond_to?(:template_class) # Haml 5 and older
@@ -93,7 +92,6 @@ module Middleman
93
92
  end
94
93
  end
95
94
  end
96
- # rubocop:enable NestedMethodDefinition
97
95
 
98
96
  ::Tilt.prefer(::Middleman::Renderers::HamlTemplate, :haml)
99
97
 
@@ -4,20 +4,16 @@ module Middleman
4
4
  module Renderers
5
5
  # Our own Kramdown Tilt template that simply uses our custom renderer.
6
6
  class KramdownTemplate < ::Tilt::KramdownTemplate
7
- def initialize(*args, &block)
8
- super
7
+ private
9
8
 
10
- @context = @options[:context] if @options.key?(:context)
11
- end
12
-
13
- def evaluate(context, *)
9
+ def _prepare_output
10
+ @context = @options[:context]
14
11
  MiddlemanKramdownHTML.scope = @context || context
15
12
 
16
- @output ||= begin
17
- output, warnings = MiddlemanKramdownHTML.convert(@engine.root, @engine.options)
18
- @engine.warnings.concat(warnings)
19
- output
20
- end
13
+ @engine = Kramdown::Document.new(data, options)
14
+ output, warnings = MiddlemanKramdownHTML.convert(@engine.root, @engine.options)
15
+ @engine.warnings.concat(warnings)
16
+ output
21
17
  end
22
18
  end
23
19
 
@@ -1,36 +1,20 @@
1
- require 'less'
2
-
3
1
  module Middleman
4
2
  module Renderers
5
3
  # Sass renderer
6
4
  class Less < ::Middleman::Extension
7
- define_setting :less, {}, 'LESS compiler options'
8
-
9
- def initialize(app, options={}, &block)
10
- super
11
-
12
- # Tell Tilt to use it as well (for inline sass blocks)
13
- ::Tilt.register 'less', LocalLoadingLessTemplate
14
- ::Tilt.prefer(LocalLoadingLessTemplate)
15
- end
16
-
17
- def after_configuration
18
- app.files.by_type(:source).watchers.each do |source|
19
- ::Less.paths << (source.directory + app.config[:css_dir]).to_s
20
- end
21
- end
22
-
23
5
  # A SassTemplate for Tilt which outputs debug messages
24
- class LocalLoadingLessTemplate < ::Tilt::LessTemplate
25
- def prepare
26
- if ::Less.const_defined? :Engine
27
- @engine = ::Less::Engine.new(data)
28
- else
29
- parser = ::Less::Parser.new({}.merge!(options).merge!(filename: eval_file, line: line, paths: ['.', File.dirname(eval_file)]))
30
- @engine = parser.parse(data)
31
- end
6
+ class DummyLessTemplate < ::Tilt::Template
7
+ def evaluate(scope, locals, &block)
8
+ raise <<~ERROR
9
+ The builtin less renderer has been removed from middleman.
10
+ To continue using less, make sure to setup an external pipeline.
11
+ See external pipeline documentation at https://middlemanapp.com/advanced/external-pipeline
12
+ for more information.
13
+ ERROR
32
14
  end
33
15
  end
16
+
17
+ ::Tilt.register 'less', DummyLessTemplate
34
18
  end
35
19
  end
36
20
  end
@@ -11,7 +11,7 @@ module Middleman
11
11
  end
12
12
 
13
13
  # Called by Liquid to retrieve a template file
14
- def read_template_file(template_path, _)
14
+ def read_template_file(template_path, _ = nil)
15
15
  file = app.files.find(:source, "_#{template_path}.liquid")
16
16
  raise ::Liquid::FileSystemError, "No such template '#{template_path}'" unless file
17
17
  file.read
@@ -10,13 +10,12 @@ module Middleman
10
10
  escape_html: :filter_html
11
11
  }.freeze
12
12
 
13
- def initialize(*args, &block)
14
- super
13
+ private
15
14
 
16
- @context = @options[:context] if @options.key?(:context)
15
+ def _prepare_output
16
+ Redcarpet::Markdown.new(generate_renderer, options).render(data)
17
17
  end
18
18
 
19
- # Overwrite built-in Tilt version.
20
19
  # Don't overload :renderer option with smartypants
21
20
  # Support renderer-level options
22
21
  def generate_renderer
@@ -26,6 +25,7 @@ module Middleman
26
25
 
27
26
  # Pick a renderer
28
27
  renderer = MiddlemanRedcarpetHTML
28
+ renderer.scope = options[:context]
29
29
 
30
30
  if options.delete(:smartypants)
31
31
  # Support SmartyPants
@@ -44,16 +44,6 @@ module Middleman
44
44
  renderer.new(render_options)
45
45
  end
46
46
 
47
- def evaluate(scope, _)
48
- @output ||= begin
49
- MiddlemanRedcarpetHTML.scope = @context || scope
50
-
51
- @engine.render(data)
52
- end
53
- end
54
-
55
- private
56
-
57
47
  def covert_options_to_aliases!
58
48
  ALIASES.each do |aka, actual|
59
49
  options[actual] = options.delete(aka) if options.key? aka
@@ -29,26 +29,19 @@ module Middleman
29
29
 
30
30
  # A SassTemplate for Tilt which outputs debug messages
31
31
  class SassPlusCSSFilenameTemplate < ::Tilt::SassTemplate
32
- def initialize(*args, &block)
33
- super
34
-
35
- @context = @options[:context] if @options.key?(:context)
36
- end
37
-
38
32
  # Define the expected syntax for the template
39
33
  # @return [Symbol]
40
34
  def syntax
41
35
  :sass
42
36
  end
43
37
 
44
- def prepare; end
38
+ private
45
39
 
46
40
  # Add exception messaging
47
41
  # @param [Class] context
48
42
  # @return [String]
49
- def evaluate(context, _)
50
- @context ||= context
51
-
43
+ def _prepare_output
44
+ @context = @options[:context]
52
45
  @engine = ::SassC::Engine.new(data, sass_options)
53
46
 
54
47
  begin
@@ -29,7 +29,7 @@ module Middleman
29
29
  # background: image-url("image.jpg", $digest: true); // background: url("/assets/image-27a8f1f96afd8d4c67a59eb9447f45bd.jpg");
30
30
  #
31
31
  def image_url(source, options={}, _cache_buster=nil)
32
- # Work with the Compass #image_url API
32
+ # Work with the Sass #image_url API
33
33
  if options.respond_to? :value
34
34
  case options.value
35
35
  when true
@@ -66,7 +66,7 @@ module Middleman
66
66
  # src: font-url("image.jpg", $digest: true); // src: url("/assets/font-27a8f1f96afd8d4c67a59eb9447f45bd.ttf");
67
67
  #
68
68
  def font_url(source, options={})
69
- # Work with the Compass #font_url API
69
+ # Work with the Sass #font_url API
70
70
  if options.respond_to? :value
71
71
  case options.value
72
72
  when true
@@ -39,9 +39,17 @@ module Middleman
39
39
  ::Slim::Engine.set_options(
40
40
  buffer: '@_out_buf',
41
41
  use_html_safe: true,
42
- generator: ::Temple::Generators::RailsOutputBuffer,
43
42
  disable_escape: true
44
43
  )
44
+ begin
45
+ require "action_view"
46
+ rescue LoadError
47
+ # Don't add generator option if action_view is not available, since it depends on it
48
+ else
49
+ ::Slim::Engine.set_options(
50
+ generator: ::Temple::Generators::RailsOutputBuffer,
51
+ )
52
+ end
45
53
  end
46
54
  end
47
55
  end
@@ -335,7 +335,7 @@ module Middleman
335
335
 
336
336
  Contract Pathname => Pathname
337
337
  def strip_extensions(p)
338
- p = p.sub_ext('') while ::Tilt[p.to_s] || p.extname == '.html'
338
+ p = p.sub_ext('') while Middleman::Util.tilt_class(p.to_s) || p.extname == '.html'
339
339
  Pathname(p.to_s + '.*')
340
340
  end
341
341
 
@@ -1,28 +1,28 @@
1
1
  When /^I stop (?:middleman|all commands) if the output( of the last command)? contains:$/ do |last_command, expected|
2
2
  begin
3
- Timeout.timeout(exit_timeout) do
3
+ Timeout.timeout(aruba.config.exit_timeout) do
4
4
  loop do
5
- fail "You need to start middleman interactively first." unless @interactive
5
+ fail "You need to start middleman interactively first." unless last_command_started
6
6
 
7
- if unescape(@interactive.output) =~ Regexp.new(unescape(expected))
8
- only_processes.each { |p| p.terminate }
7
+ if unescape_text(last_command_started.output) =~ Regexp.new(unescape_text(expected))
8
+ all_commands.each { |p| p.terminate }
9
9
  break
10
10
  end
11
11
 
12
12
  sleep 0.1
13
13
  end
14
14
  end
15
- rescue ChildProcess::TimeoutError, TimeoutError
16
- @interactive.terminate
15
+ rescue ChildProcess::TimeoutError, Timeout::Error
16
+ last_command_started.terminate
17
17
  ensure
18
- announcer.stdout @interactive.stdout
19
- announcer.stderr @interactive.stderr
18
+ aruba.announcer.announce :stdout, last_command_started.stdout
19
+ aruba.announcer.announce :stderr, last_command_started.stderr
20
20
  end
21
21
  end
22
22
 
23
23
  # Make it just a long running process
24
24
  Given /`(.*?)` is running in background/ do |cmd|
25
- run(cmd, 120)
25
+ run_command(cmd, exit_timeout: 120)
26
26
  end
27
27
 
28
28
  Given /I have a local hosts file with:/ do |string|
@@ -49,10 +49,10 @@ Given /I start a dns server with:/ do |string|
49
49
  )
50
50
  )
51
51
 
52
- set_env 'PATH', File.expand_path(File.join(current_dir, 'bin')) + ':' + ENV['PATH']
52
+ set_environment_variable 'PATH', File.expand_path(File.join(aruba.current_directory, 'bin')) + ':' + ENV['PATH']
53
53
  write_file db_file, string
54
54
 
55
- @dns_server = run("dns_server.rb #{db_file} #{port}", 120)
55
+ @dns_server = run_command("dns_server.rb #{db_file} #{port}", exit_timeout: 120)
56
56
  end
57
57
 
58
58
  Given /I start a mdns server with:/ do |string|
@@ -68,10 +68,10 @@ Given /I start a mdns server with:/ do |string|
68
68
  )
69
69
  )
70
70
 
71
- set_env 'PATH', File.expand_path(File.join(current_dir, 'bin')) + ':' + ENV['PATH']
71
+ set_environment_variable 'PATH', File.expand_path(File.join(aruba.current_directory, 'bin')) + ':' + ENV['PATH']
72
72
  write_file db_file, string
73
73
 
74
- @mdns_server = run("dns_server.rb #{db_file} #{port}", 120)
74
+ @mdns_server = run_command("dns_server.rb #{db_file} #{port}", exit_timeout: 120)
75
75
  end
76
76
 
77
77
  Given /I start a mdns server for the local hostname/ do
@@ -80,5 +80,5 @@ end
80
80
 
81
81
  # Make sure each and every process is really dead
82
82
  After do
83
- only_processes.each { |p| p.terminate }
83
+ all_commands.each { |p| p.terminate }
84
84
  end
@@ -34,7 +34,7 @@ end
34
34
  Given /^the Server is running$/ do
35
35
  root_dir = File.expand_path(expand_path("."))
36
36
 
37
- if File.exists?(File.join(root_dir, 'source'))
37
+ if File.exist?(File.join(root_dir, 'source'))
38
38
  ENV['MM_SOURCE'] = 'source'
39
39
  else
40
40
  ENV['MM_SOURCE'] = ''
@@ -16,6 +16,9 @@ module ArubaMonkeypatch
16
16
  end
17
17
  World(ArubaMonkeypatch)
18
18
 
19
+ # The Capybara monkey-patch that switches between RSpec::Matchers#all and Capybara::DSL#all
20
+ World(Capybara::RSpecMatcherProxies)
21
+
19
22
  Before do
20
23
  @aruba_timeout_seconds = RUBY_PLATFORM == 'java' ? 120 : 60
21
24
  end
@@ -119,10 +119,10 @@ module Middleman
119
119
 
120
120
  if defined?(::I18n)
121
121
  old_locale = ::I18n.locale
122
- ::I18n.locale = options[:locale] if options[:locale]
122
+ ::I18n.locale = options.delete(:locale) if options[:locale]
123
123
 
124
124
  # Backwards compat
125
- ::I18n.locale = options[:lang] if options[:lang]
125
+ ::I18n.locale = options.delete(:lang) if options[:lang]
126
126
  end
127
127
 
128
128
  # Sandboxed class for template eval
@@ -2,7 +2,6 @@ require 'yaml'
2
2
  require 'json'
3
3
  require 'toml'
4
4
  require 'pathname'
5
- require 'backports/2.1.0/array/to_h'
6
5
  require 'hashie'
7
6
  require 'memoist'
8
7
 
@@ -118,16 +117,16 @@ module Middleman
118
117
  # @return [Hash]
119
118
  Contract String, Pathname => Hash
120
119
  def parse_yaml(content, full_path)
121
- permitted_classes = [Date, Symbol]
120
+ permitted_classes = [Date, Time, DateTime, Symbol, Regexp]
122
121
  c = begin
123
122
  ::Middleman::Util.instrument 'parse.yaml' do
124
123
  allowed_parameters = ::YAML.method(:safe_load).parameters
125
124
  if allowed_parameters.include? [:key, :permitted_classes]
126
- ::YAML.safe_load(content, permitted_classes: permitted_classes)
125
+ ::YAML.safe_load(content, permitted_classes: permitted_classes, aliases: true)
127
126
  elsif allowed_parameters.include? [:key, :whitelist_classes]
128
- ::YAML.safe_load(content, whitelist_classes: permitted_classes)
127
+ ::YAML.safe_load(content, whitelist_classes: permitted_classes, aliases: true)
129
128
  else
130
- ::YAML.safe_load(content, permitted_classes)
129
+ ::YAML.safe_load(content, permitted_classes, [], true)
131
130
  end
132
131
  end
133
132
  rescue StandardError, ::Psych::SyntaxError => error
@@ -7,7 +7,6 @@ require 'tilt'
7
7
 
8
8
  require 'middleman-core/contracts'
9
9
 
10
- # rubocop:disable ModuleLength
11
10
  module Middleman
12
11
  module Util
13
12
  extend Memoist
@@ -24,6 +23,8 @@ module Middleman
24
23
  Contract String => Any
25
24
  def tilt_class(path)
26
25
  ::Tilt[path]
26
+ rescue LoadError
27
+ nil
27
28
  end
28
29
  memoize :tilt_class
29
30
 
@@ -1,3 +1,9 @@
1
+ if RUBY_VERSION < "3.2"
2
+ require "active_support/version"
3
+
4
+ require "logger" if ActiveSupport.version < Gem::Version.new("8.0.0")
5
+ end
6
+
1
7
  require 'active_support/all'
2
8
 
3
9
  require 'middleman-core/application'
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  # Current Version
3
3
  # @return [String]
4
- VERSION = '4.5.0'.freeze unless const_defined?(:VERSION)
4
+ VERSION = '4.6.0'.freeze unless const_defined?(:VERSION)
5
5
  end
@@ -1,5 +1,3 @@
1
- # rubocop:disable FileName
2
-
3
1
  # Setup our load paths
4
2
  libdir = File.expand_path(File.dirname(__FILE__))
5
3
  $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
@@ -1,6 +1,4 @@
1
- # -*- encoding: utf-8 -*-
2
- $LOAD_PATH.push File.expand_path('../lib', __FILE__)
3
- require File.expand_path('../lib/middleman-core/version', __FILE__)
1
+ require_relative './lib/middleman-core/version'
4
2
 
5
3
  Gem::Specification.new do |s|
6
4
  s.name = 'middleman-core'
@@ -11,18 +9,22 @@ Gem::Specification.new do |s|
11
9
  s.email = ['me@tdreyno.com', 'ben@benhollis.net', 'karlfreeman@gmail.com']
12
10
  s.homepage = 'https://middlemanapp.com'
13
11
  s.summary = 'Hand-crafted frontend development'
14
- s.description = 'A static site generator. Provides dozens of templating languages (Haml, Sass, Compass, Slim, CoffeeScript, and more). Makes minification, compression, cache busting, Yaml data (and more) an easy part of your development cycle.'
12
+ s.description = 'A static site generator. Provides dozens of templating languages (Haml, Sass, Slim, CoffeeScript, and more). Makes minification, compression, cache busting, Yaml data (and more) an easy part of your development cycle.'
15
13
 
16
14
  s.files = `git ls-files -z`.split("\0")
17
15
  s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
18
- s.require_path = 'lib'
19
- s.required_ruby_version = '>= 2.5.0'
16
+
17
+ s.required_ruby_version = '>= 2.7.0'
20
18
 
21
19
  # Core
22
20
  s.add_dependency('bundler', '~> 2.0')
23
- s.add_dependency('rack', ['>= 1.4.5', '< 3'])
24
- s.add_dependency('tilt', ['~> 2.0.9'])
25
- s.add_dependency('erubis')
21
+ s.add_dependency('rack', '>= 3')
22
+ s.add_dependency('rackup')
23
+ s.add_dependency('tilt', ['~> 2.2'])
24
+ s.add_dependency('erubi')
25
+ s.add_dependency('haml', ['>= 4.0.5'])
26
+ s.add_dependency('coffee-script', ['~> 2.2'])
27
+ s.add_dependency('kramdown', ['~> 2.4'])
26
28
  s.add_dependency('fast_blank')
27
29
  s.add_dependency('parallel')
28
30
  s.add_dependency('servolux')
@@ -31,7 +33,7 @@ Gem::Specification.new do |s|
31
33
  s.add_dependency('webrick')
32
34
 
33
35
  # Helpers
34
- s.add_dependency('activesupport', ['>= 6.1', '< 7.1'])
36
+ s.add_dependency('activesupport', ['>= 6.1'])
35
37
  s.add_dependency('padrino-helpers', ['~> 0.15.0'])
36
38
  s.add_dependency("addressable", ["~> 2.4"])
37
39
  s.add_dependency('memoist', ['~> 0.14'])
@@ -40,7 +42,7 @@ Gem::Specification.new do |s|
40
42
  s.add_dependency('listen', ['~> 3.0'])
41
43
 
42
44
  # i18n
43
- s.add_dependency('i18n', ['~> 1.6.0'])
45
+ s.add_dependency('i18n', '>= 1.6', '< 1.15')
44
46
 
45
47
  # Automatic Image Sizes
46
48
  s.add_dependency('fastimage', ['~> 2.0'])
@@ -49,14 +51,13 @@ Gem::Specification.new do |s|
49
51
  s.add_dependency('sassc', ['~> 2.0'])
50
52
 
51
53
  # Minify JS
52
- s.add_dependency('uglifier', ['~> 3.0'])
54
+ s.add_dependency('uglifier', ['>= 3', '< 5'])
53
55
  s.add_dependency('execjs', ['~> 2.0'])
54
56
 
55
57
  # Testing
56
- s.add_dependency('contracts', ['~> 0.13'])
58
+ s.add_dependency('contracts')
57
59
 
58
60
  # Hash stuff
59
- s.add_dependency('hashie', ['~> 3.4'])
61
+ s.add_dependency('hashie', '>= 3.4', '< 6.0')
60
62
  s.add_dependency('hamster', ['~> 3.0'])
61
- s.add_dependency('backports', ['~> 3.6'])
62
63
  end
File without changes
File without changes
File without changes