middleman-core 3.2.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +10 -0
  3. data/features/helpers_auto_javascript_include_tag.feature +21 -0
  4. data/features/helpers_auto_stylesheet_link_tag.feature +21 -0
  5. data/features/i18n_builder.feature +23 -13
  6. data/features/i18n_preview.feature +9 -9
  7. data/features/markdown_kramdown.feature +1 -1
  8. data/fixtures/i18n-test-app/source/{layout.erb → layouts/layout.erb} +0 -0
  9. data/fixtures/i18n-test-app/source/{morning.en.html.erb → localizable/morning.en.html.erb} +0 -0
  10. data/fixtures/i18n-test-app/source/{morning.es.html.erb → localizable/morning.es.html.erb} +0 -0
  11. data/fixtures/i18n-test-app/source/{one.en.md → localizable/one.en.md} +0 -0
  12. data/fixtures/i18n-test-app/source/{one.es.md → localizable/one.es.md} +0 -0
  13. data/lib/middleman-core/application.rb +4 -0
  14. data/lib/middleman-core/cli/build.rb +14 -2
  15. data/lib/middleman-core/cli/init.rb +1 -0
  16. data/lib/middleman-core/core_extensions.rb +6 -1
  17. data/lib/middleman-core/core_extensions/file_watcher.rb +1 -0
  18. data/lib/middleman-core/core_extensions/request.rb +2 -4
  19. data/lib/middleman-core/extensions.rb +13 -5
  20. data/lib/middleman-core/meta_pages.rb +25 -11
  21. data/lib/middleman-core/meta_pages/sitemap_resource.rb +2 -2
  22. data/lib/middleman-core/meta_pages/templates/config.html.erb +7 -9
  23. data/lib/middleman-core/meta_pages/templates/index.html.erb +3 -3
  24. data/lib/middleman-core/meta_pages/templates/sitemap.html.erb +6 -6
  25. data/lib/middleman-core/sitemap/extensions/redirects.rb +1 -2
  26. data/lib/middleman-core/sitemap/extensions/request_endpoints.rb +2 -3
  27. data/lib/middleman-core/sitemap/resource.rb +7 -13
  28. data/lib/middleman-core/util.rb +2 -3
  29. data/lib/middleman-core/version.rb +1 -1
  30. data/lib/middleman-more/core_extensions/default_helpers.rb +9 -5
  31. data/lib/middleman-more/core_extensions/i18n.rb +17 -10
  32. data/lib/middleman-more/extensions/{automatic-alt-tags.rb → automatic_alt_tags.rb} +0 -0
  33. data/lib/middleman-more/extensions/gzip.rb +29 -6
  34. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/.document +0 -0
  35. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/.gitignore +0 -0
  36. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/.yardopts +0 -0
  37. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/LICENSE.txt +0 -0
  38. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/README.rdoc +5 -5
  39. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/Rakefile +0 -0
  40. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/bin/padrino +0 -0
  41. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core.rb +4 -10
  42. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/application.rb +39 -35
  43. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/application/flash.rb +7 -7
  44. data/lib/vendored-middleman-deps/padrino-core-0.11.4/lib/padrino-core/application/rendering.rb +317 -0
  45. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/application/rendering/extensions/erubis.rb +15 -6
  46. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/application/rendering/extensions/haml.rb +2 -0
  47. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/application/rendering/extensions/slim.rb +0 -0
  48. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/application/routing.rb +406 -368
  49. data/lib/vendored-middleman-deps/padrino-core-0.11.4/lib/padrino-core/application/showexceptions.rb +21 -0
  50. data/lib/vendored-middleman-deps/padrino-core-0.11.4/lib/padrino-core/caller.rb +53 -0
  51. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/cli/adapter.rb +4 -4
  52. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/cli/base.rb +40 -39
  53. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/cli/console.rb +0 -0
  54. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/cli/rake.rb +2 -2
  55. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/cli/rake_tasks.rb +2 -4
  56. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/command.rb +2 -2
  57. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/images/404.png +0 -0
  58. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/images/500.png +0 -0
  59. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/loader.rb +14 -15
  60. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/cs.yml +0 -1
  61. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/da.yml +0 -1
  62. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/de.yml +0 -1
  63. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/en.yml +0 -1
  64. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/es.yml +1 -2
  65. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/fr.yml +2 -3
  66. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/hu.yml +1 -2
  67. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/it.yml +0 -1
  68. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/ja.yml +1 -2
  69. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/lv.yml +0 -1
  70. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/nl.yml +0 -1
  71. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/no.yml +0 -2
  72. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/pl.yml +0 -1
  73. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/pt_br.yml +0 -1
  74. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/ro.yml +0 -1
  75. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/ru.yml +0 -1
  76. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/sv.yml +0 -1
  77. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/tr.yml +0 -1
  78. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/uk.yml +0 -1
  79. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/zh_cn.yml +0 -1
  80. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/locale/zh_tw.yml +0 -1
  81. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/logger.rb +30 -36
  82. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/module.rb +3 -3
  83. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/mounter.rb +59 -59
  84. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/reloader.rb +23 -23
  85. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/router.rb +10 -13
  86. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/server.rb +17 -19
  87. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/support_lite.rb +0 -0
  88. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/tasks.rb +3 -3
  89. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/lib/padrino-core/version.rb +1 -1
  90. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/padrino-core.gemspec +2 -2
  91. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/app_gem/Gemfile +0 -0
  92. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/app_gem/app/app.rb +0 -0
  93. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/app_gem/app_gem.gemspec +0 -0
  94. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/app_gem/lib/app_gem.rb +0 -0
  95. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/app_gem/lib/app_gem/version.rb +0 -0
  96. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/apps/.components +0 -0
  97. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/apps/.gitignore +0 -0
  98. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/apps/complex.rb +0 -0
  99. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/apps/simple.rb +0 -0
  100. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/dependencies/a.rb +0 -0
  101. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/dependencies/b.rb +0 -0
  102. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/dependencies/c.rb +0 -0
  103. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/dependencies/circular/e.rb +0 -0
  104. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/dependencies/circular/f.rb +0 -0
  105. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/dependencies/circular/g.rb +0 -0
  106. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/fixtures/dependencies/d.rb +0 -0
  107. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/helper.rb +0 -0
  108. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/mini_shoulda.rb +0 -0
  109. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_application.rb +7 -7
  110. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_core.rb +0 -0
  111. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_csrf_protection.rb +0 -0
  112. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_dependencies.rb +0 -0
  113. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_filters.rb +0 -0
  114. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_flash.rb +0 -0
  115. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_locale.rb +0 -0
  116. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_logger.rb +29 -0
  117. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_mounter.rb +0 -0
  118. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_reloader_complex.rb +0 -0
  119. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_reloader_simple.rb +0 -0
  120. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_rendering.rb +15 -2
  121. data/lib/vendored-middleman-deps/padrino-core-0.11.4/test/test_rendering_extensions.rb +14 -0
  122. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_restful_routing.rb +0 -0
  123. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_router.rb +0 -0
  124. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_routing.rb +69 -11
  125. data/lib/vendored-middleman-deps/{padrino-core-0.11.2 → padrino-core-0.11.4}/test/test_support_lite.rb +0 -0
  126. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/.document +0 -0
  127. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/.gitignore +0 -0
  128. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/.yardopts +0 -0
  129. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/LICENSE.txt +0 -0
  130. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/README.rdoc +1 -1
  131. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/Rakefile +0 -0
  132. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers.rb +3 -6
  133. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/asset_tag_helpers.rb +34 -42
  134. data/lib/vendored-middleman-deps/padrino-helpers-0.11.4/lib/padrino-helpers/breadcrumb_helpers.rb +183 -0
  135. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/form_builder/abstract_form_builder.rb +126 -118
  136. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/form_builder/standard_form_builder.rb +6 -9
  137. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/form_helpers.rb +252 -195
  138. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/format_helpers.rb +29 -42
  139. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/cs.yml +14 -14
  140. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/da.yml +1 -1
  141. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/de.yml +1 -1
  142. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/en.yml +16 -16
  143. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/es.yml +16 -16
  144. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/fr.yml +1 -2
  145. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/hu.yml +16 -16
  146. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/it.yml +2 -2
  147. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/ja.yml +16 -16
  148. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/lv.yml +16 -16
  149. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/nl.yml +1 -1
  150. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/no.yml +1 -1
  151. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/pl.yml +7 -7
  152. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/pt_br.yml +16 -16
  153. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/ro.yml +16 -16
  154. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/ru.yml +16 -16
  155. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/sv.yml +16 -16
  156. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/tr.yml +16 -16
  157. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/uk.yml +16 -16
  158. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/zh_cn.yml +16 -16
  159. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/locale/zh_tw.yml +16 -16
  160. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/number_helpers.rb +10 -15
  161. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/output_helpers.rb +50 -58
  162. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/output_helpers/abstract_handler.rb +16 -18
  163. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/output_helpers/erb_handler.rb +11 -12
  164. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/output_helpers/haml_handler.rb +9 -9
  165. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/output_helpers/slim_handler.rb +11 -13
  166. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/render_helpers.rb +5 -6
  167. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/tag_helpers.rb +26 -22
  168. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/lib/padrino-helpers/translation_helpers.rb +4 -6
  169. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/padrino-helpers.gemspec +0 -0
  170. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/app.rb +7 -3
  171. data/lib/vendored-middleman-deps/padrino-helpers-0.11.4/test/fixtures/markup_app/views/button_to.erb +8 -0
  172. data/lib/vendored-middleman-deps/padrino-helpers-0.11.4/test/fixtures/markup_app/views/button_to.haml +5 -0
  173. data/lib/vendored-middleman-deps/padrino-helpers-0.11.4/test/fixtures/markup_app/views/button_to.slim +6 -0
  174. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/capture_concat.erb +0 -0
  175. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/capture_concat.haml +0 -0
  176. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/capture_concat.slim +0 -0
  177. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/content_for.erb +0 -0
  178. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/content_for.haml +0 -0
  179. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/content_for.slim +0 -0
  180. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/content_tag.erb +0 -0
  181. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/content_tag.haml +0 -0
  182. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/content_tag.slim +0 -0
  183. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/current_engine.erb +0 -0
  184. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/current_engine.haml +0 -0
  185. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/current_engine.slim +0 -0
  186. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/fields_for.erb +0 -0
  187. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/fields_for.haml +0 -0
  188. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/fields_for.slim +0 -0
  189. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/form_for.erb +0 -0
  190. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/form_for.haml +0 -0
  191. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/form_for.slim +0 -0
  192. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/form_tag.erb +9 -0
  193. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/form_tag.haml +8 -0
  194. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/form_tag.slim +9 -0
  195. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/link_to.erb +0 -0
  196. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/link_to.haml +0 -0
  197. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/link_to.slim +0 -0
  198. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/mail_to.erb +0 -0
  199. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/mail_to.haml +0 -0
  200. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/mail_to.slim +0 -0
  201. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/meta_tag.erb +0 -0
  202. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/meta_tag.haml +0 -0
  203. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/meta_tag.slim +0 -0
  204. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/partials/_erb.erb +0 -0
  205. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/partials/_haml.haml +0 -0
  206. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/partials/_slim.slim +0 -0
  207. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/simple_partial.erb +0 -0
  208. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/simple_partial.haml +0 -0
  209. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/markup_app/views/simple_partial.slim +0 -0
  210. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/app.rb +1 -0
  211. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/current_engine.haml +0 -0
  212. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/current_engines/_erb.erb +0 -0
  213. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/current_engines/_haml.haml +0 -0
  214. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/current_engines/_slim.slim +0 -0
  215. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/double_capture_erb.erb +0 -0
  216. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/double_capture_haml.haml +0 -0
  217. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/double_capture_slim.slim +0 -0
  218. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/erb/test.erb +0 -0
  219. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/explicit_engine.haml +0 -0
  220. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/haml/test.haml +0 -0
  221. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/template/_user.haml +0 -0
  222. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/template/haml_template.haml +0 -0
  223. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/fixtures/render_app/views/template/some_template.haml +0 -0
  224. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/helper.rb +0 -0
  225. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/test_asset_tag_helpers.rb +9 -3
  226. data/lib/vendored-middleman-deps/padrino-helpers-0.11.4/test/test_breadcrumb_helpers.rb +134 -0
  227. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/test_form_builder.rb +38 -6
  228. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/test_form_helpers.rb +230 -12
  229. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/test_format_helpers.rb +3 -3
  230. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/test_locale.rb +0 -0
  231. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/test_number_helpers.rb +4 -0
  232. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/test_output_helpers.rb +1 -1
  233. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/test_render_helpers.rb +1 -1
  234. data/lib/vendored-middleman-deps/{padrino-helpers-0.11.2 → padrino-helpers-0.11.4}/test/test_tag_helpers.rb +3 -3
  235. data/middleman-core.gemspec +7 -8
  236. data/spec/spec_helper.rb +1 -1
  237. metadata +220 -215
  238. data/lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/rendering.rb +0 -320
  239. data/lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/showexceptions.rb +0 -20
  240. data/lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/caller.rb +0 -53
  241. data/lib/vendored-middleman-deps/padrino-helpers-0.11.2/lib/padrino-helpers/breadcrumb_helpers.rb +0 -171
