middleman 2.0.16.1 → 3.0.0.alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. data/.gitignore +2 -1
  2. data/CHANGELOG +16 -8
  3. data/features/builder.feature +2 -5
  4. data/features/cache_buster.feature +1 -1
  5. data/features/clean_build.feature +0 -1
  6. data/features/coffee-script.feature +3 -3
  7. data/features/custom_layout_engines.feature +10 -0
  8. data/features/directory_index.feature +0 -1
  9. data/features/dynamic_pages.feature +0 -1
  10. data/features/fonts.feature +0 -1
  11. data/features/{padrino_helpers.feature → former_padrino_helpers.feature} +1 -1
  12. data/features/sprockets.feature +34 -5
  13. data/features/sprockets_gems.feature +7 -4
  14. data/features/step_definitions/asset_host_steps.rb +7 -6
  15. data/features/step_definitions/builder_steps.rb +4 -0
  16. data/features/step_definitions/middleman_steps.rb +22 -16
  17. data/features/step_definitions/page_layout_steps.rb +10 -8
  18. data/fixtures/custom-layout-app/config.rb +1 -0
  19. data/fixtures/custom-layout-app/source/index.html.erb +1 -0
  20. data/fixtures/custom-layout-app/source/layout.haml +6 -0
  21. data/fixtures/sprockets-app/config.rb +2 -1
  22. data/fixtures/sprockets-app/source/library/css/bootstrap_include.css.scss +1 -0
  23. data/fixtures/sprockets-app/source/library/css/plain.css +3 -0
  24. data/fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss +1 -0
  25. data/fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss +1 -0
  26. data/fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss +1 -0
  27. data/fixtures/sprockets-app/source/{jquery_include.js → library/js/jquery_include.js} +0 -0
  28. data/fixtures/sprockets-app/source/library/js/plain.js +3 -0
  29. data/fixtures/sprockets-app/source/library/{javascripts → js}/sprockets_base.js +0 -0
  30. data/fixtures/sprockets-app/source/library/{javascripts → js}/sprockets_sub.js +0 -0
  31. data/fixtures/test-app/config.rb +5 -4
  32. data/fixtures/test-app/source/{padrino_test.html.haml → former_padrino_test.html.haml} +0 -0
  33. data/fixtures/test-app/source/stylesheets/sprockets_base1.css.scss +1 -0
  34. data/fixtures/test-app/source/stylesheets/sprockets_base2.css.scss +1 -0
  35. data/fixtures/test-app/source/stylesheets/sprockets_sub.css.scss +1 -0
  36. data/lib/middleman.rb +27 -25
  37. data/lib/middleman/base.rb +408 -166
  38. data/lib/middleman/builder.rb +78 -162
  39. data/lib/middleman/cli.rb +61 -32
  40. data/lib/middleman/core_extensions/assets.rb +4 -44
  41. data/lib/middleman/core_extensions/builder.rb +12 -16
  42. data/lib/middleman/core_extensions/compass.rb +28 -57
  43. data/lib/middleman/core_extensions/data.rb +65 -49
  44. data/lib/middleman/core_extensions/default_helpers.rb +33 -18
  45. data/lib/middleman/core_extensions/features.rb +48 -26
  46. data/lib/middleman/core_extensions/file_watcher.rb +66 -0
  47. data/lib/middleman/core_extensions/front_matter.rb +91 -86
  48. data/lib/middleman/core_extensions/rendering.rb +9 -8
  49. data/lib/middleman/core_extensions/routing.rb +19 -53
  50. data/lib/middleman/core_extensions/sitemap.rb +229 -0
  51. data/lib/middleman/core_extensions/sprockets.rb +53 -37
  52. data/lib/middleman/features/asset_host.rb +20 -10
  53. data/lib/middleman/features/automatic_image_sizes.rb +12 -9
  54. data/lib/middleman/features/cache_buster.rb +38 -25
  55. data/lib/middleman/features/directory_indexes.rb +31 -28
  56. data/lib/middleman/features/minify_css.rb +3 -2
  57. data/lib/middleman/features/minify_css/cssmin.rb +55 -0
  58. data/lib/middleman/features/minify_javascript.rb +12 -5
  59. data/lib/middleman/features/relative_assets.rb +28 -25
  60. data/lib/middleman/features/sitemap_tree.rb +34 -0
  61. data/lib/middleman/guard.rb +57 -23
  62. data/lib/middleman/renderers/erb.rb +29 -0
  63. data/lib/middleman/renderers/liquid.rb +3 -12
  64. data/lib/middleman/renderers/markdown.rb +16 -15
  65. data/lib/middleman/renderers/sass.rb +34 -38
  66. data/lib/middleman/vendor/hooks-0.2.0/CHANGES.textile +9 -0
  67. data/lib/middleman/vendor/hooks-0.2.0/Gemfile +3 -0
  68. data/lib/middleman/vendor/hooks-0.2.0/README.rdoc +107 -0
  69. data/lib/middleman/vendor/hooks-0.2.0/Rakefile +12 -0
  70. data/lib/middleman/vendor/hooks-0.2.0/hooks.gemspec +22 -0
  71. data/lib/middleman/vendor/hooks-0.2.0/lib/hooks.rb +109 -0
  72. data/lib/middleman/vendor/hooks-0.2.0/lib/hooks/inheritable_attribute.rb +33 -0
  73. data/lib/middleman/vendor/hooks-0.2.0/test/hooks_test.rb +141 -0
  74. data/lib/middleman/vendor/hooks-0.2.0/test/inheritable_attribute_test.rb +55 -0
  75. data/lib/middleman/vendor/hooks-0.2.0/test/test_helper.rb +10 -0
  76. data/lib/middleman/vendor/padrino-core-0.10.5/.document +5 -0
  77. data/lib/middleman/vendor/padrino-core-0.10.5/.gitignore +22 -0
  78. data/lib/middleman/vendor/padrino-core-0.10.5/.yardopts +1 -0
  79. data/lib/middleman/vendor/padrino-core-0.10.5/LICENSE.txt +20 -0
  80. data/lib/middleman/vendor/padrino-core-0.10.5/README.rdoc +294 -0
  81. data/lib/middleman/vendor/padrino-core-0.10.5/Rakefile +5 -0
  82. data/lib/middleman/vendor/padrino-core-0.10.5/bin/padrino +9 -0
  83. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core.rb +167 -0
  84. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/application.rb +270 -0
  85. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/application/rendering.rb +292 -0
  86. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/application/routing.rb +934 -0
  87. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/application/showexceptions.rb +20 -0
  88. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/caller.rb +53 -0
  89. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/cli/adapter.rb +24 -0
  90. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/cli/base.rb +151 -0
  91. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/cli/console.rb +20 -0
  92. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/cli/rake.rb +24 -0
  93. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/cli/rake_tasks.rb +59 -0
  94. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/command.rb +38 -0
  95. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/images/404.png +0 -0
  96. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/images/500.png +0 -0
  97. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/loader.rb +210 -0
  98. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/cs.yml +34 -0
  99. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/da.yml +34 -0
  100. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/de.yml +34 -0
  101. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/en.yml +34 -0
  102. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/es.yml +34 -0
  103. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/fr.yml +34 -0
  104. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/hu.yml +34 -0
  105. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/it.yml +40 -0
  106. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/ja.yml +34 -0
  107. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/lv.yml +34 -0
  108. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/nl.yml +34 -0
  109. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/no.yml +35 -0
  110. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/pl.yml +34 -0
  111. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/pt_br.yml +40 -0
  112. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/ru.yml +35 -0
  113. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/tr.yml +34 -0
  114. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/uk.yml +34 -0
  115. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/zh_cn.yml +34 -0
  116. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/zh_tw.yml +34 -0
  117. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/logger.rb +345 -0
  118. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/mounter.rb +224 -0
  119. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/reloader.rb +254 -0
  120. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/router.rb +98 -0
  121. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/server.rb +79 -0
  122. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/support_lite.rb +199 -0
  123. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/tasks.rb +21 -0
  124. data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/version.rb +20 -0
  125. data/lib/middleman/vendor/padrino-core-0.10.5/padrino-core.gemspec +38 -0
  126. data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/apps/.components +6 -0
  127. data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/apps/.gitignore +7 -0
  128. data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/apps/complex.rb +32 -0
  129. data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/apps/simple.rb +33 -0
  130. data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/a.rb +9 -0
  131. data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/b.rb +4 -0
  132. data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/c.rb +1 -0
  133. data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/e.rb +13 -0
  134. data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/f.rb +2 -0
  135. data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/g.rb +2 -0
  136. data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/d.rb +4 -0
  137. data/lib/middleman/vendor/padrino-core-0.10.5/test/helper.rb +81 -0
  138. data/lib/middleman/vendor/padrino-core-0.10.5/test/mini_shoulda.rb +45 -0
  139. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_application.rb +108 -0
  140. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_core.rb +79 -0
  141. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_dependencies.rb +44 -0
  142. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_filters.rb +278 -0
  143. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_locale.rb +21 -0
  144. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_logger.rb +100 -0
  145. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_mounter.rb +177 -0
  146. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_reloader_complex.rb +75 -0
  147. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_reloader_simple.rb +98 -0
  148. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_rendering.rb +461 -0
  149. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_restful_routing.rb +33 -0
  150. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_router.rb +146 -0
  151. data/lib/middleman/vendor/padrino-core-0.10.5/test/test_routing.rb +1673 -0
  152. data/lib/middleman/vendor/padrino-helpers-0.10.5/.document +5 -0
  153. data/lib/middleman/vendor/padrino-helpers-0.10.5/.gitignore +21 -0
  154. data/lib/middleman/vendor/padrino-helpers-0.10.5/.yardopts +1 -0
  155. data/lib/middleman/vendor/padrino-helpers-0.10.5/LICENSE.txt +20 -0
  156. data/lib/middleman/vendor/padrino-helpers-0.10.5/README.rdoc +239 -0
  157. data/lib/middleman/vendor/padrino-helpers-0.10.5/Rakefile +5 -0
  158. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers.rb +58 -0
  159. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/asset_tag_helpers.rb +420 -0
  160. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_builder/abstract_form_builder.rb +220 -0
  161. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_builder/standard_form_builder.rb +43 -0
  162. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_helpers.rb +602 -0
  163. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/format_helpers.rb +381 -0
  164. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/cs.yml +103 -0
  165. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/da.yml +91 -0
  166. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/de.yml +81 -0
  167. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/en.yml +103 -0
  168. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/es.yml +103 -0
  169. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/fr.yml +80 -0
  170. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/hu.yml +103 -0
  171. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/it.yml +89 -0
  172. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/ja.yml +103 -0
  173. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/lv.yml +103 -0
  174. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/nl.yml +82 -0
  175. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/no.yml +91 -0
  176. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/pl.yml +95 -0
  177. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/pt_br.yml +103 -0
  178. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/ru.yml +103 -0
  179. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/tr.yml +103 -0
  180. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/uk.yml +103 -0
  181. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/zh_cn.yml +104 -0
  182. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/zh_tw.yml +103 -0
  183. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/number_helpers.rb +288 -0
  184. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers.rb +175 -0
  185. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/abstract_handler.rb +98 -0
  186. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/erb_handler.rb +79 -0
  187. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/haml_handler.rb +63 -0
  188. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/slim_handler.rb +81 -0
  189. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/render_helpers.rb +60 -0
  190. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/tag_helpers.rb +103 -0
  191. data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/translation_helpers.rb +38 -0
  192. data/lib/middleman/vendor/padrino-helpers-0.10.5/padrino-helpers.gemspec +27 -0
  193. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/app.rb +73 -0
  194. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.erb +14 -0
  195. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.haml +12 -0
  196. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.slim +13 -0
  197. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.erb +14 -0
  198. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.haml +12 -0
  199. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.slim +12 -0
  200. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.erb +11 -0
  201. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.haml +9 -0
  202. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.slim +9 -0
  203. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.erb +5 -0
  204. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.haml +5 -0
  205. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.slim +5 -0
  206. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.erb +20 -0
  207. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.haml +15 -0
  208. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.slim +15 -0
  209. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.erb +56 -0
  210. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.haml +47 -0
  211. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.slim +47 -0
  212. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.erb +56 -0
  213. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.haml +45 -0
  214. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.slim +45 -0
  215. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.erb +5 -0
  216. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.haml +4 -0
  217. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.slim +4 -0
  218. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.erb +3 -0
  219. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.haml +3 -0
  220. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.slim +3 -0
  221. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.erb +3 -0
  222. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.haml +3 -0
  223. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.slim +3 -0
  224. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_erb.erb +1 -0
  225. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_haml.haml +1 -0
  226. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_slim.slim +1 -0
  227. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.erb +1 -0
  228. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.haml +1 -0
  229. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.slim +1 -0
  230. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/app.rb +50 -0
  231. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engine.haml +5 -0
  232. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_erb.erb +1 -0
  233. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_haml.haml +1 -0
  234. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_slim.slim +1 -0
  235. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/erb/test.erb +1 -0
  236. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/explicit_engine.haml +5 -0
  237. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/haml/test.haml +1 -0
  238. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/_user.haml +7 -0
  239. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/haml_template.haml +1 -0
  240. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/some_template.haml +2 -0
  241. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/helper.rb +66 -0
  242. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_asset_tag_helpers.rb +320 -0
  243. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_form_builder.rb +996 -0
  244. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_form_helpers.rb +645 -0
  245. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_format_helpers.rb +227 -0
  246. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_locale.rb +20 -0
  247. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_number_helpers.rb +136 -0
  248. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_output_helpers.rb +153 -0
  249. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_render_helpers.rb +76 -0
  250. data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_tag_helpers.rb +105 -0
  251. data/lib/middleman/version.rb +1 -1
  252. data/middleman-x86-mingw32.gemspec +16 -33
  253. data/middleman.gemspec +16 -31
  254. metadata +590 -349
  255. data/features/sinatra.feature +0 -6
  256. data/lib/middleman/core_extensions/rack_map.rb +0 -35
  257. data/lib/middleman/renderers/coffee_script.rb +0 -8
  258. data/lib/middleman/renderers/haml.rb +0 -31
  259. data/lib/middleman/renderers/slim.rb +0 -8
