middleman-core 4.3.0.rc.4 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/cucumber.yml +2 -2
  3. data/features/builder.feature +1 -1
  4. data/features/chained_templates.feature +0 -7
  5. data/features/coffee-script.feature +1 -1
  6. data/features/collections.feature +2 -2
  7. data/features/console.feature +1 -1
  8. data/features/data.feature +31 -0
  9. data/features/extension_api_deprecations.feature +3 -1
  10. data/features/extension_hooks.feature +3 -1
  11. data/features/helpers_external.feature +1 -17
  12. data/features/i18n_link_to.feature +0 -23
  13. data/features/i18n_mixed_sources.feature +0 -8
  14. data/features/i18n_preview.feature +1 -30
  15. data/features/ignore.feature +11 -67
  16. data/features/ignore_already_minified.feature +1 -1
  17. data/features/markdown.feature +1 -0
  18. data/features/minify_javascript.feature +35 -35
  19. data/features/mount_rack.feature +0 -1
  20. data/features/page-id.feature +2 -2
  21. data/features/partials.feature +1 -1
  22. data/features/relative_assets_helpers_only.feature +6 -4
  23. data/features/scss-support.feature +6 -1
  24. data/features/support/env.rb +5 -5
  25. data/features/tilde_directories.feature +2 -0
  26. data/features/unicode_filenames.feature +1 -1
  27. data/fixtures/asset-hash-app/config.rb +1 -0
  28. data/fixtures/asset-hash-app/lib/middleware.rb +2 -2
  29. data/fixtures/asset-hash-app/source/stylesheets/_partial.sass +1 -1
  30. data/fixtures/asset-hash-minified-app/config.rb +1 -1
  31. data/fixtures/asset-hash-prefix/config.rb +2 -1
  32. data/fixtures/asset-hash-prefix/lib/middleware.rb +2 -2
  33. data/fixtures/asset-hash-source-map/config.rb +1 -0
  34. data/fixtures/asset-hash-source-map/lib/middleware.rb +2 -2
  35. data/fixtures/asset-host-app/config.rb +1 -1
  36. data/fixtures/auto-css-app/config.rb +2 -2
  37. data/fixtures/auto-js-app/config.rb +2 -2
  38. data/fixtures/auto-js-directory-index-app/config.rb +1 -1
  39. data/fixtures/automatic-directory-matcher-app/config.rb +1 -1
  40. data/fixtures/basic-data-app/config.rb +2 -2
  41. data/fixtures/capture-html-app/config.rb +4 -4
  42. data/fixtures/clean-app/config-complications.rb +6 -6
  43. data/fixtures/clean-app/config-hidden-dir-after.rb +4 -4
  44. data/fixtures/clean-app/config-hidden-dir-before.rb +1 -1
  45. data/fixtures/clean-app/config.rb +6 -6
  46. data/fixtures/clean-dir-app/config.rb +1 -0
  47. data/fixtures/clean-nested-app/config.rb +1 -1
  48. data/fixtures/collections-app/source/blog1/2011-01-01-new-article.html.markdown +1 -1
  49. data/fixtures/collections-app/source/blog1/2011-01-02-another-article.html.markdown +1 -1
  50. data/fixtures/collections-app/source/blog2/2011-01-01-new-article.html.markdown +1 -1
  51. data/fixtures/collections-app/source/blog2/2011-01-02-another-article.html.markdown +1 -1
  52. data/fixtures/content-for-app/config.rb +4 -4
  53. data/fixtures/dynamic-pages-app/config.rb +26 -25
  54. data/fixtures/ember-cli-app/config.rb +4 -4
  55. data/fixtures/env-app/environments/development.rb +1 -1
  56. data/fixtures/env-app/environments/production.rb +1 -1
  57. data/fixtures/env-app/source/stylesheets/site.css.scss +1 -1
  58. data/fixtures/extension-hooks-app/config.rb +8 -8
  59. data/fixtures/external-helpers/config.rb +2 -2
  60. data/fixtures/external-helpers/helpers/derp.rb +1 -3
  61. data/fixtures/external-helpers/helpers/four_helpers.rb +1 -3
  62. data/fixtures/external-helpers/helpers/one_helper.rb +1 -3
  63. data/fixtures/external-helpers/helpers/yet_another_thingy.rb +1 -3
  64. data/fixtures/external-helpers/lib/hello_helper.rb +1 -1
  65. data/fixtures/external-pipeline-error/config.rb +4 -4
  66. data/fixtures/feature-params-app/config.rb +1 -1
  67. data/fixtures/frontmatter-app/config.rb +1 -1
  68. data/fixtures/generator-test/config.rb +15 -1
  69. data/fixtures/glob-app/config.rb +1 -1
  70. data/fixtures/i-8859-1-app/config.rb +1 -1
  71. data/fixtures/i18n-force-locale/config.rb +4 -4
  72. data/fixtures/i18n-mixed-sources/config.rb +1 -1
  73. data/fixtures/i18n-test-app/locales/en.yml +1 -7
  74. data/fixtures/i18n-test-app/locales/es.yml +1 -2
  75. data/fixtures/import-app/config.rb +3 -3
  76. data/fixtures/indexable-app/config.rb +3 -3
  77. data/fixtures/large-build-app/config.rb +1 -1
  78. data/fixtures/manual-layout-override/config.rb +1 -1
  79. data/fixtures/missing-tilt-library-app/config.rb +2 -2
  80. data/fixtures/more-traversal-app/config.rb +4 -4
  81. data/fixtures/multiple-data-sources-app/config.rb +1 -1
  82. data/fixtures/multiple-sources-app/config.rb +1 -1
  83. data/fixtures/multiple-sources-with-duplicate-file-names-app/config.rb +1 -1
  84. data/fixtures/nested-layout-app/source/another.html.markdown +1 -1
  85. data/fixtures/nested-layout-app/source/haml-test.html.markdown +1 -1
  86. data/fixtures/nested-layout-app/source/slim-test.html.markdown +1 -1
  87. data/fixtures/padrino-helpers-app/config.rb +1 -1
  88. data/fixtures/page-classes-app/config.rb +2 -2
  89. data/fixtures/page-helper-layout-block-app/config.rb +1 -1
  90. data/fixtures/page-id-app/config-proc.rb +4 -4
  91. data/fixtures/page-id-app/config.rb +3 -3
  92. data/fixtures/page-id-app/source/{forty-two.html.erb → fourty-two.html.erb} +0 -0
  93. data/fixtures/paginate-app/source/blog/2011-01-01-test-article.html.markdown +1 -1
  94. data/fixtures/paginate-app/source/blog/2011-01-02-test-article.html.markdown +1 -1
  95. data/fixtures/paginate-app/source/blog/2011-01-03-test-article.html.markdown +1 -1
  96. data/fixtures/paginate-app/source/blog/2011-01-04-test-article.html.markdown +1 -1
  97. data/fixtures/paginate-app/source/blog/2011-01-05-test-article.html.markdown +1 -1
  98. data/fixtures/paginate-app/source/blog/2011-02-01-test-article.html.markdown +1 -1
  99. data/fixtures/paginate-app/source/blog/2011-02-02-test-article.html.markdown +1 -1
  100. data/fixtures/partials-app/source/_locals.erb +1 -1
  101. data/fixtures/partials-app/source/locals.html.erb +1 -1
  102. data/fixtures/proxy-pages-app/config.rb +14 -13
  103. data/fixtures/sass-assets-path-app/config.rb +2 -2
  104. data/fixtures/scss-app/source/stylesheets/error.css.sass +1 -0
  105. data/fixtures/sinatra-app/config.rb +6 -6
  106. data/fixtures/traversal-app/config.rb +4 -4
  107. data/fixtures/v4-extension-callbacks/config.rb +2 -2
  108. data/fixtures/wildcard-app/config.rb +1 -1
  109. data/fixtures/wildcard-directory-index-app/config.rb +1 -1
  110. data/lib/middleman/rack.rb +7 -0
  111. data/lib/middleman-core/application.rb +9 -10
  112. data/lib/middleman-core/builder.rb +21 -50
  113. data/lib/middleman-core/callback_manager.rb +1 -1
  114. data/lib/middleman-core/config_context.rb +2 -2
  115. data/lib/middleman-core/configuration.rb +5 -5
  116. data/lib/middleman-core/contracts.rb +2 -2
  117. data/lib/middleman-core/core_extensions/collections/lazy_root.rb +1 -1
  118. data/lib/middleman-core/core_extensions/collections/lazy_step.rb +9 -9
  119. data/lib/middleman-core/core_extensions/collections/pagination.rb +6 -6
  120. data/lib/middleman-core/core_extensions/collections.rb +1 -1
  121. data/lib/middleman-core/core_extensions/data.rb +11 -11
  122. data/lib/middleman-core/core_extensions/default_helpers.rb +29 -26
  123. data/lib/middleman-core/core_extensions/external_helpers.rb +1 -1
  124. data/lib/middleman-core/core_extensions/file_watcher.rb +1 -1
  125. data/lib/middleman-core/core_extensions/front_matter.rb +3 -3
  126. data/lib/middleman-core/core_extensions/i18n.rb +23 -44
  127. data/lib/middleman-core/core_extensions/inline_url_rewriter.rb +7 -10
  128. data/lib/middleman-core/core_extensions/routing.rb +1 -1
  129. data/lib/middleman-core/core_extensions.rb +2 -2
  130. data/lib/middleman-core/dns_resolver/basic_network_resolver.rb +3 -3
  131. data/lib/middleman-core/dns_resolver/hosts_resolver.rb +1 -1
  132. data/lib/middleman-core/dns_resolver/local_link_resolver.rb +1 -1
  133. data/lib/middleman-core/dns_resolver/network_resolver.rb +1 -1
  134. data/lib/middleman-core/dns_resolver.rb +1 -1
  135. data/lib/middleman-core/extension.rb +32 -34
  136. data/lib/middleman-core/extension_manager.rb +2 -6
  137. data/lib/middleman-core/extensions/asset_hash.rb +22 -24
  138. data/lib/middleman-core/extensions/asset_host.rb +10 -10
  139. data/lib/middleman-core/extensions/automatic_alt_tags.rb +1 -1
  140. data/lib/middleman-core/extensions/automatic_image_sizes.rb +3 -3
  141. data/lib/middleman-core/extensions/cache_buster.rb +2 -2
  142. data/lib/middleman-core/extensions/directory_indexes.rb +1 -1
  143. data/lib/middleman-core/extensions/external_pipeline.rb +9 -14
  144. data/lib/middleman-core/extensions/gzip.rb +6 -8
  145. data/lib/middleman-core/extensions/lorem.rb +9 -9
  146. data/lib/middleman-core/extensions/minify_css.rb +16 -14
  147. data/lib/middleman-core/extensions/minify_javascript.rb +13 -13
  148. data/lib/middleman-core/extensions/relative_assets.rb +8 -8
  149. data/lib/middleman-core/extensions.rb +7 -8
  150. data/lib/middleman-core/file_renderer.rb +6 -7
  151. data/lib/middleman-core/load_paths.rb +10 -13
  152. data/lib/middleman-core/logger.rb +4 -3
  153. data/lib/middleman-core/meta_pages/sitemap_resource.rb +2 -0
  154. data/lib/middleman-core/meta_pages/sitemap_tree.rb +1 -1
  155. data/lib/middleman-core/meta_pages.rb +1 -1
  156. data/lib/middleman-core/preview_server/checks.rb +1 -1
  157. data/lib/middleman-core/preview_server/information.rb +13 -13
  158. data/lib/middleman-core/preview_server/network_interface_inventory.rb +3 -3
  159. data/lib/middleman-core/preview_server/server_information.rb +1 -1
  160. data/lib/middleman-core/preview_server/server_information_callback_proxy.rb +1 -1
  161. data/lib/middleman-core/preview_server/server_url.rb +1 -1
  162. data/lib/middleman-core/preview_server/tcp_port_prober.rb +1 -1
  163. data/lib/middleman-core/preview_server.rb +25 -25
  164. data/lib/middleman-core/rack.rb +1 -1
  165. data/lib/middleman-core/renderers/coffee_script.rb +2 -2
  166. data/lib/middleman-core/renderers/haml.rb +4 -8
  167. data/lib/middleman-core/renderers/less.rb +1 -1
  168. data/lib/middleman-core/renderers/liquid.rb +2 -3
  169. data/lib/middleman-core/renderers/markdown.rb +7 -7
  170. data/lib/middleman-core/renderers/redcarpet.rb +2 -2
  171. data/lib/middleman-core/renderers/sass.rb +23 -26
  172. data/lib/middleman-core/renderers/sass_functions.rb +14 -17
  173. data/lib/middleman-core/renderers/slim.rb +2 -2
  174. data/lib/middleman-core/sitemap/extensions/ignores.rb +4 -2
  175. data/lib/middleman-core/sitemap/extensions/import.rb +1 -1
  176. data/lib/middleman-core/sitemap/extensions/on_disk.rb +1 -1
  177. data/lib/middleman-core/sitemap/extensions/proxies.rb +1 -2
  178. data/lib/middleman-core/sitemap/extensions/redirects.rb +1 -1
  179. data/lib/middleman-core/sitemap/extensions/request_endpoints.rb +1 -1
  180. data/lib/middleman-core/sitemap/extensions/traversal.rb +25 -80
  181. data/lib/middleman-core/sitemap/resource.rb +20 -21
  182. data/lib/middleman-core/sitemap/store.rb +6 -6
  183. data/lib/middleman-core/sources/source_watcher.rb +11 -17
  184. data/lib/middleman-core/sources.rb +12 -12
  185. data/lib/middleman-core/step_definitions/builder_steps.rb +12 -38
  186. data/lib/middleman-core/step_definitions/commandline_steps.rb +6 -6
  187. data/lib/middleman-core/step_definitions/middleman_steps.rb +14 -13
  188. data/lib/middleman-core/step_definitions/server_steps.rb +16 -18
  189. data/lib/middleman-core/template_context.rb +10 -17
  190. data/lib/middleman-core/template_renderer.rb +33 -35
  191. data/lib/middleman-core/util/binary.rb +1 -3
  192. data/lib/middleman-core/util/data.rb +22 -12
  193. data/lib/middleman-core/util/files.rb +3 -3
  194. data/lib/middleman-core/util/paths.rb +44 -47
  195. data/lib/middleman-core/util/rack.rb +3 -3
  196. data/lib/middleman-core/util/uri_templates.rb +0 -1
  197. data/lib/middleman-core/util.rb +2 -2
  198. data/lib/middleman-core/version.rb +1 -1
  199. data/lib/middleman-core.rb +3 -3
  200. data/middleman-core.gemspec +13 -12
  201. data/spec/middleman-core/callbacks_spec.rb +14 -15
  202. data/spec/middleman-core/core_extensions/data_spec.rb +74 -70
  203. data/spec/middleman-core/dns_resolver_spec.rb +6 -6
  204. data/spec/middleman-core/util_spec.rb +86 -81
  205. data/spec/spec_helper.rb +6 -1
  206. data/spec/support/given.rb +15 -11
  207. metadata +59 -76
  208. data/features/multiple-sources-reload.feature +0 -40
  209. data/fixtures/chained-app/source/stylesheets/main.css.scss.erb +0 -3
  210. data/fixtures/chained-app/source/stylesheets/sub.scss +0 -1
  211. data/fixtures/destination-dir-different-from-source-dir-name/external/page.html.erb +0 -1
  212. data/fixtures/destination-dir-different-from-source-dir-name/my-app/config.rb +0 -2
  213. data/fixtures/destination-dir-different-from-source-dir-name/my-app/source/index.html.erb +0 -1
  214. data/fixtures/i18n-default-app/source/name.html.erb +0 -1
  215. data/fixtures/i18n-mixed-sources/source/c/d/index.html.erb +0 -9
  216. data/fixtures/i18n-mixed-sources/source/localizable/c/d/index.html.erb +0 -9
  217. data/fixtures/i18n-test-app/source/localizable/tac.html.erb +0 -1
  218. data/fixtures/multiple-sources-with-destination-dir/config.rb +0 -2
  219. data/fixtures/multiple-sources-with-destination-dir/external/page.html.erb +0 -1
  220. data/fixtures/multiple-sources-with-destination-dir/source/index.html.erb +0 -1
  221. data/fixtures/multiple-sources-without-destination-dir/config.rb +0 -1
  222. data/fixtures/multiple-sources-without-destination-dir/external/page.html.erb +0 -1
  223. 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: fe804ebc36f4a264dcde64fc13c9a76573d6fd34b50f982136b82e4bc309d6f5