@@ -26,7 +26,6 @@ lv:
26
26
  am: "priekšpusdiena"
27
27
  pm: "pēcpusdiena"
28
28
 
29
- # Used in array.to_sentence.
30
29
  support:
31
30
  array:
32
31
  words_connector: ", "
@@ -26,7 +26,6 @@ nl:
26
26
  am: "am"
27
27
  pm: "pm"
28
28
 
29
- # Used in array.to_sentence.
30
29
  support:
31
30
  array:
32
31
  words_connector: ", "
@@ -26,10 +26,8 @@
26
26
  am: ""
27
27
  pm: ""
28
28
 
29
- # Used in array.to_sentence.
30
29
  support:
31
30
  array:
32
31
  words_connector: ", "
33
32
  two_words_connector: " og "
34
33
  last_word_connector: " og "
35
-
@@ -26,7 +26,6 @@ pl:
26
26
  am: "przed południem"
27
27
  pm: "po południu"
28
28
 
29
- # Used in array.to_sentence.
30
29
  support:
31
30
  array:
32
31
  words_connector: ", "
@@ -33,7 +33,6 @@ pt_br:
33
33
  am: 'am'
34
34
  pm: 'pm'
35
35
 
36
- # Used in array.to_sentence.
37
36
  support:
38
37
  array:
