middleman-core 3.0.0.beta.3 → 3.0.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. data/bin/middleman +32 -30
  2. data/features/clean_build.feature +0 -13
  3. data/features/extensionless_text_files.feature +2 -34
  4. data/features/front-matter.feature +27 -6
  5. data/features/frontmatter_page_settings.feature +6 -15
  6. data/features/ignore.feature +1 -78
  7. data/features/sitemap_traversal.feature +5 -5
  8. data/features/support/env.rb +3 -0
  9. data/features/wildcard_page_helper.feature +0 -9
  10. data/fixtures/frontmatter-app/source/front-matter-encoding.html.erb +7 -0
  11. data/fixtures/frontmatter-app/source/{front-matter.html.erb → front-matter-line-2.html.erb} +0 -1
  12. data/fixtures/frontmatter-app/source/json-front-matter-2.php.erb +2 -2
  13. data/fixtures/frontmatter-app/source/json-front-matter-auto.erb +2 -2
  14. data/fixtures/frontmatter-app/source/json-front-matter-encoding.html.erb +7 -0
  15. data/fixtures/frontmatter-app/source/json-front-matter-line-2.html.erb +7 -0
  16. data/fixtures/frontmatter-app/source/json-front-matter.html.erb +2 -2
  17. data/fixtures/frontmatter-settings-app/config.rb +1 -3
  18. data/fixtures/indexable-app/config.rb +0 -4
  19. data/fixtures/traversal-app/config.rb +0 -2
  20. data/lib/middleman-core/application.rb +7 -48
  21. data/lib/middleman-core/cli.rb +49 -46
  22. data/lib/middleman-core/cli/build.rb +62 -30
  23. data/lib/middleman-core/cli/extension.rb +1 -1
  24. data/lib/middleman-core/cli/server.rb +4 -3
  25. data/lib/middleman-core/core_extensions.rb +1 -10
  26. data/lib/middleman-core/core_extensions/extensions.rb +14 -9
  27. data/lib/middleman-core/core_extensions/file_watcher.rb +44 -46
  28. data/lib/middleman-core/core_extensions/front_matter.rb +27 -11
  29. data/lib/middleman-core/core_extensions/rendering.rb +74 -7
  30. data/lib/middleman-core/core_extensions/request.rb +32 -33
  31. data/lib/middleman-core/core_extensions/routing.rb +5 -3
  32. data/lib/middleman-core/extensions.rb +11 -21
  33. data/lib/middleman-core/preview_server.rb +3 -3
  34. data/lib/middleman-core/renderers/coffee_script.rb +41 -0
  35. data/lib/middleman-core/renderers/haml.rb +30 -0
  36. data/lib/middleman-core/renderers/less.rb +46 -0
  37. data/lib/middleman-core/renderers/liquid.rb +35 -0
  38. data/lib/middleman-core/renderers/markdown.rb +57 -0
  39. data/lib/middleman-core/renderers/redcarpet.rb +38 -0
  40. data/lib/middleman-core/renderers/sass.rb +85 -0
  41. data/lib/middleman-core/renderers/slim.rb +30 -0
  42. data/lib/middleman-core/sitemap/resource.rb +6 -2
  43. data/lib/middleman-core/step_definitions/middleman_steps.rb +2 -2
  44. data/lib/middleman-core/templates/extension/gemspec +1 -1
  45. data/lib/middleman-core/templates/extension/lib/lib.rb +1 -1
  46. data/lib/middleman-core/util.rb +4 -0
  47. data/lib/middleman-core/version.rb +1 -9
  48. data/middleman-core.gemspec +3 -7
  49. metadata +146 -312
  50. data/features/asset_host.feature +0 -7
  51. data/features/automatic_image_sizes.feature +0 -16
  52. data/features/content_for.feature +0 -6
  53. data/features/directory_index.feature +0 -66
  54. data/features/former_padrino_helpers.feature +0 -12
  55. data/features/helpers_auto_javascript_include_tag.feature +0 -27
  56. data/features/helpers_auto_stylesheet_link_tag.feature +0 -27
  57. data/features/helpers_lorem.feature +0 -6
  58. data/features/helpers_page_classes.feature +0 -17
  59. data/features/helpers_relative_link_to.feature +0 -68
  60. data/features/i18n_builder.feature +0 -121
  61. data/features/i18n_preview.feature +0 -113
  62. data/features/instance_vars.feature +0 -18
  63. data/features/nested_layouts.feature +0 -24
  64. data/features/partials.feature +0 -46
  65. data/fixtures/asset-host-app/config.rb +0 -6
  66. data/fixtures/asset-host-app/source/.htaccess +0 -1
  67. data/fixtures/asset-host-app/source/asset_host.html.erb +0 -1
  68. data/fixtures/asset-host-app/source/images/blank.gif +0 -0
  69. data/fixtures/auto-css-app/config.rb +0 -11
  70. data/fixtures/auto-css-app/source/auto-css.html.erb +0 -1
  71. data/fixtures/auto-css-app/source/auto-css/auto-css.html.erb +0 -1
  72. data/fixtures/auto-css-app/source/auto-css/index.html.erb +0 -1
  73. data/fixtures/auto-css-app/source/auto-css/sub/auto-css.html.erb +0 -1
  74. data/fixtures/auto-css-app/source/stylesheets/auto-css.css +0 -3
  75. data/fixtures/auto-css-app/source/stylesheets/auto-css/auto-css.css +0 -3
  76. data/fixtures/auto-css-app/source/stylesheets/auto-css/index.css +0 -0
  77. data/fixtures/auto-css-app/source/stylesheets/auto-css/sub/auto-css.css +0 -3
  78. data/fixtures/auto-js-app/config.rb +0 -11
  79. data/fixtures/auto-js-app/source/auto-js.html.erb +0 -1
  80. data/fixtures/auto-js-app/source/auto-js/auto-js.html.erb +0 -1
  81. data/fixtures/auto-js-app/source/auto-js/index.html.erb +0 -1
  82. data/fixtures/auto-js-app/source/auto-js/sub/auto-js.html.erb +0 -1
  83. data/fixtures/auto-js-app/source/javascripts/auto-js.js +0 -1
  84. data/fixtures/auto-js-app/source/javascripts/auto-js/auto-js.js +0 -1
  85. data/fixtures/auto-js-app/source/javascripts/auto-js/index.js +0 -1
  86. data/fixtures/auto-js-app/source/javascripts/auto-js/sub/auto-js.js +0 -1
  87. data/fixtures/automatic-image-size-app/config.rb +0 -0
  88. data/fixtures/automatic-image-size-app/source/auto-image-sizes.html.erb +0 -1
  89. data/fixtures/automatic-image-size-app/source/images/blank.gif +0 -0
  90. data/fixtures/clean-dir-app/config.rb +0 -2
  91. data/fixtures/clean-dir-app/source/about.html +0 -1
  92. data/fixtures/content-for-app/config.rb +0 -3
  93. data/fixtures/content-for-app/source/content_for_erb.html.erb +0 -5
  94. data/fixtures/content-for-app/source/layouts/content_for.erb +0 -4
  95. data/fixtures/different-engine-partial/config.rb +0 -0
  96. data/fixtures/different-engine-partial/source/index.html.erb +0 -1
  97. data/fixtures/different-engine-partial/source/layouts/layout.erb +0 -7
  98. data/fixtures/different-engine-partial/source/shared/_footer.str +0 -1
  99. data/fixtures/different-engine-partial/source/shared/_header.erb +0 -1
  100. data/fixtures/frontmatter-settings-app/source/no_index.html.erb +0 -5
  101. data/fixtures/i18n-alt-root-app/locales/en.yml +0 -4
  102. data/fixtures/i18n-alt-root-app/locales/es.yml +0 -7
  103. data/fixtures/i18n-alt-root-app/source/lang_data/hello.html.erb +0 -1
  104. data/fixtures/i18n-alt-root-app/source/lang_data/index.html.erb +0 -1
  105. data/fixtures/i18n-alt-root-app/source/layout.erb +0 -1
  106. data/fixtures/i18n-test-app/locales/en.yml +0 -4
  107. data/fixtures/i18n-test-app/locales/es.yml +0 -7
  108. data/fixtures/i18n-test-app/source/layout.erb +0 -1
  109. data/fixtures/i18n-test-app/source/localizable/hello.html.erb +0 -1
  110. data/fixtures/i18n-test-app/source/localizable/index.html.erb +0 -1
  111. data/fixtures/instance-vars-app/config.rb +0 -0
  112. data/fixtures/instance-vars-app/source/_vartial.erb +0 -5
  113. data/fixtures/instance-vars-app/source/instance-var-set.html.erb +0 -2
  114. data/fixtures/instance-vars-app/source/layout.erb +0 -3
  115. data/fixtures/instance-vars-app/source/no-instance-var.html.erb +0 -1
  116. data/fixtures/lorem-app/config.rb +0 -1
  117. data/fixtures/lorem-app/source/lorem.html.erb +0 -13
  118. data/fixtures/nested-layout-app/config.rb +0 -1
  119. data/fixtures/nested-layout-app/source/data-one.html.erb +0 -5
  120. data/fixtures/nested-layout-app/source/data-two.html.erb +0 -5
  121. data/fixtures/nested-layout-app/source/index.html.erb +0 -1
  122. data/fixtures/nested-layout-app/source/layouts/inner.erb +0 -4
  123. data/fixtures/nested-layout-app/source/layouts/master.erb +0 -3
  124. data/fixtures/nested-layout-app/source/layouts/outer.erb +0 -4
  125. data/fixtures/padrino-helpers-app/config.rb +0 -0
  126. data/fixtures/padrino-helpers-app/source/former_padrino_test.html.erb +0 -5
  127. data/fixtures/page-classes-app/config.rb +0 -4
  128. data/fixtures/page-classes-app/source/page-classes.html.erb +0 -1
  129. data/fixtures/page-classes-app/source/sub1/page-classes.html.erb +0 -1
  130. data/fixtures/page-classes-app/source/sub1/sub2/page-classes.html.erb +0 -1
  131. data/fixtures/partials-app/config.rb +0 -0
  132. data/fixtures/partials-app/source/_locals.erb +0 -1
  133. data/fixtures/partials-app/source/_main.erb +0 -1
  134. data/fixtures/partials-app/source/_main.str +0 -1
  135. data/fixtures/partials-app/source/index.html.erb +0 -3
  136. data/fixtures/partials-app/source/locals.html.erb +0 -1
  137. data/fixtures/partials-app/source/second.html.str +0 -3
  138. data/fixtures/partials-app/source/shared/_footer.erb +0 -1
  139. data/fixtures/partials-app/source/shared/_header.erb +0 -1
  140. data/fixtures/partials-app/source/shared/snippet.erb +0 -1
  141. data/fixtures/partials-app/source/sub/_local.erb +0 -1
  142. data/fixtures/partials-app/source/sub/index.html.erb +0 -3
  143. data/fixtures/partials-app/source/using_snippet.html.erb +0 -1
  144. data/fixtures/wildcard-directory-index-app/config.rb +0 -2
  145. data/fixtures/wildcard-directory-index-app/source/admin/index.html.erb +0 -1
  146. data/fixtures/wildcard-directory-index-app/source/admin/page.html.erb +0 -1
  147. data/fixtures/wildcard-directory-index-app/source/index.html.erb +0 -1
  148. data/fixtures/wildcard-directory-index-app/source/layouts/admin.erb +0 -2
  149. data/fixtures/wildcard-directory-index-app/source/layouts/layout.erb +0 -2
  150. data/lib/middleman-core/core_extensions/assets.rb +0 -43
  151. data/lib/middleman-core/core_extensions/default_helpers.rb +0 -172
  152. data/lib/middleman-core/core_extensions/i18n.rb +0 -146
  153. data/lib/middleman-core/extensions/asset_host.rb +0 -47
  154. data/lib/middleman-core/extensions/automatic_image_sizes.rb +0 -57
  155. data/lib/middleman-core/extensions/automatic_image_sizes/fastimage.rb +0 -287
  156. data/lib/middleman-core/extensions/directory_indexes.rb +0 -54
  157. data/lib/middleman-core/extensions/lorem.rb +0 -195
