middleman-core-x86-mingw32 3.0.1.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (401) hide show
  1. data/.cane +2 -0
  2. data/.cane-exclusions.yml +5 -0
  3. data/.gemtest +0 -0
  4. data/Rakefile +7 -0
  5. data/bin/middleman +25 -0
  6. data/features/3rd_party_cli.feature +15 -0
  7. data/features/auto_layout.feature +36 -0
  8. data/features/automatic_directory_matcher.feature +32 -0
  9. data/features/builder.feature +50 -0
  10. data/features/chained_templates.feature +19 -0
  11. data/features/clean_build.feature +28 -0
  12. data/features/cli_extension.feature +14 -0
  13. data/features/cli_init.feature +89 -0
  14. data/features/current_page_request_path_backwards.feature +6 -0
  15. data/features/custom_layout_engines.feature +8 -0
  16. data/features/custom_layouts.feature +64 -0
  17. data/features/data.feature +22 -0
  18. data/features/dynamic_pages.feature +133 -0
  19. data/features/extensionless_text_files.feature +24 -0
  20. data/features/feature_params.feature +6 -0
  21. data/features/front-matter.feature +72 -0
  22. data/features/frontmatter_page_settings.feature +43 -0
  23. data/features/helpers_external.feature +12 -0
  24. data/features/ignore.feature +121 -0
  25. data/features/implied_extensions.feature +69 -0
  26. data/features/instance_vars.feature +9 -0
  27. data/features/mount_rack.feature +8 -0
  28. data/features/preview_changes.feature +29 -0
  29. data/features/request_params.feature +6 -0
  30. data/features/sitemap_traversal.feature +73 -0
  31. data/features/static_server.feature +6 -0
  32. data/features/step_definitions/page_layout_steps.rb +15 -0
  33. data/features/strip_url.feature +40 -0
  34. data/features/support/env.rb +6 -0
  35. data/features/unicode_filenames.feature +36 -0
  36. data/features/wildcard_page_helper.feature +10 -0
  37. data/fixtures/automatic-directory-matcher-app/config.rb +1 -0
  38. data/fixtures/automatic-directory-matcher-app/source/root-plain.html +1 -0
  39. data/fixtures/automatic-directory-matcher-app/source/root.html.erb +1 -0
  40. data/fixtures/automatic-directory-matcher-app/source/sub--sub--sub-plain.html +1 -0
  41. data/fixtures/automatic-directory-matcher-app/source/sub--sub--sub.html.erb +1 -0
  42. data/fixtures/automatic-directory-matcher-app/source/sub--sub-plain.html +1 -0
  43. data/fixtures/automatic-directory-matcher-app/source/sub--sub.html.erb +1 -0
  44. data/fixtures/basic-data-app/config.rb +4 -0
  45. data/fixtures/basic-data-app/data/test.yml +4 -0
  46. data/fixtures/basic-data-app/data/test2.json +4 -0
  47. data/fixtures/basic-data-app/source/data.html.erb +1 -0
  48. data/fixtures/basic-data-app/source/data3.html.erb +1 -0
  49. data/fixtures/build-with-errors-app/config.rb +1 -0
  50. data/fixtures/build-with-errors-app/source/index.html.erb +1 -0
  51. data/fixtures/chained-app/config.rb +0 -0
  52. data/fixtures/chained-app/data/article.yml +2 -0
  53. data/fixtures/chained-app/source/index.html.str.erb +8 -0
  54. data/fixtures/clean-app/config-complications.rb +11 -0
  55. data/fixtures/clean-app/config-empty.rb +0 -0
  56. data/fixtures/clean-app/config.rb +11 -0
  57. data/fixtures/clean-app/source/index.html.erb +1 -0
  58. data/fixtures/clean-app/source/layout.erb +9 -0
  59. data/fixtures/clean-app/source/layouts/custom.erb +8 -0
  60. data/fixtures/clean-app/source/real/index.html.erb +5 -0
  61. data/fixtures/clean-app/source/real.html +1 -0
  62. data/fixtures/clean-app/source/should_be_ignored.html +1 -0
  63. data/fixtures/clean-app/source/should_be_ignored2.html +1 -0
  64. data/fixtures/clean-app/source/should_be_ignored3.html +1 -0
  65. data/fixtures/clean-app/source/static.html +1 -0
  66. data/fixtures/clean-nested-app/config.rb +3 -0
  67. data/fixtures/clean-nested-app/source/about.html +1 -0
  68. data/fixtures/csspie/config.rb +0 -0
  69. data/fixtures/csspie/source/stylesheets/PIE.htc +96 -0
  70. data/fixtures/current-page-app/config.rb +3 -0
  71. data/fixtures/current-page-app/source/request-path.html.erb +1 -0
  72. data/fixtures/custom-layout-app/config.rb +1 -0
  73. data/fixtures/custom-layout-app/source/index.html.erb +1 -0
  74. data/fixtures/custom-layout-app/source/layout.str +9 -0
  75. data/fixtures/custom-layout-app2/config.rb +0 -0
  76. data/fixtures/custom-layout-app2/source/custom-layout-dir/index.html.erb +1 -0
  77. data/fixtures/custom-layout-app2/source/custom-layout.html.erb +1 -0
  78. data/fixtures/custom-layout-app2/source/layouts/custom.erb +8 -0
  79. data/fixtures/data-app/config.rb +3 -0
  80. data/fixtures/data-app/data/pages.yml +6 -0
  81. data/fixtures/data-app/source/index.html.erb +1 -0
  82. data/fixtures/data-app/source/layout.erb +5 -0
  83. data/fixtures/different-engine-layout/config.rb +0 -0
  84. data/fixtures/different-engine-layout/source/index.html.str +1 -0
  85. data/fixtures/different-engine-layout/source/layout.erb +9 -0
  86. data/fixtures/dynamic-pages-app/config.rb +52 -0
  87. data/fixtures/dynamic-pages-app/source/real/index.html.erb +9 -0
  88. data/fixtures/dynamic-pages-app/source/real.html +1 -0
  89. data/fixtures/dynamic-pages-app/source/should_be_ignored.html +1 -0
  90. data/fixtures/dynamic-pages-app/source/should_be_ignored2.html +1 -0
  91. data/fixtures/dynamic-pages-app/source/should_be_ignored3.html +1 -0
  92. data/fixtures/dynamic-pages-app/source/should_be_ignored4.html +1 -0
  93. data/fixtures/dynamic-pages-app/source/should_be_ignored5.html +1 -0
  94. data/fixtures/dynamic-pages-app/source/should_be_ignored6.html +1 -0
  95. data/fixtures/dynamic-pages-app/source/should_be_ignored7.html +1 -0
  96. data/fixtures/dynamic-pages-app/source/should_be_ignored8.html +1 -0
  97. data/fixtures/empty-app/not-config.rb +0 -0
  98. data/fixtures/engine-matching-layout/config.rb +0 -0
  99. data/fixtures/engine-matching-layout/source/index.html.erb +1 -0
  100. data/fixtures/engine-matching-layout/source/layout.erb +9 -0
  101. data/fixtures/extensionless-text-files-app/config.rb +0 -0
  102. data/fixtures/extensionless-text-files-app/source/CNAME +1 -0
  103. data/fixtures/extensionless-text-files-app/source/LICENSE +1 -0
  104. data/fixtures/extensionless-text-files-app/source/README +1 -0
  105. data/fixtures/extensionless-text-files-app/source/index.html +1 -0
  106. data/fixtures/external-helpers/config.rb +4 -0
  107. data/fixtures/external-helpers/helpers/derp.rb +3 -0
  108. data/fixtures/external-helpers/helpers/four_helpers.rb +3 -0
  109. data/fixtures/external-helpers/helpers/one_helper.rb +3 -0
  110. data/fixtures/external-helpers/helpers/yet_another_thingy.rb +3 -0
  111. data/fixtures/external-helpers/lib/hello_helper.rb +5 -0
  112. data/fixtures/external-helpers/source/automatic.html.erb +1 -0
  113. data/fixtures/external-helpers/source/index.html.erb +1 -0
  114. data/fixtures/feature-params-app/config.rb +12 -0
  115. data/fixtures/feature-params-app/source/index.html.erb +3 -0
  116. data/fixtures/frontmatter-app/config.rb +0 -0
  117. data/fixtures/frontmatter-app/source/front-matter-2.php.erb +7 -0
  118. data/fixtures/frontmatter-app/source/front-matter-auto.erb +6 -0
  119. data/fixtures/frontmatter-app/source/front-matter-change.html.erb +5 -0
  120. data/fixtures/frontmatter-app/source/front-matter-encoding.html.erb +7 -0
  121. data/fixtures/frontmatter-app/source/front-matter-line-2.html.erb +7 -0
  122. data/fixtures/frontmatter-app/source/json-front-matter-2.php.erb +7 -0
  123. data/fixtures/frontmatter-app/source/json-front-matter-auto.erb +6 -0
  124. data/fixtures/frontmatter-app/source/json-front-matter-encoding.html.erb +7 -0
  125. data/fixtures/frontmatter-app/source/json-front-matter-line-2.html.erb +7 -0
  126. data/fixtures/frontmatter-app/source/json-front-matter.html.erb +6 -0
  127. data/fixtures/frontmatter-settings-app/config.rb +4 -0
  128. data/fixtures/frontmatter-settings-app/source/alternate_layout.html.erb +5 -0
  129. data/fixtures/frontmatter-settings-app/source/ignored.html.erb +5 -0
  130. data/fixtures/frontmatter-settings-app/source/layouts/alternate.erb +3 -0
  131. data/fixtures/frontmatter-settings-app/source/layouts/override.erb +2 -0
  132. data/fixtures/frontmatter-settings-app/source/override_layout.html.erb +4 -0
  133. data/fixtures/frontmatter-settings-app/source/page_mentioned.html.erb +4 -0
  134. data/fixtures/generator-test/config.rb +80 -0
  135. data/fixtures/generator-test/source/index.html.erb +10 -0
  136. data/fixtures/glob-app/config.rb +1 -0
  137. data/fixtures/glob-app/source/index.html.erb +4 -0
  138. data/fixtures/glob-app/source/stylesheets/site.css.str +3 -0
  139. data/fixtures/ignore-app/source/about.html.erb +1 -0
  140. data/fixtures/ignore-app/source/images/icon/messages.png +0 -0
  141. data/fixtures/ignore-app/source/images/pic.png +0 -0
  142. data/fixtures/ignore-app/source/images/portrait.jpg +0 -0
  143. data/fixtures/ignore-app/source/index.html.erb +0 -0
  144. data/fixtures/ignore-app/source/plain.html +1 -0
  145. data/fixtures/ignore-app/source/reports/another.html +0 -0
  146. data/fixtures/ignore-app/source/reports/index.html +0 -0
  147. data/fixtures/implied-extensions-app/config.rb +0 -0
  148. data/fixtures/implied-extensions-app/source/index.erb +1 -0
  149. data/fixtures/indexable-app/config.rb +0 -0
  150. data/fixtures/indexable-app/source/.htaccess +1 -0
  151. data/fixtures/indexable-app/source/a_folder/needs_index.html +1 -0
  152. data/fixtures/indexable-app/source/leave_me_alone.html +1 -0
  153. data/fixtures/indexable-app/source/needs_index.html +1 -0
  154. data/fixtures/indexable-app/source/regular/index.html +1 -0
  155. data/fixtures/indexable-app/source/wildcard_leave_me_alone.html +1 -0
  156. data/fixtures/instance-vars-app/config.rb +7 -0
  157. data/fixtures/instance-vars-app/source/content.html.erb +2 -0
  158. data/fixtures/instance-vars-app/source/layout.erb +1 -0
  159. data/fixtures/large-build-app/config.rb +3 -0
  160. data/fixtures/large-build-app/source/.htaccess +1 -0
  161. data/fixtures/large-build-app/source/_partial.erb +1 -0
  162. data/fixtures/large-build-app/source/feed.xml.builder +4 -0
  163. data/fixtures/large-build-app/source/images/Child folder/regular_file(example).txt +1 -0
  164. data/fixtures/large-build-app/source/images/Read me (example).txt +1 -0
  165. data/fixtures/large-build-app/source/images/blank.gif +0 -0
  166. data/fixtures/large-build-app/source/index.html.erb +1 -0
  167. data/fixtures/large-build-app/source/layout.erb +9 -0
  168. data/fixtures/large-build-app/source/layouts/content_for.erb +4 -0
  169. data/fixtures/large-build-app/source/layouts/custom.erb +8 -0
  170. data/fixtures/large-build-app/source/other_layout.erb +1 -0
  171. data/fixtures/large-build-app/source/services/index.html.erb +1 -0
  172. data/fixtures/large-build-app/source/spaces in file.html.erb +1 -0
  173. data/fixtures/large-build-app/source/static.html +1 -0
  174. data/fixtures/large-build-app/source/stylesheets/static.css +2 -0
  175. data/fixtures/manual-layout/config.rb +1 -0
  176. data/fixtures/manual-layout/source/index.html.erb +1 -0
  177. data/fixtures/manual-layout/source/layouts/custom.erb +9 -0
  178. data/fixtures/manual-layout-missing/config.rb +1 -0
  179. data/fixtures/manual-layout-missing/source/index.html.erb +1 -0
  180. data/fixtures/manual-layout-override/config.rb +3 -0
  181. data/fixtures/manual-layout-override/source/index.html.erb +1 -0
  182. data/fixtures/manual-layout-override/source/layouts/another.erb +9 -0
  183. data/fixtures/manual-layout-override/source/layouts/custom.erb +9 -0
  184. data/fixtures/multiple-layouts/config.rb +0 -0
  185. data/fixtures/multiple-layouts/source/index.html.erb +1 -0
  186. data/fixtures/multiple-layouts/source/layout.erb +9 -0
  187. data/fixtures/multiple-layouts/source/layout.str +9 -0
  188. data/fixtures/no-layout/config.rb +0 -0
  189. data/fixtures/no-layout/source/index.html.erb +1 -0
  190. data/fixtures/page-helper-layout-block-app/config.rb +6 -0
  191. data/fixtures/page-helper-layout-block-app/source/index.html.erb +1 -0
  192. data/fixtures/page-helper-layout-block-app/source/layouts/alt.erb +3 -0
  193. data/fixtures/page-helper-layout-block-app/source/layouts/layout.erb +3 -0
  194. data/fixtures/page-helper-layout-block-app/source/path/child.html.erb +1 -0
  195. data/fixtures/page-helper-layout-block-app/source/path/index.html.erb +1 -0
  196. data/fixtures/plain-app/index.html +1 -0
  197. data/fixtures/preview-app/config.rb +0 -0
  198. data/fixtures/preview-app/source/content.html.erb +1 -0
  199. data/fixtures/preview-app/source/layout.erb +1 -0
  200. data/fixtures/request-app/config.rb +0 -0
  201. data/fixtures/request-app/source/index.html.erb +3 -0
  202. data/fixtures/sinatra-app/config.rb +11 -0
  203. data/fixtures/sinatra-app/source/index.html.erb +5 -0
  204. data/fixtures/strip-url-app/config.rb +0 -0
  205. data/fixtures/strip-url-app/source/index.html.erb +1 -0
  206. data/fixtures/strip-url-app/source/other.html.erb +1 -0
  207. data/fixtures/strip-url-app/source/subdir/index.html.erb +1 -0
  208. data/fixtures/traversal-app/config.rb +5 -0
  209. data/fixtures/traversal-app/source/directory-indexed/sibling.html.erb +3 -0
  210. data/fixtures/traversal-app/source/directory-indexed/sibling2.html.erb +3 -0
  211. data/fixtures/traversal-app/source/directory-indexed/sub2/index.html.erb +0 -0
  212. data/fixtures/traversal-app/source/directory-indexed/sub3/deep.html.erb +0 -0
  213. data/fixtures/traversal-app/source/directory-indexed.html.erb +0 -0
  214. data/fixtures/traversal-app/source/index.html.erb +0 -0
  215. data/fixtures/traversal-app/source/layout.erb +21 -0
  216. data/fixtures/traversal-app/source/proxied.html.erb +0 -0
  217. data/fixtures/traversal-app/source/root.html.erb +0 -0
  218. data/fixtures/traversal-app/source/sub/index.html.erb +0 -0
  219. data/fixtures/traversal-app/source/sub/sibling.html.erb +0 -0
  220. data/fixtures/traversal-app/source/sub/sibling2.html.erb +0 -0
  221. data/fixtures/traversal-app/source/sub/sub2/index.html.erb +0 -0
  222. data/fixtures/traversal-app/source/sub/sub3/deep.html.erb +0 -0
  223. data/fixtures/wildcard-app/config.rb +1 -0
  224. data/fixtures/wildcard-app/source/admin/index.html.erb +1 -0
  225. data/fixtures/wildcard-app/source/admin/page.html.erb +1 -0
  226. data/fixtures/wildcard-app/source/index.html.erb +1 -0
  227. data/fixtures/wildcard-app/source/layouts/admin.erb +2 -0
  228. data/fixtures/wildcard-app/source/layouts/layout.erb +2 -0
  229. data/lib/middleman/rack.rb +4 -0
  230. data/lib/middleman-core/application.rb +245 -0
  231. data/lib/middleman-core/cli/build.rb +286 -0
  232. data/lib/middleman-core/cli/bundler.rb +40 -0
  233. data/lib/middleman-core/cli/extension.rb +49 -0
  234. data/lib/middleman-core/cli/init.rb +58 -0
  235. data/lib/middleman-core/cli/server.rb +73 -0
  236. data/lib/middleman-core/cli.rb +89 -0
  237. data/lib/middleman-core/core_extensions/builder.rb +17 -0
  238. data/lib/middleman-core/core_extensions/data.rb +180 -0
  239. data/lib/middleman-core/core_extensions/extensions.rb +161 -0
  240. data/lib/middleman-core/core_extensions/external_helpers.rb +39 -0
  241. data/lib/middleman-core/core_extensions/file_watcher.rb +167 -0
  242. data/lib/middleman-core/core_extensions/front_matter.rb +213 -0
  243. data/lib/middleman-core/core_extensions/rendering.rb +439 -0
  244. data/lib/middleman-core/core_extensions/request.rb +338 -0
  245. data/lib/middleman-core/core_extensions/routing.rb +94 -0
  246. data/lib/middleman-core/core_extensions/ruby_encoding.rb +24 -0
  247. data/lib/middleman-core/core_extensions/show_exceptions.rb +31 -0
  248. data/lib/middleman-core/core_extensions.rb +33 -0
  249. data/lib/middleman-core/extensions.rb +103 -0
  250. data/lib/middleman-core/load_paths.rb +56 -0
  251. data/lib/middleman-core/logger.rb +29 -0
  252. data/lib/middleman-core/preview_server.rb +186 -0
  253. data/lib/middleman-core/profiling.rb +58 -0
  254. data/lib/middleman-core/renderers/coffee_script.rb +45 -0
  255. data/lib/middleman-core/renderers/erb.rb +36 -0
  256. data/lib/middleman-core/renderers/haml.rb +30 -0
  257. data/lib/middleman-core/renderers/less.rb +49 -0
  258. data/lib/middleman-core/renderers/liquid.rb +35 -0
  259. data/lib/middleman-core/renderers/markdown.rb +56 -0
  260. data/lib/middleman-core/renderers/redcarpet.rb +58 -0
  261. data/lib/middleman-core/renderers/sass.rb +101 -0
  262. data/lib/middleman-core/renderers/slim.rb +38 -0
  263. data/lib/middleman-core/sitemap/extensions/ignores.rb +91 -0
  264. data/lib/middleman-core/sitemap/extensions/on_disk.rb +84 -0
  265. data/lib/middleman-core/sitemap/extensions/proxies.rb +114 -0
  266. data/lib/middleman-core/sitemap/extensions/traversal.rb +84 -0
  267. data/lib/middleman-core/sitemap/resource.rb +149 -0
  268. data/lib/middleman-core/sitemap/store.rb +219 -0
  269. data/lib/middleman-core/sitemap.rb +78 -0
  270. data/lib/middleman-core/step_definitions/builder_steps.rb +56 -0
  271. data/lib/middleman-core/step_definitions/middleman_steps.rb +17 -0
  272. data/lib/middleman-core/step_definitions/server_steps.rb +91 -0
  273. data/lib/middleman-core/step_definitions.rb +12 -0
  274. data/lib/middleman-core/templates/default/source/images/background.png +0 -0
  275. data/lib/middleman-core/templates/default/source/images/middleman.png +0 -0
  276. data/lib/middleman-core/templates/default/source/index.html.erb +10 -0
  277. data/lib/middleman-core/templates/default/source/javascripts/all.js +1 -0
  278. data/lib/middleman-core/templates/default/source/layouts/layout.erb +19 -0
  279. data/lib/middleman-core/templates/default/source/stylesheets/all.css +55 -0
  280. data/lib/middleman-core/templates/default/source/stylesheets/normalize.css +431 -0
  281. data/lib/middleman-core/templates/default.rb +38 -0
  282. data/lib/middleman-core/templates/extension/Gemfile +17 -0
  283. data/lib/middleman-core/templates/extension/Rakefile +14 -0
  284. data/lib/middleman-core/templates/extension/features/support/env.rb +4 -0
  285. data/lib/middleman-core/templates/extension/gemspec +24 -0
  286. data/lib/middleman-core/templates/extension/gitignore +2 -0
  287. data/lib/middleman-core/templates/extension/lib/lib.rb +49 -0
  288. data/lib/middleman-core/templates/extension/lib/middleman_extension.rb +1 -0
  289. data/lib/middleman-core/templates/html5/source/404.html +43 -0
  290. data/lib/middleman-core/templates/html5/source/README.md +55 -0
  291. data/lib/middleman-core/templates/html5/source/apple-touch-icon-114x114-precomposed.png +0 -0
  292. data/lib/middleman-core/templates/html5/source/apple-touch-icon-57x57-precomposed.png +0 -0
  293. data/lib/middleman-core/templates/html5/source/apple-touch-icon-72x72-precomposed.png +0 -0
  294. data/lib/middleman-core/templates/html5/source/apple-touch-icon-precomposed.png +0 -0
  295. data/lib/middleman-core/templates/html5/source/apple-touch-icon.png +0 -0
  296. data/lib/middleman-core/templates/html5/source/crossdomain.xml +25 -0
  297. data/lib/middleman-core/templates/html5/source/css/style.css +293 -0
  298. data/lib/middleman-core/templates/html5/source/favicon.ico +0 -0
  299. data/lib/middleman-core/templates/html5/source/humans.txt +43 -0
  300. data/lib/middleman-core/templates/html5/source/img/.gitignore +0 -0
  301. data/lib/middleman-core/templates/html5/source/index.html +67 -0
  302. data/lib/middleman-core/templates/html5/source/js/libs/jquery-1.7.1.js +9266 -0
  303. data/lib/middleman-core/templates/html5/source/js/libs/jquery-1.7.1.min.js +4 -0
  304. data/lib/middleman-core/templates/html5/source/js/libs/modernizr-2.5.3.min.js +4 -0
  305. data/lib/middleman-core/templates/html5/source/js/plugins.js +11 -0
  306. data/lib/middleman-core/templates/html5/source/js/script.js +8 -0
  307. data/lib/middleman-core/templates/html5/source/robots.txt +4 -0
  308. data/lib/middleman-core/templates/html5.rb +30 -0
  309. data/lib/middleman-core/templates/local.rb +28 -0
  310. data/lib/middleman-core/templates/mobile/source/404.html +37 -0
  311. data/lib/middleman-core/templates/mobile/source/README.markdown +21 -0
  312. data/lib/middleman-core/templates/mobile/source/crossdomain.xml +25 -0
  313. data/lib/middleman-core/templates/mobile/source/css/style.css +315 -0
  314. data/lib/middleman-core/templates/mobile/source/humans.txt +43 -0
  315. data/lib/middleman-core/templates/mobile/source/img/h/apple-touch-icon.png +0 -0
  316. data/lib/middleman-core/templates/mobile/source/img/h/splash.png +0 -0
  317. data/lib/middleman-core/templates/mobile/source/img/l/apple-touch-icon-precomposed.png +0 -0
  318. data/lib/middleman-core/templates/mobile/source/img/l/apple-touch-icon.png +0 -0
  319. data/lib/middleman-core/templates/mobile/source/img/l/splash.png +0 -0
  320. data/lib/middleman-core/templates/mobile/source/img/m/apple-touch-icon.png +0 -0
  321. data/lib/middleman-core/templates/mobile/source/index.html +92 -0
  322. data/lib/middleman-core/templates/mobile/source/js/libs/modernizr-custom.js +14 -0
  323. data/lib/middleman-core/templates/mobile/source/js/libs/respond.min.js +7 -0
  324. data/lib/middleman-core/templates/mobile/source/js/mylibs/helper.js +171 -0
  325. data/lib/middleman-core/templates/mobile/source/js/plugins.js +20 -0
  326. data/lib/middleman-core/templates/mobile/source/js/script.js +0 -0
  327. data/lib/middleman-core/templates/mobile/source/robots.txt +4 -0
  328. data/lib/middleman-core/templates/mobile/source/sitemap.xml +9 -0
  329. data/lib/middleman-core/templates/mobile/source/test/index.html +31 -0
  330. data/lib/middleman-core/templates/mobile/source/test/qunit/qunit.css +148 -0
  331. data/lib/middleman-core/templates/mobile/source/test/qunit/qunit.js +1265 -0
  332. data/lib/middleman-core/templates/mobile/source/test/tests.js +21 -0
  333. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/Readme.PDF +0 -0
  334. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/aspx1.snippet +31 -0
  335. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/aspx2.snippet +2 -0
  336. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/ga.aspx +195 -0
  337. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/sample.aspx +44 -0
  338. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/ga.jsp +225 -0
  339. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/jsp1.snippet +35 -0
  340. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/jsp2.snippet +2 -0
  341. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/sample.jsp +51 -0
  342. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/ga.php +176 -0
  343. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet +30 -0
  344. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php2.snippet +4 -0
  345. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/sample.php +44 -0
  346. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/ga.pl +195 -0
  347. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/perl1.snippet +27 -0
  348. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/perl2.snippet +1 -0
  349. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/sample.pl +38 -0
  350. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/COPYING +202 -0
  351. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/bookmark_bubble.js +559 -0
  352. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/example/example.html +43 -0
  353. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/example/example.js +57 -0
  354. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/arrow.png +0 -0
  355. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/close.png +0 -0
  356. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/generate_base64_images +33 -0
  357. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/icon_calendar.png +0 -0
  358. data/lib/middleman-core/templates/mobile/source/tools/wspl/README +27 -0
  359. data/lib/middleman-core/templates/mobile/source/tools/wspl/databasefactory.js +45 -0
  360. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbworker.js +324 -0
  361. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbworker_test.html +393 -0
  362. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbworkerstarter.js +32 -0
  363. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_gears.js +595 -0
  364. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_gears_test.html +404 -0
  365. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_html5.js +203 -0
  366. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_html5_test.html +468 -0
  367. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapperapi.js +202 -0
  368. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapperapi_test.html +51 -0
  369. data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js +71 -0
  370. data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset_test.html +86 -0
  371. data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_transaction.js +196 -0
  372. data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_transaction_test.html +221 -0
  373. data/lib/middleman-core/templates/mobile/source/tools/wspl/gearsutils.js +94 -0
  374. data/lib/middleman-core/templates/mobile/source/tools/wspl/gearsutils_test.html +84 -0
  375. data/lib/middleman-core/templates/mobile/source/tools/wspl/global_functions.js +72 -0
  376. data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/index.html +347 -0
  377. data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/simplenotes.js +503 -0
  378. data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/styles.css +66 -0
  379. data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/template.js +75 -0
  380. data/lib/middleman-core/templates/mobile.rb +25 -0
  381. data/lib/middleman-core/templates/shared/Gemfile.tt +3 -0
  382. data/lib/middleman-core/templates/shared/config.ru +4 -0
  383. data/lib/middleman-core/templates/shared/config.tt +92 -0
  384. data/lib/middleman-core/templates/shared/gitignore +14 -0
  385. data/lib/middleman-core/templates.rb +85 -0
  386. data/lib/middleman-core/util.rb +174 -0
  387. data/lib/middleman-core/vendor/hooks-0.2.0/CHANGES.textile +9 -0
  388. data/lib/middleman-core/vendor/hooks-0.2.0/Gemfile +3 -0
  389. data/lib/middleman-core/vendor/hooks-0.2.0/README.rdoc +107 -0
  390. data/lib/middleman-core/vendor/hooks-0.2.0/Rakefile +12 -0
  391. data/lib/middleman-core/vendor/hooks-0.2.0/hooks.gemspec +22 -0
  392. data/lib/middleman-core/vendor/hooks-0.2.0/lib/hooks/inheritable_attribute.rb +33 -0
  393. data/lib/middleman-core/vendor/hooks-0.2.0/lib/hooks.rb +109 -0
  394. data/lib/middleman-core/vendor/hooks-0.2.0/test/hooks_test.rb +141 -0
  395. data/lib/middleman-core/vendor/hooks-0.2.0/test/inheritable_attribute_test.rb +55 -0
  396. data/lib/middleman-core/vendor/hooks-0.2.0/test/test_helper.rb +10 -0
  397. data/lib/middleman-core/version.rb +5 -0
  398. data/lib/middleman-core.rb +16 -0
  399. data/middleman-core-x86-mingw32.gemspec +38 -0
  400. data/middleman-core.gemspec +39 -0
  401. metadata +806 -0
