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.
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
@@ -1,4 +1,4 @@
1
- @wip
1
+ @encoding @travishatesme @wip
2
2
 
3
3
  Feature: Unicode filenames
4
4
  In order to support non-ASCII characters in filenames
@@ -1,3 +1,4 @@
1
+
1
2
  activate :asset_hash
2
3
 
3
4
  activate :relative_assets
@@ -6,8 +6,8 @@ class Middleware
6
6
  def call(env)
7
7
  status, headers, response = @app.call(env)
8
8
  body = ''
9
- response.each { |part| body += part }
10
- if /css$/.match?(env['PATH_INFO'])
9
+ response.each {|part| body += part }
10
+ if (env["PATH_INFO"] =~ /css$/)
11
11
  body += "\n/* Added by Rack filter */"
12
12
  status, headers, response = Rack::Response.new(body, status, headers).finish
13
13
  end
@@ -1,2 +1,2 @@
1
1
  body
2
- font-size: 18px
2
+ font-size: 18px
@@ -1,5 +1,5 @@
1
1
  configure :build do
2
- # Minify JavaScript on build
2
+ # Minify Javascript on build
3
3
  activate :minify_javascript
4
4
  activate :asset_hash
5
5
  end
@@ -1,5 +1,6 @@
1
+
1
2
  activate :asset_hash,
2
- prefix: 'myprefix-'
3
+ prefix: "myprefix-"
3
4
 
4
5
  activate :relative_assets
5
6
 
@@ -6,8 +6,8 @@ class Middleware
6
6
  def call(env)
7
7
  status, headers, response = @app.call(env)
8
8
  body = ''
9
- response.each { |part| body += part }
10
- if /css$/.match?(env['PATH_INFO'])
9
+ response.each {|part| body += part }
10
+ if (env["PATH_INFO"] =~ /css$/)
11
11
  body += "\n/* Added by Rack filter */"
12
12
  status, headers, response = Rack::Response.new(body, status, headers).finish
13
13
  end
@@ -1,3 +1,4 @@
1
+
1
2
  activate :asset_hash
2
3
 
3
4
  activate :relative_assets
@@ -6,8 +6,8 @@ class Middleware
6
6
  def call(env)
7
7
  status, headers, response = @app.call(env)
8
8
  body = ''
9
- response.each { |part| body += part }
10
- if /css$/.match?(env['PATH_INFO'])
9
+ response.each {|part| body += part }
10
+ if (env["PATH_INFO"] =~ /css$/)
11
11
  body += "\n/* Added by Rack filter */"
12
12
  status, headers, response = Rack::Response.new(body, status, headers).finish
13
13
  end
@@ -1 +1 @@
1
- activate :asset_host, host: 'http://assets1.example.com'
1
+ activate :asset_host, host: "http://assets1.example.com"
@@ -1,9 +1,9 @@
1
- %w[
1
+ %w{
2
2
  /auto-css.html
3
3
  /auto-css
4
4
  /auto-css/
5
5
  /auto-css/auto-css.html
6
6
  /auto-css/sub/auto-css.html
7
- ].each do |path|
7
+ }.each do |path|
8
8
  page path, layout: false
9
9
  end
@@ -1,9 +1,9 @@
1
- %w[
1
+ %w{
2
2
  /auto-js.html
3
3
  /auto-js
4
4
  /auto-js/
5
5
  /auto-js/auto-js.html
6
6
  /auto-js/sub/auto-js.html
7
- ].each do |path|
7
+ }.each do |path|
8
8
  page path, layout: false
9
9
  end
@@ -1 +1 @@
1
- activate :directory_indexes
1
+ activate :directory_indexes
@@ -1 +1 @@
1
- set :automatic_directory_matcher, '--'
1
+ set :automatic_directory_matcher, "--"
@@ -1,2 +1,2 @@
1
- page '/data.html', layout: false
2
- page '/data3.html', layout: false
1
+ page "/data.html", layout: false
2
+ page "/data3.html", layout: false
@@ -1,5 +1,5 @@
1
- require 'slim'
1
+ require "slim"
2
2
 
3
- page '/capture_html_erb.html', layout: :capture_html
4
- page '/capture_html_haml.html', layout: :capture_html
5
- page '/capture_html_slim.html', layout: :capture_html
3
+ page "/capture_html_erb.html", layout: :capture_html
4
+ page "/capture_html_haml.html", layout: :capture_html
5
+ page "/capture_html_slim.html", layout: :capture_html
@@ -1,9 +1,9 @@
1
- proxy '/fake.html', '/real.html', layout: false
1
+ proxy "/fake.html", "/real.html", layout: false
2
2
 
