2014/08/19分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Add option to stop swallowing errors on callbacks.
- Fixes the
Relation#exists?
to work with polymorphic associations.
Sync railties release notes [ci skip]
guides/source/4_2_release_notes.md
の修正です。
railtiesのrelease noteを反映しています。
Check attributes passed to create_with and where
activerecord/lib/active_record/relation/query_methods.rb
の修正です。
create_with
、where
メソッドに渡すattributesについて、sanitize処理を行うよう修正しています。CVE-2014-3514 fix対応。
以下のような使い方をしている場合に問題が起きるとの事です。
user.blog_posts.create_with(params[:blog_post]).create
user.blog_posts.create(params[:blog_post]) # or: user.blog_posts.create_with(params[:blog_post].permit(:title, :body, :etc)).create
詳細はこちら。
Sync action pack release notes [ci skip]
guides/source/4_2_release_notes.md
の修正です。
ActionPackのrelease noteを反映しています。
guides/source/4_2_release_notes.md
の修正です。
インデントの整理。
Gemfile
、activesupport/activesupport.gemspec
の修正です。
i18nについて、リリース済みのgemを使用するよう修正しています。
Add option to stop swallowing errors on callbacks.
activerecord/lib/active_record/connection_adapters/abstract/transaction.rb
の修正です。
現状、after_rollback/after_commit コールバックでエラーが発生した際は、一旦rails側でエラーをrescueして、エラーをログファイルに出力していたのですが、次のバージョンでは、 rescueは行わなくするとの事です。
先にこの振る舞いについて確認したい場合は、
config.active_record.raise_in_transactional_callbacks = true
を設定すれば、確認出来るとの事です。
No need to point to arel and i18n master anymore
railties/lib/rails/generators/app_base.rb
の修正です。
生成されるGemfileからarel、rack、i18nを削除しています。
Fix assertion to map the behaviour of the old sanitizer
actionview/test/template/sanitize_helper_test.rb
の修正です。
以前のサニタイザの動作と合ってる事を確認するように、test_should_sanitize_illegal_style_properties
を修正しています。
actionpack/actionpack.gemspec
の修正です。
rackのバージョンをalphaからbetaに修正しています。
railties/lib/rails/generators/app_base.rb
の修正です。
最新のrackがリリースされたので、生成されるGemfileからrackを削除しています。
rails guideのA Guide for Upgrading Ruby on Rail
の修正です。
PATCHメソッドについて説明した記事へのリンクが切れていたのを修正しています。
[ActiveJob] Add queue_name_prefix so all queue are prefixed .
activejob/lib/active_job/queue_name.rb
の修正です。
mattr_accessorにqueue_name_prefix
を追加しています。
ActiveJob::Base.queue_name_prefix = 'foo'
環境毎とかに分けて管理する事が出来そうですね。ちょっと便利そう。
Add activejob guide to documents.yml [ci skip]
guides/source/documents.yaml
の修正です。
Active Job を追加しています。
Fixes the Relation#exists?
to work with polymorphic associations.
activerecord/lib/active_record/relation/finder_methods.rb
の修正です。
polymorphic associationsを使用している時に、Relation#exists?
メソッドが正常に動作してなかったバグを修正しています。
Fix broken link to Upgrading Ruby on Rails Guide
rails guideのRuby on Rails 4.2 Release Notes
の修正です。
4.1から4.2へのUpgrading guideへのリンクが壊れていたのを修正しています。
Fix after_commit warning message
activerecord/lib/active_record/transactions.rb
の修正です。
上であったafter_rollback/after_commit コールバックのエラー対応で、出力するエラーメッセージにtypoがあったのを修正しています。
Deprecate TagAssertion instead of removing
actionpack/lib/action_dispatch/testing/assertions/tag.rb
の修正です。
削除されてしまったTagAssertions
を戻してく、Deprecateメッセージを出すよう修正しています。
actionview/test/activerecord/controller_runtime_test.rb
の修正です。
使用していない変数を削除しています。
Point to unreleased deprecated_sanitizer
Gemfileの修正です。
rails-deprecated_sanitizer
を追加しています。
Remove to_s from reflection.type in add_constraints
activerecord/lib/active_record/associations/association_scope.rb
の修正です。
不要なStringへの変換処理を削除しています。
Merge pull request #16542 from seamusabshere/numerify-pool-checkout-timeout-from-urls-4-1-stable
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
の修正です。
checkout_timeout
パラメータのチェック処理を追加しています。
- @checkout_timeout = spec.config[:checkout_timeout] || 5 + @checkout_timeout = (spec.config[:checkout_timeout] && spec.config[:checkout_timeout].to_f) || 5
spec.config[:checkout_timeout]にStringが設定されて場合に、エラーになっていた為対応したようです。
require 'test_help' -> require 'rails/test_help'
rails guideのA Guide for Upgrading Ruby on Rails
の修正です。
require 'test_help' を require 'rails/test_help'に修正しています。
actionpack/lib/action_dispatch/testing/assertions/tag.rb
の修正です。
require 'active_support/deprecation'
を追加しています。
Mention deprecation of assert_select and friends in the release notes [ci skip]
guides/source/4_2_release_notes.md
の修正です。
Deprecated
の項に、assert_tag
, assert_no_tag
, find_tag
、find_all_tag
を追加しています。
Sync Action View release notes [ci skip]
guides/source/4_2_release_notes.md
の修正です。
ActionViewのrelease noteを反映しています。
Sync Action Mailer release notes [ci skip]
guides/source/4_2_release_notes.md
の修正です。
ActionMailerのrelease noteを反映しています。
rails guideのGetting Started with Rails
の修正です
不要なabout
を削除しています。
activerecord/CHANGELOG.md
の修正です。
raise_in_transactional_callbacks
をerrors_in_transactional_callbacks
にtypoしていたのを修正しています。
http://gembundler.com/ => http://bundler.io/
rails guideのDevelopment Dependencies Install
の修正です。
http://gembundler.com/ を http://bundler.io/ に修正しています。
4.2 Release Notes pass [skip ci]
rails guideのRuby on Rails 4.2 Release Notes
の修正です。
グラマーの修正です。
Merge pull request #16552 from untidy-hair/update_plugin_guide
rails guideのThe Basics of Creating Rails Plugins
の修正です。
サンプルの内容を最新の内容に更新しています。
use same idiom to define class method as in every other adapter.
activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb
の修正です。
クラスメソッドの定義方法を、def self.xxx
からclass << self
に修正しています。
- def self.perform(job_name, *args) - job_name.constantize.new.execute(*args) + class << self + def perform(job_name, *args) + job_name.constantize.new.execute(*args) + end
railsのコーディング規約的には、class << self
を推奨しており、他のadapterもその書き方をしているので、合わせた形ですね。
"warning: assigned but unused variable"
activesupport/test/multibyte_chars_test.rb
の修正です。
使用していない変数を削除しています。
Gem queue_classic
does not support JRuby
Gemfile
の修正です。
queue_classic
はJRubyでサポートしていないという事で、platforms: :ruby
の指定を追加しています。
Skip adapter queue_classic for JRuby
activejob/Rakefile
の修正です。
JRubyの場合にadapterからqueue_classic
を削除しています。
Merge pull request #16487 from jayshepherd/patch-1
rails guideのActive Record Query Interface
の修正です。
グラマーの修正です。不要なa
を削除しています。