4
- data.tar.gz: 759ee3d80a5683d7904a70a196b0eacc4d7f5e8bafc01da763422285e04d9645
3
+ metadata.gz: 2f2fc5888682b7c060027e651e2a750c951cb0151eb0a4388bec0c8593dd0fd8
4
+ data.tar.gz: d5885c630ebd13ac9419432adef385485f80c008d853b4e759a0a024113adea4
5
5
  SHA512:
6
- metadata.gz: 6776538352eff82847ea01c13a3bd1e0afb4bdb38629fda06f15c49e1b6e8e7d0829b12169d4802a1a48a22c7d6c32dd2d62fd73ed9dd165f03b86ad7538598d
7
- data.tar.gz: f44eccdd46765b7207e328d560394ea98fa78f11a575e630bf1517dbaf4d566ad3dc25470e857028ed22657a1609ea85c33e6df59594d425a7284e2c0974154f
6
+ metadata.gz: c2a1183511d4e3662af4d5c72c8120ed637577fc3db721667221ebfddd3fef40c6e80f35d3582a81d25895f61fef6badaf3bb1d392d5a5597c7e2b9176ce2103
7
+ data.tar.gz: 6a7fbf18e8a691e115b7d0cbcbd42eb208814f89faf29d853a05ebc3a15ee6157f681b11677a687c61e3d4df9eda0a50b6252c4e3e3f8718a613c46de5058ed1
data/cucumber.yml CHANGED
@@ -1,2 +1,2 @@
1
- default: --fail-fast --require features --tags 'not @wip'
2
- wip: --fail-fast --require features --tags @wip
1
+ default: --require features --tags ~@wip
2
+ wip: --require features --tags @wip
@@ -41,7 +41,7 @@ Feature: Builder
41
41
 