39
38
  sentence_connector: "e"
@@ -26,7 +26,6 @@ ro:
26
26
  am: "am"
27
27
  pm: "pm"
28
28
 
29
- # Used in array.to_sentence.
30
29
  support:
31
30
  array:
32
31
  words_connector: ", "
@@ -26,7 +26,6 @@ ru:
26
26
  am: "д.п."
27
27
  pm: "п.п."
28
28
 
29
- # Used in array.to_sentence.
30
29
  support:
31
30
  array:
32
31
  words_connector: ", "
@@ -26,7 +26,6 @@ sv:
26
26
  am: "fm"
27
27
  pm: "em"
28
28
 
29
- # Used in array.to_sentence.
30
29
  support:
31
30
  array:
32
31
  words_connector: ", "
@@ -26,7 +26,6 @@ tr:
26
26
  am: "öö"
27
27
  pm: "ös"
28
28
 
29
- # Used in array.to_sentence.
30
29
  support:
31
30
  array:
32
31
  words_connector: ", "
@@ -26,7 +26,6 @@ uk:
26
26
  am: "д.п."
27
27
  pm: "п.п"
28
28
 
29
- # Used in array.to_sentence.
30
29
  support:
31
30
  array:
32
31
  words_connector: ", "
@@ -26,7 +26,6 @@ zh_cn:
26
26
  am: "上午"