data/.gitignore CHANGED
@@ -10,4 +10,5 @@ docs
10
10
  .rvmrc
11
11
  .rbenv-version
12
12
  fixtures/test-app/build
13
- .*.swp
13
+ .*.swp
14
+ build
data/CHANGELOG CHANGED
@@ -1,19 +1,27 @@
1
- 2.0.16.1
1
+ 3.0.pre
2
2
  ====
3
- Update EventMachine to 1.0.0.rc.4 on Windows
3
+ Rewritten to work directly with Rack (Sinatra apps can still be mounted)
4
4
 
5
- 2.0.16
5
+ 2.1.pre
6
6
  ====
7
- Update Guard to v1.1
8
-
9
- 2.0.15.4
10
- ====
11
- Lock Padrino version to 0.10.6
7
+ Finally support Compass in Sprockets! Thanks to @xdite and @petebrowne
8
+ Sitemap object representing the known world
9
+ FileWatcher proxies file change events
10
+ Unified callback solution
11
+ Removed Slim and Maruku from base install. Will need to be installed and required by the user (in config.rb)
12
12
 
13
13
  2.0.14
14
14
  ====
15
15
  Minor fix for i18n
16
16
 
17
+ 2.0.13.2
18
+ ====
19
+ Update Windows eventmachine dep
20
+
21
+ 2.0.13.1
22
+ ====
23
+ build --clean shouldn't remove dotfiles
24
+
17
25
  2.0.13
