From ed59260367155e3894be890b27cbfe2765880499 Mon Sep 17 00:00:00 2001 From: Manuel Meurer Date: Wed, 29 May 2013 11:25:57 +0200 Subject: [PATCH] Replace all occurrences of data.page with current_page.data see https://github.com/middleman/middleman/issues/912 --- middleman-core/features/front-matter-neighbor.feature | 4 ++-- middleman-core/features/front-matter.feature | 6 +++--- .../fixtures/chained-app/source/index.html.str.erb | 2 +- .../fixtures/frontmatter-app/source/front-matter-2.php.erb | 4 ++-- .../fixtures/frontmatter-app/source/front-matter-auto.erb | 2 +- .../frontmatter-app/source/front-matter-change.html.erb | 2 +- .../frontmatter-app/source/front-matter-encoding.html.erb | 2 +- .../frontmatter-app/source/front-matter-line-2.html.erb | 2 +- .../frontmatter-app/source/json-front-matter-2.php.erb | 4 ++-- .../frontmatter-app/source/json-front-matter-auto.erb | 2 +- .../source/json-front-matter-encoding.html.erb | 2 +- .../source/json-front-matter-line-2.html.erb | 2 +- .../frontmatter-app/source/json-front-matter.html.erb | 2 +- .../fixtures/frontmatter-app/source/raw-front-matter.html | 2 +- .../frontmatter-neighbor-app/source/front-matter-2.php.erb | 4 ++-- .../frontmatter-neighbor-app/source/front-matter-auto.erb | 2 +- .../source/front-matter-change.html.erb | 2 +- .../source/front-matter-encoding.html.erb | 2 +- .../source/json-front-matter-2.php.erb | 4 ++-- .../source/json-front-matter-auto.erb | 2 +- .../source/json-front-matter.html.erb | 2 +- .../frontmatter-neighbor-app/source/raw-front-matter.html | 2 +- .../fixtures/nested-layout-app/source/layouts/master.erb | 4 ++-- .../nested-layout-app/source/layouts/master_haml.haml | 4 ++-- .../nested-layout-app/source/layouts/master_slim.slim | 4 ++-- 25 files changed, 35 insertions(+), 35 deletions(-) diff --git a/middleman-core/features/front-matter-neighbor.feature b/middleman-core/features/front-matter-neighbor.feature index 04724248..b420cba0 100644 --- a/middleman-core/features/front-matter-neighbor.feature +++ b/middleman-core/features/front-matter-neighbor.feature @@ -17,7 +17,7 @@ Feature: Neighboring YAML Front Matter Scenario: Rendering raw (template-less) (yaml) Given the Server is running at "frontmatter-neighbor-app" When I go to "/raw-front-matter.html" - Then I should see "

<%= data.page.title %>

" + Then I should see "

<%= current_page.data.title %>

" Then I should not see "---" When I go to "/raw-front-matter.html.frontmatter" Then I should see "File Not Found" @@ -59,7 +59,7 @@ Feature: Neighboring YAML Front Matter Given the Server is running at "frontmatter-neighbor-app" And the file "source/front-matter-change.html.erb" has the contents """ - <%= data.page.title %> + <%= current_page.data.title %> """ And the file "source/front-matter-change.html.erb.frontmatter" has the contents """ diff --git a/middleman-core/features/front-matter.feature b/middleman-core/features/front-matter.feature index e7746063..a0440f55 100644 --- a/middleman-core/features/front-matter.feature +++ b/middleman-core/features/front-matter.feature @@ -14,7 +14,7 @@ Feature: YAML Front Matter Scenario: Rendering raw (template-less) (yaml) Given the Server is running at "frontmatter-app" When I go to "/raw-front-matter.html" - Then I should see "

<%= data.page.title %>

" + Then I should see "

<%= current_page.data.title %>

