diff options
4 files changed, 42 insertions, 7 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..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,11 +56,16 @@ 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"] assert_equal "chunked", headers["Transfer-Encoding"] assert_equal cache, headers["Cache-Control"] end - end if defined?(Fiber) -end + end +end if defined?(Fiber) 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 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/ 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'] |