なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2015/11/12)

2015/11/12分のコミットです。

CHANGELOGへの追加はありませんでした。


Show middleware classes on /rails/info/properties

actionpack/lib/action_dispatch/middleware/stack.rbの修正です。

/rails/info/properties及びrake middlewareでmiddlewareを表示する際、一部インスタンスのデータが表示されてしまっていたのを、クラス名が表示されるよう統一しています。

# before
use Rack::Sendfile
use ActionDispatch::Static
use ActionDispatch::LoadInterlock
use #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x007f292d79d828>
use Rack::Runtime
use Rack::MethodOverride
use ActionDispatch::RequestId
use Rails::Rack::Logger
use ActionDispatch::ShowExceptions
use WebConsole::Middleware
use ActionDispatch::DebugExceptions
use ActionDispatch::RemoteIp
use ActionDispatch::Reloader
use ActionDispatch::Callbacks
use ActiveRecord::Migration::CheckPending
use ActiveRecord::ConnectionAdapters::ConnectionManagement
use ActiveRecord::QueryCache
use ActionDispatch::Cookies
use ActionDispatch::Session::CookieStore
use ActionDispatch::Flash
use Rack::Head
use Rack::ConditionalGet
use Rack::ETag
use ActionView::Digestor::PerRequestDigestCacheExpiry
run Master::Application.routes


# after
use Rack::Sendfile
use ActionDispatch::Static
use ActionDispatch::LoadInterlock
use ActiveSupport::Cache::Strategy::LocalCache::Middleware
use Rack::Runtime
use Rack::MethodOverride
use ActionDispatch::RequestId
use Rails::Rack::Logger
use ActionDispatch::ShowExceptions
use WebConsole::Middleware
use ActionDispatch::DebugExceptions
use ActionDispatch::RemoteIp
use ActionDispatch::Reloader
use ActionDispatch::Callbacks
use ActiveRecord::Migration::CheckPending
use ActiveRecord::ConnectionAdapters::ConnectionManagement
use ActiveRecord::QueryCache
use ActionDispatch::Cookies
use ActionDispatch::Session::CookieStore
use ActionDispatch::Flash
use Rack::Head
use Rack::ConditionalGet
use Rack::ETag
use ActionView::Digestor::PerRequestDigestCacheExpiry
run Master::Application.routes

ActiveSupport::Cache::Strategy::LocalCache::Middlewareがそうですね。


let filter_out_descendants do less passes

activesupport/lib/active_support/file_evented_update_checker.rbの修正です。

ActiveSupport::FileEventedUpdateChecker::PathHelper#filter_out_descendantsメソッドで、子ディレクトリを除外するのに、ディレクトリをチェック後にselect + concatしていたのを、ループ内で結果を追加、及びreject!を使用しループを減らせるよう改善しています。


Use the file watcher defined by the app config

activesupport/lib/active_support/i18n_railtie.rbの修正です。

initialize_i18nメソッドで、reloaderをActiveSupport::FileUpdateCheckerに固定していたのを、config.file_watcherに指定された値を使用するよう修正しています。


base (refined) Pathname#ascendant_of? also on Pathname#ascend

activesupport/lib/active_support/file_evented_update_checker.rbの修正です。

Pathname#ascendant_of?メソッドを、Pathname#ascendメソッドを使用してチェックを行うよう、再度修正しています。


Fix instance variable not defined warning from Active Support test suite

activesupport/test/file_update_checker_shared_tests.rbの修正です。

ファイル更新処理についてのテストでの後処理で、@tmpdirを削除する際に、@tmpdir変数が定義されているかどうかチェックするよう修正しています。

warning: instance variable @tmpdir not initializedが出てしまっていたので、その対応の為との事です。