aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #30520 from rails/railties-rails-commandMatthew Draper2017-09-0521-289/+339
|\ | | | | Run in-app rails commands via fork+load where possible
| * Run in-app rails commands via fork+load where possibleMatthew Draper2017-09-0421-289/+339
| | | | | | | | | | While this avoids shell argument parsing, we still pass through everything in our stack.
* | Don't pass unneeded `reflection` to `add_constraints`Ryuta Kamizono2017-09-051-3/+3
| | | | | | | | Because `refl.scope` is the same meaning with `chain_head.scope`.
* | Merge pull request #30517 from y-yagi/fix_30516Kasper Timm Hansen2017-09-042-0/+7
|\ \ | | | | | | Explicitly require `test_unit/reporter`
| * | Explicitly require `test_unit/reporter` in test helperyuuji.yaginuma2017-09-042-0/+7
| |/ | | | | | | | | | | | | | | | | | | | | If the user used the `bin/test` to execute the test, this file is automatically loaded, so require is unnecessary. https://github.com/rails/rails/blob/acea68de026ba657cb65c4dd0fc1f24ba67e1cf8/railties/lib/rails/plugin/test.rb#L4 However, when using `rake test`, an explicit require is required because the above file is not loaded. Fixes #30516
* | Merge pull request #30407 from assain/document-expiry-metadata-support-cookiesKasper Timm Hansen2017-09-042-4/+28
|\ \ | | | | | | Add Documentation For Duration Support & Expiry Meta Data Added to Signed / Encrypted Cookies
| * | This commit adds:Assain2017-09-042-4/+28
| |/ | | | | | | | | | | | | | | * Documentation for Duration support added to signed/encrypted cookies * Changelog entries for the duration support and expiry metadata added to cookies [ci skip]
* | Assigning `values` is only necessary when `reflection_scope.where_clause` is ↵Ryuta Kamizono2017-09-051-1/+1
| | | | | | | | | | | | not empty Because `reflection_scope.values` will create extra new hash.
* | Don't merge `reflection_scope` if `reflection.scope` isn't givenRyuta Kamizono2017-09-051-1/+1
| | | | | | | | | | If `reflection.scope` isn't given, `reflection_scope` is always `klass.unscoped`. it is unnecessary to merge it.
* | Should quote composite primary key namesRyuta Kamizono2017-09-042-2/+12
|/ | | | | | | Otherwise using reserved words as composite primary key names will be failed as an invalid SQL. Fixes #30518.
* Don't need the layout hereMatthew Draper2017-09-041-0/+2
|
* Preload some additional specific filesMatthew Draper2017-09-041-0/+3
|
* Preload Rails component gems in railties testsMatthew Draper2017-09-044-2/+22
|
* Scope in associations should treat nil as `all`Ryuta Kamizono2017-09-046-9/+11
| | | | | | | | Defined scope treats nil as `all`, but scope in associations isn't so. If the result of the scope is nil, most features on associations will be broken. It should treat nil as `all` like defined scope. Fixes #20823.
* Run all railties tests before reporting failureMatthew Draper2017-09-031-1/+14
|
* Don't start a new process for every test fileMatthew Draper2017-09-031-10/+34
| | | | | This effectively reverts 200cf32e207728df287cac2ec113a7cbe277c1eb, restoring a variant of 5a0e0e72995472e315738dcea5b5a12d6e3d3489.
* Don't expose `find_all_ordered` utility method in testsRyuta Kamizono2017-09-021-4/+5
| | | | Because this is not a test case.
* Merge pull request #30509 from y-yagi/remove_outdated_commentRyuta Kamizono2017-09-021-1/+1
|\ | | | | Remove outdated comment [ci skip]
| * Fix outdated comment [ci skip]yuuji.yaginuma2017-09-021-1/+1
| | | | | | | | We do not use double assign since 61f92f8bc5fa0b486fc56f249fa23f1102e79759.
* | Retry if rubygems misbehaves: it's probably just the networkMatthew Draper2017-09-021-2/+2
| |
* | Fix preloading through association with custom scopeRyuta Kamizono2017-09-022-1/+11
| | | | | | | | | | | | | | | | | | | | If `reflection_scope.where_clause` is not empty, `through_scope` should be joined the source association. But if `values[:references]` in `reflection_scope` is empty, the source association will not be joined. It should use `source_reflection.table_name` in that case. Fixes #22535. Closes #28763.
* | Merge pull request #30493 from ↵Ryuta Kamizono2017-09-022-1/+13
|\ \ | | | | | | | | | | | | koic/fix_cant_modify_frozen_string_error_in_ac_rendering Fix `can't modify frozen String` error in AC::Rendering
| * | Fix `can't modify frozen String` error in AC::RenderingKoichi ITO2017-09-022-1/+13
| | |
* | | Merge pull request #30506 from yhirano55/replace_unnecessary_links_with_tt_textRyuta Kamizono2017-09-021-2/+2
|\ \ \ | | | | | | | | Replace unnecessary link with typewriter text [ci skip]
| * | | Replace unnecessary link with typewriter text [ci skip]Yoshiyuki Hirano2017-09-021-2/+2
| | | |
* | | | Accept GCS client optionsGeorge Claghorn2017-09-011-2/+2
|/ / /
* | | Add a test case for preloading through association with implicit sourceRyuta Kamizono2017-09-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If `reflection_scope.where_clause` is not empty, `through_scope` should be joined the source association. But if the through association doesn't have explicit `:source`, `options[:source]` will be nil and `scope.includes_values` will also be empty. It should use `source_reflection.name` rather than `options[:source]`. Fixed by a26cff3c1235c61cd0135bed4ef63d7be452b458. Fixes #11078. Fixes #26129. Closes #14312. Closes #29155. Closes #29841.
* | | `values[:includes]` in `reflection_scope` is not compatible with `through_scope`Ryuta Kamizono2017-09-022-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this fix, preloading `:comments_with_include` will cause the following error: ``` % bundle exec ruby -w -Itest test/cases/associations/eager_test.rb -n test_eager_with_has_many_through_join_model_with_include Using sqlite3 Run options: -n test_eager_with_has_many_through_join_model_with_include --seed 1502 E Error: EagerAssociationTest#test_eager_with_has_many_through_join_model_with_include: ActiveRecord::AssociationNotFoundError: Association named 'post' was not found on Post; perhaps you misspelled it? ```
* | | Don't call `scope.eager_loading?` when `reflection_scope.where_clause` is emptyRyuta Kamizono2017-09-021-10/+10
| | | | | | | | | | | | | | | If `reflection_scope.where_clause` is empty, `scope` isn't changed. So `scope.eager_loading?` is always false.
* | | Merge pull request #30503 from yahonda/bump_postgresql_and_ruby_versionsRyuta Kamizono2017-09-021-1/+1
|\ \ \ | | | | | | | | Bump PostgreSQL version to the latest version 9.6 at Travis CI
| * | | Bump PostgreSQL version to the latest version 9.6 at Travis CIYasuo Honda2017-09-011-1/+1
|/ / / | | | | | | | | | | | | Travis CI new default Ubuntu Trusty supports 9.6 https://docs.travis-ci.com/user/database-setup/#Using-a-different-PostgreSQL-Version
* | | Merge pull request #30499 from yahonda/diag_floatRyuta Kamizono2017-09-022-9/+4
|\ \ \ | |_|/ |/| | Remove unnecessary `to_i` for old sqlite3 adapter
| * | sqlite3 adapter returns integer value which used to be stringYasuo Honda2017-09-012-9/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `to_i` was added for SQLite3 adapter which did not handle number but sqlite3 gem already supports it then `to_i` is unnecessary. else condition is kept for adapters which return string, i.e. mysql(not mysql2) and sqlserver. Renamed `test_cache_does_not_wrap_string_results_in_arrays` to `test_cache_does_not_wrap_results_in_arrays` to explain the current behavior. most of adapters return integer, not only string. * Refer these commits: "future proofing the sqlite3 adapter code" https://github.com/rails/rails/commit/beda2d43d6ac5c3435fc2fba0cbd108c20fe1c67 "Refactor calculation test to remove unneeded SQLite special case." https://github.com/rails/rails/commit/47d568ed3fc701934ebe80b276f3d8bf6951c93f "no need to to_i, sqlite does that for us" https://github.com/rails/rails/commit/6cf44a1bd64ba10497742d70ad78fe68faa16e99
* | Merge pull request #29850 from yahonda/test_with_mariadb_102_on_trustyRyuta Kamizono2017-09-012-1/+5
|\ \ | | | | | | CI with the latest stable(GA) version of MariaDB 10.2
| * | Skip `test_remove_column_with_multi_column_index`Yasuo Honda2017-09-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when tested with MariaDB 10.2.8 or higher Refer #30485 https://mariadb.com/kb/en/the-mariadb-library/alter-table/#drop-column-if-exists-col_name-cascaderestrict > MariaDB starting with 10.2.8 > Dropping a column that is part of a multi-column UNIQUE constraint is not permitted.
| * | CI with the latest stable(GA) version of MariaDB 10.2Yasuo Honda2017-09-011-1/+1
| | | | | | | | | | | | | | | - Travis CI is migrating Ubuntu version to Trusty - MariaDB 10.2 is supported on Ubuntu Trusty
* | | `add_reference` should respect column position for both reference id and ↵Ryuta Kamizono2017-09-012-1/+11
|/ / | | | | | | | | | | type columns Fixes #30496.
* | Remove unused requireRyuta Kamizono2017-09-011-2/+0
| | | | | | | | This is no longer used since 79a5ea9eadb4d43b62afacedc0706cbe88c54496.
* | :warning: assigned but unused variable - messageAkira Matsuda2017-09-011-6/+6
| |
* | Unused variablesAkira Matsuda2017-09-011-2/+2
| |
* | Hash#transform_keys is in Ruby 2.5+Akira Matsuda2017-09-011-2/+2
| | | | | | | | since r59328
* | Suppress "unused variable" in Ruby 2.5Akira Matsuda & yui-knk2017-09-011-3/+4
| |
* | double assign is no longer an effective workaround for unused variable warningAkira Matsuda2017-09-011-1/+1
| | | | | | | | `def a() x = x = 1; end` warns since Ruby 2.5 (r59585)
* | Merge pull request #30492 from y-yagi/remove_neeless_silence_warningsRyuta Kamizono2017-09-011-4/+1
|\ \ | | | | | | Remove needless `silence_warnings`
| * | Remove needless `silence_warnings`yuuji.yaginuma2017-09-011-4/+1
| | | | | | | | | | | | Since ff30db1, warning is not show.
* | | Merge pull request #29233 from matthewd/redefine-methodMatthew Draper2017-09-0118-67/+98
|\ \ \ | | | | | | | | Clarify intentions around method redefinitions
| * | | Self-alias doesn't suppress the warning on Ruby 2.2Matthew Draper2017-09-011-8/+17
| | | |
| * | | Clarify intentions around method redefinitionsMatthew Draper2017-09-0118-67/+89
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Don't use remove_method or remove_possible_method just before a new definition: at best the purpose is unclear, and at worst it creates a race condition. Instead, prefer redefine_method when practical, and silence_redefinition_of_method otherwise.
* | | Have attachments touch their recordsGeorge Claghorn2017-08-311-1/+1
| | |
* | | Merge pull request #30490 from ↵Richard Schneeman2017-08-311-1/+1
|\ \ \ | | | | | | | | | | | | | | | | y-yagi/fix_cant_modify_forzen_string_error_in_XmlMini_JDOM Fix `can't modify frozen String` error in `XmlMini_JDOM`