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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. data/features/cli_extension.feature +13 -0
  2. data/features/{cli.feature → cli_init.feature} +1 -10
  3. data/features/directory_index.feature +29 -1
  4. data/features/dynamic_pages.feature +1 -0
  5. data/features/extensionless_text_files.feature +0 -2
  6. data/features/front-matter.feature +17 -1
  7. data/features/frontmatter_page_settings.feature +16 -1
  8. data/features/helpers_relative_link_to.feature +68 -0
  9. data/features/unicode_filenames.feature +14 -0
  10. data/fixtures/csspie/config.rb +0 -0
  11. data/fixtures/csspie/source/stylesheets/PIE.htc +96 -0
  12. data/fixtures/dynamic-pages-app/config.rb +3 -0
  13. data/fixtures/frontmatter-app/source/front-matter-auto.erb +6 -0
  14. data/fixtures/frontmatter-app/source/front-matter.html.erb +2 -0
  15. data/fixtures/frontmatter-app/source/json-front-matter-2.php.erb +7 -0
  16. data/fixtures/frontmatter-app/source/json-front-matter-auto.erb +6 -0
  17. data/fixtures/frontmatter-app/source/json-front-matter.html.erb +6 -0
  18. data/fixtures/unicode-filenames-app/config.rb +1 -0
  19. data/fixtures/unicode-filenames-app/source/snowmen-rule-/342/230/203.html +4 -0
  20. data/lib/middleman-core/application.rb +43 -335
  21. data/lib/middleman-core/cli/build.rb +11 -4
  22. data/lib/middleman-core/cli/bundler.rb +40 -0
  23. data/lib/middleman-core/cli/extension.rb +36 -0
  24. data/lib/middleman-core/cli/server.rb +2 -2
  25. data/lib/middleman-core/cli.rb +2 -6
  26. data/lib/middleman-core/core_extensions/assets.rb +35 -31
  27. data/lib/middleman-core/core_extensions/builder.rb +14 -9
  28. data/lib/middleman-core/core_extensions/data.rb +150 -145
  29. data/lib/middleman-core/core_extensions/default_helpers.rb +159 -97
  30. data/lib/middleman-core/core_extensions/extensions.rb +103 -97
  31. data/lib/middleman-core/core_extensions/external_helpers.rb +27 -23
  32. data/lib/middleman-core/core_extensions/file_watcher.rb +140 -110
  33. data/lib/middleman-core/core_extensions/front_matter.rb +155 -175
  34. data/lib/middleman-core/core_extensions/i18n.rb +111 -102
  35. data/lib/middleman-core/core_extensions/rendering.rb +293 -295
  36. data/lib/middleman-core/core_extensions/request.rb +338 -0
  37. data/lib/middleman-core/core_extensions/routing.rb +72 -68
  38. data/lib/middleman-core/core_extensions/show_exceptions.rb +23 -18
  39. data/lib/middleman-core/core_extensions.rb +39 -0
  40. data/lib/middleman-core/extensions/directory_indexes.rb +1 -4
  41. data/lib/middleman-core/extensions/lorem.rb +10 -3
  42. data/lib/middleman-core/extensions.rb +2 -64
  43. data/lib/middleman-core/preview_server.rb +157 -0
  44. data/lib/middleman-core/sitemap/extensions/ignores.rb +73 -68
  45. data/lib/middleman-core/sitemap/extensions/on_disk.rb +65 -58
  46. data/lib/middleman-core/sitemap/extensions/proxies.rb +86 -75
  47. data/lib/middleman-core/sitemap/extensions/traversal.rb +68 -61
  48. data/lib/middleman-core/sitemap/resource.rb +123 -102
  49. data/lib/middleman-core/sitemap/store.rb +170 -149
  50. data/lib/middleman-core/sitemap.rb +57 -57
  51. data/lib/middleman-core/step_definitions/server_steps.rb +13 -3
  52. data/lib/middleman-core/templates/extension/Gemfile +4 -0
  53. data/lib/middleman-core/templates/extension/Rakefile +12 -0
  54. data/lib/middleman-core/templates/extension/features/support/env.rb +4 -0
  55. data/lib/middleman-core/templates/extension/gemspec +24 -0
  56. data/lib/middleman-core/templates/extension/lib/lib.rb +49 -0
  57. data/lib/middleman-core/templates/extension/lib/middleman_extension.rb +1 -0
  58. data/lib/middleman-core/templates/shared/gitignore +14 -0
  59. data/lib/middleman-core/templates.rb +14 -8
  60. data/lib/middleman-core/util.rb +31 -9
  61. data/lib/middleman-core/version.rb +1 -1
  62. data/lib/middleman-core.rb +6 -4
  63. data/middleman-core.gemspec +4 -6
  64. metadata +62 -203
  65. data/lib/middleman-core/vendor/padrino-core-0.10.6/.document +0 -5
  66. data/lib/middleman-core/vendor/padrino-core-0.10.6/.gitignore +0 -22
  67. data/lib/middleman-core/vendor/padrino-core-0.10.6/.yardopts +0 -1
  68. data/lib/middleman-core/vendor/padrino-core-0.10.6/LICENSE.txt +0 -20
  69. data/lib/middleman-core/vendor/padrino-core-0.10.6/README.rdoc +0 -294
  70. data/lib/middleman-core/vendor/padrino-core-0.10.6/Rakefile +0 -5
  71. data/lib/middleman-core/vendor/padrino-core-0.10.6/bin/padrino +0 -9
  72. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application/rendering.rb +0 -292
  73. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application/routing.rb +0 -943
  74. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application/showexceptions.rb +0 -20
  75. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application.rb +0 -269
  76. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/caller.rb +0 -53
  77. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/adapter.rb +0 -24
  78. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/base.rb +0 -150
  79. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/console.rb +0 -20
  80. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/rake.rb +0 -24
  81. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/rake_tasks.rb +0 -59
  82. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/command.rb +0 -38
  83. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/images/404.png +0 -0
  84. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/images/500.png +0 -0
  85. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/loader.rb +0 -211
  86. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/cs.yml +0 -34
  87. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/da.yml +0 -34
  88. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/de.yml +0 -34
  89. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/en.yml +0 -34
  90. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/es.yml +0 -34
  91. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/fr.yml +0 -34
  92. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/hu.yml +0 -34
  93. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/it.yml +0 -40
  94. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/ja.yml +0 -34
  95. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/lv.yml +0 -34
  96. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/nl.yml +0 -34
  97. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/no.yml +0 -35
  98. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/pl.yml +0 -34
  99. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/pt_br.yml +0 -40
  100. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/ru.yml +0 -35
  101. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/tr.yml +0 -34
  102. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/uk.yml +0 -34
  103. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/zh_cn.yml +0 -34
  104. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/zh_tw.yml +0 -34
  105. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/logger.rb +0 -428
  106. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/mounter.rb +0 -224
  107. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/reloader.rb +0 -254
  108. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/router.rb +0 -98
  109. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/server.rb +0 -79
  110. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/support_lite.rb +0 -199
  111. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/tasks.rb +0 -21
  112. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/version.rb +0 -20
  113. data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core.rb +0 -152
  114. data/lib/middleman-core/vendor/padrino-core-0.10.6/padrino-core.gemspec +0 -38
  115. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/.components +0 -6
  116. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/.gitignore +0 -7
  117. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/complex.rb +0 -32
  118. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/simple.rb +0 -33
  119. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/a.rb +0 -9
  120. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/b.rb +0 -4
  121. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/c.rb +0 -1
  122. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/circular/e.rb +0 -13
  123. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/circular/f.rb +0 -2
  124. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/circular/g.rb +0 -2
  125. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/d.rb +0 -4
  126. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/helper.rb +0 -83
  127. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/mini_shoulda.rb +0 -45
  128. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_application.rb +0 -108
  129. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_core.rb +0 -77
  130. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_dependencies.rb +0 -44
  131. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_filters.rb +0 -278
  132. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_locale.rb +0 -21
  133. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_logger.rb +0 -154
  134. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_mounter.rb +0 -177
  135. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_reloader_complex.rb +0 -75
  136. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_reloader_simple.rb +0 -98
  137. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_rendering.rb +0 -461
  138. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_restful_routing.rb +0 -33
  139. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_router.rb +0 -146
  140. data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_routing.rb +0 -1680
  141. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/.document +0 -5
  142. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/.gitignore +0 -21
  143. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/.yardopts +0 -1
  144. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/LICENSE.txt +0 -20
  145. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/README.rdoc +0 -239
  146. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/Rakefile +0 -5
  147. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/asset_tag_helpers.rb +0 -417
  148. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/form_builder/abstract_form_builder.rb +0 -251
  149. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/form_builder/standard_form_builder.rb +0 -43
  150. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/form_helpers.rb +0 -787
  151. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/format_helpers.rb +0 -381
  152. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/cs.yml +0 -103
  153. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/da.yml +0 -91
  154. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/de.yml +0 -81
  155. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/en.yml +0 -103
  156. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/es.yml +0 -103
  157. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/fr.yml +0 -80
  158. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/hu.yml +0 -103
  159. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/it.yml +0 -89
  160. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/ja.yml +0 -103
  161. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/lv.yml +0 -103
  162. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/nl.yml +0 -82
  163. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/no.yml +0 -91
  164. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/pl.yml +0 -95
  165. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/pt_br.yml +0 -103
  166. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/ru.yml +0 -103
  167. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/tr.yml +0 -103
  168. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/uk.yml +0 -103
  169. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/zh_cn.yml +0 -104
  170. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/zh_tw.yml +0 -103
  171. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/number_helpers.rb +0 -288
  172. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/abstract_handler.rb +0 -98
  173. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/erb_handler.rb +0 -79
  174. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/haml_handler.rb +0 -63
  175. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/slim_handler.rb +0 -81
  176. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers.rb +0 -175
  177. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/render_helpers.rb +0 -60
  178. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/tag_helpers.rb +0 -260
  179. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/translation_helpers.rb +0 -38
  180. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers.rb +0 -59
  181. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/padrino-helpers.gemspec +0 -27
  182. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/app.rb +0 -73
  183. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/capture_concat.erb +0 -14
  184. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/capture_concat.haml +0 -12
  185. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/capture_concat.slim +0 -13
  186. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_for.erb +0 -14
  187. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_for.haml +0 -12
  188. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_for.slim +0 -12
  189. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_tag.erb +0 -11
  190. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_tag.haml +0 -9
  191. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_tag.slim +0 -9
  192. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/current_engine.erb +0 -5
  193. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/current_engine.haml +0 -5
  194. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/current_engine.slim +0 -5
  195. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/fields_for.erb +0 -20
  196. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/fields_for.haml +0 -15
  197. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/fields_for.slim +0 -15
  198. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_for.erb +0 -72
  199. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_for.haml +0 -59
  200. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_for.slim +0 -59
  201. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_tag.erb +0 -86
  202. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_tag.haml +0 -70
  203. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_tag.slim +0 -70
  204. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/link_to.erb +0 -5
  205. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/link_to.haml +0 -4
  206. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/link_to.slim +0 -4
  207. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/mail_to.erb +0 -3
  208. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/mail_to.haml +0 -3
  209. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/mail_to.slim +0 -3
  210. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/meta_tag.erb +0 -3
  211. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/meta_tag.haml +0 -3
  212. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/meta_tag.slim +0 -3
  213. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/partials/_erb.erb +0 -1
  214. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/partials/_haml.haml +0 -1
  215. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/partials/_slim.slim +0 -1
  216. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/simple_partial.erb +0 -1
  217. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/simple_partial.haml +0 -1
  218. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/simple_partial.slim +0 -1
  219. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/app.rb +0 -50
  220. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engine.haml +0 -5
  221. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engines/_erb.erb +0 -1
  222. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engines/_haml.haml +0 -1
  223. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engines/_slim.slim +0 -1
  224. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/erb/test.erb +0 -1
  225. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/explicit_engine.haml +0 -5
  226. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/haml/test.haml +0 -1
  227. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/template/_user.haml +0 -7
  228. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/template/haml_template.haml +0 -1
  229. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/template/some_template.haml +0 -2
  230. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/helper.rb +0 -66
  231. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_asset_tag_helpers.rb +0 -328
  232. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_form_builder.rb +0 -1106
  233. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_form_helpers.rb +0 -770
  234. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_format_helpers.rb +0 -227
  235. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_locale.rb +0 -20
  236. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_number_helpers.rb +0 -139
  237. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_output_helpers.rb +0 -153
  238. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_render_helpers.rb +0 -76
  239. data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_tag_helpers.rb +0 -106
  240. data/lib/middleman-core/watcher.rb +0 -196