3
- ignore '/should_be_ignored.html'
4
- ignore '/should_be_ignored2.html'
5
- proxy '/target_ignore.html', '/should_be_ignored3.html', ignore: true
3
+ ignore "/should_be_ignored.html"
4
+ ignore "/should_be_ignored2.html"
5
+ proxy "/target_ignore.html", "/should_be_ignored3.html", ignore: true
6
6
 
7
- %w[one two].each do |num|
8
- proxy "/fake/#{num}.html", '/real/index.html', locals: { num: num }
7
+ %w(one two).each do |num|
8
+ proxy "/fake/#{num}.html", "/real/index.html", locals: { num: num }
9
9
  end
@@ -1,5 +1,5 @@
1
- set :build_dir, '.build'
1
+ set :build_dir, ".build"
2
2
 
3
- ignore '/should_be_ignored.html'
4
- ignore '/should_be_ignored2.html'
5
- proxy '/target_ignore.html', '/should_be_ignored3.html', ignore: true
3
+ ignore "/should_be_ignored.html"
4
+ ignore "/should_be_ignored2.html"
5
+ proxy "/target_ignore.html", "/should_be_ignored3.html", ignore: true
@@ -1 +1 @@
1
- set :build_dir, '.build'
1
+ set :build_dir, ".build"
@@ -1,9 +1,9 @@
1
- proxy '/fake.html', '/real.html', layout: false
1
+ proxy "/fake.html", "/real.html", layout: false
2
2
 
3
- ignore '/should_be_ignored.html'
4
- ignore '/should_be_ignored2.html'
5
- proxy '/target_ignore.html', '/should_be_ignored3.html', ignore: true
3
+ ignore "/should_be_ignored.html"
4
+ ignore "/should_be_ignored2.html"
5
+ proxy "/target_ignore.html", "/should_be_ignored3.html", ignore: true
6
6
 
7
- %w[one two].each do |num|
8
- proxy "/fake/#{num}.html", '/real/index.html', locals: { num: num }
7
+ %w(one two).each do |num|
8
+ proxy "/fake/#{num}.html", "/real/index.html", locals: { num: num }
9
9
  end
@@ -1 +1,2 @@
1
1
  activate :directory_indexes
2
+
@@ -1 +1 @@
1
- set :build_dir, 'sub/dir'
1
+ set :build_dir, "sub/dir"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Blog1 Newer Article"
3
- date: "2011-01-01"
3
+ date: 2011-01-01
4
4
  tags: foo, bar
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Blog1 Another Article"
3
- date: "2011-01-02"
3
+ date: 2011-01-02
4
4
  tags:
5
5
  - foo
6
6
  - 120
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Blog2 Newer Article"
3
- date: "2011-01-01"
3
+ date: 2011-01-01
4
4
  tags: foo, bar
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Blog2 Another Article"
3
- date: "2011-01-02"
3
+ date: 2011-01-02
4
4
  tags:
5
5
  - foo
6
6
  ---
@@ -1,5 +1,5 @@
1
- require 'slim'
1
+ require "slim"
2
2
 
3
- page '/content_for_erb.html', layout: :content_for
4
- page '/content_for_haml.html', layout: :content_for
5
- page '/content_for_slim.html', layout: :content_for
3
+ page "/content_for_erb.html", layout: :content_for
4
+ page "/content_for_haml.html", layout: :content_for
5
+ page "/content_for_slim.html", layout: :content_for
@@ -1,33 +1,34 @@
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
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
5
6
 
6
- ignore '/should_be_ignored.html'
7
- ignore '/should_be_ignored2.html'
8
- proxy '/target_ignore.html', '/should_be_ignored3.html', ignore: true
7
+ ignore "/should_be_ignored.html"
8
+ ignore "/should_be_ignored2.html"
9
+ proxy "/target_ignore.html", "/should_be_ignored3.html", ignore: true
9
10
 
10
- ignore 'should_be_ignored4.html'
11
- ignore 'should_be_ignored5.html'
12
- proxy 'target_ignore2.html', '/should_be_ignored6.html', ignore: true
13
- proxy 'target_ignore3.html', 'should_be_ignored7.html', ignore: true
14
- proxy '/target_ignore4.html', 'should_be_ignored8.html', ignore: true
11
+ ignore "should_be_ignored4.html"
12
+ ignore "should_be_ignored5.html"
13
+ proxy "target_ignore2.html", "/should_be_ignored6.html", ignore: true
14
+ proxy "target_ignore3.html", "should_be_ignored7.html", ignore: true
15
+ proxy "/target_ignore4.html", "should_be_ignored8.html", ignore: true
15
16
 
