middleman-more 3.0.0.beta.3 → 3.0.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. data/features/asset_hash.feature +28 -25
  2. data/features/asset_host.feature +7 -0
  3. data/features/automatic_image_sizes.feature +16 -0
  4. data/features/clean_build.feature +14 -0
  5. data/features/coffee-script.feature +1 -1
  6. data/features/content_for.feature +5 -0
  7. data/features/directory_index.feature +66 -0
  8. data/features/extensionless_text_files.feature +28 -0
  9. data/features/former_padrino_helpers.feature +12 -0
  10. data/features/frontmatter_page_settings.feature +42 -0
  11. data/features/helpers_auto_javascript_include_tag.feature +27 -0
  12. data/features/helpers_auto_stylesheet_link_tag.feature +27 -0
  13. data/features/helpers_lorem.feature +6 -0
  14. data/features/helpers_page_classes.feature +17 -0
  15. data/features/helpers_relative_link_to.feature +68 -0
  16. data/features/i18n_builder.feature +121 -0
  17. data/features/i18n_preview.feature +113 -0
  18. data/features/ignore.feature +62 -0
  19. data/features/instance_vars.feature +18 -0
  20. data/features/markdown.feature +1 -7
  21. data/features/markdown_redcarpet.feature +10 -4
  22. data/features/minify_css.feature +2 -2
  23. data/features/nested_layouts.feature +55 -0
  24. data/features/partials.feature +46 -0
  25. data/features/sass_partials.feature +0 -33
  26. data/features/sitemap_traversal.feature +73 -0
  27. data/features/support/env.rb +3 -0
  28. data/features/twitter-bootstrap-compile.feature +6 -0
  29. data/features/wildcard_page_helper.feature +10 -0
  30. data/fixtures/asset-hash-app/source/apple-touch-icon.png +0 -0
  31. data/fixtures/asset-hash-app/source/favicon.ico +0 -0
  32. data/fixtures/asset-hash-app/source/index.html.erb +3 -0
  33. data/fixtures/asset-host-app/source/asset_host.html.erb +1 -0
  34. data/fixtures/auto-css-app/config.rb +11 -0
  35. data/fixtures/auto-css-app/source/auto-css.html.erb +1 -0
  36. data/fixtures/auto-css-app/source/auto-css/auto-css.html.erb +1 -0
  37. data/fixtures/auto-css-app/source/auto-css/index.html.erb +1 -0
  38. data/fixtures/auto-css-app/source/auto-css/sub/auto-css.html.erb +1 -0
  39. data/fixtures/auto-css-app/source/stylesheets/auto-css.css +3 -0
  40. data/fixtures/auto-css-app/source/stylesheets/auto-css/auto-css.css +3 -0
  41. data/fixtures/{sprockets-app2/config.rb → auto-css-app/source/stylesheets/auto-css/index.css} +0 -0
  42. data/fixtures/auto-css-app/source/stylesheets/auto-css/sub/auto-css.css +3 -0
  43. data/fixtures/auto-js-app/config.rb +11 -0
  44. data/fixtures/auto-js-app/source/auto-js.html.erb +1 -0
  45. data/fixtures/auto-js-app/source/auto-js/auto-js.html.erb +1 -0
  46. data/fixtures/auto-js-app/source/auto-js/index.html.erb +1 -0
  47. data/fixtures/auto-js-app/source/auto-js/sub/auto-js.html.erb +1 -0
  48. data/fixtures/auto-js-app/source/javascripts/auto-js.js +1 -0
  49. data/fixtures/auto-js-app/source/javascripts/auto-js/auto-js.js +1 -0
  50. data/fixtures/auto-js-app/source/javascripts/auto-js/index.js +1 -0
  51. data/fixtures/auto-js-app/source/javascripts/auto-js/sub/auto-js.js +1 -0
  52. data/fixtures/automatic-image-size-app/config.rb +0 -0
  53. data/fixtures/automatic-image-size-app/source/auto-image-sizes.html.erb +1 -0
  54. data/fixtures/automatic-image-size-app/source/images/blank.gif +0 -0
  55. data/fixtures/clean-dir-app/config.rb +2 -0
  56. data/fixtures/clean-dir-app/source/about.html +1 -0
  57. data/fixtures/content-for-app/config.rb +1 -0
  58. data/fixtures/content-for-app/source/content_for_erb.html.erb +5 -0
  59. data/fixtures/different-engine-partial/config.rb +0 -0
  60. data/fixtures/different-engine-partial/source/index.html.erb +1 -0
  61. data/fixtures/different-engine-partial/source/layouts/layout.erb +7 -0
  62. data/fixtures/different-engine-partial/source/shared/_footer.str +1 -0
  63. data/fixtures/different-engine-partial/source/shared/_header.erb +1 -0
  64. data/fixtures/extensionless-text-files-app/config.rb +1 -0
  65. data/fixtures/extensionless-text-files-app/source/CNAME +1 -0
  66. data/fixtures/extensionless-text-files-app/source/LICENSE +1 -0
  67. data/fixtures/extensionless-text-files-app/source/README +1 -0
  68. data/fixtures/extensionless-text-files-app/source/index.html +1 -0
  69. data/fixtures/frontmatter-settings-app/config.rb +4 -0
  70. data/fixtures/frontmatter-settings-app/source/alternate_layout.html.erb +5 -0
  71. data/fixtures/frontmatter-settings-app/source/ignored.html.erb +5 -0
  72. data/fixtures/frontmatter-settings-app/source/layouts/alternate.erb +3 -0
  73. data/fixtures/frontmatter-settings-app/source/no_index.html.erb +5 -0
  74. data/fixtures/i18n-alt-root-app/locales/en.yml +4 -0
  75. data/fixtures/i18n-alt-root-app/locales/es.yml +7 -0
  76. data/fixtures/i18n-alt-root-app/source/lang_data/hello.html.erb +1 -0
  77. data/fixtures/i18n-alt-root-app/source/lang_data/index.html.erb +1 -0
  78. data/fixtures/i18n-alt-root-app/source/layout.erb +1 -0
  79. data/fixtures/i18n-test-app/locales/en.yml +4 -0
  80. data/fixtures/i18n-test-app/locales/es.yml +7 -0
  81. data/fixtures/i18n-test-app/source/layout.erb +1 -0
  82. data/fixtures/i18n-test-app/source/localizable/hello.html.erb +1 -0
  83. data/fixtures/i18n-test-app/source/localizable/index.html.erb +1 -0
  84. data/fixtures/ignore-app/source/about.html.erb +1 -0
  85. data/fixtures/ignore-app/source/images/icon/messages.png +0 -0
  86. data/fixtures/ignore-app/source/images/pic.png +0 -0
  87. data/fixtures/ignore-app/source/images/portrait.jpg +0 -0
  88. data/fixtures/ignore-app/source/index.html.erb +0 -0
  89. data/fixtures/ignore-app/source/plain.html +1 -0
  90. data/fixtures/ignore-app/source/reports/another.html +0 -0
  91. data/fixtures/ignore-app/source/reports/index.html +0 -0
  92. data/fixtures/indexable-app/config.rb +4 -0
  93. data/fixtures/indexable-app/source/.htaccess +1 -0
  94. data/fixtures/indexable-app/source/a_folder/needs_index.html +1 -0
  95. data/fixtures/indexable-app/source/leave_me_alone.html +1 -0
  96. data/fixtures/indexable-app/source/needs_index.html +1 -0
  97. data/fixtures/indexable-app/source/regular/index.html +1 -0
  98. data/fixtures/indexable-app/source/wildcard_leave_me_alone.html +1 -0
  99. data/fixtures/instance-vars-app/config.rb +0 -0
  100. data/fixtures/instance-vars-app/source/_vartial.erb +5 -0
  101. data/fixtures/instance-vars-app/source/instance-var-set.html.erb +2 -0
  102. data/fixtures/instance-vars-app/source/layout.erb +3 -0
  103. data/fixtures/instance-vars-app/source/no-instance-var.html.erb +1 -0
  104. data/fixtures/lorem-app/config.rb +1 -0
  105. data/fixtures/lorem-app/source/lorem.html.erb +13 -0
  106. data/fixtures/markdown-app/source/hard_wrap.html.markdown +2 -0
  107. data/fixtures/markdown-app/source/with_toc_data.html.markdown +3 -0
  108. data/fixtures/nested-layout-app/config.rb +1 -0
  109. data/fixtures/nested-layout-app/source/another.html.markdown +7 -0
  110. data/fixtures/nested-layout-app/source/data-one.html.erb +5 -0
  111. data/fixtures/nested-layout-app/source/data-two.html.erb +5 -0
  112. data/fixtures/nested-layout-app/source/haml-test.html.markdown +7 -0
  113. data/fixtures/nested-layout-app/source/index.html.erb +6 -0
  114. data/fixtures/nested-layout-app/source/layouts/inner.erb +4 -0
  115. data/fixtures/nested-layout-app/source/layouts/inner_haml.haml +3 -0
  116. data/fixtures/nested-layout-app/source/layouts/inner_slim.slim +3 -0
  117. data/fixtures/nested-layout-app/source/layouts/master.erb +3 -0
  118. data/fixtures/nested-layout-app/source/layouts/master_haml.haml +3 -0
  119. data/fixtures/nested-layout-app/source/layouts/master_slim.slim +3 -0
  120. data/fixtures/nested-layout-app/source/layouts/outer.erb +4 -0
  121. data/fixtures/nested-layout-app/source/layouts/outer_haml.haml +3 -0
  122. data/fixtures/nested-layout-app/source/layouts/outer_slim.slim +3 -0
  123. data/fixtures/nested-layout-app/source/slim-test.html.markdown +7 -0
  124. data/fixtures/padrino-helpers-app/config.rb +0 -0
  125. data/fixtures/padrino-helpers-app/source/former_padrino_test.html.erb +5 -0
  126. data/fixtures/page-classes-app/config.rb +4 -0
  127. data/fixtures/page-classes-app/source/page-classes.html.erb +1 -0
  128. data/fixtures/page-classes-app/source/sub1/page-classes.html.erb +1 -0
  129. data/fixtures/page-classes-app/source/sub1/sub2/page-classes.html.erb +1 -0
  130. data/fixtures/partials-app/config.rb +0 -0
  131. data/fixtures/partials-app/source/_locals.erb +1 -0
  132. data/fixtures/partials-app/source/_main.erb +1 -0
  133. data/fixtures/partials-app/source/_main.str +1 -0
  134. data/fixtures/partials-app/source/index.html.erb +3 -0
  135. data/fixtures/partials-app/source/locals.html.erb +1 -0
  136. data/fixtures/partials-app/source/second.html.str +3 -0
  137. data/fixtures/partials-app/source/shared/_footer.erb +1 -0
  138. data/fixtures/partials-app/source/shared/_header.erb +1 -0
  139. data/fixtures/partials-app/source/shared/snippet.erb +1 -0
  140. data/fixtures/partials-app/source/sub/_local.erb +1 -0
  141. data/fixtures/partials-app/source/sub/index.html.erb +3 -0
  142. data/fixtures/partials-app/source/using_snippet.html.erb +1 -0
  143. data/fixtures/traversal-app/config.rb +7 -0
  144. data/fixtures/traversal-app/source/directory-indexed.html.erb +0 -0
  145. data/fixtures/traversal-app/source/directory-indexed/sibling.html.erb +3 -0
  146. data/fixtures/traversal-app/source/directory-indexed/sibling2.html.erb +3 -0
  147. data/fixtures/traversal-app/source/directory-indexed/sub2/index.html.erb +0 -0
  148. data/fixtures/traversal-app/source/directory-indexed/sub3/deep.html.erb +0 -0
  149. data/fixtures/traversal-app/source/index.html.erb +0 -0
  150. data/fixtures/traversal-app/source/layout.erb +21 -0
  151. data/fixtures/traversal-app/source/proxied.html.erb +0 -0
  152. data/fixtures/traversal-app/source/root.html.erb +0 -0
  153. data/fixtures/traversal-app/source/sub/index.html.erb +0 -0
  154. data/fixtures/traversal-app/source/sub/sibling.html.erb +0 -0
  155. data/fixtures/traversal-app/source/sub/sibling2.html.erb +0 -0
  156. data/fixtures/traversal-app/source/sub/sub2/index.html.erb +0 -0
  157. data/fixtures/traversal-app/source/sub/sub3/deep.html.erb +0 -0
  158. data/fixtures/twitter-bootstrap-app/config.rb +0 -0
  159. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/.gitignore +36 -0
  160. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/.travis.yml +3 -0
  161. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/LICENSE +176 -0
  162. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/README.md +137 -0
  163. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/img/glyphicons-halflings-white.png +0 -0
  164. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/img/glyphicons-halflings.png +0 -0
  165. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/.jshintrc +10 -0
  166. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/README.md +112 -0
  167. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-alert.js +90 -0
  168. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-button.js +96 -0
  169. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-carousel.js +169 -0
  170. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-collapse.js +157 -0
  171. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-dropdown.js +100 -0
  172. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-modal.js +218 -0
  173. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-popover.js +98 -0
  174. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-scrollspy.js +151 -0
  175. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-tab.js +135 -0
  176. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-tooltip.js +275 -0
  177. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-transition.js +61 -0
  178. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/bootstrap-typeahead.js +285 -0
  179. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/index.html +54 -0
  180. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/phantom.js +63 -0
  181. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/server.js +14 -0
  182. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-alert.js +56 -0
  183. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-button.js +77 -0
  184. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-carousel.js +28 -0
  185. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-collapse.js +54 -0
  186. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-dropdown.js +87 -0
  187. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-modal.js +114 -0
  188. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-phantom.js +21 -0
  189. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-popover.js +93 -0
  190. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-scrollspy.js +31 -0
  191. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-tab.js +61 -0
  192. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-tooltip.js +155 -0
  193. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-transition.js +13 -0
  194. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/unit/bootstrap-typeahead.js +148 -0
  195. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/vendor/jquery.js +9252 -0
  196. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/vendor/qunit.css +232 -0
  197. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/js/tests/vendor/qunit.js +1510 -0
  198. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_accordion.less +33 -0
  199. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_alerts.less +58 -0
  200. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_breadcrumbs.less +24 -0
  201. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_button-groups.less +191 -0
  202. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_buttons.less +191 -0
  203. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_carousel.less +121 -0
  204. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_close.less +29 -0
  205. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_code.less +57 -0
  206. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_component-animations.less +20 -0
  207. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_dropdowns.less +143 -0
  208. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_forms.less +583 -0
  209. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_grid.less +5 -0
  210. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_hero-unit.less +22 -0
  211. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_labels-badges.less +55 -0
  212. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_layouts.less +17 -0
  213. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_mixins.less +646 -0
  214. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_modals.less +90 -0
  215. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_navbar.less +358 -0
  216. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_navs.less +363 -0
  217. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_pager.less +36 -0
  218. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_pagination.less +56 -0
  219. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_popovers.less +49 -0
  220. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_progress-bars.less +117 -0
  221. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_reset.less +131 -0
  222. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_responsive-1200px-min.less +26 -0
  223. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_responsive-767px-max.less +149 -0
  224. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_responsive-768px-979px.less +17 -0
  225. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_responsive-navbar.less +153 -0
  226. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_responsive-utilities.less +41 -0
  227. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_scaffolding.less +29 -0
  228. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_sprites.less +191 -0
  229. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_tables.less +176 -0
  230. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_thumbnails.less +47 -0
  231. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_tooltip.less +35 -0
  232. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_type.less +232 -0
  233. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_utilities.less +23 -0
  234. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_variables.less +206 -0
  235. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/_wells.less +27 -0
  236. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/bootstrap.less +62 -0
  237. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/responsive.less +48 -0
  238. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/tests/css-tests.css +52 -0
  239. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/tests/css-tests.html +917 -0
  240. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/tests/forms.html +179 -0
  241. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/less/tests/navbar.html +108 -0
  242. data/fixtures/twitter-bootstrap-app/source/twitter-bootstrap-ebc6935/package.json +25 -0
  243. data/fixtures/wildcard-directory-index-app/config.rb +2 -0
  244. data/fixtures/wildcard-directory-index-app/source/admin/index.html.erb +1 -0
  245. data/fixtures/wildcard-directory-index-app/source/admin/page.html.erb +1 -0
  246. data/fixtures/wildcard-directory-index-app/source/index.html.erb +1 -0
  247. data/fixtures/wildcard-directory-index-app/source/layouts/admin.erb +2 -0
  248. data/fixtures/wildcard-directory-index-app/source/layouts/layout.erb +2 -0
  249. data/lib/middleman-more.rb +117 -2
  250. data/lib/middleman-more/core_extensions/assets.rb +43 -0
  251. data/lib/middleman-more/core_extensions/compass.rb +26 -0
  252. data/lib/middleman-more/core_extensions/default_helpers.rb +171 -0
  253. data/lib/middleman-more/core_extensions/i18n.rb +123 -0
  254. data/lib/middleman-more/extensions/asset_hash.rb +75 -81
  255. data/lib/middleman-more/extensions/asset_host.rb +46 -0
  256. data/lib/middleman-more/extensions/automatic_image_sizes.rb +56 -0
  257. data/lib/middleman-more/extensions/automatic_image_sizes/fastimage.rb +287 -0
  258. data/lib/middleman-more/extensions/directory_indexes.rb +56 -0
  259. data/lib/middleman-more/extensions/lorem.rb +197 -0
  260. data/lib/middleman_extension.rb +1 -0
  261. data/middleman-more.gemspec +4 -4
  262. metadata +674 -158
  263. data/features/sprockets.feature +0 -52
  264. data/features/sprockets_gems.feature +0 -15
  265. data/fixtures/sprockets-app/config.rb +0 -2
  266. data/fixtures/sprockets-app/source/library/css/bootstrap_include.css.scss +0 -1
  267. data/fixtures/sprockets-app/source/library/css/plain.css +0 -3
  268. data/fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss +0 -1
  269. data/fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss +0 -1
  270. data/fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss +0 -1
  271. data/fixtures/sprockets-app/source/library/js/jquery_include.js +0 -1
  272. data/fixtures/sprockets-app/source/library/js/plain.js +0 -3
  273. data/fixtures/sprockets-app/source/library/js/sprockets_base.js +0 -5
  274. data/fixtures/sprockets-app/source/library/js/sprockets_sub.js +0 -3
  275. data/fixtures/sprockets-app/source/library/js/vendored_include.js +0 -1
  276. data/fixtures/sprockets-app/vendor/assets/javascripts/vendored_js.js +0 -1
  277. data/fixtures/sprockets-app2/data/test.yml +0 -4
  278. data/fixtures/sprockets-app2/data/test2.json +0 -4
  279. data/fixtures/sprockets-app2/source/javascripts/multiple_engines.js.coffee.erb +0 -1
  280. data/fixtures/sprockets-app2/source/javascripts/sprockets_base.js +0 -5
  281. data/fixtures/sprockets-app2/source/javascripts/sprockets_sub.js +0 -3
  282. data/fixtures/sprockets-app2/source/stylesheets/sprockets_base1.css.scss +0 -1
  283. data/fixtures/sprockets-app2/source/stylesheets/sprockets_base2.css.scss +0 -1
  284. data/fixtures/sprockets-app2/source/stylesheets/sprockets_sub.css.scss +0 -1
  285. data/lib/middleman-more/core_extensions/sprockets.rb +0 -101
  286. data/lib/middleman-more/register_extensions.rb +0 -82
  287. data/lib/middleman-more/renderers/coffee_script.rb +0 -22
  288. data/lib/middleman-more/renderers/haml.rb +0 -30
  289. data/lib/middleman-more/renderers/liquid.rb +0 -40
  290. data/lib/middleman-more/renderers/markdown.rb +0 -58
  291. data/lib/middleman-more/renderers/sass.rb +0 -88
  292. data/lib/middleman-more/renderers/slim.rb +0 -35
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Simple connect server for phantom.js
3
+ * Adapted from Modernizr
4
+ */
5
+
6
+ var connect = require('connect')
7
+ , http = require('http')
8
+ , fs = require('fs')
9
+ , app = connect()
10
+ .use(connect.static(__dirname + '/../../'));
11
+
12
+ http.createServer(app).listen(3000);
13
+
14
+ fs.writeFileSync(__dirname + '/pid.txt', process.pid, 'utf-8')
@@ -0,0 +1,56 @@
1
+ $(function () {
2
+
3
+ module("bootstrap-alerts")
4
+
5
+ test("should be defined on jquery object", function () {
6
+ ok($(document.body).alert, 'alert method is defined')
7
+ })
8
+
9
+ test("should return element", function () {
10
+ ok($(document.body).alert()[0] == document.body, 'document.body returned')
11
+ })
12
+
13
+ test("should fade element out on clicking .close", function () {
14
+ var alertHTML = '<div class="alert-message warning fade in">'
15
+ + '<a class="close" href="#" data-dismiss="alert">×</a>'
16
+ + '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>'
17
+ + '</div>'
18
+ , alert = $(alertHTML).alert()
19
+
20
+ alert.find('.close').click()
21
+
22
+ ok(!alert.hasClass('in'), 'remove .in class on .close click')
23
+ })
24
+
25
+ test("should remove element when clicking .close", function () {
26
+ $.support.transition = false
27
+
28
+ var alertHTML = '<div class="alert-message warning fade in">'
29
+ + '<a class="close" href="#" data-dismiss="alert">×</a>'
30
+ + '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>'
31
+ + '</div>'
32
+ , alert = $(alertHTML).appendTo('#qunit-fixture').alert()
33
+
34
+ ok($('#qunit-fixture').find('.alert-message').length, 'element added to dom')
35
+
36
+ alert.find('.close').click()
37
+
38
+ ok(!$('#qunit-fixture').find('.alert-message').length, 'element removed from dom')
39
+ })
40
+
41
+ test("should not fire closed when close is prevented", function () {
42
+ $.support.transition = false
43
+ stop();
44
+ $('<div class="alert"/>')
45
+ .bind('close', function (e) {
46
+ e.preventDefault();
47
+ ok(true);
48
+ start();
49
+ })
50
+ .bind('closed', function () {
51
+ ok(false);
52
+ })
53
+ .alert('close')
54
+ })
55
+
56
+ })
@@ -0,0 +1,77 @@
1
+ $(function () {
2
+
3
+ module("bootstrap-buttons")
4
+
5
+ test("should be defined on jquery object", function () {
6
+ ok($(document.body).button, 'button method is defined')
7
+ })
8
+
9
+ test("should return element", function () {
10
+ ok($(document.body).button()[0] == document.body, 'document.body returned')
11
+ })
12
+
13
+ test("should return set state to loading", function () {
14
+ var btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
15
+ equals(btn.html(), 'mdo', 'btn text equals mdo')
16
+ btn.button('loading')
17
+ equals(btn.html(), 'fat', 'btn text equals fat')
18
+ stop()
19
+ setTimeout(function () {
20
+ ok(btn.attr('disabled'), 'btn is disabled')
21
+ ok(btn.hasClass('disabled'), 'btn has disabled class')
22
+ start()
23
+ }, 0)
24
+ })
25
+
26
+ test("should return reset state", function () {
27
+ var btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
28
+ equals(btn.html(), 'mdo', 'btn text equals mdo')
29
+ btn.button('loading')
30
+ equals(btn.html(), 'fat', 'btn text equals fat')
31
+ stop()
32
+ setTimeout(function () {
33
+ ok(btn.attr('disabled'), 'btn is disabled')
34
+ ok(btn.hasClass('disabled'), 'btn has disabled class')
35
+ start()
36
+ stop()
37
+ }, 0)
38
+ btn.button('reset')
39
+ equals(btn.html(), 'mdo', 'btn text equals mdo')
40
+ setTimeout(function () {
41
+ ok(!btn.attr('disabled'), 'btn is not disabled')
42
+ ok(!btn.hasClass('disabled'), 'btn does not have disabled class')
43
+ start()
44
+ }, 0)
45
+ })
46
+
47
+ test("should toggle active", function () {
48
+ var btn = $('<button class="btn">mdo</button>')
49
+ ok(!btn.hasClass('active'), 'btn does not have active class')
50
+ btn.button('toggle')
51
+ ok(btn.hasClass('active'), 'btn has class active')
52
+ })
53
+
54
+ test("should toggle active when btn children are clicked", function () {
55
+ var btn = $('<button class="btn" data-toggle="button">mdo</button>')
56
+ , inner = $('<i></i>')
57
+ btn
58
+ .append(inner)
59
+ .appendTo($('#qunit-fixture'))
60
+ ok(!btn.hasClass('active'), 'btn does not have active class')
61
+ inner.click()
62
+ ok(btn.hasClass('active'), 'btn has class active')
63
+ })
64
+
65
+ test("should toggle active when btn children are clicked within btn-group", function () {
66
+ var btngroup = $('<div class="btn-group" data-toggle="buttons-checkbox"></div>')
67
+ , btn = $('<button class="btn">fat</button>')
68
+ , inner = $('<i></i>')
69
+ btngroup
70
+ .append(btn.append(inner))
71
+ .appendTo($('#qunit-fixture'))
72
+ ok(!btn.hasClass('active'), 'btn does not have active class')
73
+ inner.click()
74
+ ok(btn.hasClass('active'), 'btn has class active')
75
+ })
76
+
77
+ })
@@ -0,0 +1,28 @@
1
+ $(function () {
2
+
3
+ module("bootstrap-carousel")
4
+
5
+ test("should be defined on jquery object", function () {
6
+ ok($(document.body).carousel, 'carousel method is defined')
7
+ })
8
+
9
+ test("should return element", function () {
10
+ ok($(document.body).carousel()[0] == document.body, 'document.body returned')
11
+ })
12
+
13
+ test("should not fire sliden when slide is prevented", function () {
14
+ $.support.transition = false
15
+ stop();
16
+ $('<div class="carousel"/>')
17
+ .bind('slide', function (e) {
18
+ e.preventDefault();
19
+ ok(true);
20
+ start();
21
+ })
22
+ .bind('slid', function () {
23
+ ok(false);
24
+ })
25
+ .carousel('next')
26
+ })
27
+
28
+ })
@@ -0,0 +1,54 @@
1
+ $(function () {
2
+
3
+ module("bootstrap-collapse")
4
+
5
+ test("should be defined on jquery object", function () {
6
+ ok($(document.body).collapse, 'collapse method is defined')
7
+ })
8
+
9
+ test("should return element", function () {
10
+ ok($(document.body).collapse()[0] == document.body, 'document.body returned')
11
+ })
12
+
13
+ test("should show a collapsed element", function () {
14
+ var el = $('<div class="collapse"></div>').collapse('show')
15
+ ok(el.hasClass('in'), 'has class in')
16
+ ok(/height/.test(el.attr('style')), 'has height set')
17
+ })
18
+
19
+ test("should hide a collapsed element", function () {
20
+ var el = $('<div class="collapse"></div>').collapse('hide')
21
+ ok(!el.hasClass('in'), 'does not have class in')
22
+ ok(/height/.test(el.attr('style')), 'has height set')
23
+ })
24
+
25
+ test("should not fire shown when show is prevented", function () {
26
+ $.support.transition = false
27
+ stop();
28
+ $('<div class="collapse"/>')
29
+ .bind('show', function (e) {
30
+ e.preventDefault();
31
+ ok(true);
32
+ start();
33
+ })
34
+ .bind('shown', function () {
35
+ ok(false);
36
+ })
37
+ .collapse('show')
38
+ })
39
+
40
+ test("should reset style to auto after finishing opening collapse", function () {
41
+ $.support.transition = false
42
+ stop();
43
+ $('<div class="collapse" style="height: 0px"/>')
44
+ .bind('show', function () {
45
+ ok(this.style.height == '0px')
46
+ })
47
+ .bind('shown', function () {
48
+ ok(this.style.height == 'auto')
49
+ start()
50
+ })
51
+ .collapse('show')
52
+ })
53
+
54
+ })
@@ -0,0 +1,87 @@
1
+ $(function () {
2
+
3
+ module("bootstrap-dropdowns")
4
+
5
+ test("should be defined on jquery object", function () {
6
+ ok($(document.body).dropdown, 'dropdown method is defined')
7
+ })
8
+
9
+ test("should return element", function () {
10
+ ok($(document.body).dropdown()[0] == document.body, 'document.body returned')
11
+ })
12
+
13
+ test("should not open dropdown if target is disabled", function () {
14
+ var dropdownHTML = '<ul class="tabs">'
15
+ + '<li class="dropdown">'
16
+ + '<button disabled href="#" class="btn dropdown-toggle" data-toggle="dropdown">Dropdown</button>'
17
+ + '<ul class="dropdown-menu">'
18
+ + '<li><a href="#">Secondary link</a></li>'
19
+ + '<li><a href="#">Something else here</a></li>'
20
+ + '<li class="divider"></li>'
21
+ + '<li><a href="#">Another link</a></li>'
22
+ + '</ul>'
23
+ + '</li>'
24
+ + '</ul>'
25
+ , dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
26
+
27
+ ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
28
+ })
29
+
30
+ test("should not open dropdown if target is disabled", function () {
31
+ var dropdownHTML = '<ul class="tabs">'
32
+ + '<li class="dropdown">'
33
+ + '<button href="#" class="btn dropdown-toggle disabled" data-toggle="dropdown">Dropdown</button>'
34
+ + '<ul class="dropdown-menu">'
35
+ + '<li><a href="#">Secondary link</a></li>'
36
+ + '<li><a href="#">Something else here</a></li>'
37
+ + '<li class="divider"></li>'
38
+ + '<li><a href="#">Another link</a></li>'
39
+ + '</ul>'
40
+ + '</li>'
41
+ + '</ul>'
42
+ , dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
43
+
44
+ ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
45
+ })
46
+
47
+ test("should add class open to menu if clicked", function () {
48
+ var dropdownHTML = '<ul class="tabs">'
49
+ + '<li class="dropdown">'
50
+ + '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
51
+ + '<ul class="dropdown-menu">'
52
+ + '<li><a href="#">Secondary link</a></li>'
53
+ + '<li><a href="#">Something else here</a></li>'
54
+ + '<li class="divider"></li>'
55
+ + '<li><a href="#">Another link</a></li>'
56
+ + '</ul>'
57
+ + '</li>'
58
+ + '</ul>'
59
+ , dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
60
+
61
+ ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
62
+ })
63
+
64
+ test("should remove open class if body clicked", function () {
65
+ var dropdownHTML = '<ul class="tabs">'
66
+ + '<li class="dropdown">'
67
+ + '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
68
+ + '<ul class="dropdown-menu">'
69
+ + '<li><a href="#">Secondary link</a></li>'
70
+ + '<li><a href="#">Something else here</a></li>'
71
+ + '<li class="divider"></li>'
72
+ + '<li><a href="#">Another link</a></li>'
73
+ + '</ul>'
74
+ + '</li>'
75
+ + '</ul>'
76
+ , dropdown = $(dropdownHTML)
77
+ .appendTo('#qunit-fixture')
78
+ .find('[data-toggle="dropdown"]')
79
+ .dropdown()
80
+ .click()
81
+ ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
82
+ $('body').click()
83
+ ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class removed')
84
+ dropdown.remove()
85
+ })
86
+
87
+ })
@@ -0,0 +1,114 @@
1
+ $(function () {
2
+
3
+ module("bootstrap-modal")
4
+
5
+ test("should be defined on jquery object", function () {
6
+ var div = $("<div id='modal-test'></div>")
7
+ ok(div.modal, 'modal method is defined')
8
+ })
9
+
10
+ test("should return element", function () {
11
+ var div = $("<div id='modal-test'></div>")
12
+ ok(div.modal() == div, 'document.body returned')
13
+ $('#modal-test').remove()
14
+ })
15
+
16
+ test("should expose defaults var for settings", function () {
17
+ ok($.fn.modal.defaults, 'default object exposed')
18
+ })
19
+
20
+ test("should insert into dom when show method is called", function () {
21
+ stop()
22
+ $.support.transition = false
23
+ $("<div id='modal-test'></div>")
24
+ .bind("shown", function () {
25
+ ok($('#modal-test').length, 'modal insterted into dom')
26
+ $(this).remove()
27
+ start()
28
+ })
29
+ .modal("show")
30
+ })
31
+
32
+ test("should fire show event", function () {
33
+ stop()
34
+ $.support.transition = false
35
+ $("<div id='modal-test'></div>")
36
+ .bind("show", function () {
37
+ ok(true, "show was called")
38
+ })
39
+ .bind("shown", function () {
40
+ $(this).remove()
41
+ start()
42
+ })
43
+ .modal("show")
44
+ })
45
+
46
+ test("should not fire shown when default prevented", function () {
47
+ stop()
48
+ $.support.transition = false
49
+ $("<div id='modal-test'></div>")
50
+ .bind("show", function (e) {
51
+ e.preventDefault()
52
+ ok(true, "show was called")
53
+ start()
54
+ })
55
+ .bind("shown", function () {
56
+ ok(false, "shown was called")
57
+ })
58
+ .modal("show")
59
+ })
60
+
61
+ test("should hide modal when hide is called", function () {
62
+ stop()
63
+ $.support.transition = false
64
+
65
+ $("<div id='modal-test'></div>")
66
+ .bind("shown", function () {
67
+ ok($('#modal-test').is(":visible"), 'modal visible')
68
+ ok($('#modal-test').length, 'modal insterted into dom')
69
+ $(this).modal("hide")
70
+ })
71
+ .bind("hidden", function() {
72
+ ok(!$('#modal-test').is(":visible"), 'modal hidden')
73
+ $('#modal-test').remove()
74
+ start()
75
+ })
76
+ .modal("show")
77
+ })
78
+
79
+ test("should toggle when toggle is called", function () {
80
+ stop()
81
+ $.support.transition = false
82
+ var div = $("<div id='modal-test'></div>")
83
+ div
84
+ .bind("shown", function () {
85
+ ok($('#modal-test').is(":visible"), 'modal visible')
86
+ ok($('#modal-test').length, 'modal insterted into dom')
87
+ div.modal("toggle")
88
+ })
89
+ .bind("hidden", function() {
90
+ ok(!$('#modal-test').is(":visible"), 'modal hidden')
91
+ div.remove()
92
+ start()
93
+ })
94
+ .modal("toggle")
95
+ })
96
+
97
+ test("should remove from dom when click [data-dismiss=modal]", function () {
98
+ stop()
99
+ $.support.transition = false
100
+ var div = $("<div id='modal-test'><span class='close' data-dismiss='modal'></span></div>")
101
+ div
102
+ .bind("shown", function () {
103
+ ok($('#modal-test').is(":visible"), 'modal visible')
104
+ ok($('#modal-test').length, 'modal insterted into dom')
105
+ div.find('.close').click()
106
+ })
107
+ .bind("hidden", function() {
108
+ ok(!$('#modal-test').is(":visible"), 'modal hidden')
109
+ div.remove()
110
+ start()
111
+ })
112
+ .modal("toggle")
113
+ })
114
+ })
@@ -0,0 +1,21 @@
1
+ // Logging setup for phantom integration
2
+ // adapted from Modernizr
3
+
4
+ QUnit.begin = function () {
5
+ console.log("Starting test suite")
6
+ console.log("================================================\n")
7
+ }
8
+
9
+ QUnit.moduleDone = function (opts) {
10
+ if (opts.failed === 0) {
11
+ console.log("\u2714 All tests passed in '" + opts.name + "' module")
12
+ } else {
13
+ console.log("\u2716 " + opts.failed + " tests failed in '" + opts.name + "' module")
14
+ }
15
+ }
16
+
17
+ QUnit.done = function (opts) {
18
+ console.log("\n================================================")
19
+ console.log("Tests completed in " + opts.runtime + " milliseconds")
20
+ console.log(opts.passed + " tests of " + opts.total + " passed, " + opts.failed + " failed.")
21
+ }