18
26
  ====
19
27
  middleman build --clean keeps the build directory clean of leftover files
@@ -4,7 +4,7 @@ Feature: Builder
4
4
  Scenario: Checking built folder for content
5
5
  Given a built app at "test-app"
6
6
  Then "index.html" should exist at "test-app" and include "Comment in layout"
7
- Then "javascripts/coffee_test.js" should exist at "test-app" and include ".slice"
7
+ Then "javascripts/coffee_test.js" should exist at "test-app" and include "Array.prototype.slice"
8
8
  Then "index.html" should exist at "test-app" and include "<h1>Welcome</h1>"
9
9
  Then "static.html" should exist at "test-app" and include "Static, no code!"
10
10
  Then "services/index.html" should exist at "test-app" and include "Services"
@@ -15,15 +15,12 @@ Feature: Builder
15
15
  Then "spaces in file.html" should exist at "test-app" and include "spaces"
16
16
  Then "images/Read me (example).txt" should exist at "test-app"
17
17
  Then "images/Child folder/regular_file(example).txt" should exist at "test-app"
18
- And cleanup built app at "test-app"
19
18
 
20
19
  Scenario: Build glob
21
- Given a built app at "glob-app" with flags "--glob '**/*.sass'"
20
+ Given a built app at "glob-app" with flags "--glob '*.css'"
22
21
  Then "stylesheets/site.css" should exist at "glob-app" and include "html"
