middleman-core 4.3.0.rc.4 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cucumber.yml +2 -2
- data/features/builder.feature +1 -1
- data/features/chained_templates.feature +0 -7
- data/features/coffee-script.feature +1 -1
- data/features/collections.feature +2 -2
- data/features/console.feature +1 -1
- data/features/data.feature +31 -0
- data/features/extension_api_deprecations.feature +3 -1
- data/features/extension_hooks.feature +3 -1
- data/features/helpers_external.feature +1 -17
- data/features/i18n_link_to.feature +0 -23
- data/features/i18n_mixed_sources.feature +0 -8
- data/features/i18n_preview.feature +1 -30
- data/features/ignore.feature +11 -67
- data/features/ignore_already_minified.feature +1 -1
- data/features/markdown.feature +1 -0
- data/features/minify_javascript.feature +35 -35
- data/features/mount_rack.feature +0 -1
- data/features/page-id.feature +2 -2
- data/features/partials.feature +1 -1
- data/features/relative_assets_helpers_only.feature +6 -4
- data/features/scss-support.feature +6 -1
- data/features/support/env.rb +5 -5
- data/features/tilde_directories.feature +2 -0
- data/features/unicode_filenames.feature +1 -1
- data/fixtures/asset-hash-app/config.rb +1 -0
- data/fixtures/asset-hash-app/lib/middleware.rb +2 -2
- data/fixtures/asset-hash-app/source/stylesheets/_partial.sass +1 -1
- data/fixtures/asset-hash-minified-app/config.rb +1 -1
- data/fixtures/asset-hash-prefix/config.rb +2 -1
- data/fixtures/asset-hash-prefix/lib/middleware.rb +2 -2
- data/fixtures/asset-hash-source-map/config.rb +1 -0
- data/fixtures/asset-hash-source-map/lib/middleware.rb +2 -2
- data/fixtures/asset-host-app/config.rb +1 -1
- data/fixtures/auto-css-app/config.rb +2 -2
- data/fixtures/auto-js-app/config.rb +2 -2
- data/fixtures/auto-js-directory-index-app/config.rb +1 -1
- data/fixtures/automatic-directory-matcher-app/config.rb +1 -1
- data/fixtures/basic-data-app/config.rb +2 -2
- data/fixtures/capture-html-app/config.rb +4 -4
- data/fixtures/clean-app/config-complications.rb +6 -6
- data/fixtures/clean-app/config-hidden-dir-after.rb +4 -4
- data/fixtures/clean-app/config-hidden-dir-before.rb +1 -1
- data/fixtures/clean-app/config.rb +6 -6
- data/fixtures/clean-dir-app/config.rb +1 -0
- data/fixtures/clean-nested-app/config.rb +1 -1
- data/fixtures/collections-app/source/blog1/2011-01-01-new-article.html.markdown +1 -1
- data/fixtures/collections-app/source/blog1/2011-01-02-another-article.html.markdown +1 -1
- data/fixtures/collections-app/source/blog2/2011-01-01-new-article.html.markdown +1 -1
- data/fixtures/collections-app/source/blog2/2011-01-02-another-article.html.markdown +1 -1
- data/fixtures/content-for-app/config.rb +4 -4
- data/fixtures/dynamic-pages-app/config.rb +26 -25
- data/fixtures/ember-cli-app/config.rb +4 -4
- data/fixtures/env-app/environments/development.rb +1 -1
- data/fixtures/env-app/environments/production.rb +1 -1
- data/fixtures/env-app/source/stylesheets/site.css.scss +1 -1
- data/fixtures/extension-hooks-app/config.rb +8 -8
- data/fixtures/external-helpers/config.rb +2 -2
- data/fixtures/external-helpers/helpers/derp.rb +1 -3
- data/fixtures/external-helpers/helpers/four_helpers.rb +1 -3
- data/fixtures/external-helpers/helpers/one_helper.rb +1 -3
- data/fixtures/external-helpers/helpers/yet_another_thingy.rb +1 -3
- data/fixtures/external-helpers/lib/hello_helper.rb +1 -1
- data/fixtures/external-pipeline-error/config.rb +4 -4
- data/fixtures/feature-params-app/config.rb +1 -1
- data/fixtures/frontmatter-app/config.rb +1 -1
- data/fixtures/generator-test/config.rb +15 -1
- data/fixtures/glob-app/config.rb +1 -1
- data/fixtures/i-8859-1-app/config.rb +1 -1
- data/fixtures/i18n-force-locale/config.rb +4 -4
- data/fixtures/i18n-mixed-sources/config.rb +1 -1
- data/fixtures/i18n-test-app/locales/en.yml +1 -7
- data/fixtures/i18n-test-app/locales/es.yml +1 -2
- data/fixtures/import-app/config.rb +3 -3
- data/fixtures/indexable-app/config.rb +3 -3
- data/fixtures/large-build-app/config.rb +1 -1
- data/fixtures/manual-layout-override/config.rb +1 -1
- data/fixtures/missing-tilt-library-app/config.rb +2 -2
- data/fixtures/more-traversal-app/config.rb +4 -4
- data/fixtures/multiple-data-sources-app/config.rb +1 -1
- data/fixtures/multiple-sources-app/config.rb +1 -1
- data/fixtures/multiple-sources-with-duplicate-file-names-app/config.rb +1 -1
- data/fixtures/nested-layout-app/source/another.html.markdown +1 -1
- data/fixtures/nested-layout-app/source/haml-test.html.markdown +1 -1
- data/fixtures/nested-layout-app/source/slim-test.html.markdown +1 -1
- data/fixtures/padrino-helpers-app/config.rb +1 -1
- data/fixtures/page-classes-app/config.rb +2 -2
- data/fixtures/page-helper-layout-block-app/config.rb +1 -1
- data/fixtures/page-id-app/config-proc.rb +4 -4
- data/fixtures/page-id-app/config.rb +3 -3
- data/fixtures/page-id-app/source/{forty-two.html.erb → fourty-two.html.erb} +0 -0
- data/fixtures/paginate-app/source/blog/2011-01-01-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-01-02-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-01-03-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-01-04-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-01-05-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-02-01-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-02-02-test-article.html.markdown +1 -1
- data/fixtures/partials-app/source/_locals.erb +1 -1
- data/fixtures/partials-app/source/locals.html.erb +1 -1
- data/fixtures/proxy-pages-app/config.rb +14 -13
- data/fixtures/sass-assets-path-app/config.rb +2 -2
- data/fixtures/scss-app/source/stylesheets/error.css.sass +1 -0
- data/fixtures/sinatra-app/config.rb +6 -6
- data/fixtures/traversal-app/config.rb +4 -4
- data/fixtures/v4-extension-callbacks/config.rb +2 -2
- data/fixtures/wildcard-app/config.rb +1 -1
- data/fixtures/wildcard-directory-index-app/config.rb +1 -1
- data/lib/middleman/rack.rb +7 -0
- data/lib/middleman-core/application.rb +9 -10
- data/lib/middleman-core/builder.rb +21 -50
- data/lib/middleman-core/callback_manager.rb +1 -1
- data/lib/middleman-core/config_context.rb +2 -2
- data/lib/middleman-core/configuration.rb +5 -5
- data/lib/middleman-core/contracts.rb +2 -2
- data/lib/middleman-core/core_extensions/collections/lazy_root.rb +1 -1
- data/lib/middleman-core/core_extensions/collections/lazy_step.rb +9 -9
- data/lib/middleman-core/core_extensions/collections/pagination.rb +6 -6
- data/lib/middleman-core/core_extensions/collections.rb +1 -1
- data/lib/middleman-core/core_extensions/data.rb +11 -11
- data/lib/middleman-core/core_extensions/default_helpers.rb +29 -26
- data/lib/middleman-core/core_extensions/external_helpers.rb +1 -1
- data/lib/middleman-core/core_extensions/file_watcher.rb +1 -1
- data/lib/middleman-core/core_extensions/front_matter.rb +3 -3
- data/lib/middleman-core/core_extensions/i18n.rb +23 -44
- data/lib/middleman-core/core_extensions/inline_url_rewriter.rb +7 -10
- data/lib/middleman-core/core_extensions/routing.rb +1 -1
- data/lib/middleman-core/core_extensions.rb +2 -2
- data/lib/middleman-core/dns_resolver/basic_network_resolver.rb +3 -3
- data/lib/middleman-core/dns_resolver/hosts_resolver.rb +1 -1
- data/lib/middleman-core/dns_resolver/local_link_resolver.rb +1 -1
- data/lib/middleman-core/dns_resolver/network_resolver.rb +1 -1
- data/lib/middleman-core/dns_resolver.rb +1 -1
- data/lib/middleman-core/extension.rb +32 -34
- data/lib/middleman-core/extension_manager.rb +2 -6
- data/lib/middleman-core/extensions/asset_hash.rb +22 -24
- data/lib/middleman-core/extensions/asset_host.rb +10 -10
- data/lib/middleman-core/extensions/automatic_alt_tags.rb +1 -1
- data/lib/middleman-core/extensions/automatic_image_sizes.rb +3 -3
- data/lib/middleman-core/extensions/cache_buster.rb +2 -2
- data/lib/middleman-core/extensions/directory_indexes.rb +1 -1
- data/lib/middleman-core/extensions/external_pipeline.rb +9 -14
- data/lib/middleman-core/extensions/gzip.rb +6 -8
- data/lib/middleman-core/extensions/lorem.rb +9 -9
- data/lib/middleman-core/extensions/minify_css.rb +16 -14
- data/lib/middleman-core/extensions/minify_javascript.rb +13 -13
- data/lib/middleman-core/extensions/relative_assets.rb +8 -8
- data/lib/middleman-core/extensions.rb +7 -8
- data/lib/middleman-core/file_renderer.rb +6 -7
- data/lib/middleman-core/load_paths.rb +10 -13
- data/lib/middleman-core/logger.rb +4 -3
- data/lib/middleman-core/meta_pages/sitemap_resource.rb +2 -0
- data/lib/middleman-core/meta_pages/sitemap_tree.rb +1 -1
- data/lib/middleman-core/meta_pages.rb +1 -1
- data/lib/middleman-core/preview_server/checks.rb +1 -1
- data/lib/middleman-core/preview_server/information.rb +13 -13
- data/lib/middleman-core/preview_server/network_interface_inventory.rb +3 -3
- data/lib/middleman-core/preview_server/server_information.rb +1 -1
- data/lib/middleman-core/preview_server/server_information_callback_proxy.rb +1 -1
- data/lib/middleman-core/preview_server/server_url.rb +1 -1
- data/lib/middleman-core/preview_server/tcp_port_prober.rb +1 -1
- data/lib/middleman-core/preview_server.rb +25 -25
- data/lib/middleman-core/rack.rb +1 -1
- data/lib/middleman-core/renderers/coffee_script.rb +2 -2
- data/lib/middleman-core/renderers/haml.rb +4 -8
- data/lib/middleman-core/renderers/less.rb +1 -1
- data/lib/middleman-core/renderers/liquid.rb +2 -3
- data/lib/middleman-core/renderers/markdown.rb +7 -7
- data/lib/middleman-core/renderers/redcarpet.rb +2 -2
- data/lib/middleman-core/renderers/sass.rb +23 -26
- data/lib/middleman-core/renderers/sass_functions.rb +14 -17
- data/lib/middleman-core/renderers/slim.rb +2 -2
- data/lib/middleman-core/sitemap/extensions/ignores.rb +4 -2
- data/lib/middleman-core/sitemap/extensions/import.rb +1 -1
- data/lib/middleman-core/sitemap/extensions/on_disk.rb +1 -1
- data/lib/middleman-core/sitemap/extensions/proxies.rb +1 -2
- data/lib/middleman-core/sitemap/extensions/redirects.rb +1 -1
- data/lib/middleman-core/sitemap/extensions/request_endpoints.rb +1 -1
- data/lib/middleman-core/sitemap/extensions/traversal.rb +25 -80
- data/lib/middleman-core/sitemap/resource.rb +20 -21
- data/lib/middleman-core/sitemap/store.rb +6 -6
- data/lib/middleman-core/sources/source_watcher.rb +11 -17
- data/lib/middleman-core/sources.rb +12 -12
- data/lib/middleman-core/step_definitions/builder_steps.rb +12 -38
- data/lib/middleman-core/step_definitions/commandline_steps.rb +6 -6
- data/lib/middleman-core/step_definitions/middleman_steps.rb +14 -13
- data/lib/middleman-core/step_definitions/server_steps.rb +16 -18
- data/lib/middleman-core/template_context.rb +10 -17
- data/lib/middleman-core/template_renderer.rb +33 -35
- data/lib/middleman-core/util/binary.rb +1 -3
- data/lib/middleman-core/util/data.rb +22 -12
- data/lib/middleman-core/util/files.rb +3 -3
- data/lib/middleman-core/util/paths.rb +44 -47
- data/lib/middleman-core/util/rack.rb +3 -3
- data/lib/middleman-core/util/uri_templates.rb +0 -1
- data/lib/middleman-core/util.rb +2 -2
- data/lib/middleman-core/version.rb +1 -1
- data/lib/middleman-core.rb +3 -3
- data/middleman-core.gemspec +13 -12
- data/spec/middleman-core/callbacks_spec.rb +14 -15
- data/spec/middleman-core/core_extensions/data_spec.rb +74 -70
- data/spec/middleman-core/dns_resolver_spec.rb +6 -6
- data/spec/middleman-core/util_spec.rb +86 -81
- data/spec/spec_helper.rb +6 -1
- data/spec/support/given.rb +15 -11
- metadata +59 -76
- data/features/multiple-sources-reload.feature +0 -40
- data/fixtures/chained-app/source/stylesheets/main.css.scss.erb +0 -3
- data/fixtures/chained-app/source/stylesheets/sub.scss +0 -1
- data/fixtures/destination-dir-different-from-source-dir-name/external/page.html.erb +0 -1
- data/fixtures/destination-dir-different-from-source-dir-name/my-app/config.rb +0 -2
- data/fixtures/destination-dir-different-from-source-dir-name/my-app/source/index.html.erb +0 -1
- data/fixtures/i18n-default-app/source/name.html.erb +0 -1
- data/fixtures/i18n-mixed-sources/source/c/d/index.html.erb +0 -9
- data/fixtures/i18n-mixed-sources/source/localizable/c/d/index.html.erb +0 -9
- data/fixtures/i18n-test-app/source/localizable/tac.html.erb +0 -1
- data/fixtures/multiple-sources-with-destination-dir/config.rb +0 -2
- data/fixtures/multiple-sources-with-destination-dir/external/page.html.erb +0 -1
- data/fixtures/multiple-sources-with-destination-dir/source/index.html.erb +0 -1
- data/fixtures/multiple-sources-without-destination-dir/config.rb +0 -1
- data/fixtures/multiple-sources-without-destination-dir/external/page.html.erb +0 -1
- data/fixtures/multiple-sources-without-destination-dir/source/index.html.erb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f2fc5888682b7c060027e651e2a750c951cb0151eb0a4388bec0c8593dd0fd8
|
4
|
+
data.tar.gz: d5885c630ebd13ac9419432adef385485f80c008d853b4e759a0a024113adea4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2a1183511d4e3662af4d5c72c8120ed637577fc3db721667221ebfddd3fef40c6e80f35d3582a81d25895f61fef6badaf3bb1d392d5a5597c7e2b9176ce2103
|
7
|
+
data.tar.gz: 6a7fbf18e8a691e115b7d0cbcbd42eb208814f89faf29d853a05ebc3a15ee6157f681b11677a687c61e3d4df9eda0a50b6252c4e3e3f8718a613c46de5058ed1
|
data/cucumber.yml
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
default: --
|
2
|
-
wip: --
|
1
|
+
default: --require features --tags ~@wip
|
2
|
+
wip: --require features --tags @wip
|
data/features/builder.feature
CHANGED
@@ -7,13 +7,6 @@ Feature: Templates should be chainable
|
|
7
7
|
Then I should see "Title</h1>"
|
8
8
|
And I should see "Subtitle</h2>"
|
9
9
|
And I should see "Sup</h3>"
|
10
|
-
When I go to "/stylesheets/main.css"
|
11
|
-
|
12
|
-
Scenario: Scss file in Erb
|
13
|
-
Given the Server is running at "chained-app"
|
14
|
-
When I go to "/stylesheets/main.css"
|
15
|
-
Then I should see "color: from_main;"
|
16
|
-
And I should see "background: from_sub;"
|
17
10
|
|
18
11
|
Scenario: Build chained template
|
19
12
|
Given a successfully built app at "chained-app"
|
@@ -111,7 +111,7 @@ Feature: Collections
|
|
111
111
|
"""
|
112
112
|
---
|
113
113
|
title: "Blog3 Another Article"
|
114
|
-
date:
|
114
|
+
date: 2011-01-02
|
115
115
|
tags:
|
116
116
|
- foo
|
117
117
|
---
|
@@ -133,7 +133,7 @@ Feature: Collections
|
|
133
133
|
"""
|
134
134
|
---
|
135
135
|
title: "Blog2 Yet Another Article"
|
136
|
-
date:
|
136
|
+
date: 2011-01-02
|
137
137
|
tags:
|
138
138
|
- foo
|
139
139
|
---
|
data/features/console.feature
CHANGED
@@ -2,7 +2,7 @@ Feature: Console
|
|
2
2
|
|
3
3
|
Scenario: Enter and exit the console
|
4
4
|
Given a fixture app "large-build-app"
|
5
|
-
When I run
|
5
|
+
When I run `middleman console` interactively
|
6
6
|
And I type "puts 'Hello from the console.'"
|
7
7
|
And I type "exit"
|
8
8
|
Then it should pass with:
|
data/features/data.feature
CHANGED
@@ -18,6 +18,37 @@ Feature: Local Data API
|
|
18
18
|
When I go to "/data.html"
|
19
19
|
Then I should see "No Test Data"
|
20
20
|
|
21
|
+
Scenario: Numeric keys in YAML
|
22
|
+
Given the Server is running at "basic-data-app"
|
23
|
+
When the file "data/by_year.yml" has the contents
|
24
|
+
"""
|
25
|
+
-
|
26
|
+
2018: 1
|
27
|
+
2019: 2
|
28
|
+
"""
|
29
|
+
And the file "source/years.html.erb" has the contents
|
30
|
+
"""
|
31
|
+
<%= data.by_year.first[2018] %>:<%= data.by_year.first[2019] %>
|
32
|
+
"""
|
33
|
+
When I go to "/years.html"
|
34
|
+
Then I should see "1:2"
|
35
|
+
|
36
|
+
Scenario: Date keys in YAML
|
37
|
+
Given the Server is running at "basic-data-app"
|
38
|
+
When the file "data/dates.yml" has the contents
|
39
|
+
"""
|
40
|
+
2016-03-25:
|
41
|
+
title: "1"
|
42
|
+
2018-03-25:
|
43
|
+
title: "2"
|
44
|
+
"""
|
45
|
+
And the file "source/years.html.erb" has the contents
|
46
|
+
"""
|
47
|
+
<%= data.dates.values.map(&:title).join(":") %>
|
48
|
+
"""
|
49
|
+
When I go to "/years.html"
|
50
|
+
Then I should see "1:2"
|
51
|
+
|
21
52
|
Scenario: Rendering json
|
22
53
|
Given the Server is running at "basic-data-app"
|
23
54
|
When I go to "/data3.html"
|
@@ -1,7 +1,9 @@
|
|
1
1
|
Feature: Extension author could use some hooks
|
2
2
|
|
3
3
|
Scenario: When build
|
4
|
-
Given a
|
4
|
+
Given a fixture app "extension-api-deprecations-app"
|
5
|
+
When I run `middleman build`
|
6
|
+
Then the exit status should be 0
|
5
7
|
And the output should contain "`set :layout` is deprecated"
|
6
8
|
And the file "build/index.html" should contain "In Index"
|
7
9
|
And the file "build/index.html" should not contain "In Layout"
|
@@ -1,7 +1,9 @@
|
|
1
1
|
Feature: Extension author could use some hooks
|
2
2
|
|
3
3
|
Scenario: When build
|
4
|
-
Given a
|
4
|
+
Given a fixture app "extension-hooks-app"
|
5
|
+
When I run `middleman build`
|
6
|
+
Then the exit status should be 0
|
5
7
|
And the output should contain "/// after_configuration ///"
|
6
8
|
And the output should contain "/// ready ///"
|
7
9
|
And the output should contain "/// before_build ///"
|
@@ -9,20 +9,4 @@ Feature: Helpers in external files
|
|
9
9
|
Given the Server is running at "external-helpers"
|
10
10
|
Then going to "/automatic.html" should not raise an exception
|
11
11
|
And I should see "One:Two:Three:Four"
|
12
|
-
|
13
|
-
Scenario: Automatic Helpers Reload
|
14
|
-
Given the Server is running at "external-helpers"
|
15
|
-
Then going to "/automatic.html" should not raise an exception
|
16
|
-
And I should see "One:Two:Three:Four"
|
17
|
-
|
18
|
-
When the file "helpers/one_helper.rb" has the contents
|
19
|
-
"""
|
20
|
-
module OneHelper
|
21
|
-
def one
|
22
|
-
'Won'
|
23
|
-
end
|
24
|
-
end
|
25
|
-
"""
|
26
|
-
When the Server is reloaded
|
27
|
-
Then going to "/automatic.html" should not raise an exception
|
28
|
-
And I should see "Won:Two:Three:Four"
|
12
|
+
|
@@ -34,8 +34,6 @@ Feature: i18n Paths
|
|
34
34
|
<%= link_to "Other Home", "/index.html", title: "Other Home", locale: ::I18n.locale == :en ? :es : :en %>
|
35
35
|
<% link_to "/index.html", class: 'current' do %><span>Home: Current Block</span><% end %>
|
36
36
|
<% link_to "/index.html", title: "Other Home", locale: ::I18n.locale == :en ? :es : :en do %><span>Home: Other Block</span><% end %>
|
37
|
-
<%= link_to "Current Foobar", "/foobar.html", class: 'current' %>
|
38
|
-
<%= link_to "Other Foobar", "/foobar.html", title: "Other Foobar", locale: ::I18n.locale == :en ? :es : :en %>
|
39
37
|
|
40
38
|
<% data.pages.each_with_index do |p, i| %>
|
41
39
|
<%= link_to "Current #{p}", "/#{p}", class: 'current' %>
|
@@ -44,14 +42,6 @@ Feature: i18n Paths
|
|
44
42
|
<% link_to "/#{p}", title: "Other #{p}", locale: ::I18n.locale == :en ? :es : :en do %><span>Other Block</span><% end %>
|
45
43
|
<% end %>
|
46
44
|
"""
|
47
|
-
And a file named "source/localizable/foobar.en.html.erb" with:
|
48
|
-
"""
|
49
|
-
English foobar
|
50
|
-
"""
|
51
|
-
And a file named "source/localizable/foobar.es.html.erb" with:
|
52
|
-
"""
|
53
|
-
Spanish foobar
|
54
|
-
"""
|
55
45
|
And a file named "config.rb" with:
|
56
46
|
"""
|
57
47
|
set :strip_index_file, false
|
@@ -68,8 +58,6 @@ Feature: i18n Paths
|
|
68
58
|
Then I should see '<a href="/es/hola.html" title="Other hello.html">Other hello.html</a>'
|
69
59
|
Then I should see '<a href="/hello.html" class="current"><span>Current Block</span></a>'
|
70
60
|
Then I should see '<a href="/es/hola.html" title="Other hello.html"><span>Other Block</span></a>'
|
71
|
-
Then I should see '<a href="/foobar.html" class="current">Current Foobar</a>'
|
72
|
-
Then I should see '<a href="/es/foobar.html" title="Other Foobar">Other Foobar</a>'
|
73
61
|
When I go to "/es/hola.html"
|
74
62
|
Then I should see "Page: Hola"
|
75
63
|
Then I should see '<a href="/es/index.html" class="current">Current Home</a>'
|
@@ -80,8 +68,6 @@ Feature: i18n Paths
|
|
80
68
|
Then I should see '<a href="/hello.html" title="Other hello.html">Other hello.html</a>'
|
81
69
|
Then I should see '<a href="/es/hola.html" class="current"><span>Current Block</span></a>'
|
82
70
|
Then I should see '<a href="/hello.html" title="Other hello.html"><span>Other Block</span></a>'
|
83
|
-
Then I should see '<a href="/es/foobar.html" class="current">Current Foobar</a>'
|
84
|
-
Then I should see '<a href="/foobar.html" title="Other Foobar">Other Foobar</a>'
|
85
71
|
|
86
72
|
Scenario: link_to is i18n aware and supports relative_links
|
87
73
|
Given a fixture app "empty-app"
|
@@ -176,7 +162,6 @@ Feature: i18n Paths
|
|
176
162
|
es:
|
177
163
|
paths:
|
178
164
|
hello: "hola"
|
179
|
-
form: "formulario"
|
180
165
|
msg: Hola
|
181
166
|
"""
|
182
167
|
And a file named "source/localizable/hello.html.erb" with:
|
@@ -187,10 +172,6 @@ Feature: i18n Paths
|
|
187
172
|
Other: <%= url_for "/#{p}", locale: ::I18n.locale == :en ? :es : :en %>
|
188
173
|
<% end %>
|
189
174
|
"""
|
190
|
-
And a file named "source/localizable/form.html.erb" with:
|
191
|
-
"""
|
192
|
-
Other: <%= url_for "/form.html", query: { foo: 'bar' }, fragment: "deep", locale: ::I18n.locale == :en ? :es : :en %>
|
193
|
-
"""
|
194
175
|
And a file named "source/localizable/article.html.erb" with:
|
195
176
|
"""
|
196
177
|
Page Lang: Default
|
@@ -218,10 +199,6 @@ Feature: i18n Paths
|
|
218
199
|
Then I should see "Page: Hola"
|
219
200
|
Then I should see 'Current: /es/hola.html'
|
220
201
|
Then I should see 'Other: /hello.html'
|
221
|
-
When I go to "/form.html"
|
222
|
-
Then I should see 'Other: /es/formulario.html?foo=bar#deep'
|
223
|
-
When I go to "/es/formulario.html"
|
224
|
-
Then I should see 'Other: /form.html?foo=bar#deep'
|
225
202
|
When I go to "/article.html"
|
226
203
|
Then I should see "Page Lang: Default"
|
227
204
|
Then I should see 'Current: /article.html'
|
@@ -37,11 +37,3 @@ Feature: i18n merging path trees
|
|
37
37
|
When I go to "/es/b/sub.html"
|
38
38
|
Then I should see "Current locale: es"
|
39
39
|
Then I should see "path: is-localized Home # b/index.html.erb # b/sub.html.erb"
|
40
|
-
|
41
|
-
When I go to "/c/d/index.html"
|
42
|
-
Then I should see "Current locale: en"
|
43
|
-
Then I should see "path: is-localized Home # c/d/index.html.erb"
|
44
|
-
|
45
|
-
When I go to "/es/c/d/index.html"
|
46
|
-
Then I should see "Current locale: es"
|
47
|
-
Then I should see "path: is-localized Home # c/d/index.html.erb"
|
@@ -32,10 +32,6 @@ Feature: i18n Preview
|
|
32
32
|
Then I should see "Buenos días"
|
33
33
|
When I go to "/es/una.html"
|
34
34
|
Then I should see "Solamente una"
|
35
|
-
When I go to "/terms-and-conditions.html"
|
36
|
-
Then I should see "Terms & Conditions"
|
37
|
-
When I go to "/es/terms-and-conditions.html"
|
38
|
-
Then I should see "Condiciones Generales"
|
39
35
|
|
40
36
|
Scenario: A template changes i18n during preview
|
41
37
|
Given a fixture app "i18n-test-app"
|
@@ -253,29 +249,4 @@ Feature: i18n Preview
|
|
253
249
|
Then I should see "More"
|
254
250
|
When I go to "/es/"
|
255
251
|
Then I should see "Como Esta?"
|
256
|
-
Then I should see "Mucho"
|
257
|
-
|
258
|
-
Scenario: Proxy to localized pages.
|
259
|
-
Given a fixture app "i18n-default-app"
|
260
|
-
And a file named "config.rb" with:
|
261
|
-
"""
|
262
|
-
langs = [:en, :es]
|
263
|
-
activate :i18n, mount_at_root: false, langs: langs
|
264
|
-
|
265
|
-
["Tom", "Jen"].each do |name|
|
266
|
-
langs.each do |lang|
|
267
|
-
proxy "/#{lang}/people/#{name.downcase}.html", "/name.html", locals: { name: name }, locale: lang, ignore: true
|
268
|
-
end
|
269
|
-
end
|
270
|
-
"""
|
271
|
-
Given the Server is running at "i18n-default-app"
|
272
|
-
When I go to "/name.html"
|
273
|
-
Then I should see "File Not Found"
|
274
|
-
When I go to "/en/people/tom.html"
|
275
|
-
Then I should see "Howdy Tom"
|
276
|
-
When I go to "/en/people/jen.html"
|
277
|
-
Then I should see "Howdy Jen"
|
278
|
-
When I go to "/es/people/tom.html"
|
279
|
-
Then I should see "Como Esta? Tom"
|
280
|
-
When I go to "/es/people/jen.html"
|
281
|
-
Then I should see "Como Esta? Jen"
|
252
|
+
Then I should see "Mucho"
|
data/features/ignore.feature
CHANGED
@@ -7,12 +7,11 @@ Feature: Ignoring paths
|
|
7
7
|
ignore 'plain.html'
|
8
8
|
"""
|
9
9
|
And a successfully built app at "ignore-app"
|
10
|
-
When I cd to "build"
|
11
10
|
Then the following files should exist:
|
12
|
-
| index.html |
|
11
|
+
| build/index.html |
|
13
12
|
And the following files should not exist:
|
14
|
-
| plain.html |
|
15
|
-
| about.html |
|
13
|
+
| build/plain.html |
|
14
|
+
| build/about.html |
|
16
15
|
|
17
16
|
Scenario: Ignore a single path (server)
|
18
17
|
Given a fixture app "ignore-app"
|
@@ -67,17 +66,16 @@ Feature: Ignoring paths
|
|
67
66
|
ignore 'images/**/*.png'
|
68
67
|
"""
|
69
68
|
And a successfully built app at "ignore-app"
|
70
|
-
When I cd to "build"
|
71
69
|
Then the following files should exist:
|
72
|
-
| plain.html |
|
73
|
-
| images/portrait.jpg |
|
74
|
-
| images/pic.png |
|
70
|
+
| build/plain.html |
|
71
|
+
| build/images/portrait.jpg |
|
72
|
+
| build/images/pic.png |
|
75
73
|
And the following files should not exist:
|
76
|
-
| about.html |
|
77
|
-
| index.html |
|
78
|
-
| reports/index.html |
|
79
|
-
| reports/another.html |
|
80
|
-
| images/icons/messages.png |
|
74
|
+
| build/about.html |
|
75
|
+
| build/index.html |
|
76
|
+
| build/reports/index.html |
|
77
|
+
| build/reports/another.html |
|
78
|
+
| build/images/icons/messages.png |
|
81
79
|
|
82
80
|
Scenario: Ignore a globbed path (server)
|
83
81
|
Given a fixture app "ignore-app"
|
@@ -150,57 +148,3 @@ Feature: Ignoring paths
|
|
150
148
|
Then I should see "File Not Found"
|
151
149
|
When I go to "/images/icons/messages.png"
|
152
150
|
Then I should see "File Not Found"
|
153
|
-
|
154
|
-
Scenario: Ignore localized templates (build)
|
155
|
-
Given a fixture app "i18n-test-app"
|
156
|
-
And a file named "config.rb" with:
|
157
|
-
"""
|
158
|
-
activate :i18n
|
159
|
-
ignore 'localizable/hello.html.erb'
|
160
|
-
ignore /morning/
|
161
|
-
ignore 'localizable/*.md'
|
162
|
-
"""
|
163
|
-
And a successfully built app at "i18n-test-app"
|
164
|
-
When I cd to "build"
|
165
|
-
Then the following files should exist:
|
166
|
-
| index.html |
|
167
|
-
| es/index.html |
|
168
|
-
And the following files should not exist:
|
169
|
-
| hello.html |
|
170
|
-
| morning.html |
|
171
|
-
| one.html |
|
172
|
-
| es/hola.html |
|
173
|
-
| es/manana.html |
|
174
|
-
| es/una.html |
|
175
|
-
| es/hello.html |
|
176
|
-
| es/morning.html |
|
177
|
-
| es/one.html |
|
178
|
-
And the file "index.html" should contain "Howdy"
|
179
|
-
And the file "es/index.html" should contain "Como Esta?"
|
180
|
-
|
181
|
-
Scenario: Ignore localized templates (server)
|
182
|
-
Given a fixture app "i18n-test-app"
|
183
|
-
And a file named "config.rb" with:
|
184
|
-
"""
|
185
|
-
activate :i18n
|
186
|
-
ignore 'localizable/hello.html.erb'
|
187
|
-
ignore /morning/
|
188
|
-
ignore 'localizable/*.md'
|
189
|
-
"""
|
190
|
-
And the Server is running
|
191
|
-
When I go to "/index.html"
|
192
|
-
Then I should not see "File Not Found"
|
193
|
-
When I go to "/es/index.html"
|
194
|
-
Then I should not see "File Not Found"
|
195
|
-
When I go to "/hello.html"
|
196
|
-
Then I should see "File Not Found"
|
197
|
-
When I go to "/morning.html"
|
198
|
-
Then I should see "File Not Found"
|
199
|
-
When I go to "/one.html"
|
200
|
-
Then I should see "File Not Found"
|
201
|
-
When I go to "/es/hola.html"
|
202
|
-
Then I should see "File Not Found"
|
203
|
-
When I go to "/es/manana.html"
|
204
|
-
Then I should see "File Not Found"
|
205
|
-
When I go to "/es/una.html"
|
206
|
-
Then I should see "File Not Found"
|
data/features/markdown.feature
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Feature: Minify
|
1
|
+
Feature: Minify Javascript
|
2
2
|
In order reduce bytes sent to client and appease YSlow
|
3
3
|
|
4
4
|
Scenario: Rendering inline js with the feature disabled
|
@@ -19,23 +19,23 @@ Feature: Minify JavaScript
|
|
19
19
|
})();
|
20
20
|
</script>
|
21
21
|
<script>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
;(function() {
|
23
|
+
this;
|
24
|
+
should();
|
25
|
+
too();
|
26
|
+
})();
|
27
27
|
</script>
|
28
28
|
<script type='text/javascript'>
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
//<!--
|
30
|
+
;(function() {
|
31
|
+
one;
|
32
|
+
line();
|
33
|
+
here();
|
34
|
+
})();
|
35
|
+
//-->
|
36
36
|
</script>
|
37
37
|
<script type='text/html'>
|
38
|
-
|
38
|
+
I'm a jQuery {{template}}.
|
39
39
|
</script>
|
40
40
|
"""
|
41
41
|
|
@@ -66,23 +66,23 @@ Feature: Minify JavaScript
|
|
66
66
|
})();
|
67
67
|
</script>
|
68
68
|
<script>
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
;(function() {
|
70
|
+
this;
|
71
|
+
should();
|
72
|
+
too();
|
73
|
+
})();
|
74
74
|
</script>
|
75
75
|
<script type='text/javascript'>
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
76
|
+
//<!--
|
77
|
+
;(function() {
|
78
|
+
one;
|
79
|
+
line();
|
80
|
+
here();
|
81
|
+
})();
|
82
|
+
//-->
|
83
83
|
</script>
|
84
84
|
<script type='text/html'>
|
85
|
-
|
85
|
+
I'm a jQuery {{template}}.
|
86
86
|
</script>
|
87
87
|
"""
|
88
88
|
|
@@ -108,15 +108,15 @@ Feature: Minify JavaScript
|
|
108
108
|
Hello
|
109
109
|
</script>
|
110
110
|
<script>
|
111
|
-
|
111
|
+
Hello
|
112
112
|
</script>
|
113
113
|
<script type='text/javascript'>
|
114
|
-
|
114
|
+
//<!--
|
115
115
|
Hello
|
116
|
-
|
116
|
+
//-->
|
117
117
|
</script>
|
118
118
|
<script type='text/html'>
|
119
|
-
|
119
|
+
I'm a jQuery {{template}}.
|
120
120
|
</script>
|
121
121
|
"""
|
122
122
|
|
@@ -134,15 +134,15 @@ Feature: Minify JavaScript
|
|
134
134
|
!function(){should(),all.be(),on={one:line}}();
|
135
135
|
</script>
|
136
136
|
<script>
|
137
|
-
|
137
|
+
!function(){should(),too()}();
|
138
138
|
</script>
|
139
139
|
<script type='text/javascript'>
|
140
|
-
|
140
|
+
//<!--
|
141
141
|
!function(){one,line(),here()}();
|
142
|
-
|
142
|
+
//-->
|
143
143
|
</script>
|
144
144
|
<script type='text/html'>
|
145
|
-
|
145
|
+
I'm a jQuery {{template}}.
|
146
146
|
</script>
|
147
147
|
"""
|
148
148
|
|
data/features/mount_rack.feature
CHANGED
data/features/page-id.feature
CHANGED
@@ -11,7 +11,7 @@ Feature: Page IDs
|
|
11
11
|
And I should see 'URL5: <a href="/implicit.html">Imp</a>'
|
12
12
|
And I should see 'URL6: <a href="/folder/foldern.html">Foldern</a>'
|
13
13
|
And I should see 'URL7: <a href="/feed.xml">Feed</a>'
|
14
|
-
And I should see "URL8: /
|
14
|
+
And I should see "URL8: /fourty-two.html"
|
15
15
|
|
16
16
|
When I go to "/fm.html"
|
17
17
|
Then I should see "I am: frontmatter"
|
@@ -46,7 +46,7 @@ Feature: Page IDs
|
|
46
46
|
And I should see "URL2: /2.html"
|
47
47
|
And I should see 'URL3: <a href="/3.html">Hi</a>'
|
48
48
|
And I should see 'URL4: <a href="/overwrites/from-default.html">Sym</a>'
|
49
|
-
And I should see "URL8: /
|
49
|
+
And I should see "URL8: /fourty-two.html"
|
50
50
|
And I should see 'URL9: <a href="/implicit.html">Imp</a>'
|
51
51
|
And I should see 'URL10: <a href="/folder/foldern.html">Foldern</a>'
|
52
52
|
And I should see 'URL11: <a href="/feed.xml">Feed</a>'
|
data/features/partials.feature
CHANGED
@@ -37,7 +37,7 @@ Feature: Provide Sane Defaults for Partial Behavior
|
|
37
37
|
Scenario: Partials can be passed locals
|
38
38
|
Given the Server is running at "partials-app"
|
39
39
|
When I go to "/locals.html"
|
40
|
-
Then I should see "Local
|
40
|
+
Then I should see "Local var is bar"
|
41
41
|
|
42
42
|
Scenario: Partial and Layout use different engines
|
43
43
|
Given the Server is running at "different-engine-partial"
|
@@ -1,12 +1,13 @@
|
|
1
1
|
Feature: Relative Assets (Helpers Only)
|
2
2
|
|
3
|
+
@wip
|
3
4
|
Scenario: Rendering css with the feature enabled
|
4
5
|
Given a fixture app "relative-assets-app"
|
5
6
|
And a file named "config.rb" with:
|
6
7
|
"""
|
7
8
|
activate :relative_assets, helpers_only: true
|
8
9
|
"""
|
9
|
-
And a file named "source/stylesheets/
|
10
|
+
And a file named "source/stylesheets/relative_assets.css.sass.erb" with:
|
10
11
|
"""
|
11
12
|
h1
|
12
13
|
background: url("<%= asset_url('images/blank.gif') %>")
|
@@ -38,7 +39,7 @@ Feature: Relative Assets (Helpers Only)
|
|
38
39
|
}
|
39
40
|
"""
|
40
41
|
And the Server is running at "relative-assets-app"
|
41
|
-
When I go to "/stylesheets/
|
42
|
+
When I go to "/stylesheets/relative_assets.css"
|
42
43
|
Then I should see 'url("../images/blank.gif'
|
43
44
|
And I should see 'url("../images/blank2.gif'
|
44
45
|
When I go to "/javascripts/application.js"
|
@@ -88,6 +89,7 @@ Feature: Relative Assets (Helpers Only)
|
|
88
89
|
When I go to "/sub/image_tag.html"
|
89
90
|
Then I should see '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" />'
|
90
91
|
|
92
|
+
@wip
|
91
93
|
Scenario: URLs are not rewritten for rewrite ignored paths
|
92
94
|
Given a fixture app "relative-assets-app"
|
93
95
|
And a file named "config.rb" with:
|
@@ -96,7 +98,7 @@ Feature: Relative Assets (Helpers Only)
|
|
96
98
|
'/stylesheets/fonts3.css',
|
97
99
|
], helpers_only: true
|
98
100
|
"""
|
99
|
-
And a file named "source/stylesheets/
|
101
|
+
And a file named "source/stylesheets/relative_assets.css.sass.erb" with:
|
100
102
|
"""
|
101
103
|
h1
|
102
104
|
background: url("<%= asset_url('images/blank.gif') %>")
|
@@ -117,7 +119,7 @@ Feature: Relative Assets (Helpers Only)
|
|
117
119
|
}
|
118
120
|
"""
|
119
121
|
And the Server is running at "relative-assets-app"
|
120
|
-
When I go to "/stylesheets/
|
122
|
+
When I go to "/stylesheets/relative_assets.css"
|
121
123
|
Then I should see 'url("../images/blank.gif'
|
122
124
|
When I go to "/stylesheets/fonts3.css"
|
123
125
|
Then I should see 'url(/fonts/roboto/roboto-regular-webfont.eot'
|
@@ -9,4 +9,9 @@ Feature: Support SCSS Syntax
|
|
9
9
|
Scenario: Rendering scss
|
10
10
|
Given the Server is running at "scss-app"
|
11
11
|
When I go to "/stylesheets/layout.css"
|
12
|
-
Then I should see "html"
|
12
|
+
Then I should see "html"
|
13
|
+
|
14
|
+
Scenario: Rendering scss errors
|
15
|
+
Given the Server is running at "scss-app"
|
16
|
+
When I go to "/stylesheets/error.css"
|
17
|
+
Then I should see "Error:"
|
data/features/support/env.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
ENV[
|
1
|
+
ENV["TEST"] = "true"
|
2
2
|
|
3
|
-
require 'backports/latest'
|
4
3
|
require 'sassc'
|
5
4
|
|
6
5
|
require 'simplecov'
|
7
6
|
SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/../..'))
|
8
7
|
|
9
|
-
|
8
|
+
require 'coveralls'
|
9
|
+
Coveralls.wear!
|
10
10
|
|
11
|
-
require '
|
12
|
-
|
11
|
+
require 'codeclimate-test-reporter'
|
12
|
+
CodeClimate::TestReporter.start
|
13
13
|
|
14
14
|
PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
|
15
15
|
require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-core')
|