From 07fde1a3d36d0622d5fa9c040bfca70db675926a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 18 Apr 2011 14:25:51 +0200 Subject: Just define the controller if fibers are defined. --- actionpack/test/controller/new_base/render_streaming_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/test/controller/new_base/render_streaming_test.rb b/actionpack/test/controller/new_base/render_streaming_test.rb index 27ba4b1a29..dbd6c66d1f 100644 --- a/actionpack/test/controller/new_base/render_streaming_test.rb +++ b/actionpack/test/controller/new_base/render_streaming_test.rb @@ -58,5 +58,5 @@ module RenderStreaming assert_equal "chunked", headers["Transfer-Encoding"] assert_equal cache, headers["Cache-Control"] end - end if defined?(Fiber) -end + end +end if defined?(Fiber) -- cgit v1.2.3 From 3b0f917b1dfabce6a6b338e4a7cb02995c055596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 18 Apr 2011 14:27:30 +0200 Subject: Test explicit skip. --- actionpack/test/controller/new_base/render_streaming_test.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/actionpack/test/controller/new_base/render_streaming_test.rb b/actionpack/test/controller/new_base/render_streaming_test.rb index dbd6c66d1f..ffc4b331ec 100644 --- a/actionpack/test/controller/new_base/render_streaming_test.rb +++ b/actionpack/test/controller/new_base/render_streaming_test.rb @@ -8,11 +8,15 @@ module RenderStreaming )] layout "application" - stream :only => :hello_world + stream :only => [:hello_world, :skip] def hello_world end + def skip + render :action => "hello_world", :stream => false + end + def explicit render :action => "hello_world", :stream => true end @@ -52,6 +56,11 @@ module RenderStreaming assert_streaming! end + test "skip rendering with streaming at render level" do + get "/render_streaming/basic/skip" + assert_body "Hello world, I'm here!" + end + def assert_streaming!(cache="no-cache") assert_status 200 assert_equal nil, headers["Content-Length"] -- cgit v1.2.3 From 92537b8c273ea57eb7e1d686071f1876a5e9abe4 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Mon, 18 Apr 2011 17:06:07 +0530 Subject: File should be open in read/write mode. When doing lock on a file. --- activesupport/lib/active_support/cache/file_store.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 9936b33e22..a1376ae52a 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -121,7 +121,7 @@ module ActiveSupport # Lock a file for a block so only one process can modify it at a time. def lock_file(file_name, &block) # :nodoc: if File.exist?(file_name) - File.open(file_name, 'r') do |f| + File.open(file_name, 'r+') do |f| begin f.flock File::LOCK_EX yield -- cgit v1.2.3 From 0acc6bd6cb1d27fdbb0c00ac3a322bc8413e03cc Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 18 Apr 2011 21:07:04 +0200 Subject: Use proper coffee comments --- .../rails/generators/rails/assets/templates/javascript.js.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/railties/lib/rails/generators/rails/assets/templates/javascript.js.coffee b/railties/lib/rails/generators/rails/assets/templates/javascript.js.coffee index 09b2da094a..761567942f 100644 --- a/railties/lib/rails/generators/rails/assets/templates/javascript.js.coffee +++ b/railties/lib/rails/generators/rails/assets/templates/javascript.js.coffee @@ -1,3 +1,3 @@ -// Place all the behaviors and hooks related to the matching controller here. -// All this logic will automatically be available in application.js. -// You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ -- cgit v1.2.3 From 64e2a549cf92f25026a85575940a722492310125 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 18 Apr 2011 14:43:24 -0700 Subject: adding a rake task to help generate changelog notes for release announcements --- tasks/release.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tasks/release.rb b/tasks/release.rb index a605fed160..01950b227d 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -61,6 +61,32 @@ directory "dist" end end +namespace :changelog do + task :release_date do + FRAMEWORKS.each do |fw| + require 'date' + replace = '\1(' + Date.today.strftime('%B %d, %Y') + ')' + fname = File.join fw, 'CHANGELOG' + + contents = File.read(fname).sub(/^([^(]*)\(unreleased\)/, replace) + File.open(fname, 'wb') { |f| f.write contents } + end + end + + task :release_summary do + FRAMEWORKS.each do |fw| + puts "## #{fw}" + fname = File.join fw, 'CHANGELOG' + contents = File.readlines fname + contents.shift + changes = [] + changes << contents.shift until contents.first =~ /^\*Rails \d+\.\d+\.\d+/ + puts changes.reject { |change| change.strip.empty? }.join + puts + end + end +end + namespace :all do task :build => FRAMEWORKS.map { |f| "#{f}:build" } + ['rails:build'] task :install => FRAMEWORKS.map { |f| "#{f}:install" } + ['rails:install'] -- cgit v1.2.3