2015/11/11分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Add days_in_year method
- Implements an evented file system monitor to asynchronously detect changes in the application source code, routes, locales, etc.
- Generated
Gemfile
s for new applications include a new dependency on [listen](https://github.com/guard/listen) commented out.
activesupport/lib/active_support/core_ext/time/calculations.rb
の修正です。
Time
クラスに、指定された年の日数を返すdays_in_year
メソッドを追加しています。
Time.days_in_year # 引数が無い場合current.yearを使用 # => 365 Time.days_in_year(2004) # => 366 Time.days_in_year(1900) # => 365
Merge pull request #22216 from grosser/grosser/fast-ret
activesupport/lib/active_support/cache/strategy/local_cache.rb
の修正です。
LocalCache
module配下の各メソッド(cleanup
、increment
等)で、最初にlocal cacheが存在するかどうかチェックを行い、存在しない場合直ぐ親クラスを呼び出すよう修正しています。
Active Support / railtiesの修正です。
ファイルの更新監視処理に、listen
(guard/listen)を使用したバージョンの実装(ActiveSupport::FileEventedUpdateChecker
)を追加しています。
元々、ファイルの更新監視処理はpollingで行っていた(ActiveSupport::FileUpdateChecker
)のですが、これをevent-basedで行えるようにする為に、listen
を使用した実装を追加したとの事です。
元々のFileEventedUpdateChecker
クラス自体は残っており、listen
が使えればActiveSupport::FileEventedUpdateChecker
を、使えないのであれば従来通りActiveSupport::FileUpdateChecker
クラスを使用するようになっています。
合わせて、新規Railsアプリ用のGemfileの雛形に、listen
が追加されています。
因みにこの対応は、 Google Summer of Code 2015で実施された対応との事です。 参照: Riding Rails: Welcome to Google Summer of Code 2015!
normalizes spacing in a CHANGELOG [ci skip]
activesupport/CHANGELOG.md
の修正です。
CHANGELOG内のスペースの調整を行っています。
rails guideのAutoloading and Reloading Constants
の修正です。
Constant Reloading
の項のグラマーの修正を行っています。
revises the implementation of Pathname#ascendant_of? (in refinement)
activesupport/lib/active_support/file_evented_update_checker.rb
の修正です。
Pathname#ascendant_of?
メソッドの実装の修正を行っています。
元々は、正規表現で一致するかどうかをチェックしていたのを、Pathname#each_filename
で取得したパス名の一覧が一致するかどうかをチェックするよう修正しています。