middleman-core 3.0.0.alpha.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (571) hide show
  1. data/Rakefile +5 -0
  2. data/bin/middleman +52 -0
  3. data/features/3rd_party_cli.feature +5 -0
  4. data/features/asset_host.feature +7 -0
  5. data/features/auto_layout.feature +36 -0
  6. data/features/automatic_image_sizes.feature +16 -0
  7. data/features/builder.feature +50 -0
  8. data/features/chained_templates.feature +19 -0
  9. data/features/clean_build.feature +31 -0
  10. data/features/cli.feature +120 -0
  11. data/features/content_for.feature +6 -0
  12. data/features/current_page_request_path_backwards.feature +6 -0
  13. data/features/custom_layout_engines.feature +8 -0
  14. data/features/custom_layouts.feature +44 -0
  15. data/features/data.feature +22 -0
  16. data/features/directory_index.feature +36 -0
  17. data/features/dynamic_pages.feature +95 -0
  18. data/features/feature_params.feature +6 -0
  19. data/features/former_padrino_helpers.feature +10 -0
  20. data/features/front-matter.feature +35 -0
  21. data/features/helpers_auto_javascript_include_tag.feature +27 -0
  22. data/features/helpers_auto_stylesheet_link_tag.feature +27 -0
  23. data/features/helpers_external.feature +6 -0
  24. data/features/helpers_lorem.feature +6 -0
  25. data/features/helpers_page_classes.feature +17 -0
  26. data/features/instance_vars.feature +20 -0
  27. data/features/mount_rack.feature +8 -0
  28. data/features/nested_layouts.feature +24 -0
  29. data/features/partials.feature +41 -0
  30. data/features/preview_changes.feature +18 -0
  31. data/features/sitemap_traversal.features +73 -0
  32. data/features/static_server.feature +6 -0
  33. data/features/step_definitions/page_layout_steps.rb +15 -0
  34. data/features/support/env.rb +3 -0
  35. data/features/wildcard_page_helper.feature +19 -0
  36. data/fixtures/3rd-party-command/config.rb +10 -0
  37. data/fixtures/asset-host-app/config.rb +6 -0
  38. data/fixtures/asset-host-app/source/.htaccess +1 -0
  39. data/fixtures/asset-host-app/source/asset_host.html.erb +1 -0
  40. data/fixtures/asset-host-app/source/images/blank.gif +0 -0
  41. data/fixtures/auto-css-app/config.rb +11 -0
  42. data/fixtures/auto-css-app/source/auto-css.html.erb +1 -0
  43. data/fixtures/auto-css-app/source/auto-css/auto-css.html.erb +1 -0
  44. data/fixtures/auto-css-app/source/auto-css/index.html.erb +1 -0
  45. data/fixtures/auto-css-app/source/auto-css/sub/auto-css.html.erb +1 -0
  46. data/fixtures/auto-css-app/source/stylesheets/auto-css.css +3 -0
  47. data/fixtures/auto-css-app/source/stylesheets/auto-css/auto-css.css +3 -0
  48. data/fixtures/auto-css-app/source/stylesheets/auto-css/index.css +0 -0
  49. data/fixtures/auto-css-app/source/stylesheets/auto-css/sub/auto-css.css +3 -0
  50. data/fixtures/auto-js-app/config.rb +11 -0
  51. data/fixtures/auto-js-app/source/auto-js.html.erb +1 -0
  52. data/fixtures/auto-js-app/source/auto-js/auto-js.html.erb +1 -0
  53. data/fixtures/auto-js-app/source/auto-js/index.html.erb +1 -0
  54. data/fixtures/auto-js-app/source/auto-js/sub/auto-js.html.erb +1 -0
  55. data/fixtures/auto-js-app/source/javascripts/auto-js.js +1 -0
  56. data/fixtures/auto-js-app/source/javascripts/auto-js/auto-js.js +1 -0
  57. data/fixtures/auto-js-app/source/javascripts/auto-js/index.js +1 -0
  58. data/fixtures/auto-js-app/source/javascripts/auto-js/sub/auto-js.js +1 -0
  59. data/fixtures/automatic-image-size-app/config.rb +0 -0
  60. data/fixtures/automatic-image-size-app/source/auto-image-sizes.html.erb +1 -0
  61. data/fixtures/automatic-image-size-app/source/images/blank.gif +0 -0
  62. data/fixtures/basic-data-app/config.rb +4 -0
  63. data/fixtures/basic-data-app/data/test.yml +4 -0
  64. data/fixtures/basic-data-app/data/test2.json +4 -0
  65. data/fixtures/basic-data-app/source/data.html.erb +1 -0
  66. data/fixtures/basic-data-app/source/data3.html.erb +1 -0
  67. data/fixtures/build-with-errors-app/config.rb +1 -0
  68. data/fixtures/build-with-errors-app/source/index.html.erb +1 -0
  69. data/fixtures/chained-app/config.rb +0 -0
  70. data/fixtures/chained-app/data/article.yml +2 -0
  71. data/fixtures/chained-app/source/index.html.str.erb +8 -0
  72. data/fixtures/clean-app/config-complications.rb +11 -0
  73. data/fixtures/clean-app/config-empty.rb +0 -0
  74. data/fixtures/clean-app/config.rb +11 -0
  75. data/fixtures/clean-app/source/index.html.erb +1 -0
  76. data/fixtures/clean-app/source/layout.erb +9 -0
  77. data/fixtures/clean-app/source/layouts/custom.erb +8 -0
  78. data/fixtures/clean-app/source/real.html +1 -0
  79. data/fixtures/clean-app/source/real/index.html.erb +5 -0
  80. data/fixtures/clean-app/source/should_be_ignored.html +1 -0
  81. data/fixtures/clean-app/source/should_be_ignored2.html +1 -0
  82. data/fixtures/clean-app/source/should_be_ignored3.html +1 -0
  83. data/fixtures/clean-app/source/static.html +1 -0
  84. data/fixtures/clean-dir-app/config.rb +1 -0
  85. data/fixtures/clean-dir-app/source/about.html +1 -0
  86. data/fixtures/content-for-app/config.rb +3 -0
  87. data/fixtures/content-for-app/source/content_for_erb.html.erb +5 -0
  88. data/fixtures/content-for-app/source/layouts/content_for.erb +4 -0
  89. data/fixtures/current-page-app/config.rb +3 -0
  90. data/fixtures/current-page-app/source/request-path.html.erb +1 -0
  91. data/fixtures/custom-layout-app/config.rb +1 -0
  92. data/fixtures/custom-layout-app/source/index.html.erb +1 -0
  93. data/fixtures/custom-layout-app/source/layout.str +9 -0
  94. data/fixtures/custom-layout-app2/config.rb +0 -0
  95. data/fixtures/custom-layout-app2/source/custom-layout-dir/index.html.erb +1 -0
  96. data/fixtures/custom-layout-app2/source/custom-layout.html.erb +1 -0
  97. data/fixtures/custom-layout-app2/source/layouts/custom.erb +8 -0
  98. data/fixtures/data-app/config.rb +3 -0
  99. data/fixtures/data-app/data/pages.yml +6 -0
  100. data/fixtures/data-app/source/index.html.erb +1 -0
  101. data/fixtures/data-app/source/layout.erb +5 -0
  102. data/fixtures/different-engine-layout/config.rb +0 -0
  103. data/fixtures/different-engine-layout/source/index.html.str +1 -0
  104. data/fixtures/different-engine-layout/source/layout.erb +9 -0
  105. data/fixtures/different-engine-partial/config.rb +0 -0
  106. data/fixtures/different-engine-partial/source/index.html.erb +1 -0
  107. data/fixtures/different-engine-partial/source/layouts/layout.erb +7 -0
  108. data/fixtures/different-engine-partial/source/shared/_footer.str +1 -0
  109. data/fixtures/different-engine-partial/source/shared/_header.erb +1 -0
  110. data/fixtures/dynamic-pages-app/config.rb +29 -0
  111. data/fixtures/dynamic-pages-app/source/real.html +1 -0
  112. data/fixtures/dynamic-pages-app/source/real/index.html.erb +5 -0
  113. data/fixtures/dynamic-pages-app/source/should_be_ignored.html +1 -0
  114. data/fixtures/dynamic-pages-app/source/should_be_ignored2.html +1 -0
  115. data/fixtures/dynamic-pages-app/source/should_be_ignored3.html +1 -0
  116. data/fixtures/dynamic-pages-app/source/should_be_ignored4.html +1 -0
  117. data/fixtures/dynamic-pages-app/source/should_be_ignored5.html +1 -0
  118. data/fixtures/dynamic-pages-app/source/should_be_ignored6.html +1 -0
  119. data/fixtures/dynamic-pages-app/source/should_be_ignored7.html +1 -0
  120. data/fixtures/dynamic-pages-app/source/should_be_ignored8.html +1 -0
  121. data/fixtures/empty-app/not-config.rb +0 -0
  122. data/fixtures/engine-matching-layout/config.rb +0 -0
  123. data/fixtures/engine-matching-layout/source/index.html.erb +1 -0
  124. data/fixtures/engine-matching-layout/source/layout.erb +9 -0
  125. data/fixtures/external-helpers/config.rb +4 -0
  126. data/fixtures/external-helpers/lib/hello_helper.rb +5 -0
  127. data/fixtures/external-helpers/source/index.html.erb +1 -0
  128. data/fixtures/feature-params-app/config.rb +12 -0
  129. data/fixtures/feature-params-app/source/index.html.erb +3 -0
  130. data/fixtures/frontmatter-app/config.rb +0 -0
  131. data/fixtures/frontmatter-app/source/front-matter-2.php.erb +7 -0
  132. data/fixtures/frontmatter-app/source/front-matter-change.html.erb +5 -0
  133. data/fixtures/frontmatter-app/source/front-matter.html.erb +6 -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/config.rb +2 -0
  140. data/fixtures/ignore-app/source/articles/template.html.erb +1 -0
  141. data/fixtures/ignore-app/source/template.html.erb +1 -0
  142. data/fixtures/indexable-app/config.rb +2 -0
  143. data/fixtures/indexable-app/source/.htaccess +1 -0
  144. data/fixtures/indexable-app/source/a_folder/needs_index.html +1 -0
  145. data/fixtures/indexable-app/source/leave_me_alone.html +1 -0
  146. data/fixtures/indexable-app/source/needs_index.html +1 -0
  147. data/fixtures/indexable-app/source/regular/index.html +1 -0
  148. data/fixtures/instance-vars-app/config.rb +0 -0
  149. data/fixtures/instance-vars-app/source/_vartial.erb +5 -0
  150. data/fixtures/instance-vars-app/source/instance-var-set.html.erb +2 -0
  151. data/fixtures/instance-vars-app/source/layout.erb +3 -0
  152. data/fixtures/instance-vars-app/source/no-instance-var.html.erb +1 -0
  153. data/fixtures/large-build-app/config.rb +3 -0
  154. data/fixtures/large-build-app/source/.htaccess +1 -0
  155. data/fixtures/large-build-app/source/_partial.erb +1 -0
  156. data/fixtures/large-build-app/source/images/Child folder/regular_file(example).txt +1 -0
  157. data/fixtures/large-build-app/source/images/Read me (example).txt +1 -0
  158. data/fixtures/large-build-app/source/images/blank.gif +0 -0
  159. data/fixtures/large-build-app/source/index.html.erb +1 -0
  160. data/fixtures/large-build-app/source/layout.erb +9 -0
  161. data/fixtures/large-build-app/source/layouts/content_for.erb +4 -0
  162. data/fixtures/large-build-app/source/layouts/custom.erb +8 -0
  163. data/fixtures/large-build-app/source/other_layout.erb +1 -0
  164. data/fixtures/large-build-app/source/services/index.html.erb +1 -0
  165. data/fixtures/large-build-app/source/spaces in file.html.erb +1 -0
  166. data/fixtures/large-build-app/source/static.html +1 -0
  167. data/fixtures/large-build-app/source/stylesheets/static.css +2 -0
  168. data/fixtures/lorem-app/config.rb +0 -0
  169. data/fixtures/lorem-app/source/lorem.html.erb +13 -0
  170. data/fixtures/manual-layout-missing/config.rb +1 -0
  171. data/fixtures/manual-layout-missing/source/index.html.erb +1 -0
  172. data/fixtures/manual-layout-override/config.rb +3 -0
  173. data/fixtures/manual-layout-override/source/index.html.erb +1 -0
  174. data/fixtures/manual-layout-override/source/layouts/another.erb +9 -0
  175. data/fixtures/manual-layout-override/source/layouts/custom.erb +9 -0
  176. data/fixtures/manual-layout/config.rb +1 -0
  177. data/fixtures/manual-layout/source/index.html.erb +1 -0
  178. data/fixtures/manual-layout/source/layouts/custom.erb +9 -0
  179. data/fixtures/multiple-layouts/config.rb +0 -0
  180. data/fixtures/multiple-layouts/source/index.html.erb +1 -0
  181. data/fixtures/multiple-layouts/source/layout.erb +9 -0
  182. data/fixtures/multiple-layouts/source/layout.str +9 -0
  183. data/fixtures/nested-layout-app/config.rb +1 -0
  184. data/fixtures/nested-layout-app/source/data-one.html.erb +5 -0
  185. data/fixtures/nested-layout-app/source/data-two.html.erb +5 -0
  186. data/fixtures/nested-layout-app/source/index.html.erb +1 -0
  187. data/fixtures/nested-layout-app/source/layouts/inner.erb +4 -0
  188. data/fixtures/nested-layout-app/source/layouts/master.erb +3 -0
  189. data/fixtures/nested-layout-app/source/layouts/outer.erb +4 -0
  190. data/fixtures/no-layout/config.rb +0 -0
  191. data/fixtures/no-layout/source/index.html.erb +1 -0
  192. data/fixtures/padrino-helpers-app/config.rb +0 -0
  193. data/fixtures/padrino-helpers-app/source/former_padrino_test.html.erb +4 -0
  194. data/fixtures/page-classes-app/config.rb +4 -0
  195. data/fixtures/page-classes-app/source/page-classes.html.erb +1 -0
  196. data/fixtures/page-classes-app/source/sub1/page-classes.html.erb +1 -0
  197. data/fixtures/page-classes-app/source/sub1/sub2/page-classes.html.erb +1 -0
  198. data/fixtures/partials-app/config.rb +0 -0
  199. data/fixtures/partials-app/source/_locals.erb +1 -0
  200. data/fixtures/partials-app/source/_main.erb +1 -0
  201. data/fixtures/partials-app/source/_main.str +1 -0
  202. data/fixtures/partials-app/source/index.html.erb +3 -0
  203. data/fixtures/partials-app/source/locals.html.erb +1 -0
  204. data/fixtures/partials-app/source/second.html.str +3 -0
  205. data/fixtures/partials-app/source/shared/_footer.erb +1 -0
  206. data/fixtures/partials-app/source/shared/_header.erb +1 -0
  207. data/fixtures/partials-app/source/sub/_local.erb +1 -0
  208. data/fixtures/partials-app/source/sub/index.html.erb +3 -0
  209. data/fixtures/plain-app/index.html +1 -0
  210. data/fixtures/preview-app/config.rb +0 -0
  211. data/fixtures/preview-app/source/content.html.erb +1 -0
  212. data/fixtures/preview-app/source/layout.erb +1 -0
  213. data/fixtures/sinatra-app/config.rb +11 -0
  214. data/fixtures/sinatra-app/source/index.html.erb +5 -0
  215. data/fixtures/traversal-app/config.rb +7 -0
  216. data/fixtures/traversal-app/source/directory-indexed.html.erb +0 -0
  217. data/fixtures/traversal-app/source/directory-indexed/sibling.html.erb +3 -0
  218. data/fixtures/traversal-app/source/directory-indexed/sibling2.html.erb +3 -0
  219. data/fixtures/traversal-app/source/directory-indexed/sub2/index.html.erb +0 -0
  220. data/fixtures/traversal-app/source/directory-indexed/sub3/deep.html.erb +0 -0
  221. data/fixtures/traversal-app/source/index.html.erb +0 -0
  222. data/fixtures/traversal-app/source/layout.erb +19 -0
  223. data/fixtures/traversal-app/source/proxied.html.erb +0 -0
  224. data/fixtures/traversal-app/source/root.html.erb +0 -0
  225. data/fixtures/traversal-app/source/sub/index.html.erb +0 -0
  226. data/fixtures/traversal-app/source/sub/sibling.html.erb +0 -0
  227. data/fixtures/traversal-app/source/sub/sibling2.html.erb +0 -0
  228. data/fixtures/traversal-app/source/sub/sub2/index.html.erb +0 -0
  229. data/fixtures/traversal-app/source/sub/sub3/deep.html.erb +0 -0
  230. data/fixtures/wildcard-app/config.rb +1 -0
  231. data/fixtures/wildcard-app/source/admin/index.html.erb +1 -0
  232. data/fixtures/wildcard-app/source/admin/page.html.erb +1 -0
  233. data/fixtures/wildcard-app/source/index.html.erb +1 -0
  234. data/fixtures/wildcard-app/source/layouts/admin.erb +2 -0
  235. data/fixtures/wildcard-app/source/layouts/layout.erb +2 -0
  236. data/fixtures/wildcard-directory-index-app/config.rb +2 -0
  237. data/fixtures/wildcard-directory-index-app/source/admin/index.html.erb +1 -0
  238. data/fixtures/wildcard-directory-index-app/source/admin/page.html.erb +1 -0
  239. data/fixtures/wildcard-directory-index-app/source/index.html.erb +1 -0
  240. data/fixtures/wildcard-directory-index-app/source/layouts/admin.erb +2 -0
  241. data/fixtures/wildcard-directory-index-app/source/layouts/layout.erb +2 -0
  242. data/lib/middleman-core.rb +259 -0
  243. data/lib/middleman-core/base.rb +494 -0
  244. data/lib/middleman-core/cache.rb +57 -0
  245. data/lib/middleman-core/cli.rb +57 -0
  246. data/lib/middleman-core/cli/build.rb +229 -0
  247. data/lib/middleman-core/cli/init.rb +52 -0
  248. data/lib/middleman-core/cli/server.rb +52 -0
  249. data/lib/middleman-core/core_extensions/assets.rb +30 -0
  250. data/lib/middleman-core/core_extensions/builder.rb +49 -0
  251. data/lib/middleman-core/core_extensions/data.rb +193 -0
  252. data/lib/middleman-core/core_extensions/default_helpers.rb +119 -0
  253. data/lib/middleman-core/core_extensions/extensions.rb +148 -0
  254. data/lib/middleman-core/core_extensions/file_watcher.rb +83 -0
  255. data/lib/middleman-core/core_extensions/front_matter.rb +145 -0
  256. data/lib/middleman-core/core_extensions/rendering.rb +247 -0
  257. data/lib/middleman-core/core_extensions/routing.rb +69 -0
  258. data/lib/middleman-core/core_extensions/show_exceptions.rb +16 -0
  259. data/lib/middleman-core/core_extensions/sitemap.rb +72 -0
  260. data/lib/middleman-core/extensions/asset_host.rb +29 -0
  261. data/lib/middleman-core/extensions/automatic_image_sizes.rb +38 -0
  262. data/lib/middleman-core/extensions/automatic_image_sizes/fastimage.rb +287 -0
  263. data/lib/middleman-core/extensions/directory_indexes.rb +62 -0
  264. data/lib/middleman-core/extensions/lorem.rb +140 -0
  265. data/lib/middleman-core/guard.rb +148 -0
  266. data/lib/middleman-core/renderers/erb.rb +19 -0
  267. data/lib/middleman-core/sitemap/page.rb +186 -0
  268. data/lib/middleman-core/sitemap/store.rb +139 -0
  269. data/lib/middleman-core/sitemap/template.rb +82 -0
  270. data/lib/middleman-core/step_definitions.rb +12 -0
  271. data/lib/middleman-core/step_definitions/builder_steps.rb +42 -0
  272. data/lib/middleman-core/step_definitions/middleman_steps.rb +15 -0
  273. data/lib/middleman-core/step_definitions/server_steps.rb +73 -0
  274. data/lib/middleman-core/templates.rb +82 -0
  275. data/lib/middleman-core/templates/default.rb +29 -0
  276. data/lib/middleman-core/templates/default/source/images/background.png +0 -0
  277. data/lib/middleman-core/templates/default/source/images/middleman.png +0 -0
  278. data/lib/middleman-core/templates/default/source/index.html.erb +10 -0
  279. data/lib/middleman-core/templates/default/source/javascripts/all.js +1 -0
  280. data/lib/middleman-core/templates/default/source/layouts/layout.erb +19 -0
  281. data/lib/middleman-core/templates/default/source/stylesheets/_animate.scss +23 -0
  282. data/lib/middleman-core/templates/default/source/stylesheets/_normalize.scss +431 -0
  283. data/lib/middleman-core/templates/default/source/stylesheets/all.css.scss +40 -0
  284. data/lib/middleman-core/templates/html5.rb +25 -0
  285. data/lib/middleman-core/templates/html5/source/404.html +38 -0
  286. data/lib/middleman-core/templates/html5/source/README.md +388 -0
  287. data/lib/middleman-core/templates/html5/source/apple-touch-icon-114x114-precomposed.png +0 -0
  288. data/lib/middleman-core/templates/html5/source/apple-touch-icon-57x57-precomposed.png +0 -0
  289. data/lib/middleman-core/templates/html5/source/apple-touch-icon-72x72-precomposed.png +0 -0
  290. data/lib/middleman-core/templates/html5/source/apple-touch-icon-precomposed.png +0 -0
  291. data/lib/middleman-core/templates/html5/source/apple-touch-icon.png +0 -0
  292. data/lib/middleman-core/templates/html5/source/crossdomain.xml +25 -0
  293. data/lib/middleman-core/templates/html5/source/css/style.css +293 -0
  294. data/lib/middleman-core/templates/html5/source/favicon.ico +0 -0
  295. data/lib/middleman-core/templates/html5/source/humans.txt +43 -0
  296. data/lib/middleman-core/templates/html5/source/img/.gitignore +2 -0
  297. data/lib/middleman-core/templates/html5/source/index.html +79 -0
  298. data/lib/middleman-core/templates/html5/source/js/libs/jquery-1.6.2.js +8981 -0
  299. data/lib/middleman-core/templates/html5/source/js/libs/jquery-1.6.2.min.js +18 -0
  300. data/lib/middleman-core/templates/html5/source/js/libs/modernizr-2.0.6.min.js +4 -0
  301. data/lib/middleman-core/templates/html5/source/js/mylibs/.gitignore +2 -0
  302. data/lib/middleman-core/templates/html5/source/js/plugins.js +20 -0
  303. data/lib/middleman-core/templates/html5/source/js/script.js +8 -0
  304. data/lib/middleman-core/templates/html5/source/robots.txt +5 -0
  305. data/lib/middleman-core/templates/html5/source/test/index.html +31 -0
  306. data/lib/middleman-core/templates/html5/source/test/qunit/qunit.css +148 -0
  307. data/lib/middleman-core/templates/html5/source/test/qunit/qunit.js +1265 -0
  308. data/lib/middleman-core/templates/html5/source/test/tests.js +24 -0
  309. data/lib/middleman-core/templates/local.rb +21 -0
  310. data/lib/middleman-core/templates/mobile.rb +25 -0
  311. data/lib/middleman-core/templates/mobile/source/404.html +37 -0
  312. data/lib/middleman-core/templates/mobile/source/README.markdown +21 -0
  313. data/lib/middleman-core/templates/mobile/source/crossdomain.xml +25 -0
  314. data/lib/middleman-core/templates/mobile/source/css/style.css +315 -0
  315. data/lib/middleman-core/templates/mobile/source/humans.txt +43 -0
  316. data/lib/middleman-core/templates/mobile/source/img/h/apple-touch-icon.png +0 -0
  317. data/lib/middleman-core/templates/mobile/source/img/h/splash.png +0 -0
  318. data/lib/middleman-core/templates/mobile/source/img/l/apple-touch-icon-precomposed.png +0 -0
  319. data/lib/middleman-core/templates/mobile/source/img/l/apple-touch-icon.png +0 -0
  320. data/lib/middleman-core/templates/mobile/source/img/l/splash.png +0 -0
  321. data/lib/middleman-core/templates/mobile/source/img/m/apple-touch-icon.png +0 -0
  322. data/lib/middleman-core/templates/mobile/source/index.html +92 -0
  323. data/lib/middleman-core/templates/mobile/source/js/libs/modernizr-custom.js +14 -0
  324. data/lib/middleman-core/templates/mobile/source/js/libs/respond.min.js +7 -0
  325. data/lib/middleman-core/templates/mobile/source/js/mylibs/helper.js +171 -0
  326. data/lib/middleman-core/templates/mobile/source/js/plugins.js +20 -0
  327. data/lib/middleman-core/templates/mobile/source/js/script.js +0 -0
  328. data/lib/middleman-core/templates/mobile/source/robots.txt +4 -0
  329. data/lib/middleman-core/templates/mobile/source/sitemap.xml +9 -0
  330. data/lib/middleman-core/templates/mobile/source/test/index.html +31 -0
  331. data/lib/middleman-core/templates/mobile/source/test/qunit/qunit.css +148 -0
  332. data/lib/middleman-core/templates/mobile/source/test/qunit/qunit.js +1265 -0
  333. data/lib/middleman-core/templates/mobile/source/test/tests.js +21 -0
  334. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/Readme.PDF +0 -0
  335. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/aspx1.snippet +31 -0
  336. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/aspx2.snippet +2 -0
  337. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/ga.aspx +195 -0
  338. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/sample.aspx +44 -0
  339. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/ga.jsp +225 -0
  340. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/jsp1.snippet +35 -0
  341. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/jsp2.snippet +2 -0
  342. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/sample.jsp +51 -0
  343. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/ga.php +176 -0
  344. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet +30 -0
  345. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php2.snippet +4 -0
  346. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/sample.php +44 -0
  347. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/ga.pl +195 -0
  348. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/perl1.snippet +27 -0
  349. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/perl2.snippet +1 -0
  350. data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/sample.pl +38 -0
  351. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/COPYING +202 -0
  352. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/bookmark_bubble.js +559 -0
  353. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/example/example.html +43 -0
  354. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/example/example.js +57 -0
  355. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/arrow.png +0 -0
  356. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/close.png +0 -0
  357. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/generate_base64_images +33 -0
  358. data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/icon_calendar.png +0 -0
  359. data/lib/middleman-core/templates/mobile/source/tools/wspl/README +27 -0
  360. data/lib/middleman-core/templates/mobile/source/tools/wspl/databasefactory.js +45 -0
  361. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbworker.js +324 -0
  362. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbworker_test.html +393 -0
  363. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbworkerstarter.js +32 -0
  364. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_gears.js +595 -0
  365. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_gears_test.html +404 -0
  366. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_html5.js +203 -0
  367. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_html5_test.html +468 -0
  368. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapperapi.js +202 -0
  369. data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapperapi_test.html +51 -0
  370. data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js +71 -0
  371. data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset_test.html +86 -0
  372. data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_transaction.js +196 -0
  373. data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_transaction_test.html +221 -0
  374. data/lib/middleman-core/templates/mobile/source/tools/wspl/gearsutils.js +94 -0
  375. data/lib/middleman-core/templates/mobile/source/tools/wspl/gearsutils_test.html +84 -0
  376. data/lib/middleman-core/templates/mobile/source/tools/wspl/global_functions.js +72 -0
  377. data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/index.html +347 -0
  378. data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/simplenotes.js +503 -0
  379. data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/styles.css +66 -0
  380. data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/template.js +75 -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/vendor/hooks-0.2.0/CHANGES.textile +9 -0
  385. data/lib/middleman-core/vendor/hooks-0.2.0/Gemfile +3 -0
  386. data/lib/middleman-core/vendor/hooks-0.2.0/README.rdoc +107 -0
  387. data/lib/middleman-core/vendor/hooks-0.2.0/Rakefile +12 -0
  388. data/lib/middleman-core/vendor/hooks-0.2.0/hooks.gemspec +22 -0
  389. data/lib/middleman-core/vendor/hooks-0.2.0/lib/hooks.rb +109 -0
  390. data/lib/middleman-core/vendor/hooks-0.2.0/lib/hooks/inheritable_attribute.rb +33 -0
  391. data/lib/middleman-core/vendor/hooks-0.2.0/test/hooks_test.rb +141 -0
  392. data/lib/middleman-core/vendor/hooks-0.2.0/test/inheritable_attribute_test.rb +55 -0
  393. data/lib/middleman-core/vendor/hooks-0.2.0/test/test_helper.rb +10 -0
  394. data/lib/middleman-core/vendor/padrino-core-0.10.5/.document +5 -0
  395. data/lib/middleman-core/vendor/padrino-core-0.10.5/.gitignore +22 -0
  396. data/lib/middleman-core/vendor/padrino-core-0.10.5/.yardopts +1 -0
  397. data/lib/middleman-core/vendor/padrino-core-0.10.5/LICENSE.txt +20 -0
  398. data/lib/middleman-core/vendor/padrino-core-0.10.5/README.rdoc +294 -0
  399. data/lib/middleman-core/vendor/padrino-core-0.10.5/Rakefile +5 -0
  400. data/lib/middleman-core/vendor/padrino-core-0.10.5/bin/padrino +9 -0
  401. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core.rb +167 -0
  402. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/application.rb +270 -0
  403. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/application/rendering.rb +292 -0
  404. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/application/routing.rb +934 -0
  405. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/application/showexceptions.rb +20 -0
  406. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/caller.rb +53 -0
  407. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/cli/adapter.rb +24 -0
  408. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/cli/base.rb +151 -0
  409. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/cli/console.rb +20 -0
  410. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/cli/rake.rb +24 -0
  411. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/cli/rake_tasks.rb +59 -0
  412. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/command.rb +38 -0
  413. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/images/404.png +0 -0
  414. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/images/500.png +0 -0
  415. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/loader.rb +210 -0
  416. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/cs.yml +34 -0
  417. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/da.yml +34 -0
  418. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/de.yml +34 -0
  419. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/en.yml +34 -0
  420. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/es.yml +34 -0
  421. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/fr.yml +34 -0
  422. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/hu.yml +34 -0
  423. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/it.yml +40 -0
  424. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/ja.yml +34 -0
  425. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/lv.yml +34 -0
  426. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/nl.yml +34 -0
  427. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/no.yml +35 -0
  428. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/pl.yml +34 -0
  429. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/pt_br.yml +40 -0
  430. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/ru.yml +35 -0
  431. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/tr.yml +34 -0
  432. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/uk.yml +34 -0
  433. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/zh_cn.yml +34 -0
  434. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/zh_tw.yml +34 -0
  435. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/logger.rb +345 -0
  436. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/mounter.rb +224 -0
  437. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/reloader.rb +254 -0
  438. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/router.rb +98 -0
  439. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/server.rb +79 -0
  440. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/support_lite.rb +200 -0
  441. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/tasks.rb +21 -0
  442. data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/version.rb +20 -0
  443. data/lib/middleman-core/vendor/padrino-core-0.10.5/padrino-core.gemspec +38 -0
  444. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/apps/.components +6 -0
  445. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/apps/.gitignore +7 -0
  446. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/apps/complex.rb +32 -0
  447. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/apps/simple.rb +33 -0
  448. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/a.rb +9 -0
  449. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/b.rb +4 -0
  450. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/c.rb +1 -0
  451. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/e.rb +13 -0
  452. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/f.rb +2 -0
  453. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/g.rb +2 -0
  454. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/d.rb +4 -0
  455. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/helper.rb +81 -0
  456. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/mini_shoulda.rb +45 -0
  457. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_application.rb +108 -0
  458. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_core.rb +79 -0
  459. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_dependencies.rb +44 -0
  460. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_filters.rb +278 -0
  461. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_locale.rb +21 -0
  462. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_logger.rb +100 -0
  463. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_mounter.rb +177 -0
  464. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_reloader_complex.rb +75 -0
  465. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_reloader_simple.rb +98 -0
  466. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_rendering.rb +461 -0
  467. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_restful_routing.rb +33 -0
  468. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_router.rb +146 -0
  469. data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_routing.rb +1673 -0
  470. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/.document +5 -0
  471. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/.gitignore +21 -0
  472. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/.yardopts +1 -0
  473. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/LICENSE.txt +20 -0
  474. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/README.rdoc +239 -0
  475. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/Rakefile +5 -0
  476. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers.rb +58 -0
  477. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/asset_tag_helpers.rb +420 -0
  478. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_builder/abstract_form_builder.rb +220 -0
  479. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_builder/standard_form_builder.rb +43 -0
  480. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_helpers.rb +602 -0
  481. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/format_helpers.rb +381 -0
  482. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/cs.yml +103 -0
  483. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/da.yml +91 -0
  484. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/de.yml +81 -0
  485. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/en.yml +103 -0
  486. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/es.yml +103 -0
  487. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/fr.yml +80 -0
  488. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/hu.yml +103 -0
  489. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/it.yml +89 -0
  490. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/ja.yml +103 -0
  491. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/lv.yml +103 -0
  492. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/nl.yml +82 -0
  493. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/no.yml +91 -0
  494. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/pl.yml +95 -0
  495. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/pt_br.yml +103 -0
  496. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/ru.yml +103 -0
  497. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/tr.yml +103 -0
  498. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/uk.yml +103 -0
  499. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/zh_cn.yml +104 -0
  500. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/zh_tw.yml +103 -0
  501. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/number_helpers.rb +288 -0
  502. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers.rb +175 -0
  503. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/abstract_handler.rb +98 -0
  504. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/erb_handler.rb +79 -0
  505. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/haml_handler.rb +63 -0
  506. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/slim_handler.rb +81 -0
  507. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/render_helpers.rb +60 -0
  508. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/tag_helpers.rb +103 -0
  509. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/translation_helpers.rb +38 -0
  510. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/padrino-helpers.gemspec +27 -0
  511. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/app.rb +73 -0
  512. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.erb +14 -0
  513. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.haml +12 -0
  514. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.slim +13 -0
  515. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.erb +14 -0
  516. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.haml +12 -0
  517. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.slim +12 -0
  518. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.erb +11 -0
  519. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.haml +9 -0
  520. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.slim +9 -0
  521. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.erb +5 -0
  522. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.haml +5 -0
  523. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.slim +5 -0
  524. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.erb +20 -0
  525. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.haml +15 -0
  526. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.slim +15 -0
  527. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.erb +56 -0
  528. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.haml +47 -0
  529. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.slim +47 -0
  530. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.erb +56 -0
  531. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.haml +45 -0
  532. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.slim +45 -0
  533. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.erb +5 -0
  534. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.haml +4 -0
  535. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.slim +4 -0
  536. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.erb +3 -0
  537. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.haml +3 -0
  538. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.slim +3 -0
  539. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.erb +3 -0
  540. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.haml +3 -0
  541. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.slim +3 -0
  542. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_erb.erb +1 -0
  543. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_haml.haml +1 -0
  544. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_slim.slim +1 -0
  545. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.erb +1 -0
  546. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.haml +1 -0
  547. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.slim +1 -0
  548. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/app.rb +50 -0
  549. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engine.haml +5 -0
  550. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_erb.erb +1 -0
  551. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_haml.haml +1 -0
  552. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_slim.slim +1 -0
  553. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/erb/test.erb +1 -0
  554. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/explicit_engine.haml +5 -0
  555. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/haml/test.haml +1 -0
  556. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/_user.haml +7 -0
  557. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/haml_template.haml +1 -0
  558. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/some_template.haml +2 -0
  559. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/helper.rb +66 -0
  560. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_asset_tag_helpers.rb +320 -0
  561. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_form_builder.rb +996 -0
  562. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_form_helpers.rb +645 -0
  563. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_format_helpers.rb +227 -0
  564. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_locale.rb +20 -0
  565. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_number_helpers.rb +136 -0
  566. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_output_helpers.rb +153 -0
  567. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_render_helpers.rb +76 -0
  568. data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_tag_helpers.rb +105 -0
  569. data/lib/middleman-core/version.rb +13 -0
  570. data/middleman-core.gemspec +41 -0
  571. metadata +974 -0
