| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* Add test case for open-ended range.
* Add test case for numeric range for string column.
|
|
|
|
|
|
|
|
|
| |
BC dates are supported by both date and datetime types.
https://www.postgresql.org/docs/current/static/datatype-datetime.html
Since #1097, new datetime allows year zero as 1 BC, but new date does
not. It should be allowed even in new date consistently.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The values infinity and -infinity are supported by both date and
timestamp types.
https://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-DATETIME-SPECIAL-TABLE
And also, it can not be known whether a value is infinity correctly
unless cast a value.
I've added `QueryAttribute#infinity?` to handle that case.
Closes #27585.
|
|
|
|
|
| |
Since #32028, Rails 6 requires Ruby 2.3+.
No longer needed workaround for Ruby 2.2 "private attribute?" warning.
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 16f279ebd474626577ced858e3626ac4535a33df, reversing
changes made to 6c6a30a7c357ce1eafa093d77d2b08684fe50887.
The config can be named anything, not just default (although all
generated apps will be named default). We can't just delete configs that
don't have a database because that will break three-tier configs. Oh
well.
|
|
|
|
|
|
|
|
|
| |
SQLServerAdapter (gem `activerecord-sqlserver-adapter`) uses square
brackets for quoting column names (e.g. `[id]`). Those brackets must not
be misinterpreted in regular expressions.
Failure:
Expected /SELECT [developers].[id].* FROM developers/ to match "SELECT [developers].[id], [developers].[name], [developers].[salary], [developers].[firm_id], [developers].[mentor_id], [developers].[created_at], [developers].[updated_at], [developers].[created_on], [developers].[updated_on] FROM developers".
|
| |
|
|
|
|
|
| |
We should call methods with `.method_name` not `::method_name`. Fix two
instances of `YAML::load` I found in favor of `YAML.load`.
|
|\
| |
| | |
Delete default configuration
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Fixes #32021.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
3acc5d6 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.
|
| |
| |
| |
| |
| |
| | |
This reverts commit cf4f05a7d4a2051cf3593bc7c3a6a216e74e797a.
Since Rails 6 requires Ruby 2.4.1+.
|
| |
| |
| |
| |
| |
| | |
Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug.
References #32028
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Global ignores at toplevel .gitignore
* Component-specific ignores in each toplevel directory
* Remove `actionview/test/tmp/.keep` for JRuby
```
rm actionview/test/tmp/ -fr
cd actionview/
bundle exec jruby -Itest test/template/digestor_test.rb
```
Related to #11743, #30392.
Closes #29978.
|
| |
| |
| |
| | |
Closes #31998
|
| |
| |
| |
| |
| |
| | |
Some attr_readers should be `protected` instead of `private`
See https://travis-ci.org/rails/rails/builds/342800276
|
| | |
|
| | |
|
| |
| |
| |
| | |
References 89bcca5
|
| |
| |
| |
| | |
References 89bcca59e91fa9da941de890012872e8288e77b0
|
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Rails 6 will only support Ruby >= 2.3.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
| |
Add #create_or_find_by to lean on unique constraints
|
|
|
|
| |
[ci skip]
|
| |
|
|\
| |
| |
| |
| | |
mohsen-alizadeh/sanitize_empty_and_nil_parameters_passed_to_select
sanitize empty and nil parameters to select #31059
|
| | |
|
| | |
|
| | |
|
| |
| |
| | |
* Add Relation#pick as short-hand for single-value plucks
|
|\ \
| | |
| | |
| | | |
Fix marshaling of models with `has_many :through` associations
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
https://travis-ci.org/rails/rails/jobs/338338927#L1043
Related to daf15f58b943d85d8fb726590ae94f77ca0a5d5f
|
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 487a1061cc496455dfe5ee84d1e49d509c1675b5.
This `#--` is necessary for the doc of `distinct`.
[ci skip]
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Followup to b988ecb, when I cherry-picked from my parallel testing
branch I didn't realize `drop` wasn't part of the commit.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since #29572, test runner will be loaded as minitest's plugin.
Therefore, if specify a value in `Minitest.extensions` before the Minitest
initialization process, the extension will not load and the test runner will
not work.
https://github.com/seattlerb/minitest/blob/44eee51ed9716c789c7cea8a90c131cf736b8915/lib/minitest.rb#L86
Also, load processing of adapter is done before minitest option processing,
so set the adapter in the file so that the `-a` option works.
|
| |
| |
| |
| | |
@connection.more_results?`
|
| |
| |
| |
| |
| |
| | |
These are internally used only.
[ci skip]
|
| | |
|
| |
| |
| |
| | |
:tada::tada::tada:
|
| | |
|
|\ \
| | |
| | | |
Dump correctly index nulls order for PostgreSQL
|
| | | |
|
|\ \ \
| | | |
| | | | |
Avoid extra calls to to_s
|