23
22
  Then "index.html" should not exist at "glob-app"
24
- And cleanup built app at "glob-app"
25
23
 
26
24
  # Scenario: Force relative assets
27
25
  # Given a built app at "relative-app" with flags "--relative"
28
26
  # Then "stylesheets/relative_assets.css" should exist at "relative-app" and include "../"
29
- # And cleanup built app at "relative-app"
@@ -23,4 +23,4 @@ Feature: Generate mtime-based query string for busting browser caches
23
23
  Given "cache_buster" feature is "enabled"
24
24
  And the Server is running at "test-app"
25
25
  When I go to "/cache-buster.html"
26
- Then I should not see "?"
26
+ Then I should see "?"
@@ -7,4 +7,3 @@ Feature: Build Clean
7
7
  Then "should_be_ignored.html" should not exist at "clean-app"
8
8
  And "should_be_ignored2.html" should not exist at "clean-app"
9
9
  And "should_be_ignored3.html" should not exist at "clean-app"
10
- And cleanup built app at "clean-app"
@@ -4,14 +4,14 @@ Feature: Support coffee-script
4
4
  Scenario: Rendering coffee script
5
5
  Given the Server is running at "test-app"
6
6
  When I go to "/javascripts/coffee_test.js"
7
- Then I should see ".slice"
7
+ Then I should see "Array.prototype.slice"
8
8
 