@@ -0,0 +1,5 @@
1
+ # coding:utf-8
2
+ RAKE_ROOT = __FILE__
3
+
4
+ require 'rubygems'
5
+ require File.expand_path(File.dirname(__FILE__) + '/../gem_rake_helper')
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems' unless defined?(Gem)
3
+ require 'bundler/setup' if %w(Gemfile .components).all? { |f| File.exist?(f) }
4
+
5
+ padrino_core_path = File.expand_path('../../lib', __FILE__)
6
+ $:.unshift(padrino_core_path) if File.directory?(padrino_core_path) && !$:.include?(padrino_core_path)
7
+
8
+ require 'padrino-core/cli/base'
9
+ Padrino::Cli::Base.start(ARGV)
@@ -0,0 +1,167 @@
1
+ require 'sinatra/base'
2
+ require 'padrino-core/support_lite' unless defined?(SupportLite)
3
+
4
+ FileSet.glob_require('padrino-core/application/*.rb', __FILE__)
5
+ FileSet.glob_require('padrino-core/*.rb', __FILE__)
6
+
7
+ # The Padrino environment (falls back to the rack env or finally develop)
8
+ PADRINO_ENV = ENV["PADRINO_ENV"] ||= ENV["RACK_ENV"] ||= "development" unless defined?(PADRINO_ENV)
9
+ # The Padrino project root path (falls back to the first caller)
10
+ PADRINO_ROOT = ENV["PADRINO_ROOT"] ||= File.dirname(Padrino.first_caller) unless defined?(PADRINO_ROOT)
11
+
12
+ module Padrino
13
+ class ApplicationLoadError < RuntimeError # @private
14
+ end
15
+
16
+ class << self
17
+ ##
18
+ # Helper method for file references.
19
+ #
20
+ # @param [Array<String>] args
21
+ # The directories to join to {PADRINO_ROOT}.
22
+ #
23
+ # @return [String]
24
+ # The absolute path.
25
+ #
26
+ # @example
27
+ # # Referencing a file in config called settings.yml
28
+ # Padrino.root("config", "settings.yml")
29
+ # # returns PADRINO_ROOT + "/config/setting.yml"
30
+ #
31
+ def root(*args)
32
+ File.expand_path(File.join(PADRINO_ROOT, *args))
33
+ end
34
+
35
+ ##
36
+ # Helper method that return {PADRINO_ENV}.
37
+ #
38
+ # @return [Symbol]
39
+ # The Padrino Environment.
40
+ #
41
+ def env
42
+ @_env ||= PADRINO_ENV.to_s.downcase.to_sym
43
+ end
44
+
45
+ ##
46
+ # The resulting rack builder mapping each 'mounted' application.
47
+ #
48
+ # @return [Padrino::Router]
49
+ # The router for the application.
50
+ #
51
+ # @raise [ApplicationLoadError]
52
+ # No applications were mounted.
53
+ #
54
+ def application
55
+ raise ApplicationLoadError, "At least one app must be mounted!" unless Padrino.mounted_apps && Padrino.mounted_apps.any?
56
+ router = Padrino::Router.new
57
+ Padrino.mounted_apps.each { |app| app.map_onto(router) }
58
+
59
+ if middleware.present?
60
+ builder = Rack::Builder.new
61
+ middleware.each { |c,a,b| builder.use(c, *a, &b) }
62
+ builder.run(router)
63
+ builder.to_app
64
+ else
65
+ router
66
+ end
67
+ end
68
+
69
+ ##
70
+ # Configure Global Project Settings for mounted apps. These can be overloaded
71
+ # in each individual app's own personal configuration. This can be used like:
72
+ #
73
+ # @yield []
74
+ # The given block will be called to configure each application.
75
+ #
76
+ # @example
77
+ # Padrino.configure_apps do
78
+ # enable :sessions
79
+ # disable :raise_errors
80
+ # end
81
+ #
82
+ def configure_apps(&block)
83
+ @_global_configuration = block if block_given?
84
+ end
85
+
86
+ ##
87
+ # Returns project-wide configuration settings defined in
88
+ # {configure_apps} block.
89
+ #
90
+ def apps_configuration
91
+ @_global_configuration
92
+ end
93
+
94
+ ##
95
+ # Set +Encoding.default_internal+ and +Encoding.default_external+
96
+ # to +Encoding::UFT_8+.
97
+ #
98
+ # Please note that in +1.9.2+ with some template engines like +haml+
99
+ # you should turn off Encoding.default_internal to prevent problems.
100
+ #
101
+ # @see https://github.com/rtomayko/tilt/issues/75
102
+ #
103
+ # @return [NilClass]
104
+ #
105
+ def set_encoding
106
+ if RUBY_VERSION < '1.9'
107
+ $KCODE='u'
108
+ else
109
+ Encoding.default_external = Encoding::UTF_8
110
+ Encoding.default_internal = Encoding::UTF_8
111
+ end
112
+ nil
113
+ end
114
+
115
+ ##
116
+ # Determines whether the dependencies are locked by Bundler.
117
+ # otherwise return nil
118
+ #
119
+ # @return [:locked, :unlocked, nil]
120
+ # Returns +:locked+ if the +Gemfile.lock+ file exists, or +:unlocked+
121
+ # if only the +Gemfile+ exists.
122
+ #
123
+ # @deprecated Will be removed in 1.0.0
124
+ #
125
+ def bundle
126
+ return :locked if File.exist?(root('Gemfile.lock'))
127
+ return :unlocked if File.exist?(root("Gemfile"))
128
+ end
129
+
130
+ ##
131
+ # A Rack::Builder object that allows to add middlewares in front of all
132
+ # Padrino applications.
133
+ #
134
+ # @return [Array<Array<Class, Array, Proc>>]
135
+ # The middleware classes.
136
+ #
137
+ def middleware
138
+ @middleware ||= []
139
+ end
140
+
141
+ ##
142
+ # Clears all previously configured middlewares.
143
+ #
144
+ # @return [Array]
145
+ # An empty array
146
+ #
147
+ def clear_middleware!
148
+ @middleware = []
149
+ end
150
+
151
+ ##
152
+ # Convenience method for adding a Middleware to the whole padrino app.
153
+ #
154
+ # @param [Class] m
155
+ # The middleware class.
156
+ #
157
+ # @param [Array] args
158
+ # The arguments for the middleware.
159
+ #
160
+ # @yield []
161
+ # The given block will be passed to the initialized middleware.
162
+ #
163
+ def use(m, *args, &block)
164
+ middleware << [m, args, block]
165
+ end
166
+ end # self
167
+ end # Padrino
@@ -0,0 +1,270 @@
1
+ module Padrino
2
+ class ApplicationSetupError < RuntimeError # @private
3
+ end
4
+
5
+ ##
6
+ # Subclasses of this become independent Padrino applications (stemming from Sinatra::Application)
7
+ # These subclassed applications can be easily mounted into other Padrino applications as well.
8
+ #
9
+ class Application < Sinatra::Base
10
+ # Support for advanced routing, controllers, url_for
11
+ register Padrino::Routing
12
+
13
+ ##
14
+ # Returns the logger for this application.
15
+ #
16
+ # @return [Padrino::Logger] Logger associated with this app.
17
+ #
18
+ def logger
19
+ Padrino.logger
20
+ end
21
+
22
+ class << self
23
+
24
+ def inherited(base) # @private
25
+ logger.devel "Setup #{base}"
26
+ CALLERS_TO_IGNORE.concat(PADRINO_IGNORE_CALLERS)
27
+ base.default_configuration!
28
+ base.prerequisites.concat([
29
+ File.join(base.root, "/models.rb"),
30
+ File.join(base.root, "/models/**/*.rb"),
31
+ File.join(base.root, "/lib.rb"),
32
+ File.join(base.root, "/lib/**/*.rb")
33
+ ]).uniq!
34
+ Padrino.require_dependencies(base.prerequisites)
35
+ super(base) # Loading the subclass inherited method
36
+ end
37
+
38
+ ##
39
+ # Reloads the application files from all defined load paths
40
+ #
41
+ # This method is used from our Padrino Reloader during development mode
42
+ # in order to reload the source files.
43
+ #
44
+ # @return [TrueClass]
45
+ #
46
+ # @example
47
+ # MyApp.reload!
48
+ #
49
+ def reload!
50
+ logger.devel "Reloading #{self}"
51
+ @_dependencies = nil # Reset dependencies
52
+ reset! # Reset sinatra app
53
+ reset_router! # Reset all routes
54
+ Padrino.require_dependencies(self.app_file, :force => true) # Reload the app file
55
+ require_dependencies # Reload dependencies
56
+ default_filters! # Reload filters
57
+ default_routes! # Reload default routes
58
+ default_errors! # Reload our errors
59
+ I18n.reload! if defined?(I18n) # Reload also our translations
60
+ true
61
+ end
62
+
63
+ ##
64
+ # Resets application routes to only routes not defined by the user
65
+ #
66
+ # @return [TrueClass]
67
+ #
68
+ # @example
69
+ # MyApp.reset_routes!
70
+ #
71
+ def reset_routes!
72
+ reset_router!
73
+ default_routes!
74
+ true
75
+ end
76
+
77
+ ##
78
+ # Returns the routes of our app.
79
+ #
80
+ # @example
81
+ # MyApp.routes
82
+ #
83
+ def routes
84
+ router.routes
85
+ end
86
+
87
+ ##
88
+ # Setup the application by registering initializers, load paths and logger
89
+ # Invoked automatically when an application is first instantiated
90
+ #
91
+ # @return [TrueClass]
92
+ #
93
+ def setup_application!
94
+ return if @_configured
95
+ self.require_dependencies
96
+ self.default_filters!
97
+ self.default_routes!
98
+ self.default_errors!
99
+ if defined?(I18n)
100
+ I18n.load_path << self.locale_path
101
+ I18n.reload!
102
+ end
103
+ @_configured = true
104
+ @_configured
105
+ end
106
+
107
+ ##
108
+ # Run the Padrino app as a self-hosted server using
109
+ # Thin, Mongrel or WEBrick (in that order)
110
+ #
111
+ # @see Padrino::Server#start
112
+ #
113
+ def run!(options={})
114
+ return unless Padrino.load!
115
+ Padrino.mount(self.to_s).to("/")
116
+ Padrino.run!(options)
117
+ end
118
+
119
+ ##
120
+ # @return [Array]
121
+ # directory that need to be added to +$LOAD_PATHS+ from this application
122
+ #
123
+ def load_paths
124
+ @_load_paths ||= %w(models lib mailers controllers helpers).map { |path| File.join(self.root, path) }
125
+ end
126
+
127
+ ##
128
+ # Returns default list of path globs to load as dependencies
129
+ # Appends custom dependency patterns to the be loaded for your Application
130
+ #
131
+ # @return [Array]
132
+ # list of path globs to load as dependencies
133
+ #
134
+ # @example
135
+ # MyApp.dependencies << "#{Padrino.root}/uploaders/**/*.rb"
136
+ # MyApp.dependencies << Padrino.root('other_app', 'controllers.rb')
137
+ #
138
+ def dependencies
139
+ @_dependencies ||= [
140
+ "urls.rb", "config/urls.rb", "mailers/*.rb", "mailers.rb",
141
+ "controllers/**/*.rb", "controllers.rb", "helpers/**/*.rb", "helpers.rb"
142
+ ].map { |file| Dir[File.join(self.root, file)] }.flatten
143
+ end
144
+
145
+ ##
146
+ # An array of file to load before your app.rb, basically are files wich our app depends on.
147
+ #
148
+ # By default we look for files:
149
+ #
150
+ # # List of default files that we are looking for:
151
+ # yourapp/models.rb
152
+ # yourapp/models/**/*.rb
153
+ # yourapp/lib.rb
154
+ # yourapp/lib/**/*.rb
155
+ #
156
+ # @example Adding a custom perequisite
157
+ # MyApp.prerequisites << Padrino.root('my_app', 'custom_model.rb')
158
+ #
159
+ def prerequisites
160
+ @_prerequisites ||= []
161
+ end
162
+
163
+ protected
164
+ ##
165
+ # Defines default settings for Padrino application
166
+ #
167
+ def default_configuration!
168
+ # Overwriting Sinatra defaults
169
+ set :app_file, File.expand_path(caller_files.first || $0) # Assume app file is first caller
170
+ set :environment, Padrino.env
171
+ set :reload, Proc.new { development? }
172
+ set :logging, Proc.new { development? }
173
+ set :method_override, true
174
+ set :sessions, false
175
+ set :public_folder, Proc.new { Padrino.root('public', uri_root) }
176
+ set :views, Proc.new { File.join(root, "views") }
177
+ set :images_path, Proc.new { File.join(public, "images") }
178
+ set :protection, false
179
+ # Padrino specific
180
+ set :uri_root, "/"
181
+ set :app_name, self.to_s.underscore.to_sym
182
+ set :default_builder, 'StandardFormBuilder'
183
+ set :flash, defined?(Sinatra::Flash) || defined?(Rack::Flash)
184
+ set :authentication, false
185
+ # Padrino locale
186
+ set :locale_path, Proc.new { Dir[File.join(self.root, "/locale/**/*.{rb,yml}")] }
187
+ # Load the Global Configurations
188
+ class_eval(&Padrino.apps_configuration) if Padrino.apps_configuration
189
+ end
190
+
191
+ ##
192
+ # We need to add almost __sinatra__ images.
193
+ #
194
+ def default_routes!
195
+ configure :development do
196
+ get '*__sinatra__/:image.png' do
197
+ content_type :png
198
+ filename = File.dirname(__FILE__) + "/images/#{params[:image]}.png"
199
+ send_file filename
200
+ end
201
+ end
202
+ end
203
+
204
+ ##
205
+ # This filter it's used for know the format of the request, and automatically set the content type.
206
+ #
207
+ def default_filters!
208
+ before do
209
+ unless @_content_type
210
+ @_content_type = :html
211
+ response['Content-Type'] = 'text/html;charset=utf-8'
212
+ end
213
+ end
214
+ end
215
+
216
+ ##
217
+ # This log errors for production environments
218
+ #
219
+ def default_errors!
220
+ configure :production do
221
+ error ::Exception do
222
+ boom = env['sinatra.error']
223
+ logger.error ["#{boom.class} - #{boom.message}:", *boom.backtrace].join("\n ")
224
+ response.status = 500
225
+ content_type 'text/html'
226
+ '<h1>Internal Server Error</h1>'
227
+ end unless errors.has_key?(::Exception)
228
+ end
229
+ end
230
+
231
+ ##
232
+ # Requires all files within the application load paths
233
+ #
234
+ def require_dependencies
235
+ Padrino.set_load_paths(*load_paths)
236
+ Padrino.require_dependencies(dependencies, :force => true)
237
+ end
238
+
239
+ private
240
+
241
+ # Overrides the default middleware for Sinatra based on Padrino conventions
242
+ # Also initializes the application after setting up the middleware
243
+ def setup_default_middleware(builder)
244
+ setup_sessions builder
245
+ setup_flash builder
246
+ builder.use Padrino::ShowExceptions if show_exceptions?
247
+ builder.use Padrino::Logger::Rack, uri_root if Padrino.logger && logging?
248
+ builder.use Padrino::Reloader::Rack if reload?
249
+ builder.use Rack::MethodOverride if method_override?
250
+ builder.use Rack::Head
251
+ setup_protection builder
252
+ setup_application!
253
+ end
254
+
255
+ # TODO Remove this in a few versions (rack-flash deprecation)
256
+ # Move register Sinatra::Flash into setup_default_middleware
257
+ # Initializes flash using sinatra-flash or rack-flash
258
+ def setup_flash(builder)
259
+ register Sinatra::Flash if flash? && defined?(Sinatra::Flash)
260
+ if defined?(Rack::Flash) && !defined?(Sinatra::Flash)
261
+ logger.warn %Q{
262
+ [Deprecation] In Gemfile, 'rack-flash' should be replaced with 'sinatra-flash'!
263
+ Rack-Flash is not compatible with later versions of Rack and should be replaced.
264
+ }
265
+ builder.use Rack::Flash, :sweep => true if flash?
266
+ end
267
+ end
268
+ end # self
269
+ end # Application
270
+ end # Padrino