@@ -1,18 +0,0 @@
1
- Feature: Instance Vars
2
- In order to share data with layouts and partials via instance variables
3
-
4
- Scenario: Setting an instance var in a template should be visible in its layout
5
- Given the Server is running at "instance-vars-app"
6
- When I go to "/instance-var-set.html"
7
- Then I should see "Var is 100"
8
-
9
- Scenario: Setting an instance var in a template should be visible in a partial
10
- Given the Server is running at "instance-vars-app"
11
- When I go to "/instance-var-set.html"
12
- Then I should see "My var is here!"
13
-
14
- Scenario: Setting an instance var in one file should not be visible in another
15
- Given the Server is running at "instance-vars-app"
16
- When I go to "/instance-var-set.html"
17
- When I go to "/no-instance-var.html"
18
- Then I should see "No var..."
@@ -1,24 +0,0 @@
1
- Feature: Allow nesting of layouts
2
-
3
- Scenario: A page uses an inner layout when uses an outer layout
4
- Given the Server is running at "nested-layout-app"
5
- When I go to "/index.html"
6
- Then I should see "Template"
7
- And I should see "Inner"
8
- And I should see "Outer"
9
- And I should see "Master"
10
-
11
- Scenario: YAML Front Matter isn't clobbered with nested layouts
12
- Given the Server is running at "nested-layout-app"
13
- When I go to "/data-one.html"
14
- Then I should see "Page Number One"
15
- And I should see "Inner"
16
- When I go to "/data-two.html"
17
- Then I should see "Page Number Two"
18
- And I should not see "Inner"
19
- When I go to "/data-one.html"
20
- Then I should see "Page Number One"
21
- And I should see "Inner"
22
- When I go to "/data-two.html"
23
- Then I should see "Page Number Two"
24
- And I should not see "Inner"
@@ -1,46 +0,0 @@
1
- Feature: Provide Sane Defaults for Partial Behavior
2
-
3
- Scenario: Finds shared partials relative to the root
4
- Given the Server is running at "partials-app"
5
- When I go to "/index.html"
6
- Then I should see "Header"
7
- And I should see "Footer"
8
-
9
- Scenario: Finds shared partials relative to the root (sub)
10
- Given the Server is running at "partials-app"
11
- When I go to "/sub/index.html"
12
- Then I should see "Header"
13
- And I should see "Footer"
14
-
15
- Scenario: Finds shared partials without _ prefix
16
- Given the Server is running at "partials-app"
17
- When I go to "/using_snippet.html"
18
- Then I should see "Snippet"
19
-
20
- Scenario: Prefers partials of the same engine type
21
- Given the Server is running at "partials-app"
22
- When I go to "/index.html"
23
- Then I should see "ERb Main"
24
-
25
- Scenario: Prefers partials of the same engine type
26
- Given the Server is running at "partials-app"
27
- When I go to "/second.html"
28
- Then I should see "Str Main"
29
- And I should see "Header"
30
- And I should see "Footer"
31
-
32
- Scenario: Finds partial relative to template
33
- Given the Server is running at "partials-app"
34
- When I go to "/sub/index.html"
35
- Then I should see "Local Partial"
36
-
37
- Scenario: Partials can be passed locals
38
- Given the Server is running at "partials-app"
39
- When I go to "/locals.html"
40
- Then I should see "Local var is bar"
41
-
42
- Scenario: Partial and Layout use different engines
43
- Given the Server is running at "different-engine-partial"
44
- When I go to "/index.html"
45
- Then I should see "ERb Header"
46
- And I should see "Str Footer"
@@ -1,6 +0,0 @@
1
- set :layout, false
2
-
3
- activate :asset_host
4
- set :asset_host do |asset|
5
- "http://assets%d.example.com" % (asset.hash % 4)
6
- end
@@ -1 +0,0 @@
1
- # I'm an htaccess file!
@@ -1 +0,0 @@
1
- <%= image_tag "blank.gif" %>
@@ -1,11 +0,0 @@
1
- with_layout false do
2
- %w{
3
- /auto-css.html
4
- /auto-css
5
- /auto-css/
6
- /auto-css/auto-css.html
7
- /auto-css/sub/auto-css.html
8
- }.each do |path|
9
- page path
10
- end
11
- end
@@ -1 +0,0 @@
1
- <%= auto_stylesheet_link_tag %>
@@ -1 +0,0 @@
1
- <%= auto_stylesheet_link_tag %>
@@ -1 +0,0 @@
1
- <%= auto_stylesheet_link_tag %>
@@ -1 +0,0 @@
1
- <%= auto_stylesheet_link_tag %>
@@ -1,3 +0,0 @@
1
- auto {
2
- css: 1;
3
- }
@@ -1,3 +0,0 @@
1
- auto {
2
- css: 2;
3
- }
@@ -1,11 +0,0 @@
1
- with_layout false do
2
- %w{
3
- /auto-js.html
4
- /auto-js
5
- /auto-js/
6
- /auto-js/auto-js.html
7
- /auto-js/sub/auto-js.html
8
- }.each do |path|
9
- page path
10
- end
11
- end
@@ -1 +0,0 @@
1
- <%= auto_javascript_include_tag %>
@@ -1 +0,0 @@
1
- <%= auto_javascript_include_tag %>
@@ -1 +0,0 @@
1
- <%= auto_javascript_include_tag %>
@@ -1 +0,0 @@
1
- <%= auto_javascript_include_tag %>
File without changes
@@ -1 +0,0 @@
1
- <%= image_tag "blank.gif" %>
@@ -1,2 +0,0 @@
1
- activate :directory_indexes
2
-
@@ -1 +0,0 @@
1
- Fun times
@@ -1,3 +0,0 @@
1
- with_layout :content_for do
2
- page "/content_for_erb.html"
3
- end
@@ -1,5 +0,0 @@
1
- <% content_for :from_template do %>
2
- I am the yielded content erb
3
- <% end %>
4
-
5
- I am in the template
@@ -1,4 +0,0 @@
1
- In Layout: <%= yield_content(:from_template).chomp.strip %>
2
-
3
- In Template:
4
- <%= yield %>
File without changes
@@ -1,7 +0,0 @@
1
- <%= partial 'shared/header' %>
2
-
3
- <div id="main">
4
- <%= yield %>
5
- </div>
6
-
7
- <%= partial 'shared/footer' %>
@@ -1 +0,0 @@
1
- <footer>Str Footer</footer>
@@ -1 +0,0 @@
1
- <header>ERb Header</header>
@@ -1,5 +0,0 @@
1
- ---
2
- directory_index: false
3
- ---
4
-
5
- This should not be put in no_index/index.html - it goes to no_index.html
@@ -1,4 +0,0 @@
1
- ---
2
- en:
3
- greetings: "Howdy"
4
- hi: "Hello"
@@ -1,7 +0,0 @@
1
- ---
2
- es:
3
- paths:
4
- hello: "hola"
5
-
6
- greetings: "Como Esta?"
7
- hi: "Hola"
@@ -1 +0,0 @@
1
- <%= I18n.t(:hi) %> World
@@ -1 +0,0 @@
1
- <%= I18n.t(:greetings) %>
@@ -1 +0,0 @@
1
- <%= yield %>
@@ -1,4 +0,0 @@
1
- ---
2
- en:
3
- greetings: "Howdy"
4
- hi: "Hello"
@@ -1,7 +0,0 @@
1
- ---
2
- es:
3
- paths:
4
- hello: "hola"
5
-
6
- greetings: "Como Esta?"
7
- hi: "Hola"
@@ -1 +0,0 @@
1
- <%= yield %>
@@ -1 +0,0 @@
1
- <%= I18n.t(:hi) %> World
@@ -1 +0,0 @@
1
- <%= I18n.t(:greetings) %>
File without changes
@@ -1,5 +0,0 @@
1
- <% if @my_var %>
2
- My var is here!
3
- <% else %>
4
- No var...
5
- <% end %>
@@ -1,2 +0,0 @@
1
- <% @my_var = 100 %>
2
- <%= partial 'vartial' %>
@@ -1,3 +0,0 @@
1
- Var is <%= @my_var %>
2
-
3
- <%= yield %>
@@ -1 +0,0 @@
1
- <%= partial 'vartial' %>
@@ -1 +0,0 @@
1
- # activate :minify_css
@@ -1,13 +0,0 @@
1
- <%= lorem.word %>
2
- <%= lorem.words(5) %>
3
- <%= lorem.sentence %>
4
- <%= lorem.sentences(2) %>
5
- <%= lorem.paragraph %>
6
- <%= lorem.paragraphs(2) %>
7
- <%= lorem.date %>
8
- <%= lorem.name %>
9
- <%= lorem.first_name %>
10
- <%= lorem.last_name %>
11
- <%= lorem.email %>
12
- <%= image_tag lorem.image(100) %>
13
- <%= image_tag placekitten(100) %>
@@ -1 +0,0 @@
1
- set :layout, :inner
@@ -1,5 +0,0 @@
1
- ---
2
- title: Page Number One
3
- layout: inner
4
- ---
5
- Page #1
@@ -1,5 +0,0 @@
1
- ---
2
- title: Page Number Two
3
- layout: outer
4
- ---
5
- Page #2
@@ -1 +0,0 @@
1
- Template
@@ -1,4 +0,0 @@
1
- <% wrap_layout :outer do %>
2
- Inner
3
- <%= yield %>
4
- <% end %>
@@ -1,3 +0,0 @@
1
- Master
2
- <%= data.page.title %>
3
- <%= yield %>
@@ -1,4 +0,0 @@
1
- <% wrap_layout :master do %>
2
- Outer
3
- <%= yield %>
4
- <% end %>
File without changes
@@ -1,5 +0,0 @@
1
- <%= stylesheet_link_tag "test1" %>
2
- <%= javascript_include_tag "test1" %>
3
- <%= image_tag "test2.png", :alt => "alt" %>
4
- <%= link_to "Has param", "test2.com", :class => "test" %>
5
- <%= number_to_human_size(1024) %>
@@ -1,4 +0,0 @@
1
- with_layout false do
2
- page "/sub1/page-classes.html"
3
- page "/sub1/sub2/page-classes.html"
4
- end
@@ -1 +0,0 @@
1
- <%= page_classes %>
@@ -1 +0,0 @@
1
- <%= page_classes %>
@@ -1 +0,0 @@
1
- <%= page_classes %>
File without changes
@@ -1 +0,0 @@
1
- Local var is <%= foo %>
@@ -1 +0,0 @@
1
- ERb Main
@@ -1 +0,0 @@
1
- Str Main
@@ -1,3 +0,0 @@
1
- <%= partial "shared/header" %>
2
- <%= partial "main" %>
3
- <%= partial "shared/footer" %>
@@ -1 +0,0 @@
1
- <%= partial 'locals', :locals => { :foo => 'bar' } %>
@@ -1,3 +0,0 @@
1
- #{partial "shared/header"}
2
- #{partial "main"}
3
- #{partial "shared/footer"}