9
9
  Scenario: Rendering coffee-script with :coffeescript haml-filter
10
10
  Given the Server is running at "test-app"
11
11
  When I go to "/inline-coffeescript.html"
12
- Then I should see ".slice"
12
+ Then I should see "Array.prototype.slice"
13
13
 
14
14
  Scenario: Rendering broken coffee
15
15
  Given the Server is running at "test-app"
16
16
  When I go to "/javascripts/broken-coffee.js"
17
- Then I should see "eserved word"
17
+ Then I should see "ProgramError"
@@ -0,0 +1,10 @@
1
+ Feature: Custom Layout Engine
2
+
3
+ Scenario: Checking built folder for content
4
+ Given a built app at "custom-layout-app"
5
+ Then "index.html" should exist at "custom-layout-app" and include "Comment in layout"
6
+
7
+ Scenario: Checking server for content
8
+ Given the Server is running at "test-app"
9
+ When I go to "/index.html"
10
+ Then I should see "Comment in layout"
@@ -11,7 +11,6 @@ Feature: Directory Index
11
11
  Then "needs_index.html" should not exist at "indexable-app"
12
12
  Then "a_folder/needs_index.html" should not exist at "indexable-app"
13
13
  Then "leave_me_alone/index.html" should not exist at "indexable-app"
14
- And cleanup built app at "indexable-app"
15
14
 
16
15
  Scenario: Preview normal file
17
16
  Given the Server is running at "indexable-app"
@@ -10,7 +10,6 @@ Feature: Dynamic Pages
10
10
  Then "should_be_ignored.html" should not exist at "test-app"
11
11
  Then "should_be_ignored2.html" should not exist at "test-app"
12
12
  Then "should_be_ignored3.html" should not exist at "test-app"
13
- And cleanup built app at "test-app"
14
13
 
15
14
  Scenario: Preview basic proxy
16
15
  Given the Server is running at "test-app"
@@ -3,7 +3,6 @@ Feature: Web Fonts
3
3
  Scenario: Checking built folder for content
4
4
  Given a built app at "fonts-app"
5
5
  Then "stylesheets/fonts.css" should exist at "fonts-app" and include "/fonts/StMarie-Thin.otf"
6
- And cleanup built app at "fonts-app"
7
6
 
8
7
  Scenario: Rendering scss
9
8
  Given the Server is running at "fonts-app"
@@ -3,7 +3,7 @@ Feature: Built-in macro view helpers
3
3
 
4
4
  Scenario: Using the link_to helper
5
5
  Given the Server is running at "test-app"
6
- When I go to "/padrino_test.html"
6
+ When I go to "/former_padrino_test.html"
7
7
  And I should see 'href="test2.com"'
8
8
  And I should see 'src="/images/test2.png"'
9
9
  Then I should see 'src="/javascripts/test1.js"'
@@ -1,16 +1,21 @@
1
1
  Feature: Sprockets
2
2
 
3
- Scenario: Sprockets require
3
+ Scenario: Sprockets JS require
4
4
  Given the Server is running at "test-app"
5
5
  When I go to "/javascripts/sprockets_base.js"
6
6
  Then I should see "sprockets_sub_function"
7
7
 
8
- Scenario: Sprockets require with custom :js_dir
8
+ Scenario: Sprockets JS require with custom :js_dir
9
9
  Given the Server is running at "sprockets-app"
10
- When I go to "/library/javascripts/sprockets_base.js"
10
+ When I go to "/library/js/sprockets_base.js"
11
11
  Then I should see "sprockets_sub_function"
12
12
 
