| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Deprecate `LoadError::REGEXPS` constant
|
| |
| |
| |
| | |
since 4ad1a52, `LoadError::REGEXPS` is no longer needed.
|
| | |
|
|\ \
| |/
|/| |
Improve bundler binstub error message
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rails displays an error message if you have a bundler-generated binstub
at `./bin/rails` instead of a Rails-generated binstub.
This error message is misleading because it makes it seem as though
Rails 5 introduced recent changes in how binstubs are used, when these
changes were actually introduced way back in Rails 4.
The suggested upgrade steps are appropriate for an app that was created
in Rails 3, but they likely aren't the correct fix for someone who sees
this error message today on a modern app. I believe the `--binstubs`
option on bundler is a more likely culprit and troubleshooting path.
|
|\ \
| | |
| | |
| | |
| | | |
kamipo/dont_pass_connection_to_statement_cache_execute
Passing `klass` to `StatementCache.new`
|
| | |
| | |
| | |
| | |
| | |
| | | |
Actually `StatementCache#execute` is always passed the same klass that
the owner klass of the connection when the statement cache is created.
So passing `klass` to `StatementCache.new` will make more DRY.
|
|/ /
| |
| |
| | |
[ci skip]
|
|\ \
| | |
| | | |
Handling add/remove to/from migration edge cases
|
| | |
| | |
| | |
| | | |
Making sure the table name is parsed correctly when an add/remove column migration have 'from'/'to' in the table name.
|
|\ \ \
| | | |
| | | | |
Update String#camelize to provide feedback when a wrong option is sent
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
String#camelize was returning nil without any feedback when an
invalid option was passed as parameter. This update makes the method
to raises an ArgumentError when the option passed is invalid, similar
to what Ruby does for String#downcase (and others) in 2.4.1.
https://ruby-doc.org/core-2.4.1/String.html#method-i-downcase
|
|\ \ \ \
| | | | |
| | | | | |
Allow non-English values for collection_radio_buttons
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Use File::NULL instead of "/dev/null"
|
| | |_|/ /
| |/| | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
kamipo/relation_merger_should_not_fill_empty_values
`Relation::Merger` should not fill `values` with empty values
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Currently `Relation#merge` will almost fill `values` with empty values
(e.g. `other.order_values` is always true, it should be
`other.order_values.any?`). This means that `Relation#merge` always
changes `values` even if actually `values` is nothing changed. This
behavior will makes `Relation#empty_scope?` fragile. So `Relation#merge`
should avoid unnecessary changes.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix `find_by` with range conditions
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`StatementCache` doesn't support range conditions. So we need to through
the args to `FinderMethods#find_by` if range value is passed.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Unlock minitest for Rails' test suite
|
| |\ \ \ \ \ \ \
| | | |_|_|_|/ /
| | |/| | | | | |
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix test runner's output
|
| |/ / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Output changed due to specification change of `SummaryReporter#aggregated_results`
in minitest 5.10.2.
In my opinion, that should fix rails's test runner(proceeding with #29354).
However, we still need discussion and the fix itself is minor, so I think
that we can fix only the test first.
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Move `reset_pk_sequence!` test to `AdapterTestWithoutTransaction`
|
| |/ / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
If execute PostgreSQL test with specifying 53853 for seed, the following
error will occur.
```
1) Error:
TransactionTest#test_restore_custom_primary_key_after_rollback:
ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "movies_pkey"
DETAIL: Key (movieid)=(2) already exists.
: INSERT INTO "movies" ("name") VALUES ($1) RETURNING "movieid"
```
travis is here https://travis-ci.org/rails/rails/jobs/254095918
As with #29287, it seems like a problem that the value of primary key
obtained from connection gets different.
Therefore, fixed to execute that test within transaction.
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
y-yagi/reset_colun_information_after_schema_changed
Reset column information after schema changed
|
| |/ / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This fixes the following failures.
https://travis-ci.org/rails/rails/jobs/253990014
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
y-yagi/insert_environment_value_to_table_before_check_environment
Insert environment value to `InternalMetadata` table before check environment
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Sometimes `ActiveRecord::DatabaseTasksUtilsTask#test_raises_an_error_when_called_with_protected_environment`
test fails.
https://travis-ci.org/rails/rails/jobs/238861562
https://travis-ci.org/rails/rails/jobs/239950092
There seems to be an error because `environment` value is not exist.
This is because did not set the environment after recreating the
table in `SchemaMigrationsTest#test_initializes_internal_metadata_for_encoding_utf8mb4`.
Therefore, we create value after the test to maintain the original state.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| |\ \ \ \ \ \ \ \ |
|
| |\ \ \ \ \ \ \ \ \
| | |_|/ / / / / / /
| |/| | | | | | | | |
Add teardown to reset_connection at MysqlTypeLookupTest
|
| |/ / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
to address `Mysql2BooleanTest#test_column_type_without_emulated_booleans`
failure
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Load schema before assertion
|
| |/ / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Without this, test fails because the load schema when pluck is executed.
Steps to reproduce:
```
bin/test -a postgresql -w --seed 61689 test/cases/*test.rb -n "/^(?:InheritanceComputeTypeTest#(?:test_inheritance_new_with_subclass_as_default)|CalculationsTest#(?:test_pluck_loaded_relation))$/"
# Running:
.F
Failure:
CalculationsTest#test_pluck_loaded_relation [/home/yaginuma/program/rails/master_y_yagi/rails/activerecord/test/cases/calculations_test.rb:722]:
1 instead of 0 queries were executed.
Queries:
SELECT c.relname FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE n.nspname = ANY (current_schemas(false)) AND c.relname = 'companies' AND c.relkind IN ('r','v','m').
Expected: 0
Actual: 1
bin/test test/cases/calculations_test.rb:7
```
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Explicitly clear type map before run `test_only_reload_type_map_once_for_every_unknown_type`
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
`test_only_reload_type_map_once_for_every_unknown_type`
Currently, the following test fails.
```
bin/test -a sqlite3_mem --seed 37473 test/cases/relation_test.rb
```
This is due to reset connection in `test_respond_to_for_non_selected_element` postprocessing.
This reset is added with #29332 for `test_only_reload_type_map_once_for_every_unknown_type`.
Since the above test expects the type map to be empty at the time of
test run, I think that it is better to empty the type map before test run.
|
| |/ / / / / / / / |
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Clean up `type_map` at the end of test_respond_to_for_non_selected_element
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
`test_only_reload_type_map_once_for_every_unknown_type` expects no
one already registers unknown OID to `type_map`. However,
`test_respond_to_for_non_selected_element` registers it and does not clean up it.
Addresses #29331 at unlock-minitest branch
|
| |\ \ \ \ \ \ \ \ \
| | |/ / / / / / / /
| |/| | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Use existing class in PersistenceTest::SaveTest
|
| |/ / / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Creating a new class for widgets was causing failing tests because it
clashed with other widget classes. This test does not need to create its
own class, so I changed it to an existing class.
```
ARCONN=mysql2 bin/test --seed 25364 test/cases/*test.rb -n \
"/^(?:PrimaryKeyIntegerTest#(?:test_primary_key_with_serial_integer_are_automatically_numbered)|PersistenceTest::SaveTest#(?:test_save_touch_false))$/"
```
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Fix random minitest error: database_statements_test
|