" Then I should not see "---" When I go to "/raw-front-matter.php" Then I should see '' @@ -66,7 +66,7 @@ Feature: YAML Front Matter title: Hello World layout: false --- - <%= data.page.title %> + <%= current_page.data.title %> """ When I go to "/front-matter-change.html" Then I should see "Hello World" @@ -76,7 +76,7 @@ Feature: YAML Front Matter title: Hola Mundo layout: false --- - <%= data.page.title %> + <%= current_page.data.title %> """ When I go to "/front-matter-change.html" Then I should see "Hola Mundo" diff --git a/middleman-core/fixtures/chained-app/source/index.html.str.erb b/middleman-core/fixtures/chained-app/source/index.html.str.erb index a4d97d7e..3b7caec2 100755 --- a/middleman-core/fixtures/chained-app/source/index.html.str.erb +++ b/middleman-core/fixtures/chained-app/source/index.html.str.erb @@ -5,4 +5,4 @@ sup: "Sup"

#{"<%= data.article.title %>"}

#{"<%= data.article.subtitle %>"}

-

#{"<%= data.page.sup %>"}

\ No newline at end of file +

#{"<%= current_page.data.sup %>"}

diff --git a/middleman-core/fixtures/frontmatter-app/source/front-matter-2.php.erb b/middleman-core/fixtures/frontmatter-app/source/front-matter-2.php.erb index 205a442f..9d6d7dcb 100644 --- a/middleman-core/fixtures/frontmatter-app/source/front-matter-2.php.erb +++ b/middleman-core/fixtures/frontmatter-app/source/front-matter-2.php.erb @@ -3,5 +3,5 @@ layout: false title: This is the title --- -

<%= data.page.title %>

- \ No newline at end of file +

<%= current_page.data.title %>

+ diff --git a/middleman-core/fixtures/frontmatter-app/source/front-matter-auto.erb b/middleman-core/fixtures/frontmatter-app/source/front-matter-auto.erb index 73d30e72..fcae7374 100644 --- a/middleman-core/fixtures/frontmatter-app/source/front-matter-auto.erb +++ b/middleman-core/fixtures/frontmatter-app/source/front-matter-auto.erb @@ -3,4 +3,4 @@ layout: false title: This is the title --- -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-app/source/front-matter-change.html.erb b/middleman-core/fixtures/frontmatter-app/source/front-matter-change.html.erb index 044e469d..aa18f92d 100644 --- a/middleman-core/fixtures/frontmatter-app/source/front-matter-change.html.erb +++ b/middleman-core/fixtures/frontmatter-app/source/front-matter-change.html.erb @@ -2,4 +2,4 @@ title: Hola Mundo layout: false --- -<%= data.page.title %> \ No newline at end of file +<%= current_page.data.title %> diff --git a/middleman-core/fixtures/frontmatter-app/source/front-matter-encoding.html.erb b/middleman-core/fixtures/frontmatter-app/source/front-matter-encoding.html.erb index c44d9633..2aa87853 100644 --- a/middleman-core/fixtures/frontmatter-app/source/front-matter-encoding.html.erb +++ b/middleman-core/fixtures/frontmatter-app/source/front-matter-encoding.html.erb @@ -4,4 +4,4 @@ layout: false title: This is the title --- -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-app/source/front-matter-line-2.html.erb b/middleman-core/fixtures/frontmatter-app/source/front-matter-line-2.html.erb index a3a6dacf..7aeb16b9 100644 --- a/middleman-core/fixtures/frontmatter-app/source/front-matter-line-2.html.erb +++ b/middleman-core/fixtures/frontmatter-app/source/front-matter-line-2.html.erb @@ -4,4 +4,4 @@ layout: false title: This is the title --- -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-app/source/json-front-matter-2.php.erb b/middleman-core/fixtures/frontmatter-app/source/json-front-matter-2.php.erb index c7db5a50..7208cf6f 100644 --- a/middleman-core/fixtures/frontmatter-app/source/json-front-matter-2.php.erb +++ b/middleman-core/fixtures/frontmatter-app/source/json-front-matter-2.php.erb @@ -3,5 +3,5 @@ "title": "This is the title" ;;; -

<%= data.page.title %>

- \ No newline at end of file +

<%= current_page.data.title %>

+ diff --git a/middleman-core/fixtures/frontmatter-app/source/json-front-matter-auto.erb b/middleman-core/fixtures/frontmatter-app/source/json-front-matter-auto.erb index 07f6be90..da001783 100644 --- a/middleman-core/fixtures/frontmatter-app/source/json-front-matter-auto.erb +++ b/middleman-core/fixtures/frontmatter-app/source/json-front-matter-auto.erb @@ -3,4 +3,4 @@ "title": "This is the title" ;;; -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-app/source/json-front-matter-encoding.html.erb b/middleman-core/fixtures/frontmatter-app/source/json-front-matter-encoding.html.erb index d34321a4..d05b1f70 100644 --- a/middleman-core/fixtures/frontmatter-app/source/json-front-matter-encoding.html.erb +++ b/middleman-core/fixtures/frontmatter-app/source/json-front-matter-encoding.html.erb @@ -4,4 +4,4 @@ "title": "This is the title" ;;; -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-app/source/json-front-matter-line-2.html.erb b/middleman-core/fixtures/frontmatter-app/source/json-front-matter-line-2.html.erb index b6428aa9..56b65add 100644 --- a/middleman-core/fixtures/frontmatter-app/source/json-front-matter-line-2.html.erb +++ b/middleman-core/fixtures/frontmatter-app/source/json-front-matter-line-2.html.erb @@ -4,4 +4,4 @@ layout: false, title: "This is the title" ;;; -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-app/source/json-front-matter.html.erb b/middleman-core/fixtures/frontmatter-app/source/json-front-matter.html.erb index 07f6be90..da001783 100644 --- a/middleman-core/fixtures/frontmatter-app/source/json-front-matter.html.erb +++ b/middleman-core/fixtures/frontmatter-app/source/json-front-matter.html.erb @@ -3,4 +3,4 @@ "title": "This is the title" ;;; -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-app/source/raw-front-matter.html b/middleman-core/fixtures/frontmatter-app/source/raw-front-matter.html index 73d30e72..fcae7374 100644 --- a/middleman-core/fixtures/frontmatter-app/source/raw-front-matter.html +++ b/middleman-core/fixtures/frontmatter-app/source/raw-front-matter.html @@ -3,4 +3,4 @@ layout: false title: This is the title --- -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-2.php.erb b/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-2.php.erb index d74e5a71..c271a92f 100644 --- a/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-2.php.erb +++ b/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-2.php.erb @@ -1,2 +1,2 @@ -

<%= data.page.title %>

- \ No newline at end of file +

<%= current_page.data.title %>

+ diff --git a/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-auto.erb b/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-auto.erb index c9c30179..1ae95c52 100644 --- a/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-auto.erb +++ b/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-auto.erb @@ -1 +1 @@ -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-change.html.erb b/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-change.html.erb index d0ec71cc..f4b65916 100644 --- a/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-change.html.erb +++ b/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-change.html.erb @@ -1 +1 @@ -<%= data.page.title %> \ No newline at end of file +<%= current_page.data.title %> diff --git a/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-encoding.html.erb b/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-encoding.html.erb index c9c30179..1ae95c52 100644 --- a/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-encoding.html.erb +++ b/middleman-core/fixtures/frontmatter-neighbor-app/source/front-matter-encoding.html.erb @@ -1 +1 @@ -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter-2.php.erb b/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter-2.php.erb index d74e5a71..c271a92f 100644 --- a/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter-2.php.erb +++ b/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter-2.php.erb @@ -1,2 +1,2 @@ -

<%= data.page.title %>

- \ No newline at end of file +

<%= current_page.data.title %>

+ diff --git a/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter-auto.erb b/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter-auto.erb index c9c30179..1ae95c52 100644 --- a/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter-auto.erb +++ b/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter-auto.erb @@ -1 +1 @@ -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter.html.erb b/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter.html.erb index c9c30179..1ae95c52 100644 --- a/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter.html.erb +++ b/middleman-core/fixtures/frontmatter-neighbor-app/source/json-front-matter.html.erb @@ -1 +1 @@ -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/frontmatter-neighbor-app/source/raw-front-matter.html b/middleman-core/fixtures/frontmatter-neighbor-app/source/raw-front-matter.html index c9c30179..1ae95c52 100644 --- a/middleman-core/fixtures/frontmatter-neighbor-app/source/raw-front-matter.html +++ b/middleman-core/fixtures/frontmatter-neighbor-app/source/raw-front-matter.html @@ -1 +1 @@ -

<%= data.page.title %>

\ No newline at end of file +

<%= current_page.data.title %>

diff --git a/middleman-core/fixtures/nested-layout-app/source/layouts/master.erb b/middleman-core/fixtures/nested-layout-app/source/layouts/master.erb index fa191dd9..7bd170af 100644 --- a/middleman-core/fixtures/nested-layout-app/source/layouts/master.erb +++ b/middleman-core/fixtures/nested-layout-app/source/layouts/master.erb @@ -1,3 +1,3 @@ Master -

<%= data.page.title %>

-<%= yield %> \ No newline at end of file +

<%= current_page.data.title %>

+<%= yield %> diff --git a/middleman-core/fixtures/nested-layout-app/source/layouts/master_haml.haml b/middleman-core/fixtures/nested-layout-app/source/layouts/master_haml.haml index f00cbb6b..273f21e7 100644 --- a/middleman-core/fixtures/nested-layout-app/source/layouts/master_haml.haml +++ b/middleman-core/fixtures/nested-layout-app/source/layouts/master_haml.haml @@ -1,3 +1,3 @@ Master -%h1= data.page.title -= yield \ No newline at end of file +%h1= current_page.data.title += yield diff --git a/middleman-core/fixtures/nested-layout-app/source/layouts/master_slim.slim b/middleman-core/fixtures/nested-layout-app/source/layouts/master_slim.slim index ba9463d8..4ade5748 100644 --- a/middleman-core/fixtures/nested-layout-app/source/layouts/master_slim.slim +++ b/middleman-core/fixtures/nested-layout-app/source/layouts/master_slim.slim @@ -1,3 +1,3 @@ h1 Master -p== data.page.title -div== yield \ No newline at end of file +p== current_page.data.title +div== yield