middleman 2.0.16.1 → 3.0.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/CHANGELOG +16 -8
- data/features/builder.feature +2 -5
- data/features/cache_buster.feature +1 -1
- data/features/clean_build.feature +0 -1
- data/features/coffee-script.feature +3 -3
- data/features/custom_layout_engines.feature +10 -0
- data/features/directory_index.feature +0 -1
- data/features/dynamic_pages.feature +0 -1
- data/features/fonts.feature +0 -1
- data/features/{padrino_helpers.feature → former_padrino_helpers.feature} +1 -1
- data/features/sprockets.feature +34 -5
- data/features/sprockets_gems.feature +7 -4
- data/features/step_definitions/asset_host_steps.rb +7 -6
- data/features/step_definitions/builder_steps.rb +4 -0
- data/features/step_definitions/middleman_steps.rb +22 -16
- data/features/step_definitions/page_layout_steps.rb +10 -8
- data/fixtures/custom-layout-app/config.rb +1 -0
- data/fixtures/custom-layout-app/source/index.html.erb +1 -0
- data/fixtures/custom-layout-app/source/layout.haml +6 -0
- data/fixtures/sprockets-app/config.rb +2 -1
- data/fixtures/sprockets-app/source/library/css/bootstrap_include.css.scss +1 -0
- data/fixtures/sprockets-app/source/library/css/plain.css +3 -0
- data/fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss +1 -0
- data/fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss +1 -0
- data/fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss +1 -0
- data/fixtures/sprockets-app/source/{jquery_include.js → library/js/jquery_include.js} +0 -0
- data/fixtures/sprockets-app/source/library/js/plain.js +3 -0
- data/fixtures/sprockets-app/source/library/{javascripts → js}/sprockets_base.js +0 -0
- data/fixtures/sprockets-app/source/library/{javascripts → js}/sprockets_sub.js +0 -0
- data/fixtures/test-app/config.rb +5 -4
- data/fixtures/test-app/source/{padrino_test.html.haml → former_padrino_test.html.haml} +0 -0
- data/fixtures/test-app/source/stylesheets/sprockets_base1.css.scss +1 -0
- data/fixtures/test-app/source/stylesheets/sprockets_base2.css.scss +1 -0
- data/fixtures/test-app/source/stylesheets/sprockets_sub.css.scss +1 -0
- data/lib/middleman.rb +27 -25
- data/lib/middleman/base.rb +408 -166
- data/lib/middleman/builder.rb +78 -162
- data/lib/middleman/cli.rb +61 -32
- data/lib/middleman/core_extensions/assets.rb +4 -44
- data/lib/middleman/core_extensions/builder.rb +12 -16
- data/lib/middleman/core_extensions/compass.rb +28 -57
- data/lib/middleman/core_extensions/data.rb +65 -49
- data/lib/middleman/core_extensions/default_helpers.rb +33 -18
- data/lib/middleman/core_extensions/features.rb +48 -26
- data/lib/middleman/core_extensions/file_watcher.rb +66 -0
- data/lib/middleman/core_extensions/front_matter.rb +91 -86
- data/lib/middleman/core_extensions/rendering.rb +9 -8
- data/lib/middleman/core_extensions/routing.rb +19 -53
- data/lib/middleman/core_extensions/sitemap.rb +229 -0
- data/lib/middleman/core_extensions/sprockets.rb +53 -37
- data/lib/middleman/features/asset_host.rb +20 -10
- data/lib/middleman/features/automatic_image_sizes.rb +12 -9
- data/lib/middleman/features/cache_buster.rb +38 -25
- data/lib/middleman/features/directory_indexes.rb +31 -28
- data/lib/middleman/features/minify_css.rb +3 -2
- data/lib/middleman/features/minify_css/cssmin.rb +55 -0
- data/lib/middleman/features/minify_javascript.rb +12 -5
- data/lib/middleman/features/relative_assets.rb +28 -25
- data/lib/middleman/features/sitemap_tree.rb +34 -0
- data/lib/middleman/guard.rb +57 -23
- data/lib/middleman/renderers/erb.rb +29 -0
- data/lib/middleman/renderers/liquid.rb +3 -12
- data/lib/middleman/renderers/markdown.rb +16 -15
- data/lib/middleman/renderers/sass.rb +34 -38
- data/lib/middleman/vendor/hooks-0.2.0/CHANGES.textile +9 -0
- data/lib/middleman/vendor/hooks-0.2.0/Gemfile +3 -0
- data/lib/middleman/vendor/hooks-0.2.0/README.rdoc +107 -0
- data/lib/middleman/vendor/hooks-0.2.0/Rakefile +12 -0
- data/lib/middleman/vendor/hooks-0.2.0/hooks.gemspec +22 -0
- data/lib/middleman/vendor/hooks-0.2.0/lib/hooks.rb +109 -0
- data/lib/middleman/vendor/hooks-0.2.0/lib/hooks/inheritable_attribute.rb +33 -0
- data/lib/middleman/vendor/hooks-0.2.0/test/hooks_test.rb +141 -0
- data/lib/middleman/vendor/hooks-0.2.0/test/inheritable_attribute_test.rb +55 -0
- data/lib/middleman/vendor/hooks-0.2.0/test/test_helper.rb +10 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/.document +5 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/.gitignore +22 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/.yardopts +1 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/LICENSE.txt +20 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/README.rdoc +294 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/Rakefile +5 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/bin/padrino +9 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core.rb +167 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/application.rb +270 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/application/rendering.rb +292 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/application/routing.rb +934 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/application/showexceptions.rb +20 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/caller.rb +53 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/cli/adapter.rb +24 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/cli/base.rb +151 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/cli/console.rb +20 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/cli/rake.rb +24 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/cli/rake_tasks.rb +59 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/command.rb +38 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/images/404.png +0 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/images/500.png +0 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/loader.rb +210 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/cs.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/da.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/de.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/en.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/es.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/fr.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/hu.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/it.yml +40 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/ja.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/lv.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/nl.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/no.yml +35 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/pl.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/pt_br.yml +40 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/ru.yml +35 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/tr.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/uk.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/zh_cn.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/locale/zh_tw.yml +34 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/logger.rb +345 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/mounter.rb +224 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/reloader.rb +254 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/router.rb +98 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/server.rb +79 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/support_lite.rb +199 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/tasks.rb +21 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/lib/padrino-core/version.rb +20 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/padrino-core.gemspec +38 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/apps/.components +6 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/apps/.gitignore +7 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/apps/complex.rb +32 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/apps/simple.rb +33 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/a.rb +9 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/b.rb +4 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/c.rb +1 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/e.rb +13 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/f.rb +2 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/g.rb +2 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/fixtures/dependencies/d.rb +4 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/helper.rb +81 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/mini_shoulda.rb +45 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_application.rb +108 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_core.rb +79 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_dependencies.rb +44 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_filters.rb +278 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_locale.rb +21 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_logger.rb +100 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_mounter.rb +177 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_reloader_complex.rb +75 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_reloader_simple.rb +98 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_rendering.rb +461 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_restful_routing.rb +33 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_router.rb +146 -0
- data/lib/middleman/vendor/padrino-core-0.10.5/test/test_routing.rb +1673 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/.document +5 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/.gitignore +21 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/.yardopts +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/LICENSE.txt +20 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/README.rdoc +239 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/Rakefile +5 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers.rb +58 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/asset_tag_helpers.rb +420 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_builder/abstract_form_builder.rb +220 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_builder/standard_form_builder.rb +43 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_helpers.rb +602 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/format_helpers.rb +381 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/cs.yml +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/da.yml +91 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/de.yml +81 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/en.yml +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/es.yml +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/fr.yml +80 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/hu.yml +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/it.yml +89 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/ja.yml +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/lv.yml +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/nl.yml +82 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/no.yml +91 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/pl.yml +95 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/pt_br.yml +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/ru.yml +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/tr.yml +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/uk.yml +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/zh_cn.yml +104 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/zh_tw.yml +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/number_helpers.rb +288 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers.rb +175 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/abstract_handler.rb +98 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/erb_handler.rb +79 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/haml_handler.rb +63 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/slim_handler.rb +81 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/render_helpers.rb +60 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/tag_helpers.rb +103 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/translation_helpers.rb +38 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/padrino-helpers.gemspec +27 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/app.rb +73 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.erb +14 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.haml +12 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.slim +13 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.erb +14 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.haml +12 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.slim +12 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.erb +11 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.haml +9 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.slim +9 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.erb +5 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.haml +5 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.slim +5 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.erb +20 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.haml +15 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.slim +15 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.erb +56 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.haml +47 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.slim +47 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.erb +56 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.haml +45 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.slim +45 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.erb +5 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.haml +4 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.slim +4 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.erb +3 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.haml +3 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.slim +3 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.erb +3 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.haml +3 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.slim +3 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_erb.erb +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_haml.haml +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_slim.slim +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.erb +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.haml +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.slim +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/app.rb +50 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engine.haml +5 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_erb.erb +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_haml.haml +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_slim.slim +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/erb/test.erb +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/explicit_engine.haml +5 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/haml/test.haml +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/_user.haml +7 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/haml_template.haml +1 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/some_template.haml +2 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/helper.rb +66 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_asset_tag_helpers.rb +320 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_form_builder.rb +996 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_form_helpers.rb +645 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_format_helpers.rb +227 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_locale.rb +20 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_number_helpers.rb +136 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_output_helpers.rb +153 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_render_helpers.rb +76 -0
- data/lib/middleman/vendor/padrino-helpers-0.10.5/test/test_tag_helpers.rb +105 -0
- data/lib/middleman/version.rb +1 -1
- data/middleman-x86-mingw32.gemspec +16 -33
- data/middleman.gemspec +16 -31
- metadata +590 -349
- data/features/sinatra.feature +0 -6
- data/lib/middleman/core_extensions/rack_map.rb +0 -35
- data/lib/middleman/renderers/coffee_script.rb +0 -8
- data/lib/middleman/renderers/haml.rb +0 -31
- data/lib/middleman/renderers/slim.rb +0 -8
data/.gitignore
CHANGED
data/CHANGELOG
CHANGED
@@ -1,19 +1,27 @@
|
|
1
|
-
|
1
|
+
3.0.pre
|
2
2
|
====
|
3
|
-
|
3
|
+
Rewritten to work directly with Rack (Sinatra apps can still be mounted)
|
4
4
|
|
5
|
-
2.
|
5
|
+
2.1.pre
|
6
6
|
====
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
Finally support Compass in Sprockets! Thanks to @xdite and @petebrowne
|
8
|
+
Sitemap object representing the known world
|
9
|
+
FileWatcher proxies file change events
|
10
|
+
Unified callback solution
|
11
|
+
Removed Slim and Maruku from base install. Will need to be installed and required by the user (in config.rb)
|
12
12
|
|
13
13
|
2.0.14
|
14
14
|
====
|
15
15
|
Minor fix for i18n
|
16
16
|
|
17
|
+
2.0.13.2
|
18
|
+
====
|
19
|
+
Update Windows eventmachine dep
|
20
|
+
|
21
|
+
2.0.13.1
|
22
|
+
====
|
23
|
+
build --clean shouldn't remove dotfiles
|
24
|
+
|
17
25
|
2.0.13
|
18
26
|
====
|
19
27
|
middleman build --clean keeps the build directory clean of leftover files
|
data/features/builder.feature
CHANGED
@@ -4,7 +4,7 @@ Feature: Builder
|
|
4
4
|
Scenario: Checking built folder for content
|
5
5
|
Given a built app at "test-app"
|
6
6
|
Then "index.html" should exist at "test-app" and include "Comment in layout"
|
7
|
-
Then "javascripts/coffee_test.js" should exist at "test-app" and include ".slice"
|
7
|
+
Then "javascripts/coffee_test.js" should exist at "test-app" and include "Array.prototype.slice"
|
8
8
|
Then "index.html" should exist at "test-app" and include "<h1>Welcome</h1>"
|
9
9
|
Then "static.html" should exist at "test-app" and include "Static, no code!"
|
10
10
|
Then "services/index.html" should exist at "test-app" and include "Services"
|
@@ -15,15 +15,12 @@ Feature: Builder
|
|
15
15
|
Then "spaces in file.html" should exist at "test-app" and include "spaces"
|
16
16
|
Then "images/Read me (example).txt" should exist at "test-app"
|
17
17
|
Then "images/Child folder/regular_file(example).txt" should exist at "test-app"
|
18
|
-
And cleanup built app at "test-app"
|
19
18
|
|
20
19
|
Scenario: Build glob
|
21
|
-
Given a built app at "glob-app" with flags "--glob '
|
20
|
+
Given a built app at "glob-app" with flags "--glob '*.css'"
|
22
21
|
Then "stylesheets/site.css" should exist at "glob-app" and include "html"
|
23
22
|
Then "index.html" should not exist at "glob-app"
|
24
|
-
And cleanup built app at "glob-app"
|
25
23
|
|
26
24
|
# Scenario: Force relative assets
|
27
25
|
# Given a built app at "relative-app" with flags "--relative"
|
28
26
|
# Then "stylesheets/relative_assets.css" should exist at "relative-app" and include "../"
|
29
|
-
# And cleanup built app at "relative-app"
|
@@ -4,14 +4,14 @@ Feature: Support coffee-script
|
|
4
4
|
Scenario: Rendering coffee script
|
5
5
|
Given the Server is running at "test-app"
|
6
6
|
When I go to "/javascripts/coffee_test.js"
|
7
|
-
Then I should see ".slice"
|
7
|
+
Then I should see "Array.prototype.slice"
|
8
8
|
|
9
9
|
Scenario: Rendering coffee-script with :coffeescript haml-filter
|
10
10
|
Given the Server is running at "test-app"
|
11
11
|
When I go to "/inline-coffeescript.html"
|
12
|
-
Then I should see ".slice"
|
12
|
+
Then I should see "Array.prototype.slice"
|
13
13
|
|
14
14
|
Scenario: Rendering broken coffee
|
15
15
|
Given the Server is running at "test-app"
|
16
16
|
When I go to "/javascripts/broken-coffee.js"
|
17
|
-
Then I should see "
|
17
|
+
Then I should see "ProgramError"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Feature: Custom Layout Engine
|
2
|
+
|
3
|
+
Scenario: Checking built folder for content
|
4
|
+
Given a built app at "custom-layout-app"
|
5
|
+
Then "index.html" should exist at "custom-layout-app" and include "Comment in layout"
|
6
|
+
|
7
|
+
Scenario: Checking server for content
|
8
|
+
Given the Server is running at "test-app"
|
9
|
+
When I go to "/index.html"
|
10
|
+
Then I should see "Comment in layout"
|
@@ -11,7 +11,6 @@ Feature: Directory Index
|
|
11
11
|
Then "needs_index.html" should not exist at "indexable-app"
|
12
12
|
Then "a_folder/needs_index.html" should not exist at "indexable-app"
|
13
13
|
Then "leave_me_alone/index.html" should not exist at "indexable-app"
|
14
|
-
And cleanup built app at "indexable-app"
|
15
14
|
|
16
15
|
Scenario: Preview normal file
|
17
16
|
Given the Server is running at "indexable-app"
|
@@ -10,7 +10,6 @@ Feature: Dynamic Pages
|
|
10
10
|
Then "should_be_ignored.html" should not exist at "test-app"
|
11
11
|
Then "should_be_ignored2.html" should not exist at "test-app"
|
12
12
|
Then "should_be_ignored3.html" should not exist at "test-app"
|
13
|
-
And cleanup built app at "test-app"
|
14
13
|
|
15
14
|
Scenario: Preview basic proxy
|
16
15
|
Given the Server is running at "test-app"
|
data/features/fonts.feature
CHANGED
@@ -3,7 +3,6 @@ Feature: Web Fonts
|
|
3
3
|
Scenario: Checking built folder for content
|
4
4
|
Given a built app at "fonts-app"
|
5
5
|
Then "stylesheets/fonts.css" should exist at "fonts-app" and include "/fonts/StMarie-Thin.otf"
|
6
|
-
And cleanup built app at "fonts-app"
|
7
6
|
|
8
7
|
Scenario: Rendering scss
|
9
8
|
Given the Server is running at "fonts-app"
|
@@ -3,7 +3,7 @@ Feature: Built-in macro view helpers
|
|
3
3
|
|
4
4
|
Scenario: Using the link_to helper
|
5
5
|
Given the Server is running at "test-app"
|
6
|
-
When I go to "/
|
6
|
+
When I go to "/former_padrino_test.html"
|
7
7
|
And I should see 'href="test2.com"'
|
8
8
|
And I should see 'src="/images/test2.png"'
|
9
9
|
Then I should see 'src="/javascripts/test1.js"'
|
data/features/sprockets.feature
CHANGED
@@ -1,16 +1,21 @@
|
|
1
1
|
Feature: Sprockets
|
2
2
|
|
3
|
-
Scenario: Sprockets require
|
3
|
+
Scenario: Sprockets JS require
|
4
4
|
Given the Server is running at "test-app"
|
5
5
|
When I go to "/javascripts/sprockets_base.js"
|
6
6
|
Then I should see "sprockets_sub_function"
|
7
7
|
|
8
|
-
Scenario: Sprockets require with custom :js_dir
|
8
|
+
Scenario: Sprockets JS require with custom :js_dir
|
9
9
|
Given the Server is running at "sprockets-app"
|
10
|
-
When I go to "/library/
|
10
|
+
When I go to "/library/js/sprockets_base.js"
|
11
11
|
Then I should see "sprockets_sub_function"
|
12
12
|
|
13
|
-
Scenario:
|
13
|
+
Scenario: Plain JS require with custom :js_dir
|
14
|
+
Given the Server is running at "sprockets-app"
|
15
|
+
When I go to "/library/css/plain.css"
|
16
|
+
Then I should see "helloWorld"
|
17
|
+
|
18
|
+
Scenario: Sprockets JS should have access to yaml data
|
14
19
|
Given the Server is running at "test-app"
|
15
20
|
When I go to "/javascripts/multiple_engines.js"
|
16
21
|
Then I should see "Hello One"
|
@@ -18,4 +23,28 @@ Feature: Sprockets
|
|
18
23
|
Scenario: Multiple engine files should build correctly
|
19
24
|
Given a built app at "test-app"
|
20
25
|
Then "javascripts/multiple_engines.js" should exist at "test-app" and include "Hello One"
|
21
|
-
|
26
|
+
|
27
|
+
Scenario: Sprockets CSS require //require
|
28
|
+
Given the Server is running at "test-app"
|
29
|
+
When I go to "/stylesheets/sprockets_base1.css"
|
30
|
+
Then I should see "hello"
|
31
|
+
|
32
|
+
Scenario: Sprockets CSS require @import
|
33
|
+
Given the Server is running at "test-app"
|
34
|
+
When I go to "/stylesheets/sprockets_base2.css"
|
35
|
+
Then I should see "hello"
|
36
|
+
|
37
|
+
Scenario: Sprockets CSS require with custom :css_dir //require
|
38
|
+
Given the Server is running at "sprockets-app"
|
39
|
+
When I go to "/library/css/sprockets_base1.css"
|
40
|
+
Then I should see "hello"
|
41
|
+
|
42
|
+
Scenario: Plain CSS require with custom :css_dir
|
43
|
+
Given the Server is running at "sprockets-app"
|
44
|
+
When I go to "/library/css/plain.css"
|
45
|
+
Then I should see "helloWorld"
|
46
|
+
|
47
|
+
Scenario: Sprockets CSS require with custom :css_dir @import
|
48
|
+
Given the Server is running at "sprockets-app"
|
49
|
+
When I go to "/library/css/sprockets_base2.css"
|
50
|
+
Then I should see "hello"
|
@@ -1,7 +1,10 @@
|
|
1
|
-
@wip
|
2
1
|
Feature: Sprockets Gems
|
3
|
-
|
4
2
|
Scenario: Sprockets can pull jQuery from gem
|
5
3
|
Given the Server is running at "sprockets-app"
|
6
|
-
When I go to "/
|
7
|
-
Then I should see "var jQuery ="
|
4
|
+
When I go to "/library/js/jquery_include.js"
|
5
|
+
Then I should see "var jQuery ="
|
6
|
+
|
7
|
+
# Scenario: Sprockets can pull CSS from gem
|
8
|
+
# Given the Server is running at "sprockets-app"
|
9
|
+
# When I go to "/library/css/bootstrap_include.css"
|
10
|
+
# Then I should see "Bootstrap"
|
@@ -1,8 +1,9 @@
|
|
1
1
|
Given /^I am using an asset host$/ do
|
2
|
-
@
|
3
|
-
@
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
@initialize_commands ||= []
|
3
|
+
@initialize_commands << lambda {
|
4
|
+
activate :asset_host
|
5
|
+
set :asset_host do |asset|
|
6
|
+
"http://assets%d.example.com" % (asset.hash % 4)
|
7
|
+
end
|
8
|
+
}
|
8
9
|
end
|
@@ -11,6 +11,10 @@ end
|
|
11
11
|
Given /^a built app at "([^"]*)"$/ do |path|
|
12
12
|
root = File.dirname(File.dirname(File.dirname(__FILE__)))
|
13
13
|
target = File.join(root, "fixtures", path)
|
14
|
+
|
15
|
+
build_target = File.join(target, "build")
|
16
|
+
FileUtils.rm_rf(build_target)
|
17
|
+
|
14
18
|
build_cmd = File.expand_path(File.join(root, "bin", "middleman build"))
|
15
19
|
`cd #{target} && #{build_cmd}`
|
16
20
|
end
|
@@ -1,23 +1,18 @@
|
|
1
1
|
Given /^a clean server$/ do
|
2
|
-
@
|
3
|
-
@server.set :show_exceptions, false
|
2
|
+
@initialize_commands = []
|
4
3
|
end
|
5
4
|
|
6
5
|
Given /^"([^\"]*)" feature is "([^\"]*)"$/ do |feature, state|
|
7
|
-
@
|
8
|
-
@server.set :show_exceptions, false
|
6
|
+
@initialize_commands ||= []
|
9
7
|
|
10
8
|
if state == "enabled"
|
11
|
-
@
|
12
|
-
end
|
13
|
-
|
14
|
-
@server.set :environment, @current_env || :development
|
9
|
+
@initialize_commands << lambda { activate(feature.to_sym) }
|
10
|
+
end
|
15
11
|
end
|
16
12
|
|
17
13
|
Given /^"([^\"]*)" is set to "([^\"]*)"$/ do |variable, value|
|
18
|
-
@
|
19
|
-
@
|
20
|
-
@server.set variable.to_sym, value
|
14
|
+
@initialize_commands ||= []
|
15
|
+
@initialize_commands << lambda { set(variable.to_sym, value) }
|
21
16
|
end
|
22
17
|
|
23
18
|
Given /^current environment is "([^\"]*)"$/ do |env|
|
@@ -25,11 +20,22 @@ Given /^current environment is "([^\"]*)"$/ do |env|
|
|
25
20
|
end
|
26
21
|
|
27
22
|
Given /^the Server is running at "([^\"]*)"$/ do |app_path|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
23
|
+
root_dir = File.dirname(File.dirname(File.dirname(__FILE__)))
|
24
|
+
|
25
|
+
initialize_commands = @initialize_commands || []
|
26
|
+
initialize_commands.unshift lambda {
|
27
|
+
set :root, File.join(root_dir, "fixtures", app_path)
|
28
|
+
set :environment, @current_env || :development
|
29
|
+
}
|
30
|
+
|
31
|
+
@server_inst = Middleman.server.inst do
|
32
|
+
initialize_commands.each do |p|
|
33
|
+
instance_exec(&p)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
app_rack = @server_inst.class.to_rack_app
|
38
|
+
@browser = ::Rack::Test::Session.new(::Rack::MockSession.new(app_rack))
|
33
39
|
end
|
34
40
|
|
35
41
|
When /^I go to "([^\"]*)"$/ do |url|
|
@@ -1,13 +1,15 @@
|
|
1
1
|
Given /^page "([^\"]*)" has layout "([^\"]*)"$/ do |url, layout|
|
2
|
-
@
|
3
|
-
@
|
4
|
-
|
2
|
+
@initialize_commands ||= []
|
3
|
+
@initialize_commands << lambda {
|
4
|
+
page(url, :layout => layout.to_sym)
|
5
|
+
}
|
5
6
|
end
|
6
7
|
|
7
8
|
Given /^"([^\"]*)" with_layout block has layout "([^\"]*)"$/ do |url, layout|
|
8
|
-
@
|
9
|
-
@
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
@initialize_commands ||= []
|
10
|
+
@initialize_commands << lambda {
|
11
|
+
with_layout(layout.to_sym) do
|
12
|
+
page(url)
|
13
|
+
end
|
14
|
+
}
|
13
15
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
set :erb, :layout_engine => :haml
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Welcome</h1>
|
@@ -1 +1,2 @@
|
|
1
|
-
set :js_dir, "library/
|
1
|
+
set :js_dir, "library/js"
|
2
|
+
set :css_dir, "library/css"
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require "bootstrap.scss"
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require "sprockets_sub"
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "sprockets_sub";
|
@@ -0,0 +1 @@
|
|
1
|
+
hello { world: "hi"; }
|
File without changes
|
File without changes
|
File without changes
|
data/fixtures/test-app/config.rb
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
require "maruku"
|
2
|
+
require "slim"
|
3
|
+
require "liquid"
|
4
|
+
require "coffee-filter"
|
5
|
+
|
1
6
|
page "/fake.html", :proxy => "/real.html", :layout => false
|
2
7
|
|
3
8
|
ignore "/should_be_ignored.html"
|
@@ -45,8 +50,4 @@ with_layout false do
|
|
45
50
|
}.each do |path|
|
46
51
|
page path
|
47
52
|
end
|
48
|
-
end
|
49
|
-
|
50
|
-
get "/sinatra_test" do
|
51
|
-
"Ratpack"
|
52
53
|
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require "sprockets_sub"
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "sprockets_sub";
|
@@ -0,0 +1 @@
|
|
1
|
+
hello { world: "hi"; }
|
data/lib/middleman.rb
CHANGED
@@ -48,42 +48,42 @@
|
|
48
48
|
#
|
49
49
|
# [Visit the website]: http://middlemanapp.com
|
50
50
|
# [Read the wiki]: https://github.com/tdreyno/middleman/wiki
|
51
|
-
# [Email the users group]:
|
51
|
+
# [Email the users group]: https://convore.com/middleman/
|
52
52
|
# [Submit bug reports]: https://github.com/tdreyno/middleman/issues
|
53
53
|
|
54
54
|
# Setup our load paths
|
55
55
|
libdir = File.dirname(__FILE__)
|
56
56
|
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
|
57
57
|
|
58
|
-
# We're riding on Sinatra, so let's include it.
|
59
|
-
require "sinatra/base"
|
60
|
-
|
61
58
|
# Top-level Middleman object
|
62
59
|
module Middleman
|
63
60
|
# Auto-load modules on-demand
|
64
|
-
autoload :Base,
|
65
|
-
autoload :
|
66
|
-
autoload :
|
67
|
-
autoload :
|
68
|
-
autoload :
|
61
|
+
autoload :Base, "middleman/base"
|
62
|
+
autoload :Hooks, "middleman/hooks"
|
63
|
+
autoload :Builder, "middleman/builder"
|
64
|
+
autoload :CLI, "middleman/cli"
|
65
|
+
autoload :Templates, "middleman/templates"
|
66
|
+
autoload :Guard, "middleman/guard"
|
69
67
|
|
70
68
|
# Custom Renderers
|
71
69
|
module Renderers
|
72
|
-
autoload :Haml, "middleman/renderers/haml"
|
73
70
|
autoload :Sass, "middleman/renderers/sass"
|
74
|
-
autoload :Slim, "middleman/renderers/slim"
|
75
71
|
autoload :Markdown, "middleman/renderers/markdown"
|
72
|
+
autoload :ERb, "middleman/renderers/erb"
|
76
73
|
autoload :CoffeeScript, "middleman/renderers/coffee_script"
|
77
74
|
autoload :Liquid, "middleman/renderers/liquid"
|
78
75
|
end
|
79
76
|
|
80
77
|
module CoreExtensions
|
78
|
+
# File Change Notifier
|
79
|
+
autoload :FileWatcher, "middleman/core_extensions/file_watcher"
|
80
|
+
|
81
|
+
# In-memory Sitemap
|
82
|
+
autoload :Sitemap, "middleman/core_extensions/sitemap"
|
83
|
+
|
81
84
|
# Add Builder callbacks
|
82
85
|
autoload :Builder, "middleman/core_extensions/builder"
|
83
86
|
|
84
|
-
# Add Rack::Builder.map support
|
85
|
-
autoload :RackMap, "middleman/core_extensions/rack_map"
|
86
|
-
|
87
87
|
# Custom Feature API
|
88
88
|
autoload :Features, "middleman/core_extensions/features"
|
89
89
|
|
@@ -142,11 +142,11 @@ module Middleman
|
|
142
142
|
# words, paragraphs, fake images, names and email addresses.
|
143
143
|
autoload :Lorem, "middleman/features/lorem"
|
144
144
|
|
145
|
-
# guard-livereload
|
146
|
-
autoload :LiveReload, "middleman/features/live_reload"
|
147
|
-
|
148
145
|
# Automatically convert filename.html files into filename/index.html
|
149
146
|
autoload :DirectoryIndexes, "middleman/features/directory_indexes"
|
147
|
+
|
148
|
+
# Organize the sitemap as a tree
|
149
|
+
autoload :SitemapTree, "middleman/features/sitemap_tree"
|
150
150
|
end
|
151
151
|
|
152
152
|
EXTENSION_FILE = File.join("lib", "middleman_init.rb")
|
@@ -176,9 +176,8 @@ module Middleman
|
|
176
176
|
end
|
177
177
|
|
178
178
|
def self.server(&block)
|
179
|
-
sandbox = Class.new(
|
180
|
-
sandbox.
|
181
|
-
sandbox.class_eval(&block) if block_given?
|
179
|
+
sandbox = Class.new(Middleman::Base)
|
180
|
+
# sandbox.class_eval(&block) if block_given?
|
182
181
|
sandbox
|
183
182
|
end
|
184
183
|
|
@@ -188,13 +187,16 @@ module Middleman
|
|
188
187
|
:AccessLog => []
|
189
188
|
}
|
190
189
|
|
191
|
-
|
192
|
-
app
|
193
|
-
opts[:app] = app.new
|
190
|
+
app_class = options[:app] ||= ::Middleman.server.new
|
191
|
+
opts[:app] = app_class
|
194
192
|
opts[:server] = 'thin'
|
193
|
+
|
194
|
+
# require "thin"
|
195
|
+
# ::Thin::Logging.silent = true if options[:debug] != "true"
|
195
196
|
|
196
|
-
|
197
|
-
|
197
|
+
server = ::Rack::Server.new(opts)
|
198
|
+
server.start
|
199
|
+
server
|
198
200
|
end
|
199
201
|
end
|
200
202
|
|