middleman-core 4.3.0.rc.1 → 4.3.0.rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +5 -5
  2. data/Rakefile +0 -1
  3. data/cucumber.yml +2 -2
  4. data/features/asset_hash.feature +2 -2
  5. data/features/collections.feature +2 -2
  6. data/features/i18n_mixed_sources.feature +8 -0
  7. data/features/markdown.feature +0 -1
  8. data/features/multiple-sources-reload.feature +40 -0
  9. data/features/partials.feature +1 -1
  10. data/features/support/env.rb +4 -1
  11. data/features/tilde_directories.feature +0 -2
  12. data/features/unicode_filenames.feature +1 -1
  13. data/fixtures/asset-hash-app/config.rb +0 -1
  14. data/fixtures/asset-hash-app/lib/middleware.rb +2 -2
  15. data/fixtures/asset-hash-app/source/stylesheets/_partial.sass +1 -1
  16. data/fixtures/asset-hash-prefix/config.rb +1 -2
  17. data/fixtures/asset-hash-prefix/lib/middleware.rb +2 -2
  18. data/fixtures/asset-hash-source-map/config.rb +0 -1
  19. data/fixtures/asset-hash-source-map/lib/middleware.rb +2 -2
  20. data/fixtures/asset-host-app/config.rb +1 -1
  21. data/fixtures/auto-css-app/config.rb +2 -2
  22. data/fixtures/auto-js-app/config.rb +2 -2
  23. data/fixtures/auto-js-directory-index-app/config.rb +1 -1
  24. data/fixtures/automatic-directory-matcher-app/config.rb +1 -1
  25. data/fixtures/basic-data-app/config.rb +2 -2
  26. data/fixtures/capture-html-app/config.rb +4 -4
  27. data/fixtures/clean-app/config-complications.rb +6 -6
  28. data/fixtures/clean-app/config-hidden-dir-after.rb +4 -4
  29. data/fixtures/clean-app/config-hidden-dir-before.rb +1 -1
  30. data/fixtures/clean-app/config.rb +6 -6
  31. data/fixtures/clean-dir-app/config.rb +0 -1
  32. data/fixtures/clean-nested-app/config.rb +1 -1
  33. data/fixtures/collections-app/source/blog1/2011-01-01-new-article.html.markdown +1 -1
  34. data/fixtures/collections-app/source/blog1/2011-01-02-another-article.html.markdown +1 -1
  35. data/fixtures/collections-app/source/blog2/2011-01-01-new-article.html.markdown +1 -1
  36. data/fixtures/collections-app/source/blog2/2011-01-02-another-article.html.markdown +1 -1
  37. data/fixtures/content-for-app/config.rb +4 -4
  38. data/fixtures/destination-dir-different-from-source-dir-name/external/page.html.erb +1 -0
  39. data/fixtures/destination-dir-different-from-source-dir-name/my-app/config.rb +2 -0
  40. data/fixtures/destination-dir-different-from-source-dir-name/my-app/source/index.html.erb +1 -0
  41. data/fixtures/dynamic-pages-app/config.rb +25 -26
  42. data/fixtures/ember-cli-app/config.rb +4 -4
  43. data/fixtures/env-app/environments/development.rb +1 -1
  44. data/fixtures/env-app/environments/production.rb +1 -1
  45. data/fixtures/extension-hooks-app/config.rb +8 -8
  46. data/fixtures/external-helpers/config.rb +2 -2
  47. data/fixtures/external-helpers/helpers/derp.rb +3 -1
  48. data/fixtures/external-helpers/helpers/four_helpers.rb +3 -1
  49. data/fixtures/external-helpers/helpers/one_helper.rb +3 -1
  50. data/fixtures/external-helpers/helpers/yet_another_thingy.rb +3 -1
  51. data/fixtures/external-helpers/lib/hello_helper.rb +1 -1
  52. data/fixtures/external-pipeline-error/config.rb +4 -4
  53. data/fixtures/feature-params-app/config.rb +1 -1
  54. data/fixtures/frontmatter-app/config.rb +1 -1
  55. data/fixtures/glob-app/config.rb +1 -1
  56. data/fixtures/i-8859-1-app/config.rb +1 -1
  57. data/fixtures/i18n-force-locale/config.rb +4 -4
  58. data/fixtures/i18n-mixed-sources/config.rb +1 -1
  59. data/fixtures/i18n-mixed-sources/source/c/d/index.html.erb +9 -0
  60. data/fixtures/i18n-mixed-sources/source/localizable/c/d/index.html.erb +9 -0
  61. data/fixtures/import-app/config.rb +3 -3
  62. data/fixtures/indexable-app/config.rb +3 -3
  63. data/fixtures/large-build-app/config.rb +1 -1
  64. data/fixtures/manual-layout-override/config.rb +1 -1
  65. data/fixtures/missing-tilt-library-app/config.rb +2 -2
  66. data/fixtures/more-traversal-app/config.rb +4 -4
  67. data/fixtures/multiple-data-sources-app/config.rb +1 -1
  68. data/fixtures/multiple-sources-app/config.rb +1 -1
  69. data/fixtures/multiple-sources-with-destination-dir/config.rb +2 -0
  70. data/fixtures/multiple-sources-with-destination-dir/external/page.html.erb +1 -0
  71. data/fixtures/multiple-sources-with-destination-dir/source/index.html.erb +1 -0
  72. data/fixtures/multiple-sources-with-duplicate-file-names-app/config.rb +1 -1
  73. data/fixtures/multiple-sources-without-destination-dir/config.rb +1 -0
  74. data/fixtures/multiple-sources-without-destination-dir/external/page.html.erb +1 -0
  75. data/fixtures/multiple-sources-without-destination-dir/source/index.html.erb +1 -0
  76. data/fixtures/nested-layout-app/source/another.html.markdown +1 -1
  77. data/fixtures/nested-layout-app/source/haml-test.html.markdown +1 -1
  78. data/fixtures/nested-layout-app/source/slim-test.html.markdown +1 -1
  79. data/fixtures/padrino-helpers-app/config.rb +1 -1
  80. data/fixtures/page-classes-app/config.rb +2 -2
  81. data/fixtures/page-helper-layout-block-app/config.rb +1 -1
  82. data/fixtures/page-id-app/config-proc.rb +4 -4
  83. data/fixtures/page-id-app/config.rb +3 -3
  84. data/fixtures/paginate-app/source/blog/2011-01-01-test-article.html.markdown +1 -1
  85. data/fixtures/paginate-app/source/blog/2011-01-02-test-article.html.markdown +1 -1
  86. data/fixtures/paginate-app/source/blog/2011-01-03-test-article.html.markdown +1 -1
  87. data/fixtures/paginate-app/source/blog/2011-01-04-test-article.html.markdown +1 -1
  88. data/fixtures/paginate-app/source/blog/2011-01-05-test-article.html.markdown +1 -1
  89. data/fixtures/paginate-app/source/blog/2011-02-01-test-article.html.markdown +1 -1
  90. data/fixtures/paginate-app/source/blog/2011-02-02-test-article.html.markdown +1 -1
  91. data/fixtures/partials-app/source/_locals.erb +1 -1
  92. data/fixtures/partials-app/source/locals.html.erb +1 -1
  93. data/fixtures/proxy-pages-app/config.rb +13 -14
  94. data/fixtures/sass-assets-path-app/config.rb +2 -2
  95. data/fixtures/sinatra-app/config.rb +6 -6
  96. data/fixtures/traversal-app/config.rb +4 -4
  97. data/fixtures/v4-extension-callbacks/config.rb +2 -2
  98. data/fixtures/wildcard-app/config.rb +1 -1
  99. data/fixtures/wildcard-directory-index-app/config.rb +1 -1
  100. data/lib/middleman-core.rb +3 -3
  101. data/lib/middleman-core/application.rb +5 -5
  102. data/lib/middleman-core/builder.rb +20 -20
  103. data/lib/middleman-core/callback_manager.rb +1 -1
  104. data/lib/middleman-core/config_context.rb +2 -2
  105. data/lib/middleman-core/configuration.rb +5 -5
  106. data/lib/middleman-core/contracts.rb +2 -2
  107. data/lib/middleman-core/core_extensions/collections.rb +1 -1
  108. data/lib/middleman-core/core_extensions/collections/lazy_root.rb +1 -1
  109. data/lib/middleman-core/core_extensions/collections/lazy_step.rb +9 -9
  110. data/lib/middleman-core/core_extensions/collections/pagination.rb +6 -6
  111. data/lib/middleman-core/core_extensions/data.rb +10 -10
  112. data/lib/middleman-core/core_extensions/default_helpers.rb +26 -22
  113. data/lib/middleman-core/core_extensions/file_watcher.rb +1 -1
  114. data/lib/middleman-core/core_extensions/front_matter.rb +3 -3
  115. data/lib/middleman-core/core_extensions/i18n.rb +24 -24
  116. data/lib/middleman-core/core_extensions/inline_url_rewriter.rb +10 -7
  117. data/lib/middleman-core/core_extensions/routing.rb +1 -1
  118. data/lib/middleman-core/dns_resolver.rb +1 -1
  119. data/lib/middleman-core/dns_resolver/basic_network_resolver.rb +3 -3
  120. data/lib/middleman-core/dns_resolver/hosts_resolver.rb +1 -1
  121. data/lib/middleman-core/dns_resolver/local_link_resolver.rb +1 -1
  122. data/lib/middleman-core/dns_resolver/network_resolver.rb +1 -1
  123. data/lib/middleman-core/extension.rb +26 -25
  124. data/lib/middleman-core/extension_manager.rb +1 -1
  125. data/lib/middleman-core/extensions.rb +8 -7
  126. data/lib/middleman-core/extensions/asset_hash.rb +24 -22
  127. data/lib/middleman-core/extensions/asset_host.rb +10 -10
  128. data/lib/middleman-core/extensions/automatic_alt_tags.rb +1 -1
  129. data/lib/middleman-core/extensions/automatic_image_sizes.rb +3 -3
  130. data/lib/middleman-core/extensions/cache_buster.rb +2 -2
  131. data/lib/middleman-core/extensions/directory_indexes.rb +1 -1
  132. data/lib/middleman-core/extensions/external_pipeline.rb +14 -9
  133. data/lib/middleman-core/extensions/gzip.rb +7 -5
  134. data/lib/middleman-core/extensions/lorem.rb +9 -9
  135. data/lib/middleman-core/extensions/minify_css.rb +9 -9
  136. data/lib/middleman-core/extensions/minify_javascript.rb +10 -10
  137. data/lib/middleman-core/extensions/relative_assets.rb +8 -8
  138. data/lib/middleman-core/file_renderer.rb +6 -5
  139. data/lib/middleman-core/load_paths.rb +10 -10
  140. data/lib/middleman-core/logger.rb +2 -3
  141. data/lib/middleman-core/meta_pages.rb +1 -1
  142. data/lib/middleman-core/preview_server.rb +21 -22
  143. data/lib/middleman-core/preview_server/checks.rb +1 -1
  144. data/lib/middleman-core/preview_server/information.rb +13 -13
  145. data/lib/middleman-core/preview_server/network_interface_inventory.rb +3 -3
  146. data/lib/middleman-core/preview_server/server_information.rb +1 -1
  147. data/lib/middleman-core/preview_server/server_url.rb +1 -1
  148. data/lib/middleman-core/preview_server/tcp_port_prober.rb +1 -1
  149. data/lib/middleman-core/rack.rb +1 -1
  150. data/lib/middleman-core/renderers/coffee_script.rb +2 -2
  151. data/lib/middleman-core/renderers/haml.rb +1 -4
  152. data/lib/middleman-core/renderers/less.rb +1 -1
  153. data/lib/middleman-core/renderers/liquid.rb +2 -1
  154. data/lib/middleman-core/renderers/markdown.rb +7 -7
  155. data/lib/middleman-core/renderers/redcarpet.rb +2 -2
  156. data/lib/middleman-core/renderers/sass.rb +5 -5
  157. data/lib/middleman-core/renderers/sass_functions.rb +5 -5
  158. data/lib/middleman-core/renderers/slim.rb +2 -2
  159. data/lib/middleman-core/sitemap/extensions/ignores.rb +2 -4
  160. data/lib/middleman-core/sitemap/extensions/import.rb +1 -1
  161. data/lib/middleman-core/sitemap/extensions/on_disk.rb +1 -1
  162. data/lib/middleman-core/sitemap/extensions/proxies.rb +2 -1
  163. data/lib/middleman-core/sitemap/extensions/redirects.rb +1 -1
  164. data/lib/middleman-core/sitemap/extensions/request_endpoints.rb +1 -1
  165. data/lib/middleman-core/sitemap/extensions/traversal.rb +80 -25
  166. data/lib/middleman-core/sitemap/resource.rb +21 -20
  167. data/lib/middleman-core/sitemap/store.rb +3 -3
  168. data/lib/middleman-core/sources.rb +12 -12
  169. data/lib/middleman-core/sources/source_watcher.rb +16 -10
  170. data/lib/middleman-core/step_definitions/builder_steps.rb +23 -23
  171. data/lib/middleman-core/step_definitions/commandline_steps.rb +5 -5
  172. data/lib/middleman-core/step_definitions/middleman_steps.rb +13 -14
  173. data/lib/middleman-core/step_definitions/server_steps.rb +14 -16
  174. data/lib/middleman-core/template_context.rb +17 -10
  175. data/lib/middleman-core/template_renderer.rb +34 -32
  176. data/lib/middleman-core/util.rb +2 -2
  177. data/lib/middleman-core/util/binary.rb +3 -1
  178. data/lib/middleman-core/util/data.rb +2 -2
  179. data/lib/middleman-core/util/files.rb +2 -2
  180. data/lib/middleman-core/util/paths.rb +47 -44
  181. data/lib/middleman-core/util/rack.rb +3 -3
  182. data/lib/middleman-core/util/uri_templates.rb +1 -0
  183. data/lib/middleman-core/version.rb +1 -1
  184. data/middleman-core.gemspec +3 -2
  185. data/spec/middleman-core/callbacks_spec.rb +15 -14
  186. data/spec/middleman-core/core_extensions/data_spec.rb +70 -74
  187. data/spec/middleman-core/dns_resolver_spec.rb +6 -6
  188. data/spec/middleman-core/util_spec.rb +81 -86
  189. data/spec/support/given.rb +11 -15
  190. metadata +44 -6
