2017/01/18分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Install Byebug gem as default in Windows (mingw and x64_mingw) platform.
- Initialize git repo when generating new app, if option
--skip-git
is not provided.
Merge pull request #27700 from kenta-s/remove-meaningless-line-from-adapter-test
activerecord/test/cases/adapter_test.rb
の修正です。
不要な変数の初期化処理を削除しています。
Move config reset to ensure block
railties/test/generators/migration_generator_test.rb
の修正です。
Rails.application.config.paths["db/migrate"]
に任意のpathを指定した場合のテストで、Rails.application.config.paths["db/migrate"]
を元の値に戻す処理をensure
節で行うよう修正しています。
Move config reset to ensure block
railties/test/generators/model_generator_test.rb
の修正です。
Rails.application.config.paths["db/migrate"]
に任意のpathを指定した場合のテストで、Rails.application.config.paths["db/migrate"]
を元の値に戻す処理をensure
節で行うよう修正しています。
Use appropriate assertion based on expectation
activesupport/test/json/decoding_test.rb
の修正です。
JSONのテストで、assert_equal
メソッドのexpected引数にnilを指定していたテストを、assert_nil
を使用するよう修正しています。
Minitest 5.10から上記使い方がdeprecateになり、nilを期待する場合はassert_nil
が使用する必要がある為。
Remove unused variable 'regex'
actionview/lib/action_view/helpers/text_helper.rb
の修正です。
excerpt
メソッドから不要な代入処理を削除しています。
Merge pull request #27717 from JunichiIto/fix-byebug-platform
railties/lib/rails/generators/rails/app/templates/Gemfile
の修正です。
rails new
で生成されるGemfile
で、Windows環境でもbyebug
がインストールされるよう修正しています。byebug
はWindowsでも動作する為、との事です。
Merge pull request #27697 from toshimaru/rubocop-update
.rubocop.yml
、Gemfile
の修正です。
Gemfile
のバージョンを0.47
に更新、及びdeprecatedになったAlignWith
の代わりにEnforcedStyleAlignWith
を使用するよう修正しています。
rubocopのルールに違反していた箇所をまとめて修正しています。
Active Recordの修正です。
ActiveRecord::ConnectionAdapters::SchemaStatements
moduleからinitialize_schema_migrations_table
、initialize_internal_metadata_table
メソッドを削除しています。
それぞれActiveRecord::SchemaMigration.create_table
、ActiveRecord::InternalMetadata.create_table
を呼び出しているだけで、メソッド経由ではなく直接呼びだせば良いだろう、という事で削除されたようです。
Merge pull request #27706 from y-yagi/allow_to_pass_describe_option_to_rake
railties/lib/rails/command.rb
、railties/lib/rails/command/base.rb
の修正です。
bin/rails -D
コマンドを実行した場合にrailsのヘルプが表示されるようになっていたのを、Rails 5.0.1と同様にrake taskのdescrpitonが表示されるよう修正しています。
Adjust Module.parent_name
to work when frozen; fixes #27637
activesupport/lib/active_support/core_ext/module/introspection.rb
の修正です。
freeze済みのクラスに対してparent_name
メソッドを呼び出した場合に、RuntimeErrorになっていたのを、値が正しく取得出来るよう修正しています。
class A class B end end A::B.freeze # => A::B # before A::B.parent_name # => RuntimeError: can't modify frozen #<Class:A::B> # after A::B.parent_name # "A"
Add channel_prefix support to ActionCable redis/evented_redis adapters.
Action Cableの修正です。
redis/evented_redis adapterを使用している場合に、configファイルからchannel名にprefixをつけれるよう修正しています。prefixを指定したい場合は、config/cable.yml
のchannel_prefix
に指定すればOKです。
# config/cable.yml production: adapter: redis url: redis://localhost:6379/1 channel_prefix: myapp_production
Update ActionCable guide to better describe SubscriptionAdapter configuration.
rails guideのAction Cable Overview
の修正です。
Adapter Configuration
の項を追加し、各adapter(Async Adapter
、Redis Adapter
及びPostgreSQL adapter
)についての説明を追加しています。
Merge pull request #27688 from kenta-s/add-test-for-safe_join
actionview/test/template/output_safety_helper_test.rb
の修正です。
safe_join
メソッドに第二引数を指定しなかった場合のテストを追加しています。
Merge pull request #27693 from kenta-s/improve-to_sentence-method
actionview/lib/action_view/helpers/output_safety_helper.rb
の修正です。
to_sentence
メソッドでsafe_join
メソッドを使用する際に、第二引数にnil
を指定するよう修正しています。
- safe_join([safe_join(array[0...-1], options[:words_connector]), options[:last_word_connector], array[-1]]) + safe_join([safe_join(array[0...-1], options[:words_connector]), options[:last_word_connector], array[-1]], nil)
引数を指定しない場合、$,
がセパレータとして使用されてしまい、$,
の状態により予期せぬ結果が返ってきてしまう可能性がある為、それを避ける為に明示的にnil
を指定するようにしています。
Merge pull request #27665 from kenta-s/improve-compute_asset_extname
actionview/lib/action_view/helpers/asset_url_helper.rb
の修正です。
compute_asset_extname
メソッドでasset pathに追加するextnameが無い場合に、明示的にnilを返すようelse句を追加しています。
Merge pull request #27653 from s-jcs/feature/adjust_indentation_for_generator
railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
の修正です。
rails new
で生成されるproduction.rb
内でインデントがずれている箇所があったのを修正しています。
Merge pull request #27632 from dixpac/repo_initialize
railties/lib/rails/generators/rails/app/app_generator.rb
の修正です。
rails new
コマンドで新規railアプリを作成する際、git init
も合わせて実行するよう修正しています。
activesupport/test/evented_file_update_checker_test.rb
の修正です。
使用していないrm_f
メソッドを削除しています。
Unused class for testing since 93559da4826546d07014f8cfa399b64b4a143127
activesupport/test/core_ext/kernel_test.rb
の修正です。
使用していないMockStdErr
クラスを削除しています。
:warning: "Use assert_nil if expecting nil. This will fail in MT6."
assert_equal
メソッドを使用している、かつ、expected引数にnilが来る可能性のあるテストを、引数がnilの場合はassert_nil
を使用するよう修正しています。
update links of pluralization in i18n guide
rails guideのRails Internationalization (I18n) API
の修正です。
plural formsについてのリンクを、http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html から http://cldr.unicode.org/index/cldr-spec/plural-rules に修正しています。
cldr-tmp の方はもう使用されていない為。
Merge pull request #27722 from y-yagi/follow_up_to_b1c08d8
railties/lib/rails/tasks.rb
の修正です。
自動でloadするrake taskの一覧にyarn.rake
を追加しています。
I guess we're ready for the randomized tests now
Gemfile
、Gemfile.lock
の修正です。
minitest
gemのバージョンロックを削除しています。
rails自体のテストをランダムに実行するとテストがコケてしまう事がある為、ランダムに実行しないようにする為に5.3.4
未満にminitest
のバージョンをロックしていました。が、もうランダムに実行しても大丈夫だろう、という事でバージョンロックを削除しています。
しかしやはりまだ駄目で、テストがコケてしまう為後ほどrevertされています。
:warning: "Use assert_nil if expecting nil. This will fail in MT6."
actionpack/test/dispatch/ssl_test.rb
の修正です。
assert_equal
メソッドを使用している、かつ、expected引数にnilが来る可能性のあるテストを、引数がnilの場合はassert_nil
を使用するよう修正しています。
Revert "I guess we're ready for the randomized tests now"
minitest
gemのバージョンロックを削除した、 I guess we're ready for the randomized tests nowをrevertしています。
テストをランダムに実行するとまだコケてしまうテストがある為。
Merge pull request #27726 from kenta-s/fix-grammar-in-partial_renderer
actionview/lib/action_view/renderer/partial_renderer.rb
のdocの修正です。
ActionView::PartialRenderer
クラスのdoc内のグラマーの修正を行っています。
Make sure to clear query cache to prevent sporadic test failure
activerecord/test/cases/query_cache_test.rb
の修正です。
query cacheのテストで、テストの後処理でquery cacheをclearするようにしています。ランダムにコケるテストがあり、その対応の為との事です。
assert_send is going to be deprecated since minitest 5.10.0
activerecord/test/cases/adapters/postgresql/infinity_test.rb
、
activerecord/test/cases/adapters/postgresql/numbers_test.rb
の修正です。
minitest 5.10.0でdeprecateになったassert_send
を使用している箇所があったのを、assert_send
を使用しないよう修正しています。
only enhance when assets:precompile
task is defined
railties/lib/rails/tasks/yarn.rake
の修正です。
assets:precompile
taskが定義されている場合のみ、assets:precompile
taskの実行前にyarn:install
を呼び出すようにしています。
Remove TODOs related to Exceptron [ci skip]
actionview/lib/action_view/renderer/streaming_template_renderer.rb
のdocの修正です。
現状不要になっているexceptron
gemに関連したコメントを削除しています。