From ceb5f53d57aae0d2b90fed87a5a0d726f978052f Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Mon, 30 Jan 2012 10:10:38 -0800 Subject: [PATCH 1/3] enable jruby --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3f6d0093..973cd828 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ rvm: - 1.8.7 - 1.9.2 - 1.9.3 + - jruby script: "bundle exec rake test" branches: From fc2f761e2f6bbbabcd604e6211b671e67b61dfdf Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Wed, 29 Feb 2012 21:58:01 -0800 Subject: [PATCH 2/3] New scenario showing Sass partials don't work in build --- middleman-more/features/sass_partials.feature | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/middleman-more/features/sass_partials.feature b/middleman-more/features/sass_partials.feature index a6972783..e40d360b 100644 --- a/middleman-more/features/sass_partials.feature +++ b/middleman-more/features/sass_partials.feature @@ -80,4 +80,8 @@ Feature: Sass Updates and Partials """ When I go to "/stylesheets/main2.css" Then I should see "color: blue;" - Then I should see "font-size: 18px" \ No newline at end of file + Then I should see "font-size: 18px" + + Scenario: Sass partials should work when building + Given a successfully built app at "preview-app" + Then the file "build/stylesheets/main.css" should contain "font-size: 18px" From 445b66bed790df5fe965df73645a45d7fbb93534 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Thu, 1 Mar 2012 13:43:47 -0800 Subject: [PATCH 3/3] test backwards compatible request.params template values. closes #294 --- middleman-core/features/request_params.feature | 6 ++++++ middleman-core/fixtures/request-app/config.rb | 0 middleman-core/fixtures/request-app/source/index.html.erb | 3 +++ middleman-core/lib/middleman-core/base.rb | 5 ++++- 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 middleman-core/features/request_params.feature create mode 100644 middleman-core/fixtures/request-app/config.rb create mode 100644 middleman-core/fixtures/request-app/source/index.html.erb diff --git a/middleman-core/features/request_params.feature b/middleman-core/features/request_params.feature new file mode 100644 index 00000000..968d0bfc --- /dev/null +++ b/middleman-core/features/request_params.feature @@ -0,0 +1,6 @@ +Feature: Support request parameters + Scenario: Use request params in a template + Given the Server is running at "request-app" + When I go to "/index.html?say=Hello+World" + Then I should see "Quote Hello World" + Then I should see "Symbol Hello World" diff --git a/middleman-core/fixtures/request-app/config.rb b/middleman-core/fixtures/request-app/config.rb new file mode 100644 index 00000000..e69de29b diff --git a/middleman-core/fixtures/request-app/source/index.html.erb b/middleman-core/fixtures/request-app/source/index.html.erb new file mode 100644 index 00000000..f87a2bd9 --- /dev/null +++ b/middleman-core/fixtures/request-app/source/index.html.erb @@ -0,0 +1,3 @@ +Dot <%= request.params.say %> +Quote <%= request.params["say"] %> +Symbol <%= request.params[:say] %> diff --git a/middleman-core/lib/middleman-core/base.rb b/middleman-core/lib/middleman-core/base.rb index 7ab77383..1631129f 100644 --- a/middleman-core/lib/middleman-core/base.rb +++ b/middleman-core/lib/middleman-core/base.rb @@ -265,7 +265,10 @@ class Middleman::Base # @return [void] def current_path=(path) @_current_path = path - @request = ::Thor::CoreExt::HashWithIndifferentAccess.new({ :path => path }) + @request = ::Thor::CoreExt::HashWithIndifferentAccess.new({ + :path => path, + :params => req ? ::Thor::CoreExt::HashWithIndifferentAccess.new(req.params) : {} + }) end # Initialize the Middleman project