middleman-core 3.0.0.beta.1 → 3.0.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (358) hide show
  1. data/Rakefile +2 -44
  2. data/bin/middleman +12 -8
  3. data/features/3rd_party_cli.feature +12 -2
  4. data/features/builder.feature +1 -1
  5. data/features/clean_build.feature +24 -14
  6. data/features/cli.feature +9 -30
  7. data/features/custom_layouts.feature +6 -0
  8. data/features/directory_index.feature +2 -0
  9. data/features/dynamic_pages.feature +37 -0
  10. data/features/extensionless_text_files.feature +58 -0
  11. data/features/former_padrino_helpers.feature +5 -3
  12. data/features/frontmatter_page_settings.feature +27 -0
  13. data/features/helpers_external.feature +7 -1
  14. data/features/i18n_builder.feature +121 -0
  15. data/features/i18n_preview.feature +113 -0
  16. data/features/ignore.feature +198 -0
  17. data/features/implied_extensions.feature +52 -0
  18. data/features/instance_vars.feature +0 -2
  19. data/features/partials.feature +5 -0
  20. data/features/request_params.feature +6 -0
  21. data/features/{sitemap_traversal.features → sitemap_traversal.feature} +24 -24
  22. data/features/wildcard_page_helper.feature +1 -1
  23. data/fixtures/clean-dir-app/config.rb +2 -1
  24. data/fixtures/clean-nested-app/config.rb +3 -0
  25. data/fixtures/clean-nested-app/source/about.html +1 -0
  26. data/fixtures/dynamic-pages-app/config.rb +25 -5
  27. data/fixtures/dynamic-pages-app/source/real/index.html.erb +5 -1
  28. data/{lib/middleman-core/vendor/darwin/spec/fixtures/custom 'path/.gitignore → fixtures/extensionless-text-files-app/config.rb} +0 -0
  29. data/fixtures/extensionless-text-files-app/source/CNAME +1 -0
  30. data/fixtures/extensionless-text-files-app/source/LICENSE +1 -0
  31. data/fixtures/extensionless-text-files-app/source/README +1 -0
  32. data/fixtures/extensionless-text-files-app/source/index.html +1 -0
  33. data/fixtures/external-helpers/helpers/four_helper.rb +3 -0
  34. data/fixtures/external-helpers/helpers/one_helper.rb +3 -0
  35. data/fixtures/external-helpers/helpers/three_helper.rb +3 -0
  36. data/fixtures/external-helpers/helpers/two_helper.rb +3 -0
  37. data/fixtures/external-helpers/source/automatic.html.erb +1 -0
  38. data/fixtures/frontmatter-settings-app/config.rb +4 -0
  39. data/fixtures/frontmatter-settings-app/source/alternate_layout.html.erb +5 -0
  40. data/fixtures/frontmatter-settings-app/source/ignored.html.erb +5 -0
  41. data/fixtures/frontmatter-settings-app/source/layouts/alternate.erb +3 -0
  42. data/fixtures/frontmatter-settings-app/source/no_index.html.erb +5 -0
  43. data/fixtures/i18n-alt-root-app/locales/en.yml +4 -0
  44. data/fixtures/i18n-alt-root-app/locales/es.yml +7 -0
  45. data/fixtures/i18n-alt-root-app/source/lang_data/hello.html.erb +1 -0
  46. data/fixtures/i18n-alt-root-app/source/lang_data/index.html.erb +1 -0
  47. data/fixtures/i18n-alt-root-app/source/layout.erb +1 -0
  48. data/fixtures/i18n-test-app/locales/en.yml +4 -0
  49. data/fixtures/i18n-test-app/locales/es.yml +7 -0
  50. data/fixtures/i18n-test-app/source/layout.erb +1 -0
  51. data/fixtures/i18n-test-app/source/localizable/hello.html.erb +1 -0
  52. data/fixtures/i18n-test-app/source/localizable/index.html.erb +1 -0
  53. data/fixtures/ignore-app/source/about.html.erb +1 -0
  54. data/{lib/middleman-core/vendor/darwin/spec/fixtures/folder1/file1.txt → fixtures/ignore-app/source/images/icon/messages.png} +0 -0
  55. data/{lib/middleman-core/vendor/darwin/spec/fixtures/folder1/folder2/file2.txt → fixtures/ignore-app/source/images/pic.png} +0 -0
  56. data/fixtures/ignore-app/source/images/portrait.jpg +0 -0
  57. data/fixtures/ignore-app/source/index.html.erb +0 -0
  58. data/fixtures/ignore-app/source/plain.html +1 -0
  59. data/fixtures/ignore-app/source/reports/another.html +0 -0
  60. data/fixtures/ignore-app/source/reports/index.html +0 -0
  61. data/fixtures/implied-extensions-app/config.rb +0 -0
  62. data/fixtures/implied-extensions-app/source/index.erb +1 -0
  63. data/fixtures/indexable-app/config.rb +3 -1
  64. data/fixtures/indexable-app/source/wildcard_leave_me_alone.html +1 -0
  65. data/fixtures/large-build-app/source/feed.xml.builder +4 -0
  66. data/fixtures/lorem-app/config.rb +1 -0
  67. data/fixtures/padrino-helpers-app/source/former_padrino_test.html.erb +2 -1
  68. data/fixtures/partials-app/source/shared/_footer.erb +1 -1
  69. data/fixtures/partials-app/source/shared/snippet.erb +1 -0
  70. data/fixtures/partials-app/source/using_snippet.html.erb +1 -0
  71. data/fixtures/request-app/config.rb +0 -0
  72. data/fixtures/request-app/source/index.html.erb +3 -0
  73. data/fixtures/traversal-app/source/layout.erb +2 -0
  74. data/lib/middleman-core/application.rb +558 -0
  75. data/lib/middleman-core/cli/build.rb +67 -64
  76. data/lib/middleman-core/cli/init.rb +10 -4
  77. data/lib/middleman-core/cli/server.rb +7 -1
  78. data/lib/middleman-core/cli.rb +22 -2
  79. data/lib/middleman-core/core_extensions/assets.rb +12 -3
  80. data/lib/middleman-core/core_extensions/builder.rb +0 -37
  81. data/lib/middleman-core/core_extensions/data.rb +3 -3
  82. data/lib/middleman-core/core_extensions/default_helpers.rb +17 -26
  83. data/lib/middleman-core/core_extensions/extensions.rb +13 -10
  84. data/lib/middleman-core/core_extensions/external_helpers.rb +35 -0
  85. data/lib/middleman-core/core_extensions/file_watcher.rb +9 -5
  86. data/lib/middleman-core/core_extensions/front_matter.rb +85 -15
  87. data/lib/middleman-core/core_extensions/i18n.rb +137 -0
  88. data/lib/middleman-core/core_extensions/rendering.rb +134 -21
  89. data/lib/middleman-core/core_extensions/routing.rb +42 -23
  90. data/lib/middleman-core/core_extensions/show_exceptions.rb +13 -3
  91. data/lib/middleman-core/extensions/asset_host.rb +21 -3
  92. data/lib/middleman-core/extensions/automatic_image_sizes.rb +20 -1
  93. data/lib/middleman-core/extensions/directory_indexes.rb +42 -47
  94. data/lib/middleman-core/extensions/lorem.rb +54 -6
  95. data/lib/middleman-core/extensions.rb +179 -0
  96. data/lib/middleman-core/renderers/erb.rb +28 -21
  97. data/lib/middleman-core/sitemap/extensions/ignores.rb +86 -0
  98. data/lib/middleman-core/sitemap/extensions/on_disk.rb +77 -0
  99. data/lib/middleman-core/sitemap/extensions/proxies.rb +97 -0
  100. data/lib/middleman-core/sitemap/extensions/traversal.rb +77 -0
  101. data/lib/middleman-core/sitemap/resource.rb +126 -0
  102. data/lib/middleman-core/sitemap/store.rb +148 -97
  103. data/lib/middleman-core/sitemap.rb +78 -0
  104. data/lib/middleman-core/step_definitions/builder_steps.rb +15 -1
  105. data/lib/middleman-core/step_definitions/server_steps.rb +11 -4
  106. data/lib/middleman-core/templates/default.rb +10 -0
  107. data/lib/middleman-core/templates/html5/source/404.html +32 -27
  108. data/lib/middleman-core/templates/html5/source/README.md +34 -367
  109. data/lib/middleman-core/templates/html5/source/apple-touch-icon-114x114-precomposed.png +0 -0
  110. data/lib/middleman-core/templates/html5/source/apple-touch-icon-57x57-precomposed.png +0 -0
  111. data/lib/middleman-core/templates/html5/source/apple-touch-icon-72x72-precomposed.png +0 -0
  112. data/lib/middleman-core/templates/html5/source/apple-touch-icon-precomposed.png +0 -0
  113. data/lib/middleman-core/templates/html5/source/apple-touch-icon.png +0 -0
  114. data/lib/middleman-core/templates/html5/source/crossdomain.xml +0 -0
  115. data/lib/middleman-core/templates/html5/source/css/style.css +37 -37
  116. data/lib/middleman-core/templates/html5/source/favicon.ico +0 -0
  117. data/lib/middleman-core/templates/html5/source/humans.txt +0 -0
  118. data/lib/middleman-core/templates/html5/source/img/.gitignore +0 -2
  119. data/lib/middleman-core/templates/html5/source/index.html +31 -43
  120. data/lib/middleman-core/templates/html5/source/js/libs/{jquery-1.6.2.js → jquery-1.7.1.js} +1922 -1637
  121. data/lib/middleman-core/templates/html5/source/js/libs/jquery-1.7.1.min.js +4 -0
  122. data/lib/middleman-core/templates/html5/source/js/libs/modernizr-2.5.3.min.js +4 -0
  123. data/lib/middleman-core/templates/html5/source/js/plugins.js +3 -12
  124. data/lib/middleman-core/templates/html5/source/js/script.js +0 -0
  125. data/lib/middleman-core/templates/html5/source/robots.txt +1 -2
  126. data/lib/middleman-core/templates/html5.rb +10 -5
  127. data/lib/middleman-core/templates/local.rb +8 -1
  128. data/lib/middleman-core/templates/shared/config.tt +6 -6
  129. data/lib/middleman-core/templates.rb +10 -13
  130. data/lib/middleman-core/util.rb +90 -0
  131. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/.document +0 -0
  132. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/.gitignore +0 -0
  133. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/.yardopts +0 -0
  134. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/LICENSE.txt +0 -0
  135. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/README.rdoc +0 -0
  136. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/Rakefile +0 -0
  137. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/bin/padrino +0 -0
  138. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/application/rendering.rb +0 -0
  139. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/application/routing.rb +38 -29
  140. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/application/showexceptions.rb +0 -0
  141. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application.rb +269 -0
  142. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/caller.rb +0 -0
  143. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/cli/adapter.rb +0 -0
  144. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/cli/base.rb +4 -5
  145. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/cli/console.rb +0 -0
  146. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/cli/rake.rb +0 -0
  147. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/cli/rake_tasks.rb +0 -0
  148. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/command.rb +0 -0
  149. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/images/404.png +0 -0
  150. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/images/500.png +0 -0
  151. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/loader.rb +1 -0
  152. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/cs.yml +0 -0
  153. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/da.yml +0 -0
  154. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/de.yml +0 -0
  155. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/en.yml +0 -0
  156. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/es.yml +0 -0
  157. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/fr.yml +0 -0
  158. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/hu.yml +0 -0
  159. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/it.yml +1 -1
  160. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/ja.yml +0 -0
  161. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/lv.yml +2 -2
  162. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/nl.yml +0 -0
  163. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/no.yml +0 -0
  164. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/pl.yml +0 -0
  165. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/pt_br.yml +0 -0
  166. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/ru.yml +0 -0
  167. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/tr.yml +0 -0
  168. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/uk.yml +0 -0
  169. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/zh_cn.yml +0 -0
  170. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/locale/zh_tw.yml +0 -0
  171. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/logger.rb +192 -109
  172. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/mounter.rb +0 -0
  173. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/reloader.rb +39 -39
  174. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/router.rb +0 -0
  175. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/server.rb +2 -2
  176. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/support_lite.rb +4 -5
  177. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/tasks.rb +0 -0
  178. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core/version.rb +1 -1
  179. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/lib/padrino-core.rb +0 -15
  180. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/padrino-core.gemspec +1 -1
  181. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/fixtures/apps/.components +0 -0
  182. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/fixtures/apps/.gitignore +0 -0
  183. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/fixtures/apps/complex.rb +0 -0
  184. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/fixtures/apps/simple.rb +0 -0
  185. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/fixtures/dependencies/a.rb +0 -0
  186. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/fixtures/dependencies/b.rb +0 -0
  187. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/fixtures/dependencies/c.rb +0 -0
  188. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/fixtures/dependencies/circular/e.rb +0 -0
  189. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/fixtures/dependencies/circular/f.rb +0 -0
  190. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/fixtures/dependencies/circular/g.rb +0 -0
  191. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/fixtures/dependencies/d.rb +0 -0
  192. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/helper.rb +2 -0
  193. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/mini_shoulda.rb +0 -0
  194. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_application.rb +0 -0
  195. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_core.rb +0 -2
  196. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_dependencies.rb +0 -0
  197. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_filters.rb +0 -0
  198. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_locale.rb +0 -0
  199. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_logger.rb +54 -0
  200. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_mounter.rb +0 -0
  201. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_reloader_complex.rb +0 -0
  202. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_reloader_simple.rb +0 -0
  203. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_rendering.rb +0 -0
  204. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_restful_routing.rb +0 -0
  205. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_router.rb +0 -0
  206. data/lib/middleman-core/vendor/{padrino-core-0.10.5 → padrino-core-0.10.6}/test/test_routing.rb +7 -0
  207. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/.document +0 -0
  208. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/.gitignore +0 -0
  209. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/.yardopts +0 -0
  210. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/LICENSE.txt +0 -0
  211. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/README.rdoc +0 -0
  212. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/Rakefile +0 -0
  213. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/asset_tag_helpers.rb +76 -79
  214. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/form_builder/abstract_form_builder.rb +31 -0
  215. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/form_builder/standard_form_builder.rb +0 -0
  216. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/form_helpers.rb +211 -26
  217. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/format_helpers.rb +2 -2
  218. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/cs.yml +0 -0
  219. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/da.yml +0 -0
  220. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/de.yml +0 -0
  221. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/en.yml +0 -0
  222. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/es.yml +0 -0
  223. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/fr.yml +0 -0
  224. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/hu.yml +0 -0
  225. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/it.yml +0 -0
  226. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/ja.yml +0 -0
  227. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/lv.yml +0 -0
  228. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/nl.yml +0 -0
  229. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/no.yml +0 -0
  230. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/pl.yml +0 -0
  231. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/pt_br.yml +0 -0
  232. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/ru.yml +0 -0
  233. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/tr.yml +0 -0
  234. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/uk.yml +0 -0
  235. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/zh_cn.yml +0 -0
  236. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/locale/zh_tw.yml +0 -0
  237. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/number_helpers.rb +0 -0
  238. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/output_helpers/abstract_handler.rb +0 -0
  239. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/output_helpers/erb_handler.rb +0 -0
  240. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/output_helpers/haml_handler.rb +0 -0
  241. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/output_helpers/slim_handler.rb +0 -0
  242. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/output_helpers.rb +0 -0
  243. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/render_helpers.rb +0 -0
  244. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/tag_helpers.rb +260 -0
  245. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers/translation_helpers.rb +0 -0
  246. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/lib/padrino-helpers.rb +4 -3
  247. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/padrino-helpers.gemspec +0 -0
  248. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/app.rb +0 -0
  249. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/capture_concat.erb +0 -0
  250. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/capture_concat.haml +0 -0
  251. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/capture_concat.slim +0 -0
  252. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/content_for.erb +0 -0
  253. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/content_for.haml +0 -0
  254. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/content_for.slim +0 -0
  255. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/content_tag.erb +0 -0
  256. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/content_tag.haml +0 -0
  257. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/content_tag.slim +0 -0
  258. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/current_engine.erb +0 -0
  259. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/current_engine.haml +0 -0
  260. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/current_engine.slim +0 -0
  261. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/fields_for.erb +0 -0
  262. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/fields_for.haml +0 -0
  263. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/fields_for.slim +0 -0
  264. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/form_for.erb +20 -4
  265. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/form_for.haml +15 -3
  266. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/form_for.slim +15 -3
  267. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/form_tag.erb +30 -0
  268. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/form_tag.haml +25 -0
  269. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/form_tag.slim +25 -0
  270. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/link_to.erb +0 -0
  271. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/link_to.haml +0 -0
  272. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/link_to.slim +0 -0
  273. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/mail_to.erb +0 -0
  274. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/mail_to.haml +0 -0
  275. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/mail_to.slim +0 -0
  276. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/meta_tag.erb +0 -0
  277. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/meta_tag.haml +0 -0
  278. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/meta_tag.slim +0 -0
  279. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/partials/_erb.erb +0 -0
  280. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/partials/_haml.haml +0 -0
  281. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/partials/_slim.slim +0 -0
  282. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/simple_partial.erb +0 -0
  283. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/simple_partial.haml +0 -0
  284. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/markup_app/views/simple_partial.slim +0 -0
  285. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/render_app/app.rb +0 -0
  286. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/render_app/views/current_engine.haml +0 -0
  287. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/render_app/views/current_engines/_erb.erb +0 -0
  288. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/render_app/views/current_engines/_haml.haml +0 -0
  289. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/render_app/views/current_engines/_slim.slim +0 -0
  290. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/render_app/views/erb/test.erb +0 -0
  291. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/render_app/views/explicit_engine.haml +0 -0
  292. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/render_app/views/haml/test.haml +0 -0
  293. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/render_app/views/template/_user.haml +0 -0
  294. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/render_app/views/template/haml_template.haml +0 -0
  295. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/fixtures/render_app/views/template/some_template.haml +0 -0
  296. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/helper.rb +0 -0
  297. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/test_asset_tag_helpers.rb +14 -6
  298. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/test_form_builder.rb +116 -6
  299. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/test_form_helpers.rb +134 -9
  300. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/test_format_helpers.rb +0 -0
  301. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/test_locale.rb +0 -0
  302. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/test_number_helpers.rb +3 -0
  303. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/test_output_helpers.rb +0 -0
  304. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/test_render_helpers.rb +0 -0
  305. data/lib/middleman-core/vendor/{padrino-helpers-0.10.5 → padrino-helpers-0.10.6}/test/test_tag_helpers.rb +7 -6
  306. data/lib/middleman-core/version.rb +2 -2
  307. data/lib/middleman-core/watcher.rb +75 -36
  308. data/lib/middleman-core.rb +7 -252
  309. data/middleman-core.gemspec +14 -11
  310. metadata +396 -348
  311. data/bin/fsevent_watch_guard +0 -0
  312. data/ext/extconf.rb +0 -61
  313. data/ext/fsevent/fsevent_watch.c +0 -226
  314. data/fixtures/3rd-party-command/config.rb +0 -10
  315. data/fixtures/ignore-app/config.rb +0 -2
  316. data/fixtures/ignore-app/source/articles/template.html.erb +0 -1
  317. data/fixtures/ignore-app/source/template.html.erb +0 -1
  318. data/lib/middleman-core/base.rb +0 -494
  319. data/lib/middleman-core/cache.rb +0 -57
  320. data/lib/middleman-core/core_extensions/sitemap.rb +0 -72
  321. data/lib/middleman-core/sitemap/page.rb +0 -186
  322. data/lib/middleman-core/sitemap/template.rb +0 -82
  323. data/lib/middleman-core/templates/html5/source/js/libs/jquery-1.6.2.min.js +0 -18
  324. data/lib/middleman-core/templates/html5/source/js/libs/modernizr-2.0.6.min.js +0 -4
  325. data/lib/middleman-core/templates/html5/source/js/mylibs/.gitignore +0 -2
  326. data/lib/middleman-core/templates/html5/source/test/index.html +0 -31
  327. data/lib/middleman-core/templates/html5/source/test/qunit/qunit.css +0 -148
  328. data/lib/middleman-core/templates/html5/source/test/qunit/qunit.js +0 -1265
  329. data/lib/middleman-core/templates/html5/source/test/tests.js +0 -24
  330. data/lib/middleman-core/vendor/darwin/.gitignore +0 -18
  331. data/lib/middleman-core/vendor/darwin/Gemfile +0 -6
  332. data/lib/middleman-core/vendor/darwin/Guardfile +0 -8
  333. data/lib/middleman-core/vendor/darwin/LICENSE +0 -20
  334. data/lib/middleman-core/vendor/darwin/README.rdoc +0 -254
  335. data/lib/middleman-core/vendor/darwin/Rakefile +0 -21
  336. data/lib/middleman-core/vendor/darwin/ext/extconf.rb +0 -61
  337. data/lib/middleman-core/vendor/darwin/ext/fsevent/fsevent_watch.c +0 -226
  338. data/lib/middleman-core/vendor/darwin/lib/rb-fsevent/fsevent.rb +0 -105
  339. data/lib/middleman-core/vendor/darwin/lib/rb-fsevent/version.rb +0 -3
  340. data/lib/middleman-core/vendor/darwin/lib/rb-fsevent.rb +0 -2
  341. data/lib/middleman-core/vendor/darwin/rb-fsevent.gemspec +0 -24
  342. data/lib/middleman-core/vendor/darwin/spec/rb-fsevent/fsevent_spec.rb +0 -75
  343. data/lib/middleman-core/vendor/darwin/spec/spec_helper.rb +0 -24
  344. data/lib/middleman-core/vendor/linux/.gitignore +0 -3
  345. data/lib/middleman-core/vendor/linux/.yardopts +0 -4
  346. data/lib/middleman-core/vendor/linux/MIT-LICENSE +0 -20
  347. data/lib/middleman-core/vendor/linux/README.md +0 -66
  348. data/lib/middleman-core/vendor/linux/Rakefile +0 -54
  349. data/lib/middleman-core/vendor/linux/VERSION +0 -1
  350. data/lib/middleman-core/vendor/linux/lib/rb-inotify/event.rb +0 -139
  351. data/lib/middleman-core/vendor/linux/lib/rb-inotify/native/flags.rb +0 -89
  352. data/lib/middleman-core/vendor/linux/lib/rb-inotify/native.rb +0 -31
  353. data/lib/middleman-core/vendor/linux/lib/rb-inotify/notifier.rb +0 -308
  354. data/lib/middleman-core/vendor/linux/lib/rb-inotify/watcher.rb +0 -83
  355. data/lib/middleman-core/vendor/linux/lib/rb-inotify.rb +0 -17
  356. data/lib/middleman-core/vendor/linux/rb-inotify.gemspec +0 -53
  357. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/application.rb +0 -270
  358. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/tag_helpers.rb +0 -103
data/Rakefile CHANGED
@@ -1,49 +1,7 @@
1
1
  # coding:utf-8
2
2
  RAKE_ROOT = __FILE__
3
3
 
4
+ GEM_NAME = "middleman-core"
5
+
4
6
  require 'rubygems'
5
7
  require File.expand_path(File.dirname(__FILE__) + '/../gem_rake_helper')
6
-
7
- desc "Build vendored gems"
8
- task :build_vendor do
9
- raise unless File.exist?('Rakefile')
10
-
11
- # Destroy vendor
12
- sh "rm -rf lib/middleman-core/vendor/darwin"
13
- sh "rm -rf lib/middleman-core/vendor/linux"
14
-
15
- # Clone the correct gems
16
- sh "git clone https://github.com/thibaudgg/rb-fsevent.git lib/middleman-core/vendor/darwin"
17
- sh "cd lib/middleman-core/vendor/darwin && git checkout 1ca42b987596f350ee7b19d8f8210b7b6ae8766b"
18
- sh "git clone https://github.com/nex3/rb-inotify.git lib/middleman-core/vendor/linux"
19
- sh "cd lib/middleman-core/vendor/linux && git checkout 01e7487e7a8d8f26b13c6835a321390c6618ccb7"
20
-
21
- # Strip out the .git directories
22
- %w[darwin linux].each {|platform| sh "rm -rf lib/middleman-core/vendor/#{platform}/.git"}
23
-
24
- # Move ext directory of darwin to root
25
- sh "mkdir -p ext"
26
- sh "cp -r lib/middleman-core/vendor/darwin/ext/* ext/"
27
-
28
- # Alter darwin extconf.rb
29
- extconf_path = File.expand_path("../ext/extconf.rb", __FILE__)
30
- extconf_contents = File.read(extconf_path)
31
- extconf_contents.sub!(/puts "Warning/, '#\0')
32
- extconf_contents.gsub!(/bin\/fsevent_watch/, 'bin/fsevent_watch_guard')
33
- File.open(extconf_path, 'w') { |f| f << extconf_contents }
34
-
35
- # Alter lib/middleman-core/vendor/darwin/lib/rb-fsevent/fsevent.rb
36
- fsevent_path = File.expand_path("../lib/middleman-core/vendor/darwin/lib/rb-fsevent/fsevent.rb", __FILE__)
37
- fsevent_contents = File.read(fsevent_path)
38
- fsevent_contents.sub!(/fsevent_watch/, 'fsevent_watch_guard')
39
- fsevent_contents.sub!(/'\.\.'/, "'..', '..', '..', '..', '..'")
40
-
41
- File.open(fsevent_path, 'w') { |f| f << fsevent_contents }
42
- end
43
-
44
- desc "Compile mac executable"
45
- task :build_mac_exec do
46
- Dir.chdir(File.expand_path("../ext", __FILE__)) do
47
- system("ruby extconf.rb") or raise
48
- end
49
- end
data/bin/middleman CHANGED
@@ -33,23 +33,27 @@ end
33
33
  # Default command is server
34
34
  ARGV.unshift("server") if ARGV.length < 1 || ARGV.first.include?("-")
35
35
 
36
- # Require Middleman
37
- require 'middleman-core'
38
-
39
36
  begin
40
- # Rubygems
41
- require "middleman-more"
37
+ # Local
38
+ require File.expand_path(File.join(File.dirname(File.dirname(libdir)), "middleman-more", "lib", "middleman-more"))
42
39
  rescue LoadError
43
40
  begin
44
- # Local
45
- require File.expand_path(File.join(File.dirname(File.dirname(libdir)), "middleman-more", "lib", "middleman-more"))
41
+ # Rubygems
42
+ require "middleman-more"
46
43
  rescue LoadError
44
+ # Require Middleman
45
+ require 'middleman-core'
47
46
  end
48
47
  end
49
48
 
49
+ # Automatically discover extensions in RubyGems
50
+ Middleman.load_extensions_in_path
51
+
52
+ require "middleman-core/cli"
53
+
50
54
  # Change directory to the root
51
55
  Dir.chdir(ENV["MM_ROOT"] || Dir.pwd) do
52
56
 
53
57
  # Start the CLI
54
58
  Middleman::Cli::Base.start
55
- end
59
+ end
@@ -1,5 +1,15 @@
1
1
  Feature: Allow config.rb and extensions to add CLI commands
2
- Scenario: Test 3rd Party Command
3
- Given a fixture app "3rd-party-command"
2
+
3
+ Scenario: Command autoloaded from tasks/ directory
4
+ Given an empty app
5
+ And a file named "tasks/hello_task.rb" with:
6
+ """
7
+ class Hello < Thor
8
+ desc "hello", "Say hello"
9
+ def hello
10
+ puts "Hello World"
11
+ end
12
+ end
13
+ """
4
14
  When I run `middleman hello`
5
15
  Then the output should contain "Hello World"
@@ -14,10 +14,10 @@ Feature: Builder
14
14
  | images/Read me (example).txt |
15
15
  | images/Child folder/regular_file(example).txt |
16
16
  | .htaccess |
17
+ | feed.xml |
17
18
  Then the following files should not exist:
18
19
  | _partial |
19
20
  | layout |
20
- | other_layout |
21
21
  | layouts/custom |
22
22
  | layouts/content_for |
23
23
 
@@ -3,29 +3,39 @@ Feature: Build Clean
3
3
  Given a fixture app "clean-app"
4
4
  And app "clean-app" is using config "empty"
5
5
  And a successfully built app at "clean-app"
6
+ Then the following files should exist:
7
+ | build/index.html |
8
+ | build/should_be_ignored.html |
9
+ | build/should_be_ignored2.html |
10
+ | build/should_be_ignored3.html |
6
11
  And app "clean-app" is using config "complications"
7
-
8
12
  Given a successfully built app at "clean-app" with flags "--clean"
9
- When I cd to "build"
10
13
  Then the following files should not exist:
11
- | should_be_ignored.html |
12
- | should_be_ignored2.html |
13
- | should_be_ignored3.html |
14
- And the file "index.html" should contain "Comment in layout"
14
+ | build/should_be_ignored.html |
15
+ | build/should_be_ignored2.html |
16
+ | build/should_be_ignored3.html |
17
+ And the file "build/index.html" should contain "Comment in layout"
15
18
 
16
19
  Scenario: Clean an app with directory indexes
17
20
  Given a successfully built app at "clean-dir-app"
18
- When I cd to "build"
19
21
  Then the following files should exist:
20
- | about/index.html |
21
-
22
+ | build/about/index.html |
22
23
  Given a successfully built app at "clean-dir-app" with flags "--clean"
23
- When I cd to "build"
24
24
  Then the following files should exist:
25
- | about/index.html |
26
-
25
+ | build/about/index.html |
26
+
27
27
  Scenario: Clean build an app that's never been built
28
28
  Given a successfully built app at "clean-dir-app" with flags "--clean"
29
- When I cd to "build"
30
29
  Then the following files should exist:
31
- | about/index.html |
30
+ | build/about/index.html |
31
+
32
+ Scenario: Clean build an app with newly ignored files and a nested output directory
33
+ Given a built app at "clean-nested-app"
34
+ Then a directory named "sub/dir" should exist
35
+ Then the following files should exist:
36
+ | sub/dir/about.html |
37
+ When I append to "config.rb" with "ignore 'about.html'"
38
+ Given a built app at "clean-nested-app" with flags "--clean"
39
+ Then the following files should not exist:
40
+ | sub/dir/about.html |
41
+
data/features/cli.feature CHANGED
@@ -5,6 +5,7 @@ Feature: Middleman CLI
5
5
  Then the exit status should be 0
6
6
  When I cd to "MY_PROJECT"
7
7
  Then the following files should exist:
8
+ | Gemfile |
8
9
  | config.rb |
9
10
  | source/index.html.erb |
10
11
  | source/images/background.png |
@@ -18,11 +19,11 @@ Feature: Middleman CLI
18
19
  When I run `middleman i MY_PROJECT`
19
20
  Then a directory named "MY_PROJECT" should exist
20
21
 
21
- Scenario: Create a new project (alias i)
22
+ Scenario: Create a new project (alias new)
22
23
  When I run `middleman new MY_PROJECT`
23
24
  Then a directory named "MY_PROJECT" should exist
24
25
 
25
- Scenario: Create a new project (alias i)
26
+ Scenario: Create a new project (alias n)
26
27
  When I run `middleman n MY_PROJECT`
27
28
  Then a directory named "MY_PROJECT" should exist
28
29
 
@@ -33,17 +34,16 @@ Feature: Middleman CLI
33
34
  Then the following files should exist:
34
35
  | config.rb |
35
36
  | config.ru |
36
- Then the following files should not exist:
37
37
  | Gemfile |
38
38
 
39
- Scenario: Create a new project with Bundler
40
- When I run `middleman init MY_PROJECT --bundler`
39
+ Scenario: Create a new project without Bundler
40
+ When I run `middleman init MY_PROJECT --no-bundler`
41
41
  Then a directory named "MY_PROJECT" should exist
42
42
  When I cd to "MY_PROJECT"
43
43
  Then the following files should exist:
44
44
  | config.rb |
45
- | Gemfile |
46
45
  Then the following files should not exist:
46
+ | Gemfile |
47
47
  | config.ru |
48
48
 
49
49
  Scenario: Create a new HTML5 project
@@ -52,9 +52,10 @@ Feature: Middleman CLI
52
52
  When I cd to "MY_PROJECT"
53
53
  Then the following files should exist:
54
54
  | config.rb |
55
+ | Gemfile |
55
56
  Then the following files should not exist:
56
57
  | config.ru |
57
- | Gemfile |
58
+ And the file "config.rb" should contain "set :js_dir, 'js'"
58
59
  Then a directory named "source" should exist
59
60
  When I cd to "source"
60
61
  Then the following files should exist:
@@ -69,28 +70,17 @@ Feature: Middleman CLI
69
70
  Then the following files should exist:
70
71
  | config.rb |
71
72
  | config.ru |
72
- Then the following files should not exist:
73
73
  | Gemfile |
74
74
 
75
- Scenario: Create a new HTML5 project with Bundler
76
- When I run `middleman init MY_PROJECT --bundler --template=html5`
77
- Then a directory named "MY_PROJECT" should exist
78
- When I cd to "MY_PROJECT"
79
- Then the following files should exist:
80
- | config.rb |
81
- | Gemfile |
82
- Then the following files should not exist:
83
- | config.ru |
84
-
85
75
  Scenario: Create a new Mobile HTML5 project
86
76
  When I run `middleman init MY_PROJECT --template=mobile`
87
77
  Then a directory named "MY_PROJECT" should exist
88
78
  When I cd to "MY_PROJECT"
89
79
  Then the following files should exist:
90
80
  | config.rb |
81
+ | Gemfile |
91
82
  Then the following files should not exist:
92
83
  | config.ru |
93
- | Gemfile |
94
84
  Then a directory named "source" should exist
95
85
  When I cd to "source"
96
86
  Then the following files should exist:
@@ -105,15 +95,4 @@ Feature: Middleman CLI
105
95
  Then the following files should exist:
106
96
  | config.rb |
107
97
  | config.ru |
108
- Then the following files should not exist:
109
98
  | Gemfile |
110
-
111
- Scenario: Create a new Mobile HTML5 project with Bundler
112
- When I run `middleman init MY_PROJECT --bundler --template=mobile`
113
- Then a directory named "MY_PROJECT" should exist
114
- When I cd to "MY_PROJECT"
115
- Then the following files should exist:
116
- | config.rb |
117
- | Gemfile |
118
- Then the following files should not exist:
119
- | config.ru |
@@ -12,6 +12,12 @@ Feature: Custom layouts
12
12
  And the Server is running at "custom-layout-app2"
13
13
  When I go to "/custom-layout.html"
14
14
  Then I should see "Custom Layout"
15
+
16
+ Scenario: Using with_layout block with globs
17
+ Given "/custom-*" with_layout block has layout "custom"
18
+ And the Server is running at "custom-layout-app2"
19
+ When I go to "/custom-layout.html"
20
+ Then I should see "Custom Layout"
15
21
 
16
22
  Scenario: Using custom :layout attribute with folders
17
23
  Given page "/custom-layout-dir/" has layout "custom"
@@ -8,6 +8,7 @@ Feature: Directory Index
8
8
  | needs_index/index.html |
9
9
  | a_folder/needs_index/index.html |
10
10
  | leave_me_alone.html |
11
+ | wildcard_leave_me_alone.html |
11
12
  | regular/index.html |
12
13
  | .htaccess |
13
14
  Then the following files should not exist:
@@ -15,6 +16,7 @@ Feature: Directory Index
15
16
  | needs_index.html |
16
17
  | a_folder/needs_index.html |
17
18
  | leave_me_alone/index.html |
19
+ | wildcard_leave_me_alone/index.html |
18
20
  And the file "needs_index/index.html" should contain "Indexable"
19
21
  And the file "a_folder/needs_index/index.html" should contain "Indexable"
20
22
  And the file "leave_me_alone.html" should contain "Stay away"
@@ -46,23 +46,60 @@ Feature: Dynamic Pages
46
46
  Given the Server is running at "dynamic-pages-app"
47
47
  When I go to "/fake/one.html"
48
48
  Then I should see "I am real: one"
49
+ Then I should see "Global: I am one glob"
50
+ Then I should see "All: I am all glob"
51
+
49
52
  When I go to "/fake2/one.html"
50
53
  Then I should see "I am real: one"
54
+ Then I should see "Global: I am two glob"
55
+ Then I should see "All: I am all glob"
56
+
51
57
  When I go to "/fake3/one.html"
52
58
  Then I should see "I am real: one"
59
+ Then I should see "Global: I am three glob"
60
+ Then I should see "All: I am all glob"
61
+
53
62
  When I go to "/fake4/one.html"
54
63
  Then I should see "I am real: one"
64
+ Then I should see "Global: I am four glob"
65
+ Then I should see "All: I am all glob"
55
66
 
56
67
  Scenario: Preview proxy with variable two
57
68
  Given the Server is running at "dynamic-pages-app"
58
69
  When I go to "/fake/two.html"
59
70
  Then I should see "I am real: two"
71
+ Then I should see "Global: I am one glob"
72
+ Then I should see "All: I am all glob"
73
+
60
74
  When I go to "/fake2/two.html"
61
75
  Then I should see "I am real: two"
76
+ Then I should see "Global: I am two glob"
77
+ Then I should see "All: I am all glob"
78
+
62
79
  When I go to "/fake3/two.html"
63
80
  Then I should see "I am real: two"
81
+ Then I should see "Global: I am three glob"
82
+ Then I should see "All: I am all glob"
83
+
64
84
  When I go to "/fake4/two.html"
65
85
  Then I should see "I am real: two"
86
+ Then I should see "Global: I am four glob"
87
+ Then I should see "All: I am all glob"
88
+
89
+ Scenario: Build proxy with variable one
90
+ Given a successfully built app at "dynamic-pages-app"
91
+ When I cd to "build"
92
+ Then the file "fake/one.html" should contain "I am real: one"
93
+ Then the file "fake/one.html" should contain "Global: I am one glob"
94
+ Then the file "fake/one.html" should contain "All: I am all glob"
95
+
96
+ Then the file "fake2/one.html" should contain "I am real: one"
97
+ Then the file "fake2/one.html" should contain "Global: I am two glob"
98
+ Then the file "fake2/one.html" should contain "All: I am all glob"
99
+
100
+ Then the file "fake3/one.html" should contain "I am real: one"
101
+ Then the file "fake3/one.html" should contain "Global: I am three glob"
102
+ Then the file "fake3/one.html" should contain "All: I am all glob"
66
103
 
67
104
  Scenario: Target ignore
68
105
  Given the Server is running at "dynamic-pages-app"
@@ -0,0 +1,58 @@
1
+ Feature: Text Files Without Extensions Should Build and Preview
2
+
3
+ Scenario: Building Text Files without directory indexes
4
+
5
+ Given a fixture app "extensionless-text-files-app"
6
+ And a file named "config.rb" with:
7
+ """
8
+ """
9
+ And a successfully built app at "extensionless-text-files-app"
10
+ When I cd to "build"
11
+ Then the following files should exist:
12
+ | CNAME |
13
+ | LICENSE |
14
+ | README |
15
+
16
+ Scenario: Building Text Files with directory indexes
17
+
18
+ Given a fixture app "extensionless-text-files-app"
19
+ And a file named "config.rb" with:
20
+ """
21
+ activate :directory_indexes
22
+ """
23
+ And a successfully built app at "extensionless-text-files-app"
24
+ When I cd to "build"
25
+ Then the following files should exist:
26
+ | CNAME |
27
+ | LICENSE |
28
+ | README |
29
+ Then the following files should not exist:
30
+ | CNAME/index.html |
31
+ | LICENSE/index.html |
32
+ | README/index.html |
33
+
34
+ Scenario: Previewing Text Files without directory indexes
35
+ Given "directory_indexes" feature is "disabled"
36
+ Given the Server is running at "extensionless-text-files-app"
37
+ When I go to "/CNAME"
38
+ Then I should see "test.github.com"
39
+ When I go to "/LICENSE"
40
+ Then I should see "You have the right to remain classy."
41
+ When I go to "/README"
42
+ Then I should see "Bork bork bork"
43
+
44
+ Scenario: Previewing Text Files with directory indexes
45
+ Given "directory_indexes" feature is "enabled"
46
+ Given the Server is running at "extensionless-text-files-app"
47
+ When I go to "/CNAME"
48
+ Then I should see "test.github.com"
49
+ When I go to "/LICENSE"
50
+ Then I should see "You have the right to remain classy."
51
+ When I go to "/README"
52
+ Then I should see "Bork bork bork"
53
+ # When I go to "/CNAME/index.html"
54
+ # Then I should see "File Not Found"
55
+ # When I go to "/LICENSE/index.html"
56
+ # Then I should see "File Not Found"
57
+ # When I go to "/README/index.html"
58
+ # Then I should see "File Not Found"
@@ -1,10 +1,12 @@
1
1
  Feature: Built-in macro view helpers
2
2
  In order to simplify generating HTML
3
3
 
4
- Scenario: Using the link_to helper
4
+ Scenario: Using the padrino helpers
5
5
  Given the Server is running at "padrino-helpers-app"
6
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
- Then I should see 'src="/javascripts/test1.js"'
10
- Then I should see 'href="/stylesheets/test1.css"'
9
+ And I should see 'src="/javascripts/test1.js"'
10
+ And I should see 'href="/stylesheets/test1.css"'
11
+ And I should see '1 KB'
12
+
@@ -0,0 +1,27 @@
1
+ Feature: Setting page settings through frontmatter
2
+ Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (build)
3
+ Given a successfully built app at "frontmatter-settings-app"
4
+ Then the following files should exist:
5
+ | build/proxied/index.html |
6
+ | build/no_index.html |
7
+ And the file "build/alternate_layout/index.html" should contain "Alternate layout"
8
+ And the following files should not exist:
9
+ | build/ignored/index.html |
10
+ | build/no_index/index.html |
11
+
12
+
13
+ Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (preview)
14
+ Given the Server is running at "frontmatter-settings-app"
15
+ # When I go to "/proxied/"
16
+ # Then I should not see "File Not Found"
17
+ When I go to "/no_index.html"
18
+ Then I should not see "File Not Found"
19
+ When I go to "/alternate_layout/"
20
+ Then I should not see "File Not Found"
21
+ And I should see "Alternate layout"
22
+ When I go to "/ignored.html"
23
+ Then I should see "File Not Found"
24
+ When I go to "/ignored/index.html"
25
+ Then I should see "File Not Found"
26
+ When I go to "/no_index/index.html"
27
+ Then I should see "File Not Found"
@@ -3,4 +3,10 @@ Feature: Helpers in external files
3
3
  Scenario: Hello Helper
4
4
  Given the Server is running at "external-helpers"
5
5
  Then going to "/index.html" should not raise an exception
6
- And I should see "Hello World"
6
+ And I should see "Hello World"
7
+
8
+ Scenario: Automatic Helpers
9
+ Given the Server is running at "external-helpers"
10
+ Then going to "/automatic.html" should not raise an exception
11
+ And I should see "One:Two:Three:Four"
12
+
@@ -0,0 +1,121 @@
1
+ Feature: i18n Builder
2
+ In order to preview localized html
3
+
4
+ Scenario: Running localize with the default config
5
+ Given a fixture app "i18n-test-app"
6
+ And a file named "config.rb" with:
7
+ """
8
+ localize
9
+ """
10
+ Given a successfully built app at "i18n-test-app"
11
+ When I cd to "build"
12
+ Then the following files should exist:
13
+ | index.html |
14
+ | hello.html |
15
+ | es/index.html |
16
+ | es/hola.html |
17
+ Then the following files should not exist:
18
+ | en/index.html |
19
+ And the file "index.html" should contain "Howdy"
20
+ And the file "hello.html" should contain "Hello World"
21
+ And the file "es/index.html" should contain "Como Esta?"
22
+ And the file "es/hola.html" should contain "Hola World"
23
+
24
+ Scenario: Running localize with the alt path config
25
+ Given a fixture app "i18n-test-app"
26
+ And a file named "config.rb" with:
27
+ """
28
+ localize :path => "/lang_:locale/"
29
+ """
30
+ Given a successfully built app at "i18n-test-app"
31
+ When I cd to "build"
32
+ Then the following files should exist:
33
+ | index.html |
34
+ | hello.html |
35
+ | lang_es/index.html |
36
+ | lang_es/hola.html |
37
+ Then the following files should not exist:
38
+ | lang_en/index.html |
39
+ And the file "index.html" should contain "Howdy"
40
+ And the file "hello.html" should contain "Hello World"
41
+ And the file "lang_es/index.html" should contain "Como Esta?"
42
+ And the file "lang_es/hola.html" should contain "Hola World"
43
+
44
+ Scenario: Running localize with the alt root config
45
+ Given a fixture app "i18n-alt-root-app"
46
+ And a file named "config.rb" with:
47
+ """
48
+ localize :templates_dir => "lang_data"
49
+ """
50
+ Given a successfully built app at "i18n-alt-root-app"
51
+ When I cd to "build"
52
+ Then the following files should exist:
53
+ | index.html |
54
+ | hello.html |
55
+ | es/index.html |
56
+ | es/hola.html |
57
+ Then the following files should not exist:
58
+ | en/index.html |
59
+ And the file "index.html" should contain "Howdy"
60
+ And the file "hello.html" should contain "Hello World"
61
+ And the file "es/index.html" should contain "Como Esta?"
62
+ And the file "es/hola.html" should contain "Hola World"
63
+
64
+ Scenario: Running localize with the lang map config
65
+ Given a fixture app "i18n-test-app"
66
+ And a file named "config.rb" with:
67
+ """
68
+ localize :lang_map => { :en => :english, :es => :spanish }
69
+ """
70
+ Given a successfully built app at "i18n-test-app"
71
+ When I cd to "build"
72
+ Then the following files should exist:
73
+ | index.html |
74
+ | hello.html |
75
+ | spanish/index.html |
76
+ | spanish/hola.html |
77
+ Then the following files should not exist:
78
+ | english/index.html |
79
+ And the file "index.html" should contain "Howdy"
80
+ And the file "hello.html" should contain "Hello World"
81
+ And the file "spanish/index.html" should contain "Como Esta?"
82
+ And the file "spanish/hola.html" should contain "Hola World"
83
+
84
+ Scenario: Running localize with the no mount config
85
+ Given a fixture app "i18n-test-app"
86
+ And a file named "config.rb" with:
87
+ """
88
+ localize :mount_at_root => false
89
+ """
90
+ Given a successfully built app at "i18n-test-app"
91
+ When I cd to "build"
92
+ Then the following files should exist:
93
+ | en/index.html |
94
+ | en/hello.html |
95
+ | es/index.html |
96
+ | es/hola.html |
97
+ Then the following files should not exist:
98
+ | index.html |
99
+ | hello.html |
100
+ And the file "en/index.html" should contain "Howdy"
101
+ And the file "en/hello.html" should contain "Hello World"
102
+ And the file "es/index.html" should contain "Como Esta?"
103
+ And the file "es/hola.html" should contain "Hola World"
104
+
105
+ Scenario: Running localize with the subset config
106
+ Given a fixture app "i18n-test-app"
107
+ And a file named "config.rb" with:
108
+ """
109
+ localize :langs => [:en]
110
+ """
111
+ Given a successfully built app at "i18n-test-app"
112
+ When I cd to "build"
113
+ Then the following files should exist:
114
+ | index.html |
115
+ | hello.html |
116
+ Then the following files should not exist:
117
+ | en/index.html |
118
+ | es/index.html |
119
+ | es/hola.html |
120
+ And the file "index.html" should contain "Howdy"
121
+ And the file "hello.html" should contain "Hello World"