13
- Scenario: Sprockets should have access to yaml data
13
+ Scenario: Plain JS require with custom :js_dir
14
+ Given the Server is running at "sprockets-app"
15
+ When I go to "/library/css/plain.css"
16
+ Then I should see "helloWorld"
17
+
18
+ Scenario: Sprockets JS should have access to yaml data
14
19
  Given the Server is running at "test-app"
15
20
  When I go to "/javascripts/multiple_engines.js"
16
21
  Then I should see "Hello One"
@@ -18,4 +23,28 @@ Feature: Sprockets
18
23
  Scenario: Multiple engine files should build correctly
19
24
  Given a built app at "test-app"
20
25
  Then "javascripts/multiple_engines.js" should exist at "test-app" and include "Hello One"
21
- And cleanup built app at "test-app"
26
+
27
+ Scenario: Sprockets CSS require //require
28
+ Given the Server is running at "test-app"
29
+ When I go to "/stylesheets/sprockets_base1.css"
30
+ Then I should see "hello"
31
+
32
+ Scenario: Sprockets CSS require @import
33
+ Given the Server is running at "test-app"
34
+ When I go to "/stylesheets/sprockets_base2.css"
35
+ Then I should see "hello"
36
+
37
+ Scenario: Sprockets CSS require with custom :css_dir //require
38
+ Given the Server is running at "sprockets-app"
39
+ When I go to "/library/css/sprockets_base1.css"
40
+ Then I should see "hello"
41
+
42
+ Scenario: Plain CSS require with custom :css_dir
43
+ Given the Server is running at "sprockets-app"
44
+ When I go to "/library/css/plain.css"
45
+ Then I should see "helloWorld"
46
+
47
+ Scenario: Sprockets CSS require with custom :css_dir @import
48
+ Given the Server is running at "sprockets-app"
49
+ When I go to "/library/css/sprockets_base2.css"
50
+ Then I should see "hello"
@@ -1,7 +1,10 @@
1
- @wip
2
1
  Feature: Sprockets Gems
3
-
4
2
  Scenario: Sprockets can pull jQuery from gem
5
3
  Given the Server is running at "sprockets-app"
6
- When I go to "/javascripts/jquery_include.js"
7
- Then I should see "var jQuery ="
4
+ When I go to "/library/js/jquery_include.js"
5
+ Then I should see "var jQuery ="
6
+
7
+ # Scenario: Sprockets can pull CSS from gem
8
+ # Given the Server is running at "sprockets-app"
9
+ # When I go to "/library/css/bootstrap_include.css"
10
+ # Then I should see "Bootstrap"
@@ -1,8 +1,9 @@
1
1
  Given /^I am using an asset host$/ do
2
- @server ||= Middleman.server
3
- @server.set :show_exceptions, false
4
- @server.activate :asset_host
5
- @server.set :asset_host do |asset|
6
- "http://assets%d.example.com" % (asset.hash % 4)
7
- end
2
+ @initialize_commands ||= []
3
+ @initialize_commands << lambda {
4
+ activate :asset_host
5
+ set :asset_host do |asset|
6
+ "http://assets%d.example.com" % (asset.hash % 4)
7
+ end
8
+ }
8
9
  end
@@ -11,6 +11,10 @@ end
11
11
  Given /^a built app at "([^"]*)"$/ do |path|
12
12
  root = File.dirname(File.dirname(File.dirname(__FILE__)))
13
13
  target = File.join(root, "fixtures", path)
14
+
15
+ build_target = File.join(target, "build")
16
+ FileUtils.rm_rf(build_target)
17
+
14
18
  build_cmd = File.expand_path(File.join(root, "bin", "middleman build"))
15
19
  `cd #{target} && #{build_cmd}`
16
20
  end
@@ -1,23 +1,18 @@
1
1
  Given /^a clean server$/ do
2
- @server = Middleman.server
3
- @server.set :show_exceptions, false
2
+ @initialize_commands = []
4
3
  end
5
4
 
6
5
  Given /^"([^\"]*)" feature is "([^\"]*)"$/ do |feature, state|
7
- @server = Middleman.server
8
- @server.set :show_exceptions, false
6
+ @initialize_commands ||= []
9
7
 
10
8
  if state == "enabled"
11
- @server.activate(feature.to_sym)
12
- end
13
-
14
- @server.set :environment, @current_env || :development
9
+ @initialize_commands << lambda { activate(feature.to_sym) }
10
+ end
15
11
  end
16
12
 
17
13
  Given /^"([^\"]*)" is set to "([^\"]*)"$/ do |variable, value|