@@ -1,5 +1,5 @@
1
1
  activate :external_pipeline,
2
- name: :ember,
3
- command: "cd test-app/ && ember #{build? ? :build : :serve} --environment #{config[:environment]}",
4
- source: "test-app/dist",
5
- latency: 2
2
+ name: :ember,
3
+ command: "cd test-app/ && ember #{build? ? :build : :serve} --environment #{config[:environment]}",
4
+ source: 'test-app/dist',
5
+ latency: 2
@@ -1 +1 @@
1
- set :api_key, "dev1"
1
+ set :api_key, 'dev1'
@@ -1,2 +1,2 @@
1
- set :api_key, "prod2"
1
+ set :api_key, 'prod2'
2
2
  activate :minify_css
@@ -12,20 +12,20 @@ class MyFeature < Middleman::Extension
12
12
  puts '/// ready ///'
13
13
  end
14
14
 
15
- app.before_render do |body, path, locs, template_class|
16
- puts "/// before_render ///"
15
+ app.before_render do |_body, _path, _locs, _template_class|
16
+ puts '/// before_render ///'
17
17
  end
18
18
 
19
- app.after_render do |content, path, locs, template_class|
20
- puts "/// after_render ///"
19
+ app.after_render do |_content, _path, _locs, _template_class|
20
+ puts '/// after_render ///'
21
21
  end
