2015/03/19分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Change commands in the Getting Started guide to use scripts in bin/
rails guideのGetting Started with Rails
の修正です。
rails
、rake
コマンドをbin/rails
、bin/rake
に修正しています。
[ci skip] use false as value rather than symbol
rails guideのActive Record Associations
の修正です。
has_many
メソッドのオプションについてのexampleのタイポ(:false
-> false
)を修正しています。
rails guideのThe Asset Pipeline
の修正です。
Set up a CDN to Serve Static Assets
の項の説明内にあったタイポ(a
-> at
)を修正しています。
Active Record changelog pass [skip ci]
activerecord/CHANGELOG.md
の修正です。
CHANGELOG全体のタイポ、グラマーの修正を行っています。
[ci skip] use true as value rather than symbol
rails guideのActive Record Associations
の修正です。
:touch
オプションについての説明内にあったタイポ(:true
-> true
)を修正しています。
don't fallback to RACK_ENV when RAILS_ENV is not present
ENV["RAILS_ENV"]
が設定されていない場合に、ENV["RACK_ENV"]
から値を取得しようとしていた処理を、全て削除しています。
- @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "test") + @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || "test")
元々はRAILS_ENV
の代わりとしてRACK_ENV
の値を使用出来たようなのですが、現状、取得出来る内容に互換性は無く、RACK_ENV
から適切な値は取得出来ないとの事で、削除しています。
詳しくは、Brane Dump: RACK_ENV: It's not for you を参照で。
Merge pull request #19406 from larskanis/add_changelog_entry_for_17680
activerecord/CHANGELOG.md
の修正です。
pg
gemの0.18.0を使用した際にArgumentError
が発生するのを対応したコミット(PostgreSQL, Fix change detection caused by superfluous bytea unescaping)についてのエントリをCHANGELOGに追加しています。
Merge pull request #19387 from arthurnn/fix_route_regression
railties/lib/rails/generators/actions.rb
、
railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb
の修正です。
generatorがroutes.rb
にrouteを追加する際、終端に改行を追加するよう修正しています。
- inject_into_file 'config/routes.rb', " #{routing_code}", { after: sentinel, verbose: false, force: true } + inject_into_file 'config/routes.rb', " #{routing_code}\n", { after: sentinel, verbose: false, force: true }
Don't remove all line endings from routes.rb の対応で終端に改行を追加しないよう対応したのですが、改行が無いと、deviseのような3rd partyのlibraryのgeneratorが生成するrouteが上手く動作しない(一行に、railsが生成したrouteと、library側が生成したrouteが両方定義されてしまいエラーになる)ので、再度修正を行ったとの事です。
Merge pull request #19216 from senny/bin_test_runner
railties の修正です。テスト実行用のbin/rails test
コマンドを追加しています。
$ ./bin/rails t --help Usage: bin/rails test [options] [file or directory] -e, --environment [ENV] run tests in the ENV environment Filter options: You can run a single test by appending the line number to filename: bin/rails test test/models/user_test.rb:27 -n, --name [NAME] Only run tests matching NAME -p, --pattern [PATTERN] Only run tests matching PATTERN Output options: -b, --backtrace show the complte backtrace Common options: -h, --help Show this message
特定のファイルだけではなく、特定の行数だけのテスト等も実施可能になっているようです。便利そう。
method_source needs to be a hard dependency on railties
railties/railties.gemspec
の修正です。
add_dependency
にmethod_source
を追加しています。上記で追加されたrails test
コマンドでmethod_source
を使用しているので、依存関係に追加しています。
Fix test rake when passing multiple arguments
railties/lib/rails/test_unit/testing.rake
の修正です。
rake
コマンドの引数に複数の値をしてした場合にRails::TestRunner.run
メソッドがエラーになってしまっていたのを修正しています。
Use absolute path on find_method location for the runner
railties/lib/rails/test_unit/runner.rb
の修正です。
指定されたメソッドを定義されたファイル名を、絶対パスで保持するよう修正しています。
add foreign_key option to result of references column type [ci skip]
rails guideのActive Record Migrations
の修正です。
references
カラムを指定した場合の実行結果のexampleに、foreign_key: true
オプションを追加しています。
Add a foreign_key
option to references
and add_reference
.の対応により、references
にforeign_key
オプションが指定可能になり、generatorが生成する結果も変更になっているので、現状の修正内容と合うよう修正しています。
Updated MySQL documentation link for STRICT_ALL_TABLES
activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
のdocの修正です。
STRICT_ALL_TABLES
についての参考URLをhttp://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
から http://dev.mysql.com/doc/refman/5.6/en/sql-mode.html
に修正しています。