middleman-core 3.0.0.beta.2 → 3.0.0.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- data/features/cli_extension.feature +13 -0
- data/features/{cli.feature → cli_init.feature} +1 -10
- data/features/directory_index.feature +29 -1
- data/features/dynamic_pages.feature +1 -0
- data/features/extensionless_text_files.feature +0 -2
- data/features/front-matter.feature +17 -1
- data/features/frontmatter_page_settings.feature +16 -1
- data/features/helpers_relative_link_to.feature +68 -0
- data/features/unicode_filenames.feature +14 -0
- data/fixtures/csspie/config.rb +0 -0
- data/fixtures/csspie/source/stylesheets/PIE.htc +96 -0
- data/fixtures/dynamic-pages-app/config.rb +3 -0
- data/fixtures/frontmatter-app/source/front-matter-auto.erb +6 -0
- data/fixtures/frontmatter-app/source/front-matter.html.erb +2 -0
- data/fixtures/frontmatter-app/source/json-front-matter-2.php.erb +7 -0
- data/fixtures/frontmatter-app/source/json-front-matter-auto.erb +6 -0
- data/fixtures/frontmatter-app/source/json-front-matter.html.erb +6 -0
- data/fixtures/unicode-filenames-app/config.rb +1 -0
- data/fixtures/unicode-filenames-app/source/snowmen-rule-/342/230/203.html +4 -0
- data/lib/middleman-core/application.rb +43 -335
- data/lib/middleman-core/cli/build.rb +11 -4
- data/lib/middleman-core/cli/bundler.rb +40 -0
- data/lib/middleman-core/cli/extension.rb +36 -0
- data/lib/middleman-core/cli/server.rb +2 -2
- data/lib/middleman-core/cli.rb +2 -6
- data/lib/middleman-core/core_extensions/assets.rb +35 -31
- data/lib/middleman-core/core_extensions/builder.rb +14 -9
- data/lib/middleman-core/core_extensions/data.rb +150 -145
- data/lib/middleman-core/core_extensions/default_helpers.rb +159 -97
- data/lib/middleman-core/core_extensions/extensions.rb +103 -97
- data/lib/middleman-core/core_extensions/external_helpers.rb +27 -23
- data/lib/middleman-core/core_extensions/file_watcher.rb +140 -110
- data/lib/middleman-core/core_extensions/front_matter.rb +155 -175
- data/lib/middleman-core/core_extensions/i18n.rb +111 -102
- data/lib/middleman-core/core_extensions/rendering.rb +293 -295
- data/lib/middleman-core/core_extensions/request.rb +338 -0
- data/lib/middleman-core/core_extensions/routing.rb +72 -68
- data/lib/middleman-core/core_extensions/show_exceptions.rb +23 -18
- data/lib/middleman-core/core_extensions.rb +39 -0
- data/lib/middleman-core/extensions/directory_indexes.rb +1 -4
- data/lib/middleman-core/extensions/lorem.rb +10 -3
- data/lib/middleman-core/extensions.rb +2 -64
- data/lib/middleman-core/preview_server.rb +157 -0
- data/lib/middleman-core/sitemap/extensions/ignores.rb +73 -68
- data/lib/middleman-core/sitemap/extensions/on_disk.rb +65 -58
- data/lib/middleman-core/sitemap/extensions/proxies.rb +86 -75
- data/lib/middleman-core/sitemap/extensions/traversal.rb +68 -61
- data/lib/middleman-core/sitemap/resource.rb +123 -102
- data/lib/middleman-core/sitemap/store.rb +170 -149
- data/lib/middleman-core/sitemap.rb +57 -57
- data/lib/middleman-core/step_definitions/server_steps.rb +13 -3
- data/lib/middleman-core/templates/extension/Gemfile +4 -0
- data/lib/middleman-core/templates/extension/Rakefile +12 -0
- data/lib/middleman-core/templates/extension/features/support/env.rb +4 -0
- data/lib/middleman-core/templates/extension/gemspec +24 -0
- data/lib/middleman-core/templates/extension/lib/lib.rb +49 -0
- data/lib/middleman-core/templates/extension/lib/middleman_extension.rb +1 -0
- data/lib/middleman-core/templates/shared/gitignore +14 -0
- data/lib/middleman-core/templates.rb +14 -8
- data/lib/middleman-core/util.rb +31 -9
- data/lib/middleman-core/version.rb +1 -1
- data/lib/middleman-core.rb +6 -4
- data/middleman-core.gemspec +4 -6
- metadata +62 -203
- data/lib/middleman-core/vendor/padrino-core-0.10.6/.document +0 -5
- data/lib/middleman-core/vendor/padrino-core-0.10.6/.gitignore +0 -22
- data/lib/middleman-core/vendor/padrino-core-0.10.6/.yardopts +0 -1
- data/lib/middleman-core/vendor/padrino-core-0.10.6/LICENSE.txt +0 -20
- data/lib/middleman-core/vendor/padrino-core-0.10.6/README.rdoc +0 -294
- data/lib/middleman-core/vendor/padrino-core-0.10.6/Rakefile +0 -5
- data/lib/middleman-core/vendor/padrino-core-0.10.6/bin/padrino +0 -9
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application/rendering.rb +0 -292
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application/routing.rb +0 -943
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application/showexceptions.rb +0 -20
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application.rb +0 -269
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/caller.rb +0 -53
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/adapter.rb +0 -24
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/base.rb +0 -150
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/console.rb +0 -20
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/rake.rb +0 -24
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/rake_tasks.rb +0 -59
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/command.rb +0 -38
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/images/404.png +0 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/images/500.png +0 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/loader.rb +0 -211
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/cs.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/da.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/de.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/en.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/es.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/fr.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/hu.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/it.yml +0 -40
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/ja.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/lv.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/nl.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/no.yml +0 -35
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/pl.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/pt_br.yml +0 -40
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/ru.yml +0 -35
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/tr.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/uk.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/zh_cn.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/zh_tw.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/logger.rb +0 -428
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/mounter.rb +0 -224
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/reloader.rb +0 -254
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/router.rb +0 -98
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/server.rb +0 -79
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/support_lite.rb +0 -199
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/tasks.rb +0 -21
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/version.rb +0 -20
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core.rb +0 -152
- data/lib/middleman-core/vendor/padrino-core-0.10.6/padrino-core.gemspec +0 -38
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/.components +0 -6
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/.gitignore +0 -7
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/complex.rb +0 -32
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/simple.rb +0 -33
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/a.rb +0 -9
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/b.rb +0 -4
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/c.rb +0 -1
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/circular/e.rb +0 -13
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/circular/f.rb +0 -2
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/circular/g.rb +0 -2
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/d.rb +0 -4
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/helper.rb +0 -83
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/mini_shoulda.rb +0 -45
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_application.rb +0 -108
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_core.rb +0 -77
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_dependencies.rb +0 -44
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_filters.rb +0 -278
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_locale.rb +0 -21
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_logger.rb +0 -154
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_mounter.rb +0 -177
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_reloader_complex.rb +0 -75
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_reloader_simple.rb +0 -98
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_rendering.rb +0 -461
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_restful_routing.rb +0 -33
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_router.rb +0 -146
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_routing.rb +0 -1680
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/.document +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/.gitignore +0 -21
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/.yardopts +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/LICENSE.txt +0 -20
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/README.rdoc +0 -239
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/Rakefile +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/asset_tag_helpers.rb +0 -417
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/form_builder/abstract_form_builder.rb +0 -251
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/form_builder/standard_form_builder.rb +0 -43
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/form_helpers.rb +0 -787
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/format_helpers.rb +0 -381
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/cs.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/da.yml +0 -91
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/de.yml +0 -81
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/en.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/es.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/fr.yml +0 -80
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/hu.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/it.yml +0 -89
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/ja.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/lv.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/nl.yml +0 -82
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/no.yml +0 -91
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/pl.yml +0 -95
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/pt_br.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/ru.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/tr.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/uk.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/zh_cn.yml +0 -104
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/zh_tw.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/number_helpers.rb +0 -288
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/abstract_handler.rb +0 -98
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/erb_handler.rb +0 -79
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/haml_handler.rb +0 -63
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/slim_handler.rb +0 -81
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers.rb +0 -175
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/render_helpers.rb +0 -60
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/tag_helpers.rb +0 -260
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/translation_helpers.rb +0 -38
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers.rb +0 -59
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/padrino-helpers.gemspec +0 -27
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/app.rb +0 -73
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/capture_concat.erb +0 -14
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/capture_concat.haml +0 -12
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/capture_concat.slim +0 -13
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_for.erb +0 -14
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_for.haml +0 -12
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_for.slim +0 -12
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_tag.erb +0 -11
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_tag.haml +0 -9
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_tag.slim +0 -9
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/current_engine.erb +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/current_engine.haml +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/current_engine.slim +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/fields_for.erb +0 -20
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/fields_for.haml +0 -15
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/fields_for.slim +0 -15
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_for.erb +0 -72
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_for.haml +0 -59
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_for.slim +0 -59
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_tag.erb +0 -86
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_tag.haml +0 -70
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_tag.slim +0 -70
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/link_to.erb +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/link_to.haml +0 -4
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/link_to.slim +0 -4
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/mail_to.erb +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/mail_to.haml +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/mail_to.slim +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/meta_tag.erb +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/meta_tag.haml +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/meta_tag.slim +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/partials/_erb.erb +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/partials/_haml.haml +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/partials/_slim.slim +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/simple_partial.erb +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/simple_partial.haml +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/simple_partial.slim +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/app.rb +0 -50
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engine.haml +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engines/_erb.erb +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engines/_haml.haml +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engines/_slim.slim +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/erb/test.erb +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/explicit_engine.haml +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/haml/test.haml +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/template/_user.haml +0 -7
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/template/haml_template.haml +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/template/some_template.haml +0 -2
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/helper.rb +0 -66
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_asset_tag_helpers.rb +0 -328
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_form_builder.rb +0 -1106
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_form_helpers.rb +0 -770
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_format_helpers.rb +0 -227
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_locale.rb +0 -20
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_number_helpers.rb +0 -139
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_output_helpers.rb +0 -153
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_render_helpers.rb +0 -76
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_tag_helpers.rb +0 -106
- data/lib/middleman-core/watcher.rb +0 -196
@@ -0,0 +1,338 @@
|
|
1
|
+
# Built on Rack
|
2
|
+
require "rack"
|
3
|
+
require "rack/file"
|
4
|
+
|
5
|
+
module Middleman
|
6
|
+
module CoreExtensions
|
7
|
+
|
8
|
+
# Base helper to manipulate asset paths
|
9
|
+
module Request
|
10
|
+
|
11
|
+
# Extension registered
|
12
|
+
class << self
|
13
|
+
# @private
|
14
|
+
def registered(app)
|
15
|
+
|
16
|
+
# CSSPIE HTC File
|
17
|
+
::Rack::Mime::MIME_TYPES['.html'] = 'text/x-component'
|
18
|
+
|
19
|
+
# Let's serve all HTML as UTF-8
|
20
|
+
::Rack::Mime::MIME_TYPES['.html'] = 'text/html;charset=utf8'
|
21
|
+
::Rack::Mime::MIME_TYPES['.htm'] = 'text/html;charset=utf8'
|
22
|
+
|
23
|
+
app.extend ClassMethods
|
24
|
+
app.extend ServerMethods
|
25
|
+
|
26
|
+
# Include instance methods
|
27
|
+
app.send :include, InstanceMethods
|
28
|
+
end
|
29
|
+
alias :included :registered
|
30
|
+
end
|
31
|
+
|
32
|
+
module ClassMethods
|
33
|
+
# Reset Rack setup
|
34
|
+
#
|
35
|
+
# @private
|
36
|
+
def reset!
|
37
|
+
@app = nil
|
38
|
+
@prototype = nil
|
39
|
+
end
|
40
|
+
|
41
|
+
# The shared Rack instance being build
|
42
|
+
#
|
43
|
+
# @private
|
44
|
+
# @return [Rack::Builder]
|
45
|
+
def app
|
46
|
+
@app ||= ::Rack::Builder.new
|
47
|
+
end
|
48
|
+
|
49
|
+
# Get the static instance
|
50
|
+
#
|
51
|
+
# @private
|
52
|
+
# @return [Middleman::Application]
|
53
|
+
def inst(&block)
|
54
|
+
@inst ||= begin
|
55
|
+
mm = new(&block)
|
56
|
+
mm.run_hook :ready
|
57
|
+
mm
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Set the shared instance
|
62
|
+
#
|
63
|
+
# @private
|
64
|
+
# @param [Middleman::Application] inst
|
65
|
+
# @return [void]
|
66
|
+
def inst=(inst)
|
67
|
+
@inst = inst
|
68
|
+
end
|
69
|
+
|
70
|
+
# Return built Rack app
|
71
|
+
#
|
72
|
+
# @private
|
73
|
+
# @return [Rack::Builder]
|
74
|
+
def to_rack_app(&block)
|
75
|
+
inner_app = inst(&block)
|
76
|
+
|
77
|
+
(@middleware || []).each do |m|
|
78
|
+
app.use(m[0], *m[1], &m[2])
|
79
|
+
end
|
80
|
+
|
81
|
+
app.map("/") { run inner_app }
|
82
|
+
|
83
|
+
(@mappings || []).each do |m|
|
84
|
+
app.map(m[0], &m[1])
|
85
|
+
end
|
86
|
+
|
87
|
+
app
|
88
|
+
end
|
89
|
+
|
90
|
+
# Prototype app. Used in config.ru
|
91
|
+
#
|
92
|
+
# @private
|
93
|
+
# @return [Rack::Builder]
|
94
|
+
def prototype
|
95
|
+
@prototype ||= to_rack_app
|
96
|
+
end
|
97
|
+
|
98
|
+
# Call prototype, use in config.ru
|
99
|
+
#
|
100
|
+
# @private
|
101
|
+
def call(env)
|
102
|
+
prototype.call(env)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Use Rack middleware
|
106
|
+
#
|
107
|
+
# @param [Class] middleware Middleware module
|
108
|
+
# @return [void]
|
109
|
+
def use(middleware, *args, &block)
|
110
|
+
@middleware ||= []
|
111
|
+
@middleware << [middleware, args, block]
|
112
|
+
end
|
113
|
+
|
114
|
+
# Add Rack App mapped to specific path
|
115
|
+
#
|
116
|
+
# @param [String] map Path to map
|
117
|
+
# @return [void]
|
118
|
+
def map(map, &block)
|
119
|
+
@mappings ||= []
|
120
|
+
@mappings << [map, block]
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
module ServerMethods
|
125
|
+
# Create a new Class which is based on Middleman::Application
|
126
|
+
# Used to create a safe sandbox into which extensions and
|
127
|
+
# configuration can be included later without impacting
|
128
|
+
# other classes and instances.
|
129
|
+
#
|
130
|
+
# @return [Class]
|
131
|
+
def server(&block)
|
132
|
+
@@servercounter ||= 0
|
133
|
+
@@servercounter += 1
|
134
|
+
const_set("MiddlemanApplication#{@@servercounter}", Class.new(Middleman::Application))
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
# Methods to be mixed-in to Middleman::Application
|
139
|
+
module InstanceMethods
|
140
|
+
# Backwards-compatibility with old request.path signature
|
141
|
+
def request
|
142
|
+
Thread.current[:request]
|
143
|
+
end
|
144
|
+
|
145
|
+
# Accessor for current path
|
146
|
+
# @return [String]
|
147
|
+
def current_path
|
148
|
+
Thread.current[:current_path]
|
149
|
+
end
|
150
|
+
|
151
|
+
# Set the current path
|
152
|
+
#
|
153
|
+
# @param [String] path The new current path
|
154
|
+
# @return [void]
|
155
|
+
def current_path=(path)
|
156
|
+
Thread.current[:current_path] = path
|
157
|
+
Thread.current[:request] = ::Thor::CoreExt::HashWithIndifferentAccess.new({
|
158
|
+
:path => path,
|
159
|
+
:params => req ? ::Thor::CoreExt::HashWithIndifferentAccess.new(req.params) : {}
|
160
|
+
})
|
161
|
+
end
|
162
|
+
|
163
|
+
def use(*args, &block); self.class.use(*args); end
|
164
|
+
def map(*args, &block); self.class.map(*args, &block); end
|
165
|
+
|
166
|
+
# Rack env
|
167
|
+
def env
|
168
|
+
Thread.current[:env]
|
169
|
+
end
|
170
|
+
def env=(value)
|
171
|
+
Thread.current[:env] = value
|
172
|
+
end
|
173
|
+
|
174
|
+
# Rack request
|
175
|
+
# @return [Rack::Request]
|
176
|
+
def req
|
177
|
+
Thread.current[:req]
|
178
|
+
end
|
179
|
+
def req=(value)
|
180
|
+
Thread.current[:req] = value
|
181
|
+
end
|
182
|
+
|
183
|
+
# Rack response
|
184
|
+
# @return [Rack::Response]
|
185
|
+
def res
|
186
|
+
Thread.current[:res]
|
187
|
+
end
|
188
|
+
def res=(value)
|
189
|
+
Thread.current[:res] = value
|
190
|
+
end
|
191
|
+
|
192
|
+
def call(env)
|
193
|
+
dup.call!(env)
|
194
|
+
end
|
195
|
+
|
196
|
+
# Rack Interface
|
197
|
+
#
|
198
|
+
# @param env Rack environment
|
199
|
+
def call!(env)
|
200
|
+
self.env = env
|
201
|
+
# Store environment, request and response for later
|
202
|
+
self.req = req = ::Rack::Request.new(env)
|
203
|
+
self.res = res = ::Rack::Response.new
|
204
|
+
|
205
|
+
puts "== Request: #{env["PATH_INFO"]}" if logging?
|
206
|
+
|
207
|
+
# Catch :halt exceptions and use that response if given
|
208
|
+
catch(:halt) do
|
209
|
+
process_request(env, req, res)
|
210
|
+
|
211
|
+
res.status = 404
|
212
|
+
res.finish
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# Halt the current request and return a response
|
217
|
+
#
|
218
|
+
# @param [String] response Response value
|
219
|
+
def halt(response)
|
220
|
+
throw :halt, response
|
221
|
+
end
|
222
|
+
|
223
|
+
# Core response method. We process the request, check with
|
224
|
+
# the sitemap, and return the correct file, response or status
|
225
|
+
# message.
|
226
|
+
#
|
227
|
+
# @param env
|
228
|
+
# @param [Rack::Request] req
|
229
|
+
# @param [Rack::Response] res
|
230
|
+
def process_request(env, req, res)
|
231
|
+
start_time = Time.now
|
232
|
+
|
233
|
+
# Normalize the path and add index if we're looking at a directory
|
234
|
+
original_path = URI.decode(env["PATH_INFO"].dup)
|
235
|
+
if original_path.respond_to? :force_encoding
|
236
|
+
original_path.force_encoding('UTF-8')
|
237
|
+
end
|
238
|
+
request_path = full_path(original_path)
|
239
|
+
|
240
|
+
# Run before callbacks
|
241
|
+
run_hook :before
|
242
|
+
|
243
|
+
if original_path != request_path
|
244
|
+
# Get the resource object for this path
|
245
|
+
resource = sitemap.find_resource_by_destination_path(original_path)
|
246
|
+
end
|
247
|
+
|
248
|
+
# Get the resource object for this full path
|
249
|
+
resource ||= sitemap.find_resource_by_destination_path(request_path)
|
250
|
+
|
251
|
+
# Return 404 if not in sitemap
|
252
|
+
return not_found(res) unless resource && !resource.ignored?
|
253
|
+
|
254
|
+
# If this path is a static file, send it immediately
|
255
|
+
return send_file(resource.source_file, env, res) unless resource.template?
|
256
|
+
|
257
|
+
# Set the current path for use in helpers
|
258
|
+
self.current_path = request_path.dup
|
259
|
+
|
260
|
+
# Set a HTTP content type based on the request's extensions
|
261
|
+
content_type(res, resource.mime_type)
|
262
|
+
|
263
|
+
begin
|
264
|
+
# Write out the contents of the page
|
265
|
+
res.write resource.render
|
266
|
+
|
267
|
+
# Valid content is a 200 status
|
268
|
+
res.status = 200
|
269
|
+
rescue Middleman::CoreExtensions::Rendering::TemplateNotFound => e
|
270
|
+
res.write "Error: #{e.message}"
|
271
|
+
res.status = 500
|
272
|
+
end
|
273
|
+
|
274
|
+
# End the request
|
275
|
+
puts "== Finishing Request: #{self.current_path} (#{(Time.now - start_time).round(2)}s)" if logging?
|
276
|
+
halt res.finish
|
277
|
+
end
|
278
|
+
|
279
|
+
# Add a new mime-type for a specific extension
|
280
|
+
#
|
281
|
+
# @param [Symbol] type File extension
|
282
|
+
# @param [String] value Mime type
|
283
|
+
# @return [void]
|
284
|
+
def mime_type(type, value=nil)
|
285
|
+
return type if type.nil? || type.to_s.include?('/')
|
286
|
+
type = ".#{type}" unless type.to_s[0] == ?.
|
287
|
+
return ::Rack::Mime.mime_type(type, nil) unless value
|
288
|
+
::Rack::Mime::MIME_TYPES[type] = value
|
289
|
+
end
|
290
|
+
|
291
|
+
# Halt request and return 404
|
292
|
+
def not_found(res)
|
293
|
+
res.status == 404
|
294
|
+
res.write "<html><body><h1>File Not Found</h1><p>#{@request_path}</p></body>"
|
295
|
+
res.finish
|
296
|
+
end
|
297
|
+
|
298
|
+
# Immediately send static file
|
299
|
+
#
|
300
|
+
# @param [String] path File to send
|
301
|
+
def send_file(path, env, res)
|
302
|
+
extension = File.extname(path)
|
303
|
+
matched_mime = mime_type(extension)
|
304
|
+
matched_mime = "application/octet-stream" if matched_mime.nil?
|
305
|
+
content_type res, matched_mime
|
306
|
+
|
307
|
+
file = ::Rack::File.new nil
|
308
|
+
file.path = path
|
309
|
+
response = file.serving(env)
|
310
|
+
response[1]['Content-Encoding'] = 'gzip' if %w(.svgz).include?(extension)
|
311
|
+
halt response
|
312
|
+
end
|
313
|
+
|
314
|
+
# Set the content type for the current request
|
315
|
+
#
|
316
|
+
# @param [String] type Content type
|
317
|
+
# @param [Hash] params
|
318
|
+
# @return [void]
|
319
|
+
def content_type(res, type, params={})
|
320
|
+
return res['Content-Type'] unless type
|
321
|
+
default = params.delete :default
|
322
|
+
mime_type = mime_type(type) || default
|
323
|
+
throw "Unknown media type: %p" % type if mime_type.nil?
|
324
|
+
mime_type = mime_type.dup
|
325
|
+
unless params.include? :charset
|
326
|
+
params[:charset] = params.delete('charset') || "utf-8"
|
327
|
+
end
|
328
|
+
params.delete :charset if mime_type.include? 'charset'
|
329
|
+
unless params.empty?
|
330
|
+
mime_type << (mime_type.include?(';') ? ', ' : ';')
|
331
|
+
mime_type << params.map { |kv| kv.join('=') }.join(', ')
|
332
|
+
end
|
333
|
+
res['Content-Type'] = mime_type
|
334
|
+
end
|
335
|
+
end
|
336
|
+
end
|
337
|
+
end
|
338
|
+
end
|
@@ -1,88 +1,92 @@
|
|
1
1
|
# Routing extension
|
2
|
-
module Middleman
|
2
|
+
module Middleman
|
3
|
+
module CoreExtensions
|
4
|
+
module Routing
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
+
# Setup extension
|
7
|
+
class << self
|
6
8
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
# Once registered
|
10
|
+
def registered(app)
|
11
|
+
# Include methods
|
12
|
+
app.send :include, InstanceMethods
|
13
|
+
end
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
+
alias :included :registered
|
16
|
+
end
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
+
# Routing instance methods
|
19
|
+
module InstanceMethods
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
21
|
+
# Takes a block which allows many pages to have the same layout
|
22
|
+
#
|
23
|
+
# with_layout :admin do
|
24
|
+
# page "/admin/"
|
25
|
+
# page "/admin/login.html"
|
26
|
+
# end
|
27
|
+
#
|
28
|
+
# @param [String, Symbol] layout_name
|
29
|
+
# @return [void]
|
30
|
+
def with_layout(layout_name, &block)
|
31
|
+
old_layout = layout
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
set :layout, layout_name
|
34
|
+
instance_exec(&block) if block_given?
|
35
|
+
ensure
|
36
|
+
set :layout, old_layout
|
37
|
+
end
|
36
38
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
39
|
+
# The page method allows the layout to be set on a specific path
|
40
|
+
#
|
41
|
+
# page "/about.html", :layout => false
|
42
|
+
# page "/", :layout => :homepage_layout
|
43
|
+
#
|
44
|
+
# @param [String] url
|
45
|
+
# @param [Hash] opts
|
46
|
+
# @return [void]
|
47
|
+
def page(url, opts={}, &block)
|
48
|
+
a_block = block_given? ? block : nil
|
47
49
|
|
48
|
-
|
49
|
-
|
50
|
+
# Default layout
|
51
|
+
opts[:layout] = layout if opts[:layout].nil?
|
50
52
|
|
51
|
-
|
52
|
-
|
53
|
+
# If the url is a regexp
|
54
|
+
if url.is_a?(Regexp) || url.include?("*")
|
53
55
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
56
|
+
# Use the metadata loop for matching against paths at runtime
|
57
|
+
sitemap.provides_metadata_for_path url do |url|
|
58
|
+
{ :options => opts, :blocks => [a_block] }
|
59
|
+
end
|
58
60
|
|
59
|
-
|
60
|
-
|
61
|
+
return
|
62
|
+
end
|
61
63
|
|
62
|
-
|
63
|
-
|
64
|
+
# Normalized path
|
65
|
+
url = full_path(url)
|
64
66
|
|
65
|
-
|
66
|
-
|
67
|
-
|
67
|
+
# Setup proxy
|
68
|
+
if opts.has_key?(:proxy)
|
69
|
+
proxy(url, opts[:proxy])
|
68
70
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
71
|
+
if opts.has_key?(:ignore) && opts[:ignore]
|
72
|
+
ignore(opts[:proxy])
|
73
|
+
opts.delete(:ignore)
|
74
|
+
end
|
73
75
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
76
|
+
opts.delete(:proxy)
|
77
|
+
else
|
78
|
+
if opts.has_key?(:ignore) && opts[:ignore]
|
79
|
+
ignore(url)
|
80
|
+
opts.delete(:ignore)
|
81
|
+
end
|
82
|
+
end
|
81
83
|
|
82
|
-
|
83
|
-
|
84
|
-
|
84
|
+
# Setup a metadata matcher for rendering those options
|
85
|
+
sitemap.provides_metadata_for_path url do |url|
|
86
|
+
{ :options => opts, :blocks => [a_block] }
|
87
|
+
end
|
88
|
+
end
|
85
89
|
end
|
86
90
|
end
|
87
91
|
end
|
88
|
-
end
|
92
|
+
end
|
@@ -1,26 +1,31 @@
|
|
1
|
+
# Require lib
|
2
|
+
require 'rack/showexceptions'
|
3
|
+
|
1
4
|
# Support rack/showexceptions during development
|
2
|
-
module Middleman
|
5
|
+
module Middleman
|
6
|
+
module CoreExtensions
|
7
|
+
module ShowExceptions
|
3
8
|
|
4
|
-
|
5
|
-
|
9
|
+
# Setup extension
|
10
|
+
class << self
|
6
11
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
use ::Middleman::CoreExtensions::ShowExceptions::Middleware
|
12
|
+
# Once registered
|
13
|
+
def registered(app)
|
14
|
+
# When in dev
|
15
|
+
app.configure :development do
|
16
|
+
# Include middlemare
|
17
|
+
if show_exceptions
|
18
|
+
use ::Middleman::CoreExtensions::ShowExceptions::Middleware
|
19
|
+
end
|
20
|
+
end
|
17
21
|
end
|
18
22
|
end
|
19
|
-
end
|
20
|
-
end
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
|
24
|
+
# Custom exception class
|
25
|
+
# TODO: Style this ourselves
|
26
|
+
class Middleware < ::Rack::ShowExceptions
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
25
30
|
end
|
26
31
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Rack Request
|
2
|
+
require "middleman-core/core_extensions/request"
|
3
|
+
|
4
|
+
# File Change Notifier
|
5
|
+
require "middleman-core/core_extensions/file_watcher"
|
6
|
+
|
7
|
+
# Add Builder callbacks
|
8
|
+
require "middleman-core/core_extensions/builder"
|
9
|
+
|
10
|
+
# Custom Feature API
|
11
|
+
require "middleman-core/core_extensions/extensions"
|
12
|
+
|
13
|
+
# Asset Path Pipeline
|
14
|
+
require "middleman-core/core_extensions/assets"
|
15
|
+
|
16
|
+
# Data looks at the data/ folder for YAML files and makes them available
|
17
|
+
# to dynamic requests.
|
18
|
+
require "middleman-core/core_extensions/data"
|
19
|
+
|
20
|
+
# Parse YAML from templates
|
21
|
+
require "middleman-core/core_extensions/front_matter"
|
22
|
+
|
23
|
+
# External helpers looks in the helpers/ folder for helper modules
|
24
|
+
require "middleman-core/core_extensions/external_helpers"
|
25
|
+
|
26
|
+
# DefaultHelpers are the built-in dynamic template helpers.
|
27
|
+
require "middleman-core/core_extensions/default_helpers"
|
28
|
+
|
29
|
+
# Extended version of Padrino's rendering
|
30
|
+
require "middleman-core/core_extensions/rendering"
|
31
|
+
|
32
|
+
# Pass custom options to views
|
33
|
+
require "middleman-core/core_extensions/routing"
|
34
|
+
|
35
|
+
# Catch and show exceptions at the Rack level
|
36
|
+
require "middleman-core/core_extensions/show_exceptions"
|
37
|
+
|
38
|
+
# i18n
|
39
|
+
require "middleman-core/core_extensions/i18n"
|
@@ -46,12 +46,9 @@ module Middleman::Extensions
|
|
46
46
|
next
|
47
47
|
end
|
48
48
|
|
49
|
-
resource.destination_path = resource.
|
49
|
+
resource.destination_path = resource.destination_path.chomp(File.extname(index_file)) + new_index_path
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
54
|
-
|
55
|
-
# Register the extension
|
56
|
-
register :directory_indexes, DirectoryIndexes
|
57
54
|
end
|
@@ -138,6 +138,16 @@ module Middleman::Extensions
|
|
138
138
|
names[rand(names.size)]
|
139
139
|
end
|
140
140
|
|
141
|
+
# Get a placeholder 140 character tweet about Philip the Purple Otter
|
142
|
+
# Via http://www.kevadamson.com/talking-of-design/article/140-alternative-characters-to-lorem-ipsum
|
143
|
+
# @return [String]
|
144
|
+
def tweet
|
145
|
+
tweets = [ 'Far away, in a forest next to a river beneath the mountains, there lived a small purple otter called Philip. Philip likes sausages. The End.',
|
146
|
+
'He liked the quality sausages from Marks & Spencer but due to the recession he had been forced to shop in a less desirable supermarket. End.',
|
147
|
+
'He awoke one day to find his pile of sausages missing. Roger the greedy boar with human eyes, had skateboarded into the forest & eaten them!']
|
148
|
+
tweets[rand(tweets.size)]
|
149
|
+
end
|
150
|
+
|
141
151
|
# Get a placeholder email address
|
142
152
|
# @return [String]
|
143
153
|
def email
|
@@ -182,7 +192,4 @@ module Middleman::Extensions
|
|
182
192
|
end
|
183
193
|
end
|
184
194
|
end
|
185
|
-
|
186
|
-
# Register the extension
|
187
|
-
register :lorem, Lorem
|
188
195
|
end
|