22
22
 
23
- app.before_build do |builder|
24
- puts "/// before_build ///"
23
+ app.before_build do |_builder|
24
+ puts '/// before_build ///'
25
25
  end
26
26
 
27
- app.after_build do |builder|
28
- puts "/// after_build ///"
27
+ app.after_build do |_builder|
28
+ puts '/// after_build ///'
29
29
  end
30
30
  end
31
31
 
@@ -1,4 +1,4 @@
1
- require "lib/hello_helper"
1
+ require 'lib/hello_helper'
2
2
  helpers HelloHelper
3
3
 
4
- page "/", layout: false
4
+ page '/', layout: false
@@ -1,3 +1,5 @@
1
1
  module Derp
2
- def three; "Three"; end
2
+ def three
3
+ 'Three'
4
+ end
3
5
  end
@@ -1,3 +1,5 @@
1
1
  module FourHelpers
2
- def four; "Four"; end
2
+ def four
3
+ 'Four'
4
+ end
3
5
  end
@@ -1,3 +1,5 @@
1
1
  module OneHelper
2
- def one; "One"; end
2
+ def one
3
+ 'One'
4
+ end
3
5
  end
@@ -1,3 +1,5 @@
1
1
  module YetAnotherThingy
2
- def two; "Two"; end
2
+ def two
3
+ 'Two'
4
+ end
3
5
  end