27
27
  pm: "下午"
28
28
 
29
- # Used in array.to_sentence.
30
29
  support:
31
30
  array:
32
31
  words_connector: ","
@@ -26,7 +26,6 @@ zh_tw:
26
26
  am: "上午"
27
27
  pm: "下午"
28
28
 
29
- # Used in array.to_sentence.
30
29
  support:
31
30
  array:
32
31
  words_connector: ", "
@@ -17,13 +17,13 @@ module Padrino
17
17
  end
18
18
 
19
19
  ##
20
- # Set the padrino logger
20
+ # Set the padrino logger.
21
21
  #
22
22
  # @param [Object] value
23
23
  # an object that respond to <<, write, puts, debug, warn etc..
24
24
  #
25
25
  # @return [Object]
26
- # the given value
26
+ # The given value.
27
27
  #
28
28
  # @example using ruby default logger
29
29
  # require 'logger'
@@ -44,7 +44,7 @@ module Padrino
44
44
  ##
45
45
  # Ruby (standard) logger levels:
46
46
  #
47
- # :fatal:: An unhandleable error that results in a program crash
47
+ # :fatal:: An not handleable error that results in a program crash
48
48
  # :error:: A handleable error condition
49
49
  # :warn:: A warning
50
50
  # :info:: generic (useful) information about system operation