@@ -1,70 +0,0 @@
1
- - form_tag '/simple', :class => 'simple-form' do
2
- = error_messages_for nil
3
- - field_set_tag do
4
- = hidden_field_tag :session_id, :value => "__secret__"
5
- = label_tag :username
6
- = text_field_tag :username
7
- = label_tag :password
8
- = password_field_tag :password
9
- = label_tag :email
10
- = email_field_tag :email
11
- = label_tag :age
12
- = number_field_tag :age
13
- = label_tag :telephone
14
- = telephone_field_tag :telephone
15
- = label_tag :webpage
16
- = url_field_tag :webpage
17
- = label_tag :search
18
- = search_field_tag :search
19
- = label_tag :color
20
- = select_tag :color, :options => ['green', 'orange', 'purple']
21
- = label_tag :gender
22
- = radio_button_tag :gender, :value => 'male'
23
- = radio_button_tag :gender, :value => 'female'
24
- = check_box_tag :remember_me
25
- = submit_tag
26
-
27
- - form_tag '/advanced', :id => 'advanced', :class => 'advanced-form', :method => 'get' do
28
- = error_messages_for MarkupUser.new, :header_message => "There are problems with saving user!"
29
- = hidden_field_tag :session_id, :value => "__secret__"
30
- - field_set_tag "Advanced", :class => 'advanced-field-set' do
31
- %p
32
- = label_tag :username, :class => 'first', :caption => "Nickname"
33
- = text_field_tag :username, :value => params[:username], :id => 'the_username'
34
- %p
35
- = label_tag :password, :class => 'first'
36
- = password_field_tag :password, :value => params[:password]
37
- %p
38
- = label_tag :email, :caption => 'Email Address'
39
- = email_field_tag :email, :class => 'string'
40
- %p
41
- = label_tag :age, :class => 'age'
42
- = number_field_tag :age, :class => 'numeric'
43
- %p
44
- = label_tag :telephone, :class => 'telephone'
45
- = telephone_field_tag :telephone, :class => 'numeric'
46
- %p
47
- = label_tag :webpage, :caption => 'Your Home Page'
48
- = url_field_tag :webpage, :class => 'string'
49
- %p
50
- = label_tag :search
51
- = search_field_tag :search, :class => 'string'
52
- %p
53
- = label_tag :about, :class => 'about', :caption => "About Me"
54
- = text_area_tag :about, :class => 'large'
55
- %p
56
- = label_tag :gender, :class => 'gender'
57
- = radio_button_tag :gender, :value => 'male', :checked => true
58
- = radio_button_tag :gender, :value => 'female'
59
- %p
60
- = label_tag :photo, :class => 'photo'
61
- = file_field_tag :photo, :class => 'upload'
62
- %p
63
- = label_tag :fav_color
64
- = select_tag :fav_color, :options => [ ['green', '1'], ['orange', '2'], ['purple', '3'] ], :selected => '2'
65
- %p
66
- = check_box_tag :remember_me, :value => "1", :checked => true
67
- - field_set_tag(:class => 'buttons') do
68
- = submit_tag "Login"
69
- = button_tag "Cancel"
70
- = image_submit_tag "buttons/submit.png"
@@ -1,70 +0,0 @@
1
- == form_tag '/simple', :class => 'simple-form' do
2
- == error_messages_for nil
3
- == field_set_tag do
4
- == hidden_field_tag :session_id, :value => "__secret__"
5
- == label_tag :username
6
- == text_field_tag :username
7
- == label_tag :password
8
- == password_field_tag :password
9
- == label_tag :email
10
- == email_field_tag :email
11
- == label_tag :age
12
- == number_field_tag :age
13
- == label_tag :telephone
14
- == telephone_field_tag :telephone
15
- == label_tag :webpage
16
- == url_field_tag :webpage
17
- == label_tag :search
18
- == search_field_tag :search
19
- == label_tag :color
20
- == select_tag :color, :options => ['green', 'orange', 'purple']
21
- == label_tag :gender
22
- == radio_button_tag :gender, :value => 'male'
23
- == radio_button_tag :gender, :value => 'female'
24
- == check_box_tag :remember_me
25
- == submit_tag
26
-
27
- == form_tag '/advanced', :id => 'advanced', :class => 'advanced-form', :method => 'get' do
28
- == error_messages_for MarkupUser.new, :header_message => "There are problems with saving user!"
29
- == hidden_field_tag :session_id, :value => "__secret__"
30
- == field_set_tag "Advanced", :class => 'advanced-field-set' do
31
- p
32
- == label_tag :username, :class => 'first', :caption => "Nickname"
33
- == text_field_tag :username, :value => params[:username], :id => 'the_username'
34
- p
35
- == label_tag :password, :class => 'first'
36
- == password_field_tag :password, :value => params[:password]
37
- p
38
- == label_tag :email, :caption => 'Email Address'
39
- == email_field_tag :email, :class => 'string'
40
- p
41
- == label_tag :age, :class => 'age'
42
- == number_field_tag :age, :class => 'numeric'
43
- p
44
- == label_tag :telephone, :class => 'telephone'
45
- == telephone_field_tag :telephone, :class => 'numeric'
46
- p
47
- == label_tag :webpage, :caption => 'Your Home Page'
48
- == url_field_tag :webpage, :class => 'string'
49
- p
50
- == label_tag :search
51
- == search_field_tag :search, :class => 'string'
52
- p
53
- == label_tag :about, :class => 'about', :caption => "About Me"
54
- == text_area_tag :about, :class => 'large'
55
- p
56
- == label_tag :gender, :class => 'gender'
57
- == radio_button_tag :gender, :value => 'male', :checked => true
58
- == radio_button_tag :gender, :value => 'female'
59
- p
60
- == label_tag :photo, :class => 'photo'
61
- == file_field_tag :photo, :class => 'upload'
62
- p
63
- == label_tag :fav_color
64
- == select_tag :fav_color, :options => [ ['green', '1'], ['orange', '2'], ['purple', '3'] ], :selected => '2'
65
- p
66
- == check_box_tag :remember_me, :value => "1", :checked => true
67
- == field_set_tag(:class => 'buttons') do
68
- == submit_tag "Login"
69
- == button_tag "Cancel"
70
- == image_submit_tag "buttons/submit.png"
@@ -1,5 +0,0 @@
1
- <%= link_to "Test 1 No Block", '/test1', :class => 'test', :id => 'test1' %>
2
-
3
- <% link_to("/test2", :class => 'test', :id => 'test2') do %>
4
- <span>Test 2 With Block</span>
5
- <% end %>
@@ -1,4 +0,0 @@
1
- = link_to "Test 1 No Block", '/test1', :class => 'test', :id => 'test1'
2
-
3
- - link_to("/test2", :class => 'test', :id => 'test2') do
4
- %span Test 2 With Block
@@ -1,4 +0,0 @@
1
- = link_to "Test 1 No Block", '/test1', :class => 'test', :id => 'test1'
2
-
3
- - link_to("/test2", :class => 'test', :id => 'test2') do
4
- span Test 2 With Block
@@ -1,3 +0,0 @@
1
- <p class='simple'><%= mail_to 'test@demo.com' %></p>
2
-
3
- <p class='captioned'><%= mail_to 'test@demo.com', "Click my Email" %></p>
@@ -1,3 +0,0 @@
1
- %p.simple= mail_to 'test@demo.com'
2
-
3
- %p.captioned= mail_to 'test@demo.com', "Click my Email"
@@ -1,3 +0,0 @@
1
- p.simple== mail_to 'test@demo.com'
2
-
3
- p.captioned== mail_to 'test@demo.com', "Click my Email"
@@ -1,3 +0,0 @@
1
- <%= meta_tag "weblog,news", :name => "keywords" %>
2
-
3
- <%= meta_tag "text/html; charset=UTF-8", :"http-equiv" => "Content-Type" %>
@@ -1,3 +0,0 @@
1
- = meta_tag "weblog,news", :name => "keywords"
2
-
3
- = meta_tag "text/html; charset=UTF-8", :"http-equiv" => "Content-Type"
@@ -1,3 +0,0 @@
1
- == meta_tag "weblog,news", :name => "keywords"
2
-
3
- == meta_tag "text/html; charset=UTF-8", :"http-equiv" => "Content-Type"
@@ -1 +0,0 @@
1
- <p class="erb"><%= partial 'partials/erb', :engine => "erb" %></p>
@@ -1 +0,0 @@
1
- %p.haml= partial 'partials/haml', :engine => "haml"
@@ -1 +0,0 @@
1
- p.slim= partial 'partials/slim', :engine => "slim"
@@ -1,50 +0,0 @@
1
- PADRINO_ROOT = File.dirname(__FILE__) unless defined? PADRINO_ROOT
2
- PADRINO_ENV = 'test' unless defined? PADRINO_ENV
3
-
4
- require 'padrino-core'
5
- require 'slim'
6
-
7
- class RenderUser
8
- attr_accessor :name
9
- def initialize(name); @name = name; end
10
- end
11
-
12
- class RenderDemo < Padrino::Application
13
- register Padrino::Rendering
14
- register Padrino::Helpers
15
-
16
- configure do
17
- set :logging, false
18
- set :padrino_logging, false
19
- end
20
-
21
- # get current engines from partials
22
- get '/current_engine' do
23
- render :current_engine
24
- end
25
-
26
- # get current engines from explicit engine partials
27
- get '/explicit_engine' do
28
- render :explicit_engine
29
- end
30
-
31
- # partial with object
32
- get '/partial/object' do
33
- partial 'template/user', :object => RenderUser.new('John'), :locals => { :extra => "bar" }
34
- end
35
-
36
- # partial with collection
37
- get '/partial/collection' do
38
- partial 'template/user', :collection => [RenderUser.new('John'), RenderUser.new('Billy')], :locals => { :extra => "bar" }
39
- end
40
-
41
- # partial with locals
42
- get '/partial/locals' do
43
- partial 'template/user', :locals => { :user => RenderUser.new('John'), :extra => "bar" }
44
- end
45
-
46
- # partial starting with forward slash
47
- get '/partial/foward_slash' do
48
- partial '/template/user', :object => RenderUser.new('John'), :locals => { :extra => "bar" }
49
- end
50
- end
@@ -1,5 +0,0 @@
1
- %p.start= current_engine
2
- %p.haml= partial 'current_engines/haml'
3
- %p.erb= partial 'current_engines/erb'
4
- %p.slim= partial 'current_engines/slim'
5
- %p.end= current_engine
@@ -1 +0,0 @@
1
- <h1>This is a <%= @template %> template!</h1>
@@ -1,5 +0,0 @@
1
- %p.start= current_engine
2
- %p.haml= partial "current_engines/haml", :engine => :haml
3
- %p.erb= partial 'current_engines/erb', :engine => :erb
4
- %p.slim= partial 'current_engines/slim', :engine => :slim
5
- %p.end= current_engine
@@ -1 +0,0 @@
1
- %h1 This is a #{@template} template!
@@ -1,7 +0,0 @@
1
- %h1 User name is #{user.name}
2
-
3
- - if defined?(extra)
4
- %p Extra is #{extra}
5
-
6
- - if defined?(user_counter)
7
- %p My counter is #{user_counter}
@@ -1 +0,0 @@
1
- %h1 This is a #{@template} template sent from render_template!
@@ -1,2 +0,0 @@
1
-
2
- %h1 This is a haml template which was detected!
@@ -1,66 +0,0 @@
1
- require File.expand_path('../../../load_paths', __FILE__)
2
- require File.join(File.dirname(__FILE__), '..', '..', 'padrino-core', 'test', 'mini_shoulda')
3
- require 'rack/test'
4
- require 'webrat'
5
- require 'padrino-helpers'
6
- require 'active_support/time'
7
-
8
- class MiniTest::Spec
9
- include Padrino::Helpers::OutputHelpers
10
- include Padrino::Helpers::TagHelpers
11
- include Padrino::Helpers::AssetTagHelpers
12
- include Rack::Test::Methods
13
- include Webrat::Methods
14
- include Webrat::Matchers
15
-
16
- Webrat.configure do |config|
17
- config.mode = :rack
18
- end
19
-
20
- def stop_time_for_test
21
- time = Time.now
22
- Time.stubs(:now).returns(time)
23
- return time
24
- end
25
-
26
- # assert_has_tag(:h1, :content => "yellow") { "<h1>yellow</h1>" }
27
- # In this case, block is the html to evaluate
28
- def assert_has_tag(name, attributes = {}, &block)
29
- html = block && block.call
30
- matcher = HaveSelector.new(name, attributes)
31
- raise "Please specify a block!" if html.blank?
32
- assert matcher.matches?(html), matcher.failure_message
33
- end
34
-
35
- # assert_has_no_tag, tag(:h1, :content => "yellow") { "<h1>green</h1>" }
36
- # In this case, block is the html to evaluate
37
- def assert_has_no_tag(name, attributes = {}, &block)
38
- html = block && block.call
39
- attributes.merge!(:count => 0)
40
- matcher = HaveSelector.new(name, attributes)
41
- raise "Please specify a block!" if html.blank?
42
- assert matcher.matches?(html), matcher.failure_message
43
- end
44
-
45
- # Asserts that a file matches the pattern
46
- def assert_match_in_file(pattern, file)
47
- assert File.exist?(file), "File '#{file}' does not exist!"
48
- assert_match pattern, File.read(file)
49
- end
50
-
51
- # mock_model("Business", :new_record? => true) => <Business>
52
- def mock_model(klazz, options={})
53
- options.reverse_merge!(:class => klazz, :new_record? => false, :id => 20, :errors => {})
54
- record = stub(options)
55
- record.stubs(:to_ary => [record])
56
- record
57
- end
58
- end
59
-
60
- module Webrat
61
- module Logging
62
- def logger # @private
63
- @logger = nil
64
- end
65
- end
66
- end