- 22 2月, 2018 2 次提交
-
-
由 eileencodes 提交于
We should call methods with `.method_name` not `::method_name`. Fix two instances of `YAML::load` I found in favor of `YAML.load`.
-
由 eileencodes 提交于
Because of this default configuration we're constantly checking if the database exists when looping through configurations. This is unnecessary and we should just delete it before we need to loop through configurations.
-
- 19 2月, 2018 1 次提交
-
-
由 yuuji.yaginuma 提交于
Fixes #32021.
-
- 18 2月, 2018 6 次提交
-
-
由 Ryuta Kamizono 提交于
3acc5d6e was changed the order of scope evaluation from through scope to the association's own scope to be prioritized over the through scope. But the sorting order will be prioritized that is evaluated first. It is unintentional effect, association scope's sorting order should be prioritized as well. Fixes #32008.
-
由 Ryuta Kamizono 提交于
This reverts commit cf4f05a7. Since Rails 6 requires Ruby 2.4.1+.
-
由 Jeremy Daer 提交于
Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
-
由 Eddie Lebow 提交于
Closes #31998
-
由 bogdanvlviv 提交于
Some attr_readers should be `protected` instead of `private` See https://travis-ci.org/rails/rails/builds/342800276
-
由 Jeremy Daer 提交于
-
- 17 2月, 2018 3 次提交
-
-
由 Rafael Mendonça França 提交于
References 89bcca59
-
由 Jeremy Daer 提交于
References 89bcca59
-
由 Rafael Mendonça França 提交于
Some places we can't remove because Ruby still don't have a method equivalent to strip_heredoc to be called in an already existent string.
-
- 16 2月, 2018 1 次提交
-
-
由 eileencodes 提交于
Provides both a forked process and threaded parallelization options. To use add `parallelize` to your test suite. Takes a `workers` argument that controls how many times the process is forked. For each process a new database will be created suffixed with the worker number; test-database-0 and test-database-1 respectively. If `ENV["PARALLEL_WORKERS"]` is set the workers argument will be ignored and the environment variable will be used instead. This is useful for CI environments, or other environments where you may need more workers than you do for local testing. If the number of workers is set to `1` or fewer, the tests will not be parallelized. The default parallelization method is to fork processes. If you'd like to use threads instead you can pass `with: :threads` to the `parallelize` method. Note the threaded parallelization does not create multiple database and will not work with system tests at this time. parallelize(workers: 2, with: :threads) The threaded parallelization uses Minitest's parallel exector directly. The processes paralleliztion uses a Ruby Drb server. For parallelization via threads a setup hook and cleanup hook are provided. ``` class ActiveSupport::TestCase parallelize_setup do |worker| # setup databases end parallelize_teardown do |worker| # cleanup database end parallelize(workers: 2) end ``` [Eileen M. Uchitelle, Aaron Patterson]
-
- 15 2月, 2018 2 次提交
-
-
由 David Heinemeier Hansson 提交于
Add #create_or_find_by to lean on unique constraints
-
由 T.J. Schuck 提交于
[ci skip]
-
- 10 2月, 2018 2 次提交
-
-
由 yuuji.yaginuma 提交于
-
由 David Heinemeier Hansson 提交于
* Add Relation#pick as short-hand for single-value plucks
-
- 08 2月, 2018 1 次提交
-
-
由 fatkodima 提交于
-
- 07 2月, 2018 2 次提交
-
-
由 Ryuta Kamizono 提交于
This reverts commit 487a1061. This `#--` is necessary for the doc of `distinct`. [ci skip]
-
由 schneems 提交于
-
- 06 2月, 2018 3 次提交
-
-
由 Ryuta Kamizono 提交于
Currently `_default_attributes` doesn't work unless `load_schema` is called before. The `MissingAttributeError` is caused by `reload_schema_from_cache` is invoked by `serialize`. I added `load_schema` in `_default_attributes` to `_default_attributes` works without any dependency like `attribute_types` etc. Closes #31905.
-
由 eileencodes 提交于
Followup to b988ecb9, when I cherry-picked from my parallel testing branch I didn't realize `drop` wasn't part of the commit.
-
由 eileencodes 提交于
You could use the `VERBOSE` env var to turn off output for migrations tasks but you couldn't use it for other tasks. This change moves the `verbose?` check to a method so we can also use it in create and drop respectively. tenderlove and I noticed this as part of the ongoing work in parallel testing. When the parallel tests boot the app needs to create new databases for each worker. The output from these is unnecessary but there was previously no way to turn it off. Now if `VERBOSE=false` is passes to `bin/rails db:create` the text "Created blah blah db" will no longer be output.
-
- 04 2月, 2018 2 次提交
-
-
由 Ryuta Kamizono 提交于
Prefer `@connection.abandon_results!` than `@connection.next_result while @connection.more_results?`
-
由 Ryuta Kamizono 提交于
These are internally used only. [ci skip]
-
- 31 1月, 2018 2 次提交
-
-
由 Yuji Yaginuma 提交于
-
由 Rafael Mendonça França 提交于
:tada::tada::tada:
-
- 30 1月, 2018 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 29 1月, 2018 9 次提交
-
-
由 Ryuta Kamizono 提交于
This can not expand an array of aggregated objects correctly, and is no longer used internally since 159b21b5.
-
由 Daniel Colson 提交于
With #31615 `type_for_attribute` accepts either a symbol as well as a string. `has_attribute?` and `attribute_alias` also accept either. Since these methods call `to_s` on the argument, we no longer need to do that at the call site.
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
This reverts commit 755f7b58, reversing changes made to 35db4603. Originally `mapping: %w(balance amount)` is correct mapping example. Closes #31346. [Ryuta Kamizono & bogdanvlviv] [ci skip]
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
Follow up of #31724. If `composed_of` objects have multiple mappings, array predicate handler can not correctly handle the expanded condition. We need to handle it like polymorphic association objects.
-
由 Ryuta Kamizono 提交于
-
由 fatkodima 提交于
-
- 28 1月, 2018 1 次提交
-
-
由 Yasuo Honda 提交于
-
- 26 1月, 2018 2 次提交
-
-
由 Daniel Colson 提交于
-
由 Ryuta Kamizono 提交于
Since #29504, mysql2 adapter lost ability to insert zero value on primary key due to enforce `NO_AUTO_VALUE_ON_ZERO` disabled. That is for using `DEFAULT` on auto increment column, but we can use `NULL` instead in that case.
-