@@ -1,5 +1,5 @@
1
1
  module HelloHelper
2
2
  def hello
3
- "Hello World"
3
+ 'Hello World'
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  activate :external_pipeline,
2
- name: :failing,
3
- command: "mv does-not-exist tmp/file.js",
4
- source: "tmp",
5
- latency: 2
2
+ name: :failing,
3
+ command: 'mv does-not-exist tmp/file.js',
4
+ source: 'tmp',
5
+ latency: 2
@@ -13,4 +13,4 @@ end
13
13
 
14
14
  Middleman::Extensions.register :extension_a, ExtensionA
15
15
 
16
- activate :extension_a, hello: "world", hola: "mundo"
16
+ activate :extension_a, hello: 'world', hola: 'mundo'
@@ -1 +1 @@
1
- config[:frontmatter_delims][:yaml] << %w(\\--- \\---)
1
+ config[:frontmatter_delims][:yaml] << %w[\\--- \\---]
@@ -1 +1 @@
1
- page "/index.html", layout: false
1
+ page '/index.html', layout: false
@@ -1 +1 @@
1
- set :encoding, "ISO-8859-1"
1
+ set :encoding, 'ISO-8859-1'
@@ -1,11 +1,11 @@
1
- [:en, :es].each do |locale|
2
- proxy "/#{locale}/index.html", "index.html", ignore: true, lang: locale
1
+ %i[en es].each do |locale|
2
+ proxy "/#{locale}/index.html", 'index.html', ignore: true, lang: locale
3
3
  end