42
42
  Scenario: Build empty errors
43
43
  Given a built app at "empty-app"
44
- Then was not successfully built
44
+ Then the exit status should be 1
45
45
 
46
46
  Scenario: Build external_pipeline errors
47
47
  Given a built app at "external-pipeline-error"
@@ -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"
@@ -1,5 +1,5 @@
1
1
  Feature: Support coffee-script
2
- In order to offer an alternative when writing JavaScript
2
+ In order to offer an alternative when writing Javascript
3
3
 
4
4
  Scenario: Rendering coffee script
5
5
  Given the Server is running at "coffeescript-app"
@@ -111,7 +111,7 @@ Feature: Collections
111
111
  """
112
112
  ---
113
113
  title: "Blog3 Another Article"
114
- date: "2011-01-02"
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: "2011-01-02"
136
+ date: 2011-01-02
137
137
  tags:
138
138
  - foo
139
139
  ---
@@ -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 the interactive middleman console
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:
@@ -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 successfully built app at "extension-api-deprecations-app"
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 successfully built app at "extension-hooks-app"
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"
@@ -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"
@@ -1,4 +1,4 @@
1
- Feature: CSS and JavaScripts which are minify shouldn't be re-minified
1
+ Feature: CSS and Javascripts which are minify shouldn't be re-minified
2
2
 
3
3
  Scenario: JS files containing ".min" should not be re-compressed
4
4
  Given an empty app
@@ -6,6 +6,7 @@ Feature: Markdown support
6
6
  When I go to "/index.html"
7
7
  Then I should see "<p>Hello World</p>"
8
8
 
9
+ @encoding
9
10
  Scenario: Markdown extensions (Maruku)
10
11
  Given the Server is running at "markdown-app"
11
12
  When I go to "/smarty_pants.html"
@@ -1,4 +1,4 @@
1
- Feature: Minify JavaScript
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
- ;(function() {
23
- this;
24
- should();
25
- too();
26
- })();
22
+ ;(function() {
23
+ this;
24
+ should();
25
+ too();
26
+ })();
27
27
  </script>
28
28
  <script type='text/javascript'>
29
- //<!--
30
- ;(function() {
31
- one;
32
- line();
33
- here();
34
- })();
35
- //-->
29
+ //<!--
30
+ ;(function() {
31
+ one;
32
+ line();
33
+ here();
34
+ })();
35
+ //-->
36
36
  </script>
37
37
  <script type='text/html'>
38
- I'm a jQuery {{template}}.
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
- ;(function() {
70
- this;
71
- should();
72
- too();
73
- })();
69
+ ;(function() {
70
+ this;
71
+ should();
72
+ too();
73
+ })();
74
74
  </script>
75
75
  <script type='text/javascript'>
76
- //<!--
77
- ;(function() {
78
- one;
79
- line();
80
- here();
81
- })();
82
- //-->
76
+ //<!--
77
+ ;(function() {
78
+ one;
79
+ line();
80
+ here();
81
+ })();
82
+ //-->
83
83
  </script>
84
84
  <script type='text/html'>
85
- I'm a jQuery {{template}}.
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
- Hello
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
- I'm a jQuery {{template}}.
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
- !function(){should(),too()}();
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
- I'm a jQuery {{template}}.
145
+ I'm a jQuery {{template}}.
146
146
  </script>
147
147
  """
148
148
 
@@ -1,4 +1,3 @@
1
- @wip
2
1
  Feature: Support Rack apps mounted using map
3
2
 
4
3
  Scenario: Mounted Rack App at /sinatra
@@ -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: /forty-two.html"
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: /forty-two.html"
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>'
@@ -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 vars are 'foo', 'bar' and 'baz'"
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/relative_assets_helper.css.sass.erb" with:
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/relative_assets_helper.css"
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/relative_assets_helper.css.sass.erb" with:
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/relative_assets_helper.css"
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:"
@@ -1,15 +1,15 @@
1
- ENV['TEST'] = 'true'
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
- # Capybara.server = :webrick
8
+ require 'coveralls'
9
+ Coveralls.wear!
10
10
 
11
- require 'simplecov'
12
- SimpleCov.start
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')
@@ -1,3 +1,5 @@
1
+ @encoding
2
+
1
3
  Feature: Tilde directories
2
4
  In order to support ~ characters in directories
3
5