@@ -58,7 +58,7 @@ module Padrino
58
58
  :info => 3,
59
59
  :debug => 0,
60
60
  :devel => -1,
61
- } unless const_defined?(:Levels)
61
+ } unless defined?(Levels)
62
62
 
63
63
  module Extensions
64
64
  ##
@@ -80,16 +80,16 @@ module Padrino
80
80
  end
81
81
 
82
82
  ##
83
- # Append a to development logger a given action with time
83
+ # Append a to development logger a given action with time.
84
84
  #
85
85
  # @param [string] action
86
- # The action
86
+ # The action.
87
87
  #
88
88
  # @param [float] time
89
- # Time duration for the given action
89
+ # Time duration for the given action.
90
90
  #
91
91
  # @param [message] string
92
- # The message that you want to log
92
+ # The message that you want to log.
93
93
  #
94
94
  # @example
95
95
  # logger.bench 'GET', started_at, '/blog/categories'
@@ -110,10 +110,10 @@ module Padrino
110
110
  # the output of this block will be appended to the message.
111
111
  #
112
112
  # @param [String] message
113
- # The message that you want write to your stream
113
+ # The message that you want write to your stream.
114
114
  #
115
115
  # @param [String] level
116
- # The level one of :debug, :warn etc...
116
+ # The level one of :debug, :warn etc. ...
117
117
  #
118
118
  #
119
119
  def push(message = nil, level = nil)
@@ -125,10 +125,10 @@ module Padrino
125
125
  # logger components such as {Padrino::Logger}.
126
126
  #
127
127
  # @param [String] message
128
- # The message to format
128
+ # The message to format.
129
129
  #
130
130
  # @param [String,Symbol] level
131
- # The log level, one of :debug, :warn...
131
+ # The log level, one of :debug, :warn ...
132
132
  def format(message, level)
133
133
  message
134
134
  end
@@ -140,7 +140,7 @@ module Padrino
140
140
  # stylized_level(:debug) => DEBUG
141
141
  #
142
142
  # @param [String,Symbol] level
143
- # The log level
143
+ # The log level.
144
144
  #
145
145
  def stylized_level(level)
146
146
  level.to_s.upcase.rjust(7)
@@ -186,7 +186,7 @@ module Padrino
186
186
  } unless defined?(ColoredLevels)
187
187
 
188
188
  ##
189
- # Colorize our level
189
+ # Colorize our level.
190
190
  #
191
191
  # @param [String, Symbol] level
192
192
  #
@@ -207,13 +207,8 @@ module Padrino
207
207
 
208
208
  include Extensions
209
209
 
210
- attr_accessor :level
211
- attr_accessor :auto_flush
212
- attr_reader :buffer
213
- attr_reader :log
214
- attr_reader :init_args
215
- attr_accessor :log_static
216
- attr_reader :colorize_logging
210
+ attr_accessor :auto_flush, :level, :log_static
211
+ attr_reader :buffer, :colorize_logging, :init_args, :log
217
212
 
218
213
  ##
219
214
  # Configuration for a given environment, possible options are:
@@ -268,7 +263,7 @@ module Padrino
268
263
  end
269
264
 