4
4
 
5
- proxy "/fr/index.html", "index.html", lang: :fr
5
+ proxy '/fr/index.html', 'index.html', lang: :fr
6
6
 
7
7
  activate :i18n
8
8
 
9
- # This is what breaks i18n, just because it adds a resource list manipulator that
9
+ # This is what breaks i18n, just because it adds a resource list manipulator that
10
10
  # forces a rebuild of the resource list.
11
11
  activate :asset_hash
@@ -1 +1 @@
1
- activate :i18n, mount_at_root: :en, langs: [:en, :es]
1
+ activate :i18n, mount_at_root: :en, langs: %i[en es]
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: c/d/index.html.erb
3
+ ---
4
+ Current locale: <%= I18n.locale %>
5
+ path: <%=
6
+ hierarchy = [current_page]
7
+ hierarchy.unshift hierarchy.first.parent true while hierarchy.first.parent true
8
+ hierarchy.collect {|page| page.data.title }.join(" # ")
9
+ %>
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: c/d/index.html.erb
3
+ ---
4
+ Current locale: <%= I18n.locale %>
5
+ path: <%=
6
+ hierarchy = [current_page]
7
+ hierarchy.unshift hierarchy.first.parent true while hierarchy.first.parent true
8
+ hierarchy.collect {|page| page.data.title }.join(" # ")
9
+ %>
@@ -1,7 +1,7 @@
1
- import_file File.expand_path("static.html", root), "/static2.html"
1
+ import_file File.expand_path('static.html', root), '/static2.html'
2
2
 
3
- import_path File.expand_path("bower_components/", root)
3
+ import_path File.expand_path('bower_components/', root)
4
4
 
5
- import_path File.expand_path("bower_components", root) do |target_path, original_path|
5
+ import_path File.expand_path('bower_components', root) do |target_path, _original_path|
6
6
  target_path.sub('bower_components', 'bower_components2')
7
7
  end
@@ -1,5 +1,5 @@
1
1
  activate :directory_indexes
2
- page "/leave_me_alone.html", directory_index: false
2
+ page '/leave_me_alone.html', directory_index: false
3
3
 