@@ -0,0 +1,72 @@
1
+ Feature: YAML Front Matter
2
+ In order to specific options and data inline
3
+
4
+ Scenario: Rendering html (yaml)
5
+ Given the Server is running at "frontmatter-app"
6
+ When I go to "/front-matter-auto.html"
7
+ Then I should see "<h1>This is the title</h1>"
8
+ Then I should not see "---"
9
+ When I go to "/front-matter-2.php"
10
+ Then I should see "<h1>This is the title</h1>"
11
+ Then I should see "<?php"
12
+ Then I should not see "---"
13
+
14
+ Scenario: YAML not on first line, no encoding
15
+ Given the Server is running at "frontmatter-app"
16
+ When I go to "/front-matter-line-2.html"
17
+ Then I should see "<h1></h1>"
18
+ Then I should see "---"
19
+
20
+ Scenario: YAML not on first line, with encoding
21
+ Given the Server is running at "frontmatter-app"
22
+ When I go to "/front-matter-encoding.html"
23
+ Then I should see "<h1>This is the title</h1>"
24
+ Then I should not see "---"
25
+
26
+ Scenario: Rendering html (json)
27
+ Given the Server is running at "frontmatter-app"
28
+ When I go to "/json-front-matter-auto.html"
29
+ Then I should see "<h1>This is the title</h1>"
30
+ Then I should not see ";;;"
31
+ When I go to "/json-front-matter.html"
32
+ Then I should see "<h1>This is the title</h1>"
33
+ Then I should not see ";;;"
34
+ When I go to "/json-front-matter-2.php"
35
+ Then I should see "<h1>This is the title</h1>"
36
+ Then I should see "<?php"
37
+ Then I should not see ";;;"
38
+
39
+ Scenario: JSON not on first line, no encoding
40
+ Given the Server is running at "frontmatter-app"
41
+ When I go to "/json-front-matter-line-2.html"
42
+ Then I should see "<h1></h1>"
43
+ Then I should see ";;;"
44
+
45
+ Scenario: JSON not on first line, with encoding
46
+ Given the Server is running at "frontmatter-app"
47
+ When I go to "/json-front-matter-encoding.html"
48
+ Then I should see "<h1>This is the title</h1>"
49
+ Then I should not see ";;;"
50
+
51
+ Scenario: A template changes frontmatter during preview
52
+ Given the Server is running at "frontmatter-app"
53
+ And the file "source/front-matter-change.html.erb" has the contents
54
+ """
55
+ ---
56
+ title: Hello World
57
+ layout: false
58
+ ---
59
+ <%= data.page.title %>
60
+ """
61
+ When I go to "/front-matter-change.html"
62
+ Then I should see "Hello World"
63
+ And the file "source/front-matter-change.html.erb" has the contents
64
+ """
65
+ ---
66
+ title: Hola Mundo
67
+ layout: false
68
+ ---
69
+ <%= data.page.title %>
70
+ """
71
+ When I go to "/front-matter-change.html"
72
+ Then I should see "Hola Mundo"
@@ -0,0 +1,43 @@
1
+ Feature: Setting page settings through frontmatter
2
+ Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (build)
3
+ Given a successfully built app at "frontmatter-settings-app"
4
+ Then the following files should exist:
5
+ | build/proxied.html |
6
+ And the file "build/alternate_layout.html" should contain "Alternate layout"
7
+ And the following files should not exist:
8
+ | build/ignored.html |
9
+
10
+ Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (preview)
11
+ Given the Server is running at "frontmatter-settings-app"
12
+ When I go to "/alternate_layout.html"
13
+ Then I should not see "File Not Found"
14
+ And I should see "Alternate layout"
15
+ When I go to "/ignored.html"
16
+ Then I should see "File Not Found"
17
+ When I go to "/ignored/index.html"
18
+ Then I should see "File Not Found"
19
+
20
+ Scenario: Changing frontmatter in preview server
21
+ Given the Server is running at "frontmatter-settings-app"
22
+ When I go to "/ignored.html"
23
+ Then I should see "File Not Found"
24
+ And the file "source/ignored.html.erb" has the contents
25
+ """
26
+ ---
27
+ ignored: false
28
+ ---
29
+
30
+ This file is no longer ignored.
31
+ """
32
+ When I go to "/ignored.html"
33
+ Then I should see "This file is no longer ignored."
34
+
35
+ Scenario: Overriding layout through frontmatter
36
+ Given the Server is running at "frontmatter-settings-app"
37
+ When I go to "/override_layout.html"
38
+ Then I should see "Layout in use: Override"
39
+
40
+ Scenario: Setting layout through frontmatter even if page is mentioned in config
41
+ Given the Server is running at "frontmatter-settings-app"
42
+ When I go to "/page_mentioned.html"
43
+ Then I should see "Layout in use: Override"
@@ -0,0 +1,12 @@
1
+ Feature: Helpers in external files
2
+
3
+ Scenario: Hello Helper
4
+ Given the Server is running at "external-helpers"
5
+ Then going to "/index.html" should not raise an exception
6
+ And I should see "Hello World"
7
+
8
+ Scenario: Automatic Helpers
9
+ Given the Server is running at "external-helpers"
10
+ Then going to "/automatic.html" should not raise an exception
11
+ And I should see "One:Two:Three:Four"
12
+
@@ -0,0 +1,121 @@
1
+ Feature: Ignoring paths
2
+ Scenario: Ignore a single path (build)
3
+ Given a fixture app "ignore-app"
4
+ And a file named "config.rb" with:
5
+ """
6
+ ignore 'about.html.erb'
7
+ ignore 'plain.html'
8
+ """
9
+ And a successfully built app at "ignore-app"
10
+ Then the following files should exist:
11
+ | build/index.html |
12
+ And the following files should not exist:
13
+ | build/plain.html |
14
+ | build/about.html |
15
+
16
+ Scenario: Ignore a single path (server)
17
+ Given a fixture app "ignore-app"
18
+ And a file named "config.rb" with:
19
+ """
20
+ ignore 'about.html.erb'
21
+ ignore 'plain.html'
22
+ """
23
+ And the Server is running
24
+ When I go to "/index.html"
25
+ Then I should not see "File Not Found"
26
+ When I go to "/plain.html"
27
+ Then I should see "File Not Found"
28
+ When I go to "/about.html"
29
+ Then I should see "File Not Found"
30
+
31
+ Scenario: Ignore a globbed path (build)
32
+ Given a fixture app "ignore-app"
33
+ And a file named "config.rb" with:
34
+ """
35
+ ignore '*.erb'
36
+ ignore 'reports/*'
37
+ ignore 'images/**/*.png'
38
+ """
39
+ And a successfully built app at "ignore-app"
40
+ Then the following files should exist:
41
+ | build/plain.html |
42
+ | build/images/portrait.jpg |
43
+ | build/images/pic.png |
44
+ And the following files should not exist:
45
+ | build/about.html |
46
+ | build/index.html |
47
+ | build/reports/index.html |
48
+ | build/reports/another.html |
49
+ | build/images/icons/messages.png |
50
+
51
+ Scenario: Ignore a globbed path (server)
52
+ Given a fixture app "ignore-app"
53
+ And a file named "config.rb" with:
54
+ """
55
+ ignore '*.erb'
56
+ ignore 'reports/*'
57
+ ignore 'images/**/*.png'
58
+ """
59
+ And the Server is running
60
+ When I go to "/plain.html"
61
+ Then I should not see "File Not Found"
62
+ When I go to "/images/portrait.jpg"
63
+ Then I should not see "File Not Found"
64
+ When I go to "/images/pic.png"
65
+ Then I should not see "File Not Found"
66
+ When I go to "/about.html"
67
+ Then I should see "File Not Found"
68
+ When I go to "/index.html"
69
+ Then I should see "File Not Found"
70
+ When I go to "/reports/index.html"
71
+ Then I should see "File Not Found"
72
+ When I go to "/reports/another.html"
73
+ Then I should see "File Not Found"
74
+ When I go to "/images/icons/messages.png"
75
+ Then I should see "File Not Found"
76
+
77
+ Scenario: Ignore a regex (build)
78
+ Given a fixture app "ignore-app"
79
+ And a file named "config.rb" with:
80
+ """
81
+ ignore /^.*\.erb/
82
+ ignore /^reports\/.*/
83
+ ignore /^images\.*\.png/
84
+ """
85
+ And a successfully built app at "ignore-app"
86
+ Then the following files should exist:
87
+ | build/plain.html |
88
+ | build/images/portrait.jpg |
89
+ | build/images/pic.png |
90
+ And the following files should not exist:
91
+ | build/about.html |
92
+ | build/index.html |
93
+ | build/reports/index.html |
94
+ | build/reports/another.html |
95
+ | build/images/icons/messages.png |
96
+
97
+ Scenario: Ignore a regex (server)
98
+ Given a fixture app "ignore-app"
99
+ And a file named "config.rb" with:
100
+ """
101
+ ignore /^.*\.erb/
102
+ ignore /^reports\/.*/
103
+ ignore /^images\.*\.png/
104
+ """
105
+ And the Server is running
106
+ When I go to "/plain.html"
107
+ Then I should not see "File Not Found"
108
+ When I go to "/images/portrait.jpg"
109
+ Then I should not see "File Not Found"
110
+ When I go to "/images/pic.png"
111
+ Then I should not see "File Not Found"
112
+ When I go to "/about.html"
113
+ Then I should see "File Not Found"
114
+ When I go to "/index.html"
115
+ Then I should see "File Not Found"
116
+ When I go to "/reports/index.html"
117
+ Then I should see "File Not Found"
118
+ When I go to "/reports/another.html"
119
+ Then I should see "File Not Found"
120
+ When I go to "/images/icons/messages.png"
121
+ Then I should see "File Not Found"
@@ -0,0 +1,69 @@
1
+ Feature: Use default extensions when user doesn't supply them
2
+
3
+ Scenario: Default extensions preview
4
+ Given the Server is running at "implied-extensions-app"
5
+ When I go to "/"
6
+ Then I should see "hello: world"
7
+ When I go to "/index.html"
8
+ Then I should see "hello: world"
9
+ When I go to "/index.erb"
10
+ Then I should see "File Not Found"
11
+ When I go to "/index"
12
+ Then I should see "File Not Found"
13
+
14
+ Scenario: Override erb extension
15
+ Given a fixture app "implied-extensions-app"
16
+ And a file named "config.rb" with:
17
+ """
18
+ template_extensions :erb => :htm
19
+ """
20
+ And the Server is running
21
+ When I go to "/"
22
+ Then I should see "File Not Found"
23
+ When I go to "/index.htm"
24
+ Then I should see "hello: world"
25
+ When I go to "/index.erb"
26
+ Then I should see "File Not Found"
27
+ When I go to "/index"
28
+ Then I should see "File Not Found"
29
+ When I go to "/index.html"
30
+ Then I should see "File Not Found"
31
+
32
+ Scenario: Override erb extension
33
+ Given a fixture app "implied-extensions-app"
34
+ And a file named "config.rb" with:
35
+ """
36
+ set :index_file, "index.htm"
37
+ template_extensions :erb => :htm
38
+ """
39
+ And the Server is running
40
+ When I go to "/"
41
+ Then I should see "hello: world"
42
+ When I go to "/index.htm"
43
+ Then I should see "hello: world"
44
+
45
+ Scenario: Default extensions build
46
+ Given a fixture app "implied-extensions-app"
47
+ And a successfully built app at "implied-extensions-app"
48
+ When I cd to "build"
49
+ Then the following files should exist:
50
+ | index.html |
51
+ Then the following files should not exist:
52
+ | index |
53
+ | index.erb |
54
+ And the file "index.html" should contain "hello: world"
55
+
56
+ Scenario: Default extensions build with override
57
+ Given a fixture app "implied-extensions-app"
58
+ And a file named "config.rb" with:
59
+ """
60
+ template_extensions :erb => :htm
61
+ """
62
+ And a successfully built app at "implied-extensions-app"
63
+ When I cd to "build"
64
+ Then the following files should exist:
65
+ | index.htm |
66
+ Then the following files should not exist:
67
+ | index |
68
+ | index.erb |
69
+ | index.html |
@@ -0,0 +1,9 @@
1
+ Feature: Instance Variables
2
+ Scenario: A dynamic page template using instance variables
3
+ Given the Server is running at "instance-vars-app"
4
+ When I go to "/a.html"
5
+ Then I should see "A: 'set'"
6
+ Then I should see "B: ''"
7
+ When I go to "/b.html"
8
+ Then I should see "A: ''"
9
+ Then I should see "B: 'set'"
@@ -0,0 +1,8 @@
1
+ Feature: Support Rack apps mounted using map
2
+
3
+ Scenario: Mounted Rack App at /sinatra
4
+ Given the Server is running at "sinatra-app"
5
+ When I go to "/"
6
+ Then I should see "Hello World (Middleman)"
7
+ When I go to "/sinatra/"
8
+ Then I should see "Hello World (Sinatra)"
@@ -0,0 +1,29 @@
1
+ Feature: Preview Changes
2
+ In order to run quickly, we should update internal caches on file changes
3
+
4
+ Scenario: A template changes contents during preview
5
+ Given the Server is running at "preview-app"
6
+ And the file "source/content.html.erb" has the contents
7
+ """
8
+ Hello World
9
+ """
10
+ When I go to "/content.html"
11
+ Then I should see "Hello World"
12
+ And the file "source/content.html.erb" has the contents
13
+ """
14
+ Hola Mundo
15
+ """
16
+ When I go to "/content.html"
17
+ Then I should see "Hola Mundo"
18
+
19
+ Scenario: A template is removed during preview
20
+ Given the Server is running at "preview-app"
21
+ And the file "source/a-page.html.erb" has the contents
22
+ """
23
+ Hello World
24
+ """
25
+ When I go to "/a-page.html"
26
+ Then I should see "Hello World"
27
+ And the file "source/a-page.html.erb" is removed
28
+ When I go to "/a-page.html"
29
+ Then I should see "File Not Found"
@@ -0,0 +1,6 @@
1
+ Feature: Support request parameters
2
+ Scenario: Use request params in a template
3
+ Given the Server is running at "request-app"
4
+ When I go to "/index.html?say=Hello+World"
5
+ Then I should see "Quote Hello World"
6
+ Then I should see "Symbol Hello World"
@@ -0,0 +1,73 @@
1
+ Feature: Step through sitemap as a tree
2
+
3
+ Scenario: Root
4
+ Given the Server is running at "traversal-app"
5
+ When I go to "/index.html"
6
+ Then I should see "Path: index.html"
7
+ Then I should not see "Parent: index.html"
8
+ Then I should see "Child: sub/index.html"
9
+ Then I should see "Child: root.html"
10
+ Then I should not see "Child: proxied.html"
11
+
12
+ Scenario: Directories have children and a parent
13
+ Given the Server is running at "traversal-app"
14
+ When I go to "/sub/index.html"
15
+ Then I should see "Path: sub/index.html"
16
+ Then I should see "Parent: index.html"
17
+ Then I should see "Child: sub/fake.html"
18
+ Then I should see "Child: sub/fake2.html"
19
+ Then I should see "Child: sub/sibling.html"
20
+ Then I should see "Child: sub/sibling2.html"
21
+ Then I should see "Child: sub/sub2/index.html"
22
+ Then I should see "Sibling: root.html"
23
+
24
+ Scenario: Directory accessed without index.html
25
+ Given the Server is running at "traversal-app"
26
+ When I go to "/sub/"
27
+ Then I should see "Path: sub/index.html"
28
+ Then I should see "Parent: index.html"
29
+ Then I should see "Child: sub/fake.html"
30
+ Then I should see "Child: sub/fake2.html"
31
+ Then I should see "Child: sub/sibling.html"
32
+ Then I should see "Child: sub/sibling2.html"
33
+ Then I should see "Child: sub/sub2/index.html"
34
+ Then I should see "Sibling: root.html"
35
+
36
+ Scenario: Page has siblings, parent, and source file
37
+ Given the Server is running at "traversal-app"
38
+ When I go to "/sub/sibling.html"
39
+ Then I should see "Parent: sub/index.html"
40
+ Then I should see "Sibling: sub/fake.html"
41
+ Then I should see "Sibling: sub/fake2.html"
42
+ Then I should see "Sibling: sub/sibling2.html"
43
+ Then I should see "Sibling: sub/sub2/index.html"
44
+ Then I should see "Source: source/sub/sibling.html.erb"
45
+
46
+ Scenario: Proxied page has siblings, parent, and source file
47
+ Given the Server is running at "traversal-app"
48
+ When I go to "/sub/fake.html"
49
+ Then I should see "Path: sub/fake.html"
50
+ Then I should see "Parent: sub/index.html"
51
+ Then I should see "Sibling: sub/fake2.html"
52
+ Then I should see "Sibling: sub/sibling.html"
53
+ Then I should see "Sibling: sub/sibling2.html"
54
+ Then I should see "Sibling: sub/sub2/index.html"
55
+ Then I should see "Source: source/proxied.html.erb"
56
+
57
+ Scenario: Child pages have data
58
+ Given the Server is running at "traversal-app"
59
+ When I go to "/directory-indexed.html"
60
+ Then I should see "Title of Sibling One"
61
+ Then I should see "Title of Sibling Two"
62
+
63
+ Scenario: When directory_index extension is inactive, child pages are found in named directory
64
+ Given the Server is running at "traversal-app"
65
+ When I go to "/directory-indexed.html"
66
+ Then I should see "Path: directory-indexed.html"
67
+ Then I should see "Parent: index.html"
68
+ Then I should see "Child: directory-indexed/fake.html"
69
+ Then I should see "Child: directory-indexed/fake2.html"
70
+ Then I should see "Child: directory-indexed/sibling.html"
71
+ Then I should see "Child: directory-indexed/sibling2.html"
72
+ Then I should see "Child: directory-indexed/sub2/index.html"
73
+ Then I should see "Sibling: root.html"
@@ -0,0 +1,6 @@
1
+ Feature: Middleman should serve plain directories without config
2
+
3
+ Scenario: Preview a folder of static pages
4
+ Given the Server is running at "plain-app"
5
+ When I go to "/index.html"
6
+ Then I should see "I am index"
@@ -0,0 +1,15 @@
1
+ Given /^page "([^\"]*)" has layout "([^\"]*)"$/ do |url, layout|
2
+ @initialize_commands ||= []
3
+ @initialize_commands << lambda {
4
+ page(url, :layout => layout.to_sym)
5
+ }
6
+ end
7
+
8
+ Given /^"([^\"]*)" with_layout block has layout "([^\"]*)"$/ do |url, layout|
9
+ @initialize_commands ||= []
10
+ @initialize_commands << lambda {
11
+ with_layout(layout.to_sym) do
12
+ page(url)
13
+ end
14
+ }
15
+ end
@@ -0,0 +1,40 @@
1
+ Feature: Strip the index_file from urls
2
+
3
+ Scenario: Default behaviour, strip with trailing slash
4
+ Given the Server is running at "strip-url-app"
5
+ When I go to "/"
6
+ Then I should see "URL: '/'"
7
+ When I go to "/index.html"
8
+ Then I should see "URL: '/'"
9
+ When I go to "/other.html"
10
+ Then I should see "URL: '/other.html'"
11
+ When I go to "/subdir/index.html"
12
+ Then I should see "URL: '/subdir/'"
13
+
14
+ Scenario: Trailing slash off
15
+ Given a fixture app "strip-url-app"
16
+ And a file named "config.rb" with:
17
+ """
18
+ set :trailing_slash, false
19
+ """
20
+ And the Server is running
21
+ When I go to "/"
22
+ Then I should see "URL: '/'"
23
+ When I go to "/other.html"
24
+ Then I should see "URL: '/other.html'"
25
+ When I go to "/subdir/index.html"
26
+ Then I should see "URL: '/subdir'"
27
+
28
+ Scenario: Strip index off
29
+ Given a fixture app "strip-url-app"
30
+ And a file named "config.rb" with:
31
+ """
32
+ set :strip_index_file, false
33
+ """
34
+ And the Server is running
35
+ When I go to "/"
36
+ Then I should see "URL: '/index.html'"
37
+ When I go to "/other.html"
38
+ Then I should see "URL: '/other.html'"
39
+ When I go to "/subdir/index.html"
40
+ Then I should see "URL: '/subdir/index.html'"
@@ -0,0 +1,6 @@
1
+ ENV["TEST"] = "true"
2
+ ENV["AUTOLOAD_SPROCKETS"] = "false"
3
+
4
+ PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
5
+ require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-core')
6
+ require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-core', 'step_definitions')
@@ -0,0 +1,36 @@
1
+ @encoding @travishatesme @wip
2
+
3
+ Feature: Unicode filenames
4
+ In order to support non-ASCII characters in filenames
5
+
6
+ Scenario: Build with files containing unicode characters in their name
7
+ Given a fixture app "empty-app"
8
+ And a file named "config.rb" with:
9
+ """
10
+ """
11
+ And a file named "source/snowmen-rule-☃.html" with:
12
+ """
13
+ Snowman!
14
+ <div style="text-align:center; font-size:4000%;">
15
+
16
+ </div>
17
+ """
18
+ And a successfully built app at "empty-app"
19
+ When I cd to "build"
20
+ Then the file "snowmen-rule-☃.html" should contain "☃"
21
+
22
+ Scenario: Preview with files containing unicode characters in their name
23
+ Given a fixture app "empty-app"
24
+ And a file named "config.rb" with:
25
+ """
26
+ """
27
+ And a file named "source/snowmen-rule-☃.html" with:
28
+ """
29
+ Snowman!
30
+ <div style="text-align:center; font-size:4000%;">
31
+
32
+ </div>
33
+ """
34
+ And the Server is running
35
+ When I go to "/snowmen-rule-☃.html"
36
+ Then I should see "Snowman!"
@@ -0,0 +1,10 @@
1
+ Feature: Wildcards in Page helper
2
+
3
+ Scenario: Setting the layout for a folder
4
+ Given the Server is running at "wildcard-app"
5
+ When I go to "/index.html"
6
+ Then I should see "Normal Layout"
7
+ When I go to "/admin/index.html"
8
+ Then I should see "Admin Layout"
9
+ When I go to "/admin/page.html"
10
+ Then I should see "Admin Layout"
@@ -0,0 +1 @@
1
+ set :automatic_directory_matcher, "--"
@@ -0,0 +1,4 @@
1
+ with_layout false do
2
+ page "/data.html"
3
+ page "/data3.html"
4
+ end
@@ -0,0 +1,4 @@
1
+ -
2
+ title: "One"
3
+ -
4
+ title: "Two"
@@ -0,0 +1,4 @@
1
+ [
2
+ { "title": "One" },
3
+ { "title": "Two" }
4
+ ]
@@ -0,0 +1 @@
1
+ <%= data.test.map { |r| r.title }.join(":") %>
@@ -0,0 +1 @@
1
+ <%= data.test2.map { |r| r.title }.join(":") %>
@@ -0,0 +1 @@
1
+ set :layout, false
@@ -0,0 +1 @@
1
+ <%= error_error_error %>
File without changes
@@ -0,0 +1,2 @@
1
+ title: "Title"
2
+ subtitle: "Subtitle"
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: false
3
+ sup: "Sup"
4
+ ---
5
+
6
+ <h1>#{"<%= data.article.title %>"}</h1>
7
+ <h2>#{"<%= data.article.subtitle %>"}</h2>
8
+ <h3>#{"<%= data.page.sup %>"}</h3>
@@ -0,0 +1,11 @@
1
+ page "/fake.html", :proxy => "/real.html", :layout => false
2
+
3
+ ignore "/should_be_ignored.html"
4
+ page "/should_be_ignored2.html", :ignore => true
5
+ page "/target_ignore.html", :proxy => "/should_be_ignored3.html", :ignore => true
6
+
7
+ %w(one two).each do |num|
8
+ page "/fake/#{num}.html", :proxy => "/real/index.html" do
9
+ @num = num
10
+ end
11
+ end
File without changes