270
265
  ##
271
- # Setup a new logger
266
+ # Setup a new logger.
272
267
  #
273
268
  # @return [Padrino::Logger]
274
269
  # A {Padrino::Logger} instance
@@ -313,16 +308,16 @@ module Padrino
313
308
  # added. Defaults to true.
314
309
  #
315
310
  # @option options [Symbol] :format_datetime (" [%d/%b/%Y %H:%M:%S] ")
316
- # Format of datetime
311
+ # Format of datetime.
317
312
  #
318
313
  # @option options [Symbol] :format_message ("%s -%s%s")
319
- # Format of message
314
+ # Format of message.
320
315
  #
321
316
  # @option options [Symbol] :log_static (false)
322
317
  # Whether or not to show log messages for static files.
323
318
  #
324
319
  # @option options [Symbol] :colorize_logging (true)
325
- # Whether or not to colorize log messages. Defaults to: true
320
+ # Whether or not to colorize log messages. Defaults to: true.
326
321
  #
327
322
  def initialize(options={})
328
323
  @buffer = []
@@ -362,7 +357,6 @@ module Padrino
362
357
  ##
363
358
  # Adds a message to the log - for compatibility with other loggers.
364
359
  #
365
- # @private
366
360
  def add(level, message = nil)
367
361
  write(message)
368
362
  end
@@ -388,26 +382,26 @@ module Padrino
388
382
  end
389
383
 
390
384
  ##
391
- # Padrino::Loggger::Rack forwards every request to an +app+ given, and
385
+ # Padrino::Logger::Rack forwards every request to an +app+ given, and
392
386
  # logs a line in the Apache common log format to the +logger+, or
393
387
  # rack.errors by default.
394
388
  #
395
389
  class Rack
396
-
397
- def initialize(app, uri_root) # @private
390
+ def initialize(app, uri_root)
398
391
  @app = app
399
392
  @uri_root = uri_root.sub(/\/$/,"")
400
393
  end
401
394
 
402
- def call(env) # @private
395
+ def call(env)
403
396
  env['rack.logger'] = Padrino.logger
404
397
  began_at = Time.now
405
398
  status, header, body = @app.call(env)
406
- log(env, status, header, began_at)
399
+ log(env, status, header, began_at) if logger.debug?
407
400
  [status, header, body]
408
401
  end
409
402
 
410
403
  private
404
+
411
405
  def log(env, status, header, began_at)
412
406
  return if env['sinatra.static_file'] && (!logger.respond_to?(:log_static) || !logger.log_static)
413
407
  logger.bench(
@@ -430,15 +424,15 @@ module Padrino
430
424
  def code_to_name(status)
431
425
  ::Rack::Utils::HTTP_STATUS_CODES[status.to_i] || ''
432
426
  end
433
- end # Rack
434
- end # Logger
435
- end # Padrino
427
+ end
428
+ end
429
+ end
436
430
 
437
- module Kernel # @private
431
+ module Kernel
438
432
  ##
439
433
  # Define a logger available every where in our app
440
434
  #
441
435
  def logger
442
436
  Padrino.logger
443
437
  end
444
- end # Kernel
438
+ end
@@ -32,9 +32,9 @@ module Padrino
32
32
  def root(*args)
33
33
  File.expand_path(File.join(@root, *args))
34
34
  end
35
-
35
+
36
36
  ##
37
- # Returns the list of path globs to load as dependencies
37
+ # Returns the list of path globs to load as dependencies.
38
38
  # Appends custom dependency patterns to the be loaded for Padrino.
39
39
  #
40
40
  # @return [Array<String>]
@@ -55,4 +55,4 @@ module Padrino
55
55
  ]
56
56
  end
57
57
  end
58
- end
58
+ end
@@ -1,21 +1,21 @@
1
1
  module Padrino
2
2
  ##
3
- # Represents a particular mounted padrino application
4
- # Stores the name of the application (app folder name) and url mount path
3
+ # Represents a particular mounted Padrino application.
4
+ # Stores the name of the application (app folder name) and url mount path.
5
5
  #
6
6
  # @example
7
7
  # Mounter.new("blog_app", :app_class => "Blog").to("/blog")