16
- %w[one two].each do |num|
17
- proxy "/fake/#{num}.html", '/real/index.html', ignore: true, locals: { num: num }
18
- proxy "fake2/#{num}.html", '/real/index.html', ignore: true, locals: { num: num }
19
- proxy "fake3/#{num}.html", 'real/index.html', ignore: true, locals: { num: num }
20
- proxy "/fake4/#{num}.html", 'real/index.html', ignore: true, locals: { num: num }
17
+ %w(one two).each do |num|
18
+ proxy "/fake/#{num}.html", "/real/index.html", ignore: true, locals: { num: num }
19
+ proxy "fake2/#{num}.html", "/real/index.html", ignore: true, locals: { num: num }
20
+ proxy "fake3/#{num}.html", "real/index.html", ignore: true, locals: { num: num }
21
+ proxy "/fake4/#{num}.html", "real/index.html", ignore: true, locals: { num: num }
21
22
  end
22
23
 
23
- proxy '明日がある.html', '/real.html', layout: false
24
+ proxy "明日がある.html", "/real.html", layout: false
24
25
 
25
- page 'f*/*', locals: { all_glob: 'I am all glob' }
26
- page 'fake/*', locals: { glob_var: 'I am one glob' }
27
- page 'fake2/*', locals: { glob_var: 'I am two glob' }
28
- page 'fake3/*', locals: { glob_var: 'I am three glob' }
29
- page 'fake4/*', locals: { glob_var: 'I am four glob' }
26
+ page "f*/*", locals: { all_glob: "I am all glob" }
27
+ page "fake/*", locals: { glob_var: "I am one glob" }
28
+ page "fake2/*", locals: { glob_var: "I am two glob" }
29
+ page "fake3/*", locals: { glob_var: "I am three glob" }
30
+ page "fake4/*", locals: { glob_var: "I am four glob" }
30
31
 
31
- %w[tom dick harry].each do |name|
32
- proxy "/about/#{name}.html", '/should_be_ignored9.html', locals: { person_name: name }, ignore: true
32
+ ["tom", "dick", "harry"].each do |name|
33
+ proxy "/about/#{name}.html", "/should_be_ignored9.html", locals: { person_name: name }, ignore: true
33
34
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  body {
2
- background: red;
2
+ backgroud: red;
3
3
  }
@@ -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,5 +1,3 @@
1
1
  module Derp
2
- def three
3
- 'Three'
4
- end
2
+ def three; "Three"; end
5
3
  end
@@ -1,5 +1,3 @@
1
1
  module FourHelpers
2
- def four
3
- 'Four'
4
- end
2
+ def four; "Four"; end
5
3
  end
@@ -1,5 +1,3 @@
1
1
  module OneHelper
2
- def one
3
- 'One'
4
- end
2
+ def one; "One"; end
5
3
  end
@@ -1,5 +1,3 @@
1
1
  module YetAnotherThingy
2
- def two
3
- 'Two'
4
- end
2
+ def two; "Two"; end
5
3
  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,3 +1,16 @@
1
+ ###
2
+ # Compass
3
+ ###
4
+
5
+ # Susy grids in Compass
6
+ # First: gem install compass-susy-plugin
7
+ # require 'susy'
8
+
9
+ # Change Compass configuration
10
+ # compass_config do |config|
11
+ # config.output_style = :compact
12
+ # end
13
+
1
14
  ###
2
15
  # Page options, layouts, aliases and proxies
3
16
  ###
@@ -40,9 +53,10 @@
40
53
 
41
54
  # Production configuration
42
55
  configure :production do
56
+ # For example, change the Compass output style for deployment
43
57
  # activate :minify_css
44
58
 
45
- # Minify JavaScript
59
+ # Minify Javascript
46
60
  # activate :minify_javascript
47
61
 
48
62
  # Enable cache buster
@@ -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
- %i[en es].each do |locale|
2
- proxy "/#{locale}/index.html", 'index.html', ignore: true, lang: locale
1
+ [: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: %i[en es]
1
+ activate :i18n, mount_at_root: :en, langs: [:en, :es]
@@ -1,10 +1,4 @@
1
1
  ---
2
2
  en:
3
- paths:
4
- hello: "hello"
5
- morning: "morning"
6
- tac: "terms-and-conditions"
7
-
8
3
  greetings: "Howdy"
9
- hi: "Hello"
10
- tac: "Terms & Conditions"
4
+ hi: "Hello"
@@ -4,7 +4,6 @@ es:
4
4
  hello: "hola"
5
5
  morning: "manana"
6
6
  one: "una"
7
-
7
+
8
8
  greetings: "Como Esta?"
9
9
  hi: "Hola"
10
- tac: "Condiciones Generales"
@@ -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')
@@ -1,2 +1,2 @@
1
1
  files.watch :source, path: File.join(root, 'source2'),
2
- destination_dir: 'source2'
2
+ destination_dir: 'source2'
@@ -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