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
@@ -1,190 +1,211 @@
|
|
1
1
|
# Used for merging results of metadata callbacks
|
2
2
|
require "active_support/core_ext/hash/deep_merge"
|
3
3
|
|
4
|
-
|
5
|
-
module Middleman::Sitemap
|
4
|
+
module Middleman
|
6
5
|
|
7
|
-
#
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
# Sitemap namespace
|
7
|
+
module Sitemap
|
8
|
+
|
9
|
+
# The Store class
|
10
|
+
#
|
11
|
+
# The Store manages a collection of Resource objects, which represent
|
12
|
+
# individual items in the sitemap. Resources are indexed by "source path",
|
13
|
+
# which is the path relative to the source directory, minus any template
|
14
|
+
# extensions. All "path" parameters used in this class are source paths.
|
15
|
+
class Store
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
+
# @return [Middleman::Application]
|
18
|
+
attr_accessor :app
|
17
19
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
# Register classes which can manipulate the main site map list
|
28
|
-
register_resource_list_manipulator(:on_disk, Middleman::Sitemap::Extensions::OnDisk.new(self), false)
|
20
|
+
# Initialize with parent app
|
21
|
+
# @param [Middleman::Application] app
|
22
|
+
def initialize(app)
|
23
|
+
@app = app
|
24
|
+
@resources = []
|
25
|
+
@_cached_metadata = {}
|
26
|
+
@_lookup_cache = { :path => {}, :destination_path => {} }
|
27
|
+
@resource_list_manipulators = []
|
29
28
|
|
30
|
-
|
31
|
-
|
29
|
+
# Register classes which can manipulate the main site map list
|
30
|
+
register_resource_list_manipulator(:on_disk, Middleman::Sitemap::Extensions::OnDisk.new(self), false)
|
32
31
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
rebuild_resource_list!(:after_base_init)
|
37
|
-
end
|
32
|
+
# Proxies
|
33
|
+
register_resource_list_manipulator(:proxies, @app.proxy_manager, false)
|
34
|
+
end
|
38
35
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
# Rebuild the list of resources from scratch, using registed manipulators
|
49
|
-
# @return [void]
|
50
|
-
def rebuild_resource_list!(reason=nil)
|
51
|
-
@resources = @resource_list_manipulators.inject([]) do |result, (_, inst)|
|
52
|
-
inst.manipulate_resource_list(result)
|
36
|
+
# Register a klass which can manipulate the main site map list
|
37
|
+
# @param [Symbol] name Name of the manipulator for debugging
|
38
|
+
# @param [Class, Module] inst Abstract namespace which can update the resource list
|
39
|
+
# @param [Boolean] immediately_rebuild Whether the resource list should be immediately recalculated
|
40
|
+
# @return [void]
|
41
|
+
def register_resource_list_manipulator(name, inst, immediately_rebuild=true)
|
42
|
+
@resource_list_manipulators << [name, inst]
|
43
|
+
rebuild_resource_list!(:registered_new) if immediately_rebuild
|
53
44
|
end
|
45
|
+
|
46
|
+
# Rebuild the list of resources from scratch, using registed manipulators
|
47
|
+
# @return [void]
|
48
|
+
def rebuild_resource_list!(reason=nil)
|
49
|
+
@resources = @resource_list_manipulators.inject([]) do |result, (_, inst)|
|
50
|
+
inst.manipulate_resource_list(result)
|
51
|
+
end
|
54
52
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
53
|
+
# Reset lookup cache
|
54
|
+
@_lookup_cache = { :path => {}, :destination_path => {} }
|
55
|
+
@resources.each do |resource|
|
56
|
+
@_lookup_cache[:path][resource.path] = resource
|
57
|
+
@_lookup_cache[:destination_path][resource.destination_path] = resource
|
58
|
+
end
|
60
59
|
end
|
61
|
-
end
|
62
60
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
61
|
+
# Find a resource given its original path
|
62
|
+
# @param [String] request_path The original path of a resource.
|
63
|
+
# @return [Middleman::Sitemap::Resource]
|
64
|
+
def find_resource_by_path(request_path)
|
65
|
+
request_path = ::Middleman::Util.normalize_path(request_path)
|
66
|
+
@_lookup_cache[:path][request_path]
|
67
|
+
end
|
70
68
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
69
|
+
# Find a resource given its destination path
|
70
|
+
# @param [String] request_path The destination (output) path of a resource.
|
71
|
+
# @return [Middleman::Sitemap::Resource]
|
72
|
+
def find_resource_by_destination_path(request_path)
|
73
|
+
request_path = ::Middleman::Util.normalize_path(request_path)
|
74
|
+
@_lookup_cache[:destination_path][request_path]
|
75
|
+
end
|
78
76
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
77
|
+
# Get the array of all resources
|
78
|
+
# @param [Boolean] include_ignored Whether to include ignored resources
|
79
|
+
# @return [Array<Middleman::Sitemap::Resource>]
|
80
|
+
def resources(include_ignored=false)
|
81
|
+
if include_ignored
|
82
|
+
@resources
|
83
|
+
else
|
84
|
+
@resources.reject(&:ignored?)
|
85
|
+
end
|
87
86
|
end
|
88
|
-
end
|
89
87
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
88
|
+
# Register a handler to provide metadata on a file path
|
89
|
+
# @param [Regexp] matcher
|
90
|
+
# @return [Array<Array<Proc, Regexp>>]
|
91
|
+
def provides_metadata(matcher=nil, &block)
|
92
|
+
@_provides_metadata ||= []
|
93
|
+
@_provides_metadata << [block, matcher] if block_given?
|
94
|
+
@_provides_metadata
|
95
|
+
end
|
98
96
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
97
|
+
# Get the metadata for a specific file
|
98
|
+
# @param [String] source_file
|
99
|
+
# @return [Hash]
|
100
|
+
def metadata_for_file(source_file)
|
101
|
+
blank_metadata = { :options => {}, :locals => {}, :page => {}, :blocks => [] }
|
104
102
|
|
105
|
-
|
106
|
-
|
103
|
+
provides_metadata.inject(blank_metadata) do |result, (callback, matcher)|
|
104
|
+
next result if !matcher.nil? && !source_file.match(matcher)
|
107
105
|
|
108
|
-
|
109
|
-
|
106
|
+
metadata = callback.call(source_file)
|
107
|
+
|
108
|
+
if metadata.has_key?(:blocks)
|
109
|
+
result[:blocks] << metadata[:blocks]
|
110
|
+
metadata.delete(:blocks)
|
111
|
+
end
|
112
|
+
|
113
|
+
result.deep_merge(metadata)
|
114
|
+
end
|
110
115
|
end
|
111
|
-
end
|
112
116
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
@
|
118
|
-
|
119
|
-
|
120
|
-
|
117
|
+
# Register a handler to provide metadata on a url path
|
118
|
+
# @param [Regexp] matcher
|
119
|
+
# @param [Symbol] origin an indicator of where this metadata came from - only one
|
120
|
+
# block per [matcher, origin] pair may exist.
|
121
|
+
# @return [Array<Array<Proc, Regexp>>]
|
122
|
+
def provides_metadata_for_path(matcher=nil, origin=nil, &block)
|
123
|
+
@_provides_metadata_for_path ||= []
|
124
|
+
if block_given?
|
125
|
+
if origin
|
126
|
+
existing_provider = @_provides_metadata_for_path.find {|b,m,o| o == origin && m == matcher}
|
127
|
+
end
|
128
|
+
|
129
|
+
if existing_provider
|
130
|
+
existing_provider[0] = block
|
131
|
+
else
|
132
|
+
@_provides_metadata_for_path << [block, matcher, origin]
|
133
|
+
end
|
134
|
+
|
135
|
+
@_cached_metadata = {}
|
136
|
+
end
|
137
|
+
@_provides_metadata_for_path
|
138
|
+
end
|
121
139
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
140
|
+
# Get the metadata for a specific URL
|
141
|
+
# @param [String] request_path
|
142
|
+
# @return [Hash]
|
143
|
+
def metadata_for_path(request_path)
|
144
|
+
return @_cached_metadata[request_path] if @_cached_metadata[request_path]
|
145
|
+
|
146
|
+
blank_metadata = { :options => {}, :locals => {}, :page => {}, :blocks => [] }
|
127
147
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
148
|
+
@_cached_metadata[request_path] = provides_metadata_for_path.inject(blank_metadata) do |result, (callback, matcher)|
|
149
|
+
case matcher
|
150
|
+
when Regexp
|
151
|
+
next result unless request_path.match(matcher)
|
152
|
+
when String
|
153
|
+
next result unless File.fnmatch("/" + matcher.sub(%r{^/}, ''), "/#{request_path}")
|
154
|
+
end
|
135
155
|
|
136
|
-
|
156
|
+
metadata = callback.call(request_path)
|
137
157
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
158
|
+
if metadata.has_key?(:blocks)
|
159
|
+
result[:blocks] << metadata[:blocks]
|
160
|
+
metadata.delete(:blocks)
|
161
|
+
end
|
142
162
|
|
143
|
-
|
163
|
+
result.deep_merge(metadata)
|
164
|
+
end
|
144
165
|
end
|
145
|
-
end
|
146
166
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
167
|
+
# Get the URL path for an on-disk file
|
168
|
+
# @param [String] file
|
169
|
+
# @return [String]
|
170
|
+
def file_to_path(file)
|
171
|
+
file = File.expand_path(file, @app.root)
|
152
172
|
|
153
|
-
|
154
|
-
|
173
|
+
prefix = @app.source_dir.sub(/\/$/, "") + "/"
|
174
|
+
return false unless file.include?(prefix)
|
155
175
|
|
156
|
-
|
157
|
-
|
158
|
-
|
176
|
+
path = file.sub(prefix, "")
|
177
|
+
extensionless_path(path)
|
178
|
+
end
|
159
179
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
180
|
+
# Get a path without templating extensions
|
181
|
+
# @param [String] file
|
182
|
+
# @return [String]
|
183
|
+
def extensionless_path(file)
|
184
|
+
path = file.dup
|
165
185
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
186
|
+
end_of_the_line = false
|
187
|
+
while !end_of_the_line
|
188
|
+
if !::Tilt[path].nil?
|
189
|
+
path = path.sub(File.extname(path), "")
|
190
|
+
else
|
191
|
+
end_of_the_line = true
|
192
|
+
end
|
172
193
|
end
|
173
|
-
end
|
174
194
|
|
175
|
-
|
176
|
-
|
177
|
-
|
195
|
+
# If there is no extension, look for one
|
196
|
+
if File.extname(path).empty?
|
197
|
+
input_ext = File.extname(file)
|
178
198
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
199
|
+
if !input_ext.empty?
|
200
|
+
input_ext = input_ext.split(".").last.to_sym
|
201
|
+
if @app.template_extensions.has_key?(input_ext)
|
202
|
+
path << ".#{@app.template_extensions[input_ext]}"
|
203
|
+
end
|
183
204
|
end
|
184
205
|
end
|
185
|
-
end
|
186
206
|
|
187
|
-
|
207
|
+
path
|
208
|
+
end
|
188
209
|
end
|
189
210
|
end
|
190
|
-
end
|
211
|
+
end
|
@@ -1,78 +1,78 @@
|
|
1
|
+
require "middleman-core/sitemap/store"
|
2
|
+
require "middleman-core/sitemap/resource"
|
3
|
+
|
4
|
+
require "middleman-core/sitemap/extensions/on_disk"
|
5
|
+
require "middleman-core/sitemap/extensions/proxies"
|
6
|
+
require "middleman-core/sitemap/extensions/ignores"
|
7
|
+
|
1
8
|
# Core Sitemap Extensions
|
2
|
-
module Middleman
|
9
|
+
module Middleman
|
3
10
|
|
4
|
-
|
5
|
-
autoload :Resource, "middleman-core/sitemap/resource"
|
11
|
+
module Sitemap
|
6
12
|
|
7
|
-
|
8
|
-
|
9
|
-
autoload :Proxies, "middleman-core/sitemap/extensions/proxies"
|
10
|
-
autoload :Ignores, "middleman-core/sitemap/extensions/ignores"
|
11
|
-
autoload :Traversal, "middleman-core/sitemap/extensions/traversal"
|
12
|
-
end
|
13
|
-
|
14
|
-
# Setup Extension
|
15
|
-
class << self
|
13
|
+
# Setup Extension
|
14
|
+
class << self
|
16
15
|
|
17
|
-
|
18
|
-
|
16
|
+
# Once registered
|
17
|
+
def registered(app)
|
19
18
|
|
20
|
-
|
21
|
-
|
19
|
+
app.register Middleman::Sitemap::Extensions::Proxies
|
20
|
+
app.register Middleman::Sitemap::Extensions::Ignores
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
# Setup callbacks which can exclude paths from the sitemap
|
23
|
+
app.set :ignored_sitemap_matchers, {
|
24
|
+
# dotfiles and folders in the root
|
25
|
+
:root_dotfiles => proc { |file, path| file.match(/^\./) },
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
# Files starting with an dot, but not .htaccess
|
28
|
+
:source_dotfiles => proc { |file, path|
|
29
|
+
(file.match(/\/\./) && !file.match(/\/\.htaccess/))
|
30
|
+
},
|
32
31
|
|
33
|
-
|
34
|
-
|
32
|
+
# Files starting with an underscore, but not a double-underscore
|
33
|
+
:partials => proc { |file, path| (file.match(/\/_/) && !file.match(/\/__/)) },
|
35
34
|
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
:layout => proc { |file, path|
|
36
|
+
file.match(/^source\/layout\./) || file.match(/^source\/layouts\//)
|
37
|
+
},
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
# Files without any output extension (layouts, partials)
|
40
|
+
# :extensionless => proc { |file, path| !path.match(/\./) },
|
41
|
+
}
|
43
42
|
|
44
|
-
|
45
|
-
|
43
|
+
# Include instance methods
|
44
|
+
app.send :include, InstanceMethods
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
46
|
+
# Initialize Sitemap
|
47
|
+
app.before_configuration do
|
48
|
+
sitemap
|
49
|
+
end
|
50
50
|
end
|
51
|
-
|
52
|
-
alias :included :registered
|
51
|
+
alias :included :registered
|
53
52
|
|
54
|
-
|
53
|
+
end
|
55
54
|
|
56
|
-
|
57
|
-
|
55
|
+
# Sitemap instance methods
|
56
|
+
module InstanceMethods
|
58
57
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
# Get the sitemap class instance
|
59
|
+
# @return [Middleman::Sitemap::Store]
|
60
|
+
def sitemap
|
61
|
+
@_sitemap ||= Store.new(self)
|
62
|
+
end
|
64
63
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
64
|
+
# Get the resource object for the current path
|
65
|
+
# @return [Middleman::Sitemap::Resource]
|
66
|
+
def current_page
|
67
|
+
current_resource
|
68
|
+
end
|
70
69
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
70
|
+
# Get the resource object for the current path
|
71
|
+
# @return [Middleman::Sitemap::Resource]
|
72
|
+
def current_resource
|
73
|
+
sitemap.find_resource_by_destination_path(current_path)
|
74
|
+
end
|
76
75
|
|
76
|
+
end
|
77
77
|
end
|
78
78
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
1
3
|
require "rack/test"
|
2
4
|
|
3
5
|
Given /^a clean server$/ do
|
@@ -12,6 +14,14 @@ Given /^"([^\"]*)" feature is "([^\"]*)"$/ do |feature, state|
|
|
12
14
|
end
|
13
15
|
end
|
14
16
|
|
17
|
+
Given /^"([^\"]*)" feature is "enabled" with "([^\"]*)"$/ do |feature, options_str|
|
18
|
+
@initialize_commands ||= []
|
19
|
+
|
20
|
+
options = eval("{#{options_str}}")
|
21
|
+
|
22
|
+
@initialize_commands << lambda { activate(feature.to_sym, options) }
|
23
|
+
end
|
24
|
+
|
15
25
|
Given /^"([^\"]*)" is set to "([^\"]*)"$/ do |variable, value|
|
16
26
|
@initialize_commands ||= []
|
17
27
|
@initialize_commands << lambda { set(variable.to_sym, value) }
|
@@ -37,7 +47,7 @@ Given /^the Server is running$/ do
|
|
37
47
|
set :show_exceptions, false
|
38
48
|
}
|
39
49
|
|
40
|
-
@server_inst = Middleman.server.inst do
|
50
|
+
@server_inst = Middleman::Application.server.inst do
|
41
51
|
initialize_commands.each do |p|
|
42
52
|
instance_exec(&p)
|
43
53
|
end
|
@@ -53,11 +63,11 @@ Given /^the Server is running at "([^\"]*)"$/ do |app_path|
|
|
53
63
|
end
|
54
64
|
|
55
65
|
When /^I go to "([^\"]*)"$/ do |url|
|
56
|
-
@browser.get(url)
|
66
|
+
@browser.get(URI.escape(url))
|
57
67
|
end
|
58
68
|
|
59
69
|
Then /^going to "([^\"]*)" should not raise an exception$/ do |url|
|
60
|
-
lambda { @browser.get(url) }.should_not raise_exception
|
70
|
+
lambda { @browser.get(URI.escape(url)) }.should_not raise_exception
|
61
71
|
end
|
62
72
|
|
63
73
|
Then /^I should see "([^\"]*)"$/ do |expected|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
3
|
+
|
4
|
+
require 'cucumber/rake/task'
|
5
|
+
|
6
|
+
Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
|
7
|
+
t.cucumber_opts = "--color --tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}"
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'rake/clean'
|
11
|
+
|
12
|
+
task :test => ["cucumber"]
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "<%= name %>"
|
6
|
+
s.version = "0.0.1"
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
# s.authors = ["Your Name"]
|
9
|
+
# s.email = ["email@example.com"]
|
10
|
+
# s.homepage = "http://example.com"
|
11
|
+
# s.summary = %q{A short summary of your extension}
|
12
|
+
# s.description = %q{A longer description of your extension}
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
|
19
|
+
# The version of middleman-core your extension depends on
|
20
|
+
s.add_runtime_dependency("middleman-core", [">= 3.0.0.beta.2"])
|
21
|
+
|
22
|
+
# Additional dependencies
|
23
|
+
# s.add_runtime_dependency("gem-name", "gem-version")
|
24
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Require core library
|
2
|
+
require "middleman-core"
|
3
|
+
|
4
|
+
# Extension namespace
|
5
|
+
module MyExtension
|
6
|
+
class << self
|
7
|
+
|
8
|
+
# Called when user `activate`s your extension
|
9
|
+
def registered(app, options={})
|
10
|
+
# Setup extension-specific config
|
11
|
+
app.set :config_variable, false
|
12
|
+
|
13
|
+
# Include class methods
|
14
|
+
# app.extend ClassMethods
|
15
|
+
|
16
|
+
# Include instance methods
|
17
|
+
# app.send :include, InstanceMethods
|
18
|
+
|
19
|
+
app.after_configuration do
|
20
|
+
# Do something
|
21
|
+
|
22
|
+
# config_variable is now either the default or the user's
|
23
|
+
# setting from config.rb
|
24
|
+
end
|
25
|
+
end
|
26
|
+
alias :included :registered
|
27
|
+
end
|
28
|
+
|
29
|
+
# module ClassMethods
|
30
|
+
# def a_class_method
|
31
|
+
# end
|
32
|
+
# end
|
33
|
+
|
34
|
+
# module InstanceMethods
|
35
|
+
# def an_instance_method
|
36
|
+
# end
|
37
|
+
# end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
# Register extensions which can be activated
|
43
|
+
# Make sure we have the version of Middleman we expect
|
44
|
+
# ::Middleman::Extensions.register(:extension_name, ">= 3.0.0.beta.2") do
|
45
|
+
#
|
46
|
+
# # Return the extension module
|
47
|
+
# ::MyExtension
|
48
|
+
#
|
49
|
+
# end
|
@@ -0,0 +1 @@
|
|
1
|
+
require "<%= name %>"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile ~/.gitignore_global
|
6
|
+
|
7
|
+
# Ignore bundler config
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the build directory
|
11
|
+
/build
|
12
|
+
|
13
|
+
# Ignore Sass' cache
|
14
|
+
/.sass-cache
|