4
- page "/wildcard*", directory_index: false
5
- page /regex_.*/, directory_index: false
4
+ page '/wildcard*', directory_index: false
5
+ page(/regex_.*/, directory_index: false)
@@ -1,3 +1,3 @@
1
- page "/spaces in file.html", layout: false
1
+ page '/spaces in file.html', layout: false
2
2
 
3
3
  config[:port] = 5555
@@ -1,3 +1,3 @@
1
1
  set :layout, :custom
2
2
 
3
- page "/", layout: :another
3
+ page '/', layout: :another
@@ -1,2 +1,2 @@
1
- ignore "danger-zone/*"
2
- ignore "*.textile"
1
+ ignore 'danger-zone/*'
2
+ ignore '*.textile'
@@ -1,7 +1,7 @@
1
1
  activate :directory_indexes
2
2
 
3
- proxy "/sub/fake.html", "/proxied.html", ignore: true
4
- proxy "/sub/fake2.html", "/proxied.html", ignore: true
3
+ proxy '/sub/fake.html', '/proxied.html', ignore: true
4
+ proxy '/sub/fake2.html', '/proxied.html', ignore: true
5
5
 
6
- proxy "/directory-indexed/fake.html", "/proxied.html", ignore: true
7
- proxy "/directory-indexed/fake2.html", "/proxied.html", ignore: true
6
+ proxy '/directory-indexed/fake.html', '/proxied.html', ignore: true
7
+ proxy '/directory-indexed/fake2.html', '/proxied.html', ignore: true
@@ -1,3 +1,3 @@
1
1
  files.watch :data, path: File.join(root, 'data0'), priority: 100
2
2
  files.watch :data, path: File.join(root, 'data1')
3
- files.watch :data, path: File.join(root, 'data2')
3
+ files.watch :data, path: File.join(root, 'data2')
@@ -1,3 +1,3 @@
1
1
  files.watch :source, path: File.join(root, 'source0'), priority: 100
2
2
  files.watch :source, path: File.join(root, 'source1')
3
- files.watch :source, path: File.join(root, 'source2')
3
+ files.watch :source, path: File.join(root, 'source2')
@@ -0,0 +1,2 @@
1
+ files.watch :source, path: File.join(root, 'external'),
2
+ destination_dir: 'external'
@@ -1,2 +1,2 @@
1
1
  files.watch :source, path: File.join(root, 'source2'),
2
- destination_dir: 'source2'
2
+ destination_dir: 'source2'
@@ -0,0 +1 @@
1
+ files.watch :source, path: File.join(root, 'external')
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "New Article Title"
3
- date: 2011-01-01
3
+ date: "2011-01-01"
4
4
  layout: inner
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "New Article Title"
3
- date: 2011-01-01
3
+ date: "2011-01-01"
4
4
  layout: inner_haml
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "New Article Title"
3
- date: 2011-01-01
3
+ date: "2011-01-01"
4
4
  layout: inner_slim
5
5
  ---
6
6
 
@@ -1,7 +1,7 @@
1
1
  helpers do
2
2
  def title
3
3
  content_tag :h1 do
4
- "Title"
4
+ 'Title'
5
5
  end
6
6
  end
7
7
  end
@@ -1,2 +1,2 @@
1
- page "/sub1/page-classes.html", layout: false
2
- page "/sub1/sub2/page-classes.html", layout: false
1
+ page '/sub1/page-classes.html', layout: false
2
+ page '/sub1/sub2/page-classes.html', layout: false
@@ -1,4 +1,4 @@
1
- page "/path/*", layout: "alt"
1
+ page '/path/*', layout: 'alt'
2
2
 
3
3
  # Doesn't work, and shouldn't
4
4
  # page "/path/*" do
@@ -1,7 +1,7 @@
1
- %w(1 2 3).each do |n|
2
- proxy "/#{n}.html", "/index.html", id: "page#{n}"
1
+ %w[1 2 3].each do |n|
2
+ proxy "/#{n}.html", '/index.html', id: "page#{n}"
3
3
  end
4
4
 
5
- page "/overwrites/*", id: :"something-else"
5
+ page '/overwrites/*', id: :"something-else"
6
6
 
