aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #29520 from kirs/serialize-vs-postgres-native-columnSean Griffin2017-08-043-0/+42
|\ | | | | Do not let use `serialize` on native JSON/array column
| * Do not let use `serialize` on native JSON/array columnKir Shatrov2017-08-043-0/+42
| |
* | Merge pull request #30058 from ↵Rafael França2017-08-041-1/+5
|\ \ | | | | | | | | | | | | y-yagi/use_assert_nil_if_value_is_nil_in_assert_field_default_value_ Use `assert_nil` if `value` is nil in `assert_field_default_value`
| * | Use `assert_nil` if `value` is nil in `assert_field_default_value`yuuji.yaginuma2017-08-031-1/+5
| | | | | | | | | | | | | | | It is deprecate to specify nil for expect argument of `assert_equal`. Ref: https://github.com/seattlerb/minitest/commit/922bc9151a622cb3ef0b9f170aa09c3bb72c7eb8
* | | Merge pull request #30069 from kamipo/use_concurrent_map_than_mutexSean Griffin2017-08-042-10/+6
|\ \ \ | | | | | | | | Use `Concurrent::Map` than `Mutex` and `Mutex_m` for statement caches
| * | | Use `Concurrent::Map` than `Mutex` and `Mutex_m` for statement cachesRyuta Kamizono2017-08-042-10/+6
| | | | | | | | | | | | | | | | | | | | Statement caches are used as a concurrent map. It will more clarify to using `Concurrent::Map`.
* | | | Merge pull request #30022 from y-yagi/remove_extra_empty_lineEileen M. Uchitelle2017-08-041-1/+5
|\ \ \ \ | |/ / / |/| | | Remove extra empty line
| * | | Remove extra empty lineyuuji.yaginuma2017-08-021-1/+5
| | | |
* | | | Merge pull request #30052 from y-yagi/deprecate_load_error_regexpsSean Griffin2017-08-031-7/+0
|\ \ \ \ | | | | | | | | | | Deprecate `LoadError::REGEXPS` constant
| * | | | Remove unused `LoadError::REGEXPS` constantyuuji.yaginuma2017-08-041-7/+0
| | | | | | | | | | | | | | | | | | | | since 4ad1a52, `LoadError::REGEXPS` is no longer needed.
* | | | | Fix all rubocop violationsRafael Mendonça França2017-08-033-3/+4
| | | | |
* | | | | Merge pull request #29967 from naw/binstub-error-msgRichard Schneeman2017-08-031-5/+16
|\ \ \ \ \ | |/ / / / |/| | | | Improve bundler binstub error message
| * | | | Revise bundle binstub error messageNathan Wenneker2017-08-031-8/+13
| | | | |
| * | | | Improve bundler binstub error messageNathan Wenneker2017-07-261-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge pull request #30050 from ↵Sean Griffin2017-08-036-32/+31
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | kamipo/dont_pass_connection_to_statement_cache_execute Passing `klass` to `StatementCache.new`
| * | | | | Passing `klass` to `StatementCache.new`Ryuta Kamizono2017-08-046-32/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Add backticks around String#camelizeRyuta Kamizono2017-08-041-2/+2
|/ / / / / | | | | | | | | | | | | | | | [ci skip]
* | | | | Merge pull request #30011 from guilherme/fix-migration-generator-special-casesSean Griffin2017-08-032-1/+23
|\ \ \ \ \ | | | | | | | | | | | | Handling add/remove to/from migration edge cases
| * | | | | Handling add/remove to/from migration edge casesGuilherme Reis Campos2017-08-032-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | Making sure the table name is parsed correctly when an add/remove column migration have 'from'/'to' in the table name.
* | | | | | Merge pull request #30039 from ricardotk002/fix-string-camelize-invalid-optionSean Griffin2017-08-033-0/+26
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | Update String#camelize to provide feedback when a wrong option is sent
| * | | | | Fix changelog formatSean Griffin2017-08-031-1/+0
| | | | | |
| * | | | | Update String#camelize to provide feedback when wrong option is passedRicardo Díaz2017-08-023-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Merge pull request #29984 from colorfulfool/form-helpers-unicode-sanitizationRafael França2017-08-022-1/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | Allow non-English values for collection_radio_buttons
| * | | | | | Allow non-English values for collection_radio_buttons/check_boxescolorfulfool2017-08-022-1/+15
| | | | | | |
* | | | | | | Merge pull request #29958 from znz/file-nullMatthew Draper2017-08-025-5/+5
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Use File::NULL instead of "/dev/null"
| * | | | | | | Use File::NULL instead of "/dev/null"Kazuhiro NISHIYAMA2017-07-315-5/+5
| | |_|/ / / / | |/| | | | |
* | | | | | | Merge pull request #29914 from ↵Matthew Draper2017-08-023-19/+30
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/relation_merger_should_not_fill_empty_values `Relation::Merger` should not fill `values` with empty values
| * | | | | | | `get_value` and `set_value` in `Relation` are no longer used externallyRyuta Kamizono2017-07-251-9/+10
| | | | | | | |
| * | | | | | | `Relation::Merger` should not fill `values` with empty valuesRyuta Kamizono2017-07-252-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | Merge pull request #29842 from kamipo/fix_find_by_with_rangeMatthew Draper2017-08-023-4/+12
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix `find_by` with range conditions
| * | | | | | | | Fix `find_by` with range conditionsRyuta Kamizono2017-07-203-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `StatementCache` doesn't support range conditions. So we need to through the args to `FinderMethods#find_by` if range value is passed.
* | | | | | | | | Merge pull request #29271 from rails/unlock-minitestKasper Timm Hansen2017-08-0222-75/+105
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Unlock minitest for Rails' test suite
| * \ \ \ \ \ \ \ \ Merge remote-tracking branch 'origin/master' into unlock-minitestRafael Mendonça França2017-08-012023-2034/+16833
| |\ \ \ \ \ \ \ \ \ | | | |_|_|_|/ / / / | | |/| | | | | | |
| * | | | | | | | | Merge pull request #29995 from y-yagi/fix_test_runner_outputKasper Timm Hansen2017-07-302-2/+2
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fix test runner's output
| | * | | | | | | | | Fix test runner's outputyuuji.yaginuma2017-07-302-2/+2
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | | | Merge pull request #29823 from y-yagi/fix_record_not_unique_errorKasper Timm Hansen2017-07-171-20/+20
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Move `reset_pk_sequence!` test to `AdapterTestWithoutTransaction`
| | * | | | | | | | | Move `reset_pk_sequence!` test to `AdapterTestWithoutTransaction`yuuji.yaginuma2017-07-171-20/+20
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | | | Merge pull request #29808 from ↵Kasper Timm Hansen2017-07-161-0/+2
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | y-yagi/reset_colun_information_after_schema_changed Reset column information after schema changed
| | * | | | | | | | | Reset column information after schema changedyuuji.yaginuma2017-07-161-0/+2
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following failures. https://travis-ci.org/rails/rails/jobs/253990014
| * | | | | | | | | Merge pull request #29380 from ↵Kasper Timm Hansen2017-07-151-0/+4
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | y-yagi/insert_environment_value_to_table_before_check_environment Insert environment value to `InternalMetadata` table before check environment
| | * | | | | | | | | Insert environment value to `InternalMetadata` after recreating the tableyuuji.yaginuma2017-06-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | | | | Stupid empty line added after merge.Kasper Timm Hansen2017-07-151-1/+0
| | | | | | | | | | |
| * | | | | | | | | | Bump minitest; Use double quotesKasper Timm Hansen2017-07-152-2/+2
| | | | | | | | | | |
| * | | | | | | | | | Merge branch 'master' into unlock-minitestKasper Timm Hansen2017-07-151037-3778/+6367
| |\ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ Merge pull request #29479 from yahonda/unlock-minitest_mysql_booleanRafael França2017-06-161-0/+7
| |\ \ \ \ \ \ \ \ \ \ \ | | |_|/ / / / / / / / / | |/| | | | | | | | | | Add teardown to reset_connection at MysqlTypeLookupTest
| | * | | | | | | | | | Add teardown to reset_connection at MysqlTypeLookupTestYasuo Honda2017-06-071-0/+7
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to address `Mysql2BooleanTest#test_column_type_without_emulated_booleans` failure
| * | | | | | | | | | Merge pull request #29359 from y-yagi/load_schema_before_assertionMatthew Draper2017-06-061-0/+6
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Load schema before assertion
| | * | | | | | | | | | Load schema before assertionyuuji.yaginuma2017-06-061-0/+6
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
| * | | | | | | | | | Merge pull request #29341 from y-yagi/explicitly_clear_type_map_before_run_testMatthew Draper2017-06-042-10/+12
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Explicitly clear type map before run `test_only_reload_type_map_once_for_every_unknown_type`
| | * | | | | | | | | | Explicitly clear type map before run ↵yuuji.yaginuma2017-06-032-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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.