From 520b8b59110dd130c89b317b6bd65d8644c7836f Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Wed, 18 Nov 2009 16:28:12 -0800 Subject: Final steps toward clean rails "foo"; cd foo; gem bundle; script/server working --- railties/lib/rails/rack/log_tailer.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'railties/lib/rails/rack') diff --git a/railties/lib/rails/rack/log_tailer.rb b/railties/lib/rails/rack/log_tailer.rb index a237cee6bc..f3ebebf67d 100644 --- a/railties/lib/rails/rack/log_tailer.rb +++ b/railties/lib/rails/rack/log_tailer.rb @@ -1,12 +1,11 @@ module Rails module Rack class LogTailer - EnvironmentLog = "#{File.expand_path(Rails.root)}/log/#{Rails.env}.log" - def initialize(app, log = nil) + @default_log = "#{File.expand_path(Rails.root)}/log/#{Rails.env}.log" @app = app - path = Pathname.new(log || EnvironmentLog).cleanpath + path = Pathname.new(log || @default_log).cleanpath @cursor = ::File.size(path) @last_checked = Time.now.to_f -- cgit v1.2.3 From c7c39f52dcce4ea6de2051ee7816c0cb9d583f8f Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 19 Nov 2009 15:24:00 -0800 Subject: Revert "Final steps toward clean rails "foo"; cd foo; gem bundle; script/server working" Broke stuff. This reverts commit 520b8b59110dd130c89b317b6bd65d8644c7836f. --- railties/lib/rails/rack/log_tailer.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails/rack') diff --git a/railties/lib/rails/rack/log_tailer.rb b/railties/lib/rails/rack/log_tailer.rb index f3ebebf67d..a237cee6bc 100644 --- a/railties/lib/rails/rack/log_tailer.rb +++ b/railties/lib/rails/rack/log_tailer.rb @@ -1,11 +1,12 @@ module Rails module Rack class LogTailer + EnvironmentLog = "#{File.expand_path(Rails.root)}/log/#{Rails.env}.log" + def initialize(app, log = nil) - @default_log = "#{File.expand_path(Rails.root)}/log/#{Rails.env}.log" @app = app - path = Pathname.new(log || @default_log).cleanpath + path = Pathname.new(log || EnvironmentLog).cleanpath @cursor = ::File.size(path) @last_checked = Time.now.to_f -- cgit v1.2.3 From e1935e3c0c35f8f1196239e2b1213c4436049fa5 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 21 Nov 2009 10:45:42 -0800 Subject: Fix Rails::Rack::Static deprecated constant proxy --- railties/lib/rails/rack/static.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails/rack') diff --git a/railties/lib/rails/rack/static.rb b/railties/lib/rails/rack/static.rb index d6b8face27..ebe8b9e103 100644 --- a/railties/lib/rails/rack/static.rb +++ b/railties/lib/rails/rack/static.rb @@ -1,5 +1,5 @@ require 'action_dispatch' module Rails::Rack - Static = Deprecation::DeprecatedConstantProxy.new('Rails::Rack::Static', ActionDispatch::Static) + Static = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Rails::Rack::Static', ActionDispatch::Static) end -- cgit v1.2.3 From 35eda7d6d2ea13b4e42eeea9f11245e22c245fc2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 23 Nov 2009 15:36:48 -0600 Subject: Fixed that the debugger wouldn't go into IRB mode because of left-over ARGVs [DHH] --- railties/lib/rails/rack/debugger.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'railties/lib/rails/rack') diff --git a/railties/lib/rails/rack/debugger.rb b/railties/lib/rails/rack/debugger.rb index aa2711c616..0a7b405553 100644 --- a/railties/lib/rails/rack/debugger.rb +++ b/railties/lib/rails/rack/debugger.rb @@ -4,6 +4,8 @@ module Rails def initialize(app) @app = app + ARGV.clear # clear ARGV so that script/server options aren't passed to IRB + require_library_or_gem 'ruby-debug' ::Debugger.start ::Debugger.settings[:autoeval] = true if ::Debugger.respond_to?(:settings) -- cgit v1.2.3 From 530b8ff5ae811e0dd5e1343b478f42eed6fffdbd Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Tue, 24 Nov 2009 13:03:24 -0800 Subject: Have script/* and Rakefile use the application object --- railties/lib/rails/rack/log_tailer.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'railties/lib/rails/rack') diff --git a/railties/lib/rails/rack/log_tailer.rb b/railties/lib/rails/rack/log_tailer.rb index a237cee6bc..077311be3c 100644 --- a/railties/lib/rails/rack/log_tailer.rb +++ b/railties/lib/rails/rack/log_tailer.rb @@ -1,12 +1,10 @@ module Rails module Rack class LogTailer - EnvironmentLog = "#{File.expand_path(Rails.root)}/log/#{Rails.env}.log" - def initialize(app, log = nil) @app = app - path = Pathname.new(log || EnvironmentLog).cleanpath + path = Pathname.new(log || "#{File.expand_path(Rails.root)}/log/#{Rails.env}.log").cleanpath @cursor = ::File.size(path) @last_checked = Time.now.to_f -- cgit v1.2.3