8
8
  # Mounter.new("blog_app", :app_file => "/path/to/blog/app.rb").to("/blog")
9
9
  #
10
10
  class Mounter
11
- class MounterException < RuntimeError # @private
11
+ class MounterException < RuntimeError
12
12
  end
13
13
 
14
14
  attr_accessor :name, :uri_root, :app_file, :app_class, :app_root, :app_obj, :app_host
15
15
 
16
16
  ##
17
17
  # @param [String, Padrino::Application] name
18
- # The app name or the {Padrino::Application} class
18
+ # The app name or the {Padrino::Application} class.
19
19
  #
20
20
  # @param [Hash] options
21
21
  # @option options [Symbol] :app_class (Detected from name)
@@ -37,10 +37,10 @@ module Padrino
37
37
  end
38
38
 
39
39
  ##
40
- # Registers the mounted application onto Padrino
40
+ # Registers the mounted application onto Padrino.
41
41
  #
42
42
  # @param [String] mount_url
43
- # Path where we mount the app
43
+ # Path where we mount the app.
44
44
  #
45
45
  # @example
46
46
  # Mounter.new("blog_app").to("/blog")
@@ -52,10 +52,10 @@ module Padrino
52
52
  end
53
53
 
54
54
  ##
55
- # Registers the mounted application onto Padrino for the given host
55
+ # Registers the mounted application onto Padrino for the given host.
56
56
  #
57
57
  # @param [String] mount_host
58
- # Host name
58
+ # Host name.
59
59
  #
60
60
  # @example
61
61
  # Mounter.new("blog_app").to("/blog").host("blog.padrino.org")
@@ -69,8 +69,8 @@ module Padrino
69
69
  end
70
70
 
71
71
  ##
72
- # Maps Padrino application onto a Padrino::Router
73
- # For use in constructing a Rack application
72
+ # Maps Padrino application onto a Padrino::Router.
73
+ # For use in constructing a Rack application.
74
74
  #
75
75
  # @param [Padrino::Router]
76
76
  #
@@ -92,17 +92,17 @@ module Padrino
92
92
  end
93
93
 
94
94
  ###
95
- # Returns the route objects for the mounted application
95
+ # Returns the route objects for the mounted application.
96
96
  #
97
97
  def routes
98
98
  app_obj.routes
99
99
  end
100
100
 
101
101
  ###
102
- # Returns the basic route information for each named route
102
+ # Returns the basic route information for each named route.
103
103
  #
104
104
  # @return [Array]
105
- # Array of routes
105
+ # Array of routes.
106
106
  #
107
107
  def named_routes