18
- @server ||= Middleman.server
19
- @server.set :show_exceptions, false
20
- @server.set variable.to_sym, value
14
+ @initialize_commands ||= []
15
+ @initialize_commands << lambda { set(variable.to_sym, value) }
21
16
  end
22
17
 
23
18
  Given /^current environment is "([^\"]*)"$/ do |env|
@@ -25,11 +20,22 @@ Given /^current environment is "([^\"]*)"$/ do |env|
25
20
  end
26
21
 
27
22
  Given /^the Server is running at "([^\"]*)"$/ do |app_path|
28
- @server ||= Middleman.server
29
- @server.set :show_exceptions, false
30
- root = File.dirname(File.dirname(File.dirname(__FILE__)))
31
- @server.set :root, File.join(root, "fixtures", app_path)
32
- @browser = Rack::Test::Session.new(Rack::MockSession.new(@server.new))
23
+ root_dir = File.dirname(File.dirname(File.dirname(__FILE__)))
24
+
25
+ initialize_commands = @initialize_commands || []
26
+ initialize_commands.unshift lambda {
27
+ set :root, File.join(root_dir, "fixtures", app_path)
28
+ set :environment, @current_env || :development
29
+ }
30
+
31
+ @server_inst = Middleman.server.inst do
32
+ initialize_commands.each do |p|
33
+ instance_exec(&p)
34
+ end
35
+ end
36
+
37
+ app_rack = @server_inst.class.to_rack_app
38
+ @browser = ::Rack::Test::Session.new(::Rack::MockSession.new(app_rack))
33
39
  end
34
40
 
35
41
  When /^I go to "([^\"]*)"$/ do |url|
@@ -1,13 +1,15 @@
1
1
  Given /^page "([^\"]*)" has layout "([^\"]*)"$/ do |url, layout|
2
- @server ||= Middleman.server
3
- @server.set :show_exceptions, false
4
- @server.page(url, :layout => layout.to_sym)
2
+ @initialize_commands ||= []
3
+ @initialize_commands << lambda {
4
+ page(url, :layout => layout.to_sym)
5
+ }
5
6
  end
6
7
 
7
8
  Given /^"([^\"]*)" with_layout block has layout "([^\"]*)"$/ do |url, layout|
8
- @server ||= Middleman.server
9
- @server.set :show_exceptions, false
10
- @server.with_layout(layout.to_sym) do
11
- page(url)
12
- end
9
+ @initialize_commands ||= []
10
+ @initialize_commands << lambda {
11
+ with_layout(layout.to_sym) do
12
+ page(url)
13
+ end
14
+ }
13
15
  end
@@ -0,0 +1 @@
1
+ set :erb, :layout_engine => :haml
@@ -0,0 +1 @@
1
+ <h1>Welcome</h1>
@@ -0,0 +1,6 @@
1
+ %html
2
+ %head
3
+ %title My Sample Site
4
+ / Comment in layout
5
+ %body
6
+ = yield
@@ -1 +1,2 @@
1
- set :js_dir, "library/javascripts"
1
+ set :js_dir, "library/js"
2
+ set :css_dir, "library/css"
@@ -0,0 +1 @@
1
+ //= require "bootstrap.scss"
@@ -0,0 +1,3 @@
1
+ #helloWorld {
2
+ color: red;
3
+ }
@@ -0,0 +1 @@
1
+ //= require "sprockets_sub"
@@ -0,0 +1 @@
1
+ @import "sprockets_sub";
@@ -0,0 +1 @@
1
+ hello { world: "hi"; }
@@ -0,0 +1,3 @@
1
+ function hellowWorld() {
2
+
3
+ }
@@ -1,3 +1,8 @@
1
+ require "maruku"
2
+ require "slim"
3
+ require "liquid"
4
+ require "coffee-filter"
5
+
1
6
  page "/fake.html", :proxy => "/real.html", :layout => false
2
7
 
3
8
  ignore "/should_be_ignored.html"
@@ -45,8 +50,4 @@ with_layout false do
45
50
  }.each do |path|
46
51
  page path
47
52
  end
48
- end
49
-
50
- get "/sinatra_test" do
51
- "Ratpack"
52
53
  end
@@ -0,0 +1 @@
1
+ //= require "sprockets_sub"
@@ -0,0 +1 @@
1
+ @import "sprockets_sub";
@@ -0,0 +1 @@
1
+ hello { world: "hi"; }
data/lib/middleman.rb CHANGED
@@ -48,42 +48,42 @@
48
48
  #