7
- config[:page_id_generator] = ->(path){ path + "-foo" }
7
+ config[:page_id_generator] = ->(path) { path + '-foo' }
@@ -1,5 +1,5 @@
1
- %w(1 2 3).each do |n|
2
- proxy "/#{n}.html", "/index.html", id: "page#{n}"
1
+ %w[1 2 3].each do |n|
2
+ proxy "/#{n}.html", '/index.html', id: "page#{n}"
3
3
  end
4
4
 
5
- page "/overwrites/*", id: :"something-else"
5
+ page '/overwrites/*', id: :"something-else"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Test Article"
3
- date: 2011-01-01
3
+ date: "2011-01-01"
4
4
  tags: foo
5
5
  ---
6
6
  Test Article Content
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Test Article"
3
- date: 2011-01-02
3
+ date: "2011-01-02"
4
4
  tags: foo
5
5
  ---
6
6
  Test Article Content
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Test Article"
3
- date: 2011-01-03
3
+ date: "2011-01-03"
4
4
  tags: bar
5
5
  ---
6
6
  Test Article Content
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Test Article"
3
- date: 2011-01-04
3
+ date: "2011-01-04"
4
4
  tags: bar
5
5
  ---
6
6
  Test Article Content
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Test Article"
3
- date: 2011-01-05
3
+ date: "2011-01-05"
4
4
  tags: bar
5
5
  ---
6
6
  Test Article Content
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Test Article"
3
- date: 2011-02-01
3
+ date: "2011-02-01"
4
4
  tags: bar
5
5
  ---
6
6
  Test Article Content
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Test Article"
3
- date: 2011-02-02
3
+ date: "2011-02-02"
4
4
  tags: bar
5
5
  ---
6
6
  Test Article Content
@@ -1 +1 @@
1
- Local var is <%= foo %>
1
+ Local vars are '<%= locals['foo'] %>', '<%= locals[:bar] %>' and '<%= baz %>'
@@ -1 +1 @@
1
- <%= partial 'locals', locals: { foo: 'bar' } %>
1
+ <%= partial 'locals', locals: { foo: 'foo', 'bar' => 'bar', 'baz': 'baz' } %>
@@ -1,18 +1,17 @@
1
- # -*- coding: utf-8 -*-
2
- proxy "/fake.html", "/real.html", layout: false
3
- proxy "fake2.html", "/real.html", layout: false
4
- proxy "fake3.html", "real.html", layout: false
5
- proxy "/fake4.html", "real.html", layout: false
1
+ proxy '/fake.html', '/real.html', layout: false
2
+ proxy 'fake2.html', '/real.html', layout: false
3
+ proxy 'fake3.html', 'real.html', layout: false
4
+ proxy '/fake4.html', 'real.html', layout: false
6
5
 
7
- proxy "/target_ignore.html", "/should_be_ignored3.html", ignore: true
8
- proxy "target_ignore2.html", "/should_be_ignored6.html", ignore: true
9
- proxy "target_ignore3.html", "should_be_ignored7.html", ignore: true
10
- proxy "/target_ignore4.html", "should_be_ignored8.html", ignore: true
6
+ proxy '/target_ignore.html', '/should_be_ignored3.html', ignore: true
7
+ proxy 'target_ignore2.html', '/should_be_ignored6.html', ignore: true
8
+ proxy 'target_ignore3.html', 'should_be_ignored7.html', ignore: true
9
+ proxy '/target_ignore4.html', 'should_be_ignored8.html', ignore: true
11
10
 
12
- %w(one two).each do |num|
13
- proxy "/fake/#{num}.html", "/real/index.html", ignore: true, locals: { num: num }
14
- proxy "fake2/#{num}.html", "/real/index.html", ignore: true, locals: { num: num }
15
- proxy "fake3/#{num}.html", "real/index.html", ignore: true, locals: { num: num }
11
+ %w[one two].each do |num|
12
+ proxy "/fake/#{num}.html", '/real/index.html', ignore: true, locals: { num: num }
13
+ proxy "fake2/#{num}.html", '/real/index.html', ignore: true, locals: { num: num }
14
+ proxy "fake3/#{num}.html", 'real/index.html', ignore: true, locals: { num: num }
16
15
  end
17
16
 
18
- proxy "明日がある.html", "/real.html", layout: false
17
+ proxy '明日がある.html', '/real.html', layout: false