108
108
  app_obj.routes.map { |route|
@@ -116,7 +116,7 @@ module Padrino
116
116
  end
117
117
 
118
118
  ##
119
- # Makes two Mounters equal if they have the same name and uri_root
119
+ # Makes two Mounters equal if they have the same name and uri_root.
120
120
  #
121
121
  # @param [Padrino::Mounter] other
122
122
  #
@@ -126,7 +126,7 @@ module Padrino
126
126
 
127
127
  ##
128
128
  # @return [Padrino::Application]
129
- # the class object for the app if defined, nil otherwise
129
+ # the class object for the app if defined, nil otherwise.
130
130
  #
131
131
  def app_constant
132
132
  klass = Object
@@ -142,51 +142,51 @@ module Padrino
142
142
  end
143
143
 
144
144
  protected
145
- ##
146
- # Locates and requires the file to load the app constant
147
- #
148
- def locate_app_object
149
- @_app_object ||= begin
150
- ensure_app_file!
151
- Padrino.require_dependencies(app_file)
152
- app_constant
153
- end
145
+ ##
146
+ # Locates and requires the file to load the app constant.
147
+ #
148
+ def locate_app_object
149
+ @_app_object ||= begin
150
+ ensure_app_file!
151
+ Padrino.require_dependencies(app_file)
152
+ app_constant
154
153
  end
154
+ end
155
155
 
156
- ##
157
- # Returns the determined location of the mounted application main file
158
- #
159
- def locate_app_file
160
- candidates = []
161
- candidates << app_constant.app_file if app_constant.respond_to?(:app_file) && File.exist?(app_constant.app_file.to_s)
162
- candidates << Padrino.first_caller if File.identical?(Padrino.first_caller.to_s, Padrino.called_from.to_s)
163
- candidates << Padrino.mounted_root(name.downcase, "app.rb")
164
- simple_name = name.split("::").last.downcase
165
- mod_name = name.split("::")[0..-2].join("::")
166
- Padrino.modules.each do |mod|
167
- if mod.name == mod_name
168
- candidates << mod.root(simple_name, "app.rb")
169
- end
156
+ ##
157
+ # Returns the determined location of the mounted application main file.
158
+ #
159
+ def locate_app_file
160
+ candidates = []
161
+ candidates << app_constant.app_file if app_constant.respond_to?(:app_file) && File.exist?(app_constant.app_file.to_s)
162
+ candidates << Padrino.first_caller if File.identical?(Padrino.first_caller.to_s, Padrino.called_from.to_s)
163
+ candidates << Padrino.mounted_root(name.downcase, "app.rb")
164
+ simple_name = name.split("::").last.downcase
165
+ mod_name = name.split("::")[0..-2].join("::")
166
+ Padrino.modules.each do |mod|
167
+ if mod.name == mod_name
168
+ candidates << mod.root(simple_name, "app.rb")
170
169
  end
171
- candidates << Padrino.root("app", "app.rb")
172
- candidates.find { |candidate| File.exist?(candidate) }
173
170
  end
171
+ candidates << Padrino.root("app", "app.rb")
172
+ candidates.find { |candidate| File.exist?(candidate) }
173
+ end
174
174
 
175
- ###
176
- # Raises an exception unless app_file is located properly
177
- #
178
- def ensure_app_file!
179
- message = "Unable to locate source file for app '#{app_class}', try with :app_file => '/path/app.rb'"
180
- raise MounterException, message unless @app_file
181
- end
175
+ ###
176
+ # Raises an exception unless app_file is located properly.
177
+ #
178
+ def ensure_app_file!
179
+ message = "Unable to locate source file for app '#{app_class}', try with :app_file => '/path/app.rb'"
180
+ raise MounterException, message unless @app_file
181
+ end
182
182
 
183
- ###
184
- # Raises an exception unless app_obj is defined properly
185
- #
186
- def ensure_app_object!
187
- message = "Unable to locate app for '#{app_class}', try with :app_class => 'MyAppClass'"
188
- raise MounterException, message unless @app_obj
189
- end
183
+ ###
184
+ # Raises an exception unless app_obj is defined properly.
185
+ #
186
+ def ensure_app_object!
187
+ message = "Unable to locate app for '#{app_class}', try with :app_class => 'MyAppClass'"
188
+ raise MounterException, message unless @app_obj
189
+ end
190
190
  end
191
191
 
192
192
  class << self
@@ -196,7 +196,7 @@ module Padrino
196
196
  # @param [Array] args
197
197
  #
198
198
  # @return [String]
199
- # the root to the mounted apps base directory
199
+ # the root to the mounted apps base directory.
200
200
  #
201
201
  def mounted_root(*args)
202
202
  Padrino.root(@mounted_root ||= "", *args)
@@ -211,7 +211,7 @@ module Padrino
211
211
  end
212
212
 
213
213
  ##
214
- # Inserts a Mounter object into the mounted applications (avoids duplicates)
214
+ # Inserts a Mounter object into the mounted applications (avoids duplicates).
215
215
  #
216
216
  # @param [Padrino::Mounter] mounter
217
217
  #
@@ -220,7 +220,7 @@ module Padrino
220
220
  end
221
221
 
222
222
  ##
223
- # Mounts a new sub-application onto Padrino project
223
+ # Mounts a new sub-application onto Padrino project.
224
224
  #
225
225
  # @see Padrino::Mounter#new
226
226
  #
@@ -230,5 +230,5 @@ module Padrino
230
230
  def mount(name, options={})
231
231
  Mounter.new(name, options)
232
232
  end
233
- end # Mounter
234
- end # Padrino
233
+ end
234
+ end