49
49
  # [Visit the website]: http://middlemanapp.com
50
50
  # [Read the wiki]: https://github.com/tdreyno/middleman/wiki
51
- # [Email the users group]: http://groups.google.com/group/middleman-users
51
+ # [Email the users group]: https://convore.com/middleman/
52
52
  # [Submit bug reports]: https://github.com/tdreyno/middleman/issues
53
53
 
54
54
  # Setup our load paths
55
55
  libdir = File.dirname(__FILE__)
56
56
  $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
57
57
 
58
- # We're riding on Sinatra, so let's include it.
59
- require "sinatra/base"
60
-
61
58
  # Top-level Middleman object
62
59
  module Middleman
63
60
  # Auto-load modules on-demand
64
- autoload :Base, "middleman/base"
65
- autoload :Builder, "middleman/builder"
66
- autoload :CLI, "middleman/cli"
67
- autoload :Templates, "middleman/templates"
68
- autoload :Guard, "middleman/guard"
61
+ autoload :Base, "middleman/base"
62
+ autoload :Hooks, "middleman/hooks"
63
+ autoload :Builder, "middleman/builder"
64
+ autoload :CLI, "middleman/cli"
65
+ autoload :Templates, "middleman/templates"
66
+ autoload :Guard, "middleman/guard"
69
67
 
70
68
  # Custom Renderers
71
69
  module Renderers
72
- autoload :Haml, "middleman/renderers/haml"
73
70
  autoload :Sass, "middleman/renderers/sass"
74
- autoload :Slim, "middleman/renderers/slim"
75
71
  autoload :Markdown, "middleman/renderers/markdown"
72
+ autoload :ERb, "middleman/renderers/erb"
76
73
  autoload :CoffeeScript, "middleman/renderers/coffee_script"
77
74
  autoload :Liquid, "middleman/renderers/liquid"
78
75
  end
79
76
 
80
77
  module CoreExtensions
78
+ # File Change Notifier
79
+ autoload :FileWatcher, "middleman/core_extensions/file_watcher"
80
+
81
+ # In-memory Sitemap
82
+ autoload :Sitemap, "middleman/core_extensions/sitemap"
83
+
81
84
  # Add Builder callbacks
82
85
  autoload :Builder, "middleman/core_extensions/builder"
83
86
 
84
- # Add Rack::Builder.map support
85
- autoload :RackMap, "middleman/core_extensions/rack_map"
86
-
87
87
  # Custom Feature API
88
88
  autoload :Features, "middleman/core_extensions/features"
89
89
 
@@ -142,11 +142,11 @@ module Middleman
142
142
  # words, paragraphs, fake images, names and email addresses.
143
143
  autoload :Lorem, "middleman/features/lorem"
144
144
 
145
- # guard-livereload
146
- autoload :LiveReload, "middleman/features/live_reload"
147
-
148
145
  # Automatically convert filename.html files into filename/index.html
149
146
  autoload :DirectoryIndexes, "middleman/features/directory_indexes"
147
+
148
+ # Organize the sitemap as a tree
149
+ autoload :SitemapTree, "middleman/features/sitemap_tree"
150
150
  end
151
151
 
152
152
  EXTENSION_FILE = File.join("lib", "middleman_init.rb")
@@ -176,9 +176,8 @@ module Middleman
176
176
  end
177
177
 
178
178
  def self.server(&block)
179
- sandbox = Class.new(Sinatra::Base)
180
- sandbox.register Base
181
- sandbox.class_eval(&block) if block_given?
179
+ sandbox = Class.new(Middleman::Base)
180
+ # sandbox.class_eval(&block) if block_given?
182
181
  sandbox
183
182
  end
184
183
 
@@ -188,13 +187,16 @@ module Middleman
188
187
  :AccessLog => []
189
188
  }
190
189
 
191
- app = ::Middleman.server
192
- app.set :environment, options[:environment].to_sym
193
- opts[:app] = app.new
190
+ app_class = options[:app] ||= ::Middleman.server.new
191
+ opts[:app] = app_class
194
192
  opts[:server] = 'thin'
193
+
194
+ # require "thin"
195
+ # ::Thin::Logging.silent = true if options[:debug] != "true"
195
196
 
196
- $stderr.puts "== The Middleman is standing watch on port #{opts[:Port]}"
197
- ::Rack::Server.new(opts).start
197
+ server = ::Rack::Server.new(opts)
198
+ server.start
199
+ server
198
200
  end
199
201
  end
200
202