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,59 +0,0 @@
1
- require 'middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/support_lite' unless defined?(SupportLite) ### !!! FIXME middleman ###
2
- ### require 'padrino-core/support_lite' unless defined?(SupportLite) ### !!! FIXME middleman ###
3
- require 'cgi'
4
- ### require 'i18n' ### !!! FIXME middleman ###
5
- require 'enumerator'
6
- require 'active_support/core_ext/string/conversions' # to_date
7
- require 'active_support/core_ext/float/rounding' # round
8
- require 'active_support/option_merger' # with_options
9
- require 'active_support/core_ext/object/with_options' # with_options
10
- require 'active_support/inflector' # humanize
11
-
12
- FileSet.glob_require('padrino-helpers/**/*.rb', __FILE__)
13
-
14
- # Load our locales
15
- ### I18n.load_path += Dir["#{File.dirname(__FILE__)}/padrino-helpers/locale/*.yml"] ### !!! FIXME middleman ###
16
-
17
- module Padrino
18
- ##
19
- # This component provides a variety of view helpers related to html markup generation.
20
- # There are helpers for generating tags, forms, links, images, and more.
21
- # Most of the basic methods should be very familiar to anyone who has used rails view helpers.
22
- #
23
- module Helpers
24
- class << self
25
- ##
26
- # Registers these helpers into your application:
27
- #
28
- # Padrino::Helpers::OutputHelpers
29
- # Padrino::Helpers::TagHelpers
30
- # Padrino::Helpers::AssetTagHelpers
31
- # Padrino::Helpers::FormHelpers
32
- # Padrino::Helpers::FormatHelpers
33
- # Padrino::Helpers::RenderHelpers
34
- # Padrino::Helpers::NumberHelpers
35
- #
36
- # @param [Sinatra::Application] app
37
- # The specified padrino application
38
- #
39
- # @example Register the helper module
40
- # require 'padrino-helpers'
41
- # class Padrino::Appliocation
42
- # register Padrino::Helpers
43
- # end
44
- #
45
- def registered(app)
46
- app.set :default_builder, 'StandardFormBuilder'
47
- app.helpers Padrino::Helpers::OutputHelpers
48
- app.helpers Padrino::Helpers::TagHelpers
49
- app.helpers Padrino::Helpers::AssetTagHelpers
50
- app.helpers Padrino::Helpers::FormHelpers
51
- app.helpers Padrino::Helpers::FormatHelpers
52
- app.helpers Padrino::Helpers::RenderHelpers
53
- app.helpers Padrino::Helpers::NumberHelpers
54
- app.helpers Padrino::Helpers::TranslationHelpers
55
- end
56
- alias :included :registered
57
- end
58
- end # Helpers
59
- end # Padrino
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env gem build
2
- # encoding: utf-8
3
-
4
- require File.expand_path("../../padrino-core/lib/padrino-core/version.rb", __FILE__)
5
-
6
- Gem::Specification.new do |s|
7
- s.name = "padrino-helpers"
8
- s.rubyforge_project = "padrino-helpers"
9
- s.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
10
- s.email = "padrinorb@gmail.com"
11
- s.summary = "Helpers for padrino"
12
- s.homepage = "http://www.padrinorb.com"
13
- s.description = "Tag helpers, asset helpers, form helpers, form builders and many more helpers for padrino"
14
- s.required_rubygems_version = ">= 1.3.6"
15
- s.version = Padrino.version
16
- s.date = Time.now.strftime("%Y-%m-%d")
17
-
18
- s.extra_rdoc_files = Dir["*.rdoc"]
19
- s.files = `git ls-files`.split("\n")
20
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
- s.require_paths = ["lib"]
23
- s.rdoc_options = ["--charset=UTF-8"]
24
-
25
- s.add_dependency("padrino-core", Padrino.version)
26
- s.add_dependency("i18n", "~> 0.6")
27
- end
@@ -1,73 +0,0 @@
1
- require 'sinatra/base'
2
- require 'haml'
3
- require 'erubis'
4
- require 'slim'
5
-
6
- class MarkupDemo < Sinatra::Base
7
- register Padrino::Helpers
8
-
9
- configure do
10
- set :root, File.dirname(__FILE__)
11
- end
12
-
13
- get '/:engine/:file' do
14
- show(params[:engine], params[:file].to_sym)
15
- end
16
-
17
- helpers do
18
- # show :erb, :index
19
- # show :haml, :index
20
- def show(kind, template)
21
- send kind.to_sym, template.to_sym
22
- end
23
-
24
- def captured_content(&block)
25
- content_html = capture_html(&block)
26
- "<p>#{content_html}</p>"
27
- end
28
-
29
- def concat_in_p(content_html)
30
- concat_content "<p>#{content_html}</p>"
31
- end
32
-
33
- def determine_block_is_template(name, &block)
34
- concat_content "<p class='is_template'>The #{name} block passed in is a template</p>" if block_is_template?(block)
35
- end
36
-
37
- def ruby_not_template_block
38
- determine_block_is_template('ruby') do
39
- content_tag(:span, "This not a template block")
40
- end
41
- end
42
- end
43
- end
44
-
45
- class MarkupUser
46
- def errors; { :fake => "must be valid", :second => "must be present", :third => "must be a number", :email => "must be a email"}; end
47
- def session_id; 45; end
48
- def gender; 'male'; end
49
- def remember_me; '1'; end
50
- def permission; Permission.new; end
51
- def telephone; Telephone.new; end
52
- def addresses; [Address.new('Greenfield', true), Address.new('Willowrun', false)]; end
53
- end
54
-
55
- class Telephone
56
- def number; "62634576545"; end
57
- end
58
-
59
- class Address
60
- attr_accessor :name
61
- def initialize(name, existing); @name, @existing = name, existing; end
62
- def new_record?; !@existing; end
63
- def id; @existing ? 25 : nil; end
64
- end
65
-
66
- class Permission
67
- def can_edit; true; end
68
- def can_delete; false; end
69
- end
70
-
71
- module Outer
72
- class UserAccount; end
73
- end
@@ -1,14 +0,0 @@
1
- <% @content = captured_content do %>
2
- <span>Captured Line 1</span>
3
- <span>Captured Line 2</span>
4
- <% end %>
5
- <%= @content %>
6
-
7
- <% concat_in_p('Concat Line 3') %>
8
-
9
- <% determine_block_is_template('erb') do %>
10
- <span>This is erb</span>
11
- <span>This is erb</span>
12
- <% end %>
13
-
14
- <% ruby_not_template_block %>
@@ -1,12 +0,0 @@
1
- - @content = captured_content do
2
- %span Captured Line 1
3
- %span Captured Line 2
4
- = @content
5
-
6
- - concat_in_p('Concat Line 3')
7
-
8
- - determine_block_is_template('haml') do
9
- %span This is haml
10
- %span This is haml
11
-
12
- - ruby_not_template_block
@@ -1,13 +0,0 @@
1
- -@content = captured_content do
2
- span Captured Line 1
3
- span Captured Line 2
4
-
5
- ==@content
6
-
7
- ==determine_block_is_template('slim') do
8
- span This is slim
9
- span This is slim
10
-
11
- ==concat_in_p('Concat Line 3')
12
-
13
- ==ruby_not_template_block
@@ -1,14 +0,0 @@
1
- <% content_for :demo do %>
2
- <h1>This is content yielded from a content_for</h1>
3
- <% end %>
4
-
5
- <div class='demo'><%= yield_content :demo %></div>
6
-
7
- <% content_for :demo2 do |fname, lname| %>
8
- <h1>This is content yielded with name <%= fname + " " + lname %></h1>
9
- <% end %>
10
-
11
- <div class='demo2'><%= yield_content :demo2, "Johnny", "Smith" %></div>
12
-
13
- <div class="demo_has_content"><%= content_for?(:demo).to_s %>
14
- <div class="fake_has_content"><%= content_for?(:fake).to_s %>
@@ -1,12 +0,0 @@
1
- - content_for :demo do
2
- %h1 This is content yielded from a content_for
3
-
4
- .demo= yield_content :demo
5
-
6
- - content_for :demo2 do |fname, lname|
7
- %h1 This is content yielded with name #{fname + " " + lname}
8
-
9
- .demo2= yield_content :demo2, "Johnny", "Smith"
10
-
11
- .demo_has_content= content_for?(:demo)
12
- .fake_has_content= content_for?(:fake)
@@ -1,12 +0,0 @@
1
- - content_for :demo do
2
- h1 This is content yielded from a content_for
3
-
4
- .demo== yield_content :demo
5
-
6
- - content_for :demo2 do |fname, lname|
7
- h1 This is content yielded with name #{fname + " " + lname}
8
-
9
- .demo2== yield_content :demo2, "Johnny", "Smith"
10
-
11
- .demo_has_content== content_for?(:demo)
12
- .fake_has_content== content_for?(:fake)
@@ -1,11 +0,0 @@
1
- <%= content_tag :p, "Test 1", :class => 'test', :id => "test1" %>
2
-
3
- <%= content_tag :p, "Test 2" %>
4
-
5
- <% content_tag(:p, :class => 'test', :id => 'test3') do %>
6
- <span>Test 3</span>
7
- <% end %>
8
-
9
- <% content_tag(:p) do %>
10
- <span>Test 4</span>
11
- <% end %>
@@ -1,9 +0,0 @@
1
- = content_tag :p, "Test 1", :class => 'test', :id => "test1"
2
-
3
- = content_tag :p, "Test 2"
4
-
5
- - content_tag(:p, :class => 'test', :id => 'test3') do
6
- %span Test 3
7
-
8
- - content_tag(:p) do
9
- %span Test 4
@@ -1,9 +0,0 @@
1
- ==content_tag :p, "Test 1", :class => 'test', :id => "test1"
2
-
3
- == content_tag :p, "Test 2"
4
-
5
- ==content_tag(:p, :class => 'test', :id => 'test3') do
6
- span Test 3
7
-
8
- ==content_tag(:p) do
9
- span Test 4
@@ -1,5 +0,0 @@
1
- <p class="start"><%= current_engine %></p>
2
- <p class="haml"><%= haml :'partials/_haml' %></p>
3
- <p class="erb"><%= erb :'partials/_erb' %></p>
4
- <p class="slim"><%= slim :'partials/_slim' %></p>
5
- <p class="end"><%= current_engine %></p>
@@ -1,5 +0,0 @@
1
- %p.start= current_engine
2
- %p.haml= haml :'partials/_haml'
3
- %p.erb= erb :'partials/_erb'
4
- %p.slim= slim :'partials/_slim'
5
- %p.end= current_engine
@@ -1,5 +0,0 @@
1
- p.start= current_engine
2
- p.haml= haml :'partials/_haml'
3
- p.erb= erb :'partials/_erb'
4
- p.slim= slim :'partials/_slim'
5
- p.end= current_engine
@@ -1,20 +0,0 @@
1
- <% @user = MarkupUser.new %>
2
- <% form_for @user , '/demo1', :id => 'demo-fields-for' do |f| %>
3
- <%= f.text_field :gender %>
4
- <% fields_for @user.permission do |permission| %>
5
- <%= permission.check_box :can_edit %>
6
- <%= permission.check_box :can_delete %>
7
- <% end %>
8
- <% f.fields_for :telephone do |child_form| %>
9
- <%= child_form.label :number %>
10
- <%= child_form.text_field :number %>
11
- <% end %>
12
- <% f.fields_for :addresses do |child_form| %>
13
- <%= child_form.label :name %>
14
- <%= child_form.text_field :name %>
15
- <% unless child_form.object.new_record? %>
16
- <%= child_form.check_box '_destroy' %>
17
- <%= child_form.label '_destroy', :caption => 'Remove' %>
18
- <% end %>
19
- <% end %>
20
- <% end %>
@@ -1,15 +0,0 @@
1
- - @user = MarkupUser.new
2
- - form_for @user , '/demo1', :id => 'demo-fields-for' do |f|
3
- = f.text_field :gender
4
- - fields_for @user.permission do |permission|
5
- = permission.check_box :can_edit
6
- = permission.check_box :can_delete
7
- - f.fields_for :telephone do |child_form|
8
- = child_form.label :number
9
- = child_form.text_field :number
10
- - f.fields_for :addresses do |child_form|
11
- = child_form.label :name
12
- = child_form.text_field :name
13
- - unless child_form.object.new_record?
14
- = child_form.check_box '_destroy'
15
- = child_form.label '_destroy', :caption => 'Remove'
@@ -1,15 +0,0 @@
1
- - @user = MarkupUser.new
2
- == form_for @user , '/demo1', :id => 'demo-fields-for' do |f|
3
- == f.text_field :gender
4
- == fields_for @user.permission do |permission|
5
- == permission.check_box :can_edit
6
- == permission.check_box :can_delete
7
- == f.fields_for :telephone do |child_form|
8
- == child_form.label :number
9
- == child_form.text_field :number
10
- == f.fields_for :addresses do |child_form|
11
- == child_form.label :name
12
- == child_form.text_field :name
13
- - unless child_form.object.new_record?
14
- == child_form.check_box '_destroy'
15
- == child_form.label '_destroy', :caption => 'Remove'
@@ -1,72 +0,0 @@
1
- <% form_for MarkupUser.new, '/demo', :id => 'demo' do |f| %>
2
- <%= f.error_messages(:header_message => "custom MarkupUser cannot be saved!") %>
3
- <%= f.hidden_field :session_id %>
4
- <p>
5
- <%= f.label :username, :caption => "Login: ", :class => 'user-label' %>
6
- <%= f.text_field :username, :class => 'user-text', :value => "John" %>
7
- </p>
8
- <p>
9
- <%= f.label :password %>
10
- <%= f.password_field :password, :class => 'user-password', :value => "secret" %>
11
- </p>
12
- <p>
13
- <%= f.label :age %>
14
- <%= f.number_field :age, :class => 'numeric '%>
15
- </p>
16
- <p>
17
- <%= f.label :telephone %>
18
- <%= f.telephone_field :telephone, :class => 'numeric' %>
19
- </p>
20
- <p>
21
- <%= f.label :email, :caption => 'Email Address: ' %>
22
- <%= f.email_field :email, :class => 'string' %>
23
- </p>
24
- <p>
25
- <%= f.label :webpage, :caption => 'Your Web Page: ' %>
26
- <%= f.url_field :webpage, :class => 'string' %>
27
- </p>
28
- <p>
29
- <%= f.label :search %>
30
- <%= f.search_field :search, :class => 'string' %>
31
- </p>
32
- <p>
33
- <%= f.label :photo %>
34
- <%= f.file_field :photo, :class => 'user-photo' %>
35
- </p>
36
- <p>
37
- <%= f.label :about, :caption => "About Me: " %>
38
- <%= f.text_area :about, :class => 'user-about' %>
39
- </p>
40
- <p>
41
- <%= f.label :gender, :caption => "Your gender: " %>
42
- <%= f.radio_button :gender, :value => 'male' %>
43
- <%= f.radio_button :gender, :value => 'female' %>
44
- </p>
45
- <p>
46
- <%= f.label :country, :caption => "Your country" %>
47
- <%= f.select :country, :options => ['USA', 'Canada', 'Mexico'], :selected => 'USA', :class => 'selector' %>
48
- </p>
49
- <p>
50
- <%= f.label :remember_me %>
51
- <%= f.check_box :remember_me, :value => '1' %>
52
- </p>
53
- <p><%= f.submit "Create", :class => 'success', :id => 'demo-button' %></p>
54
- <p><%= f.image_submit "buttons/post.png", :class => 'success', :id => 'image-button' %></p>
55
- <% end %>
56
-
57
- <% form_for MarkupUser.new, '/another_demo', :id => 'demo2', :method => 'get' do |f| %>
58
- <%= f.error_messages :header_message => "custom MarkupUser cannot be saved!" %>
59
- <%= f.hidden_field :session_id %>
60
- <%= f.text_field_block :username, { :class => 'input' }, { :caption => 'Nickname: ', :class => 'label' } %>
61
- <%= f.password_field_block :code, { :class => 'input' } %>
62
- <%= f.text_area_block :about, { :class => 'textarea' } %>
63
- <%= f.file_field_block :photo, { :class => 'upload' } %>
64
- <%= f.check_box_block :remember_me, { :class => 'checker' } %>
65
- <%= f.select_block :state, :options => ['California', 'Texas'], :class => 'selector' %>
66
- <%= f.submit_block "Create", { :class => 'button' } %>
67
- <%= f.image_submit_block "buttons/ok.png", { :class => 'image' } %>
68
- <% end %>
69
-
70
- <% form_for :markup_user, '/third_demo', :id => 'demo3', :method => 'get' do |f| %>
71
- <%= f.text_field_block :username %>
72
- <% end %>
@@ -1,59 +0,0 @@
1
- - form_for MarkupUser.new, '/demo', :id => 'demo' do |f|
2
- = f.error_messages(:header_message => "custom MarkupUser cannot be saved!")
3
- = f.hidden_field :session_id
4
- %p
5
- = f.label :username, :caption => "Login: ", :class => 'user-label'
6
- = f.text_field :username, :class => 'user-text', :value => "John"
7
- %p
8
- = f.label :password
9
- = f.password_field :password, :class => 'user-password', :value => "secret"
10
- %p
11
- = f.label :age
12
- = f.number_field :age, :class => 'numeric'
13
- %p
14
- = f.label :telephone
15
- = f.telephone_field :telephone, :class => 'numeric'
16
- %p
17
- = f.label :email, :caption => 'Email Address: '
18
- = f.email_field :email, :class => 'string'
19
- %p
20
- = f.label :webpage, :caption => 'Your Web Page: '
21
- = f.url_field :webpage, :class => 'string'
22
- %p
23
- = f.label :search
24
- = f.search_field :search, :class => 'string'
25
- %p
26
- = f.label :photo
27
- = f.file_field :photo, :class => 'user-photo'
28
- %p
29
- = f.label :about, :caption => "About Me: "
30
- = f.text_area :about, :class => 'user-about'
31
- %p
32
- = f.label :gender, :caption => "Your gender: "
33
- = f.radio_button :gender, :value => 'male'
34
- = f.radio_button :gender, :value => 'female'
35
- %p
36
- = f.label :country, :caption => "Your country"
37
- = f.select :country, :options => ['USA', 'Canada', 'Mexico'], :selected => 'USA', :class => 'selector'
38
- %p
39
- = f.label :remember_me
40
- = f.check_box :remember_me, :value => "1"
41
- %p
42
- = f.submit "Create", :class => 'success', :id => 'demo-button'
43
- %p
44
- = f.image_submit "buttons/post.png", :class => 'success', :id => 'image-button'
45
-
46
- - form_for MarkupUser.new, '/another_demo', :id => 'demo2', :method => 'get' do |f|
47
- = f.error_messages :header_message => "custom MarkupUser cannot be saved!"
48
- = f.hidden_field :session_id
49
- = f.text_field_block :username, { :class => 'input' }, { :caption => 'Nickname: ', :class => 'label' }
50
- = f.password_field_block :code, { :class => 'input' }
51
- = f.text_area_block :about, { :class => 'textarea' }
52
- = f.file_field_block :photo, { :class => 'upload' }
53
- = f.check_box_block :remember_me, { :class => 'checker' }
54
- = f.select_block :state, :options => ['California', 'Texas'], :class => 'selector'
55
- = f.submit_block "Create", { :class => 'button' }
56
- = f.image_submit_block "buttons/ok.png", { :class => 'image' }
57
-
58
- - form_for :markup_user, '/third_demo', :id => 'demo3', :method => 'get' do |f|
59
- = f.text_field_block :username
@@ -1,59 +0,0 @@
1
- == form_for MarkupUser.new, '/demo', :id => 'demo' do |f|
2
- == f.error_messages(:header_message => "custom MarkupUser cannot be saved!")
3
- == f.hidden_field :session_id
4
- p
5
- == f.label :username, :caption => "Login: ", :class => 'user-label'
6
- == f.text_field :username, :class => 'user-text', :value => "John"
7
- p
8
- == f.label :password
9
- == f.password_field :password, :class => 'user-password', :value => "secret"
10
- p
11
- == f.label :age
12
- == f.number_field :age, :class => 'numeric'
13
- p
14
- == f.label :telephone
15
- == f.telephone_field :telephone, :class => 'numeric'
16
- p
17
- == f.label :email, :caption => 'Email Address: '
18
- == f.email_field :email, :class => 'string'
19
- p
20
- == f.label :webpage, :caption => 'Your Web Page: '
21
- == f.url_field :webpage, :class => 'string'
22
- p
23
- == f.label :search
24
- == f.search_field :search, :class => 'string'
25
- p
26
- == f.label :photo
27
- == f.file_field :photo, :class => 'user-photo'
28
- p
29
- == f.label :about, :caption => "About Me: "
30
- == f.text_area :about, :class => 'user-about'
31
- p
32
- == f.label :gender, :caption => "Your gender: "
33
- == f.radio_button :gender, :value => 'male'
34
- == f.radio_button :gender, :value => 'female'
35
- p
36
- == f.label :country, :caption => "Your country"
37
- == f.select :country, :options => ['USA', 'Canada', 'Mexico'], :selected => 'USA', :class => 'selector'
38
- p
39
- == f.label :remember_me
40
- == f.check_box :remember_me, :value => "1"
41
- p
42
- == f.submit "Create", :class => 'success', :id => 'demo-button'
43
- p
44
- == f.image_submit "buttons/post.png", :class => 'success', :id => 'image-button'
45
-
46
- == form_for MarkupUser.new, '/another_demo', :id => 'demo2', :method => 'get' do |f|
47
- == f.error_messages :header_message => "custom MarkupUser cannot be saved!"
48
- == f.hidden_field :session_id
49
- == f.text_field_block :username, { :class => 'input' }, { :caption => 'Nickname: ', :class => 'label' }
50
- == f.password_field_block :code, { :class => 'input' }
51
- == f.text_area_block :about, { :class => 'textarea' }
52
- == f.file_field_block :photo, { :class => 'upload' }
53
- == f.check_box_block :remember_me, { :class => 'checker' }
54
- == f.select_block :state, :options => ['California', 'Texas'], :class => 'selector'
55
- == f.submit_block "Create", { :class => 'button' }
56
- == f.image_submit_block "buttons/ok.png", { :class => 'image' }
57
-
58
- == form_for :markup_user, '/third_demo', :id => 'demo3', :method => 'get' do |f|
59
- == f.text_field_block :username
@@ -1,86 +0,0 @@
1
- <% form_tag '/simple', :class => 'simple-form' do %>
2
- <%= hidden_field_tag :session_id, :value => "__secret__" %>
3
- <% field_set_tag do %>
4
- <%= label_tag :username %>
5
- <%= text_field_tag :username %>
6
- <%= label_tag :password %>
7
- <%= password_field_tag :password %>
8
- <%= label_tag :email %>
9
- <%= email_field_tag :email %>
10
- <%= label_tag :age %>
11
- <%= number_field_tag :age %>
12
- <%= label_tag :telephone %>
13
- <%= telephone_field_tag :telephone %>
14
- <%= label_tag :webpage %>
15
- <%= url_field_tag :webpage %>
16
- <%= label_tag :search %>
17
- <%= search_field_tag :search %>
18
- <%= check_box_tag :remember_me %>
19
- <%= label_tag :gender %>
20
- <%= label_tag :color %>
21
- <%= select_tag :color, :options => ['green', 'orange', 'purple'] %>
22
- <%= radio_button_tag :gender, :value => 'male' %>
23
- <%= radio_button_tag :gender, :value => 'female' %>
24
- <%= submit_tag %>
25
- <% end %>
26
- <% end %>
27
-
28
- <% form_tag '/advanced', :id => 'advanced', :class => 'advanced-form', :method => 'get' do %>
29
- <%= error_messages_for MarkupUser.new, :header_message => "There are problems with saving user!" %>
30
- <%= hidden_field_tag :session_id, :value => "__secret__" %>
31
- <% field_set_tag "Advanced", :class => 'advanced-field-set' do %>
32
- <p>
33
- <%= label_tag :username, :class => 'first', :caption => "Nickname" %>
34
- <%= text_field_tag :username, :value => params[:username], :id => 'the_username' %>
35
- </p>
36
- <p>
37
- <%= label_tag :password, :class => 'first' %>
38
- <%= password_field_tag :password, :value => params[:password] %>
39
- </p>
40
- <p>
41
- <%= label_tag :email, :caption => 'Email Address' %>
42
- <%= email_field_tag :email, :class => 'string' %>
43
- </p>
44
- <p>
45
- <%= label_tag :age, :class => 'age' %>
46
- <%= number_field_tag :age, :class => 'numeric' %>
47
- </p>
48
- <p>
49
- <%= label_tag :telephone, :class => 'telephone' %>
50
- <%= telephone_field_tag :telephone, :class => 'numeric' %>
51
- </p>
52
- <p>
53
- <%= label_tag :webpage, :caption => 'Your Home Page' %>
54
- <%= url_field_tag :webpage, :class => 'string' %>
55
- </p>
56
- <p>
57
- <%= label_tag :search %>
58
- <%= search_field_tag :search, :class => 'string' %>
59
- </p>
60
- <p>
61
- <%= label_tag :about, :class => 'about', :caption => "About Me" %>
62
- <%= text_area_tag :about, :class => 'large' %>
63
- </p>
64
- <p>
65
- <%= label_tag :photo, :class => 'photo' %>
66
- <%= file_field_tag :photo, :class => 'upload' %>
67
- </p>
68
- <p>
69
- <%= label_tag :gender, :class => 'gender' %>
70
- <%= radio_button_tag :gender, :value => 'male', :checked => true %>
71
- <%= radio_button_tag :remember_me, :value => 'female' %>
72
- <p>
73
- <p>
74
- <%= label_tag :fav_color %>
75
- <%= select_tag :fav_color, :options => [ ['green', '1'], ['orange', '2'], ['purple', '3'] ], :selected => '2' %>
76
- </p>
77
- <p>
78
- <%= check_box_tag :remember_me, :value => '1', :checked => true %>
79
- <p>
80
- <% end %>
81
- <% field_set_tag(:class => 'buttons') do %>
82
- <%= submit_tag "Login" %>
83
- <%= button_tag "Cancel" %>
84
- <%= image_submit_tag "buttons/submit.png" %>
85
- <% end %>
86
- <% end %>