aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Register integer types limit correctly for postgresql adapter (#26386)Ryuta Kamizono2017-08-201-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | currently integer types extracts the `limit` from `sql_type`. But the lookup key of type map is the `oid` in postgresql adapter. So in most case `sql_type` is passed to `extract_limit` as `""` and `limit` is extracted as `nil`. https://github.com/rails/rails/blob/v5.1.0.beta1/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L445 In mysql2 adapter, `limit` is registered correctly without extracting from `sql_type`. https://github.com/rails/rails/blob/v5.1.0.beta1/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb#L678-L682 Postgresql adapter should also be registered correctly. ``` ruby conn = ActiveRecord::Base.connection conn.select_all("SELECT 1::smallint, 2::integer, 3::bigint").column_types.map do |name, type| [name, type.limit] end ``` Before: ``` ruby # => [["int2", nil], ["int4", nil], ["int8", nil]] ``` After: ``` ruby # => [["int2", 2], ["int4", 4], ["int8", 8]] ```
* | | | | | Merge pull request #30331 from ↵George Claghorn2017-08-191-7/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | yhirano55/update_rails_initialization_process_guide Update The Rails Initialization Process of guide [ci skip]
| * | | | | | Update The Rails Initialization Process of guide [ci skip]Yoshiyuki Hirano2017-08-201-7/+10
| | | | | | |
* | | | | | | Merge pull request #30330 from ↵George Claghorn2017-08-191-4/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | yhirano55/update_database_config_in_command_line_of_guide Update database config in The Rails Comamnd Line of guide [ci skip]
| * | | | | | | Update database config in The Rails Comamnd Line of guide [ci skip]Yoshiyuki Hirano2017-08-201-4/+7
| |/ / / / / /
* / / / / / / Attributes are protected, not private, to avoid the warningMatthew Draper2017-08-201-1/+2
|/ / / / / /
* | | | | | Merge pull request #30325 from koic/fix_doc_format_in_active_storage_setupArun Agrawal2017-08-191-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix doc format in Active Storage Setup [ci skip]
| * | | | | | Fix doc format in Active Storage Setup [ci skip]Koichi ITO2017-08-191-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | Follow up of 2ebb284ef5bf2c36bd8ba0a4524cab83810f12ab.
* | | | | | Merge pull request #30324 from koic/fix_cant_modify_frozen_string_in_ar_testMatthew Draper2017-08-191-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix `can't modify frozen String` error in an AR test
| * | | | | | Fix `can't modify frozen String` error in an AR testKoichi ITO2017-08-191-2/+2
|/ / / / / /
* | | | | | Merge pull request #30322 from zokioki/fix_action_dispatch_typoRyuta Kamizono2017-08-191-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix typo in "Ambiguous route definition" error message
| * | | | | | fix typo in ambiguous route definition error messageZoran Pesic2017-08-181-1/+1
|/ / / / / /
* | | | | | Merge pull request #30319 from y-yagi/remove_unused_requireRyuta Kamizono2017-08-191-1/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove unused require
| * | | | | | Remove unused requireyuuji.yaginuma2017-08-191-1/+0
| | |/ / / / | |/| | | | | | | | | | | | | | | | Since 0d72489, this file does not use `method_source`.
* | | | | | Merge pull request #30317 from yhirano55/use_ssl_in_guide_and_commentArun Agrawal2017-08-1911-18/+18
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Use https in guide and comment [ci skip]
| * | | | | Use ssl in guide and comment [ci skip]Yoshiyuki Hirano2017-08-1911-18/+18
|/ / / / /
* | | | | Merge pull request #30308 from ↵Rafael França2017-08-181-7/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | DNNX/rm-pointless-flatten-and-compact-from-am-errors Simplify ActiveModel::Errors#generate_message
| * | | | | Simplify ActiveModel::Errors#generate_messageViktar Basharymau2017-08-181-7/+5
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides making the code easier to read, this commit also makes it faster: * We don't eval `@base.class.respond_to?(:i18n_scope)` twice * We only eval `@base.class.i18n_scope` once * We don't call `flatten!` because it's not needed anymore * We don't call `compact` because all elements are Symbols
* | | | | Merge pull request #30314 from yhirano55/use_https_instead_of_http_in_guideGeorge Claghorn2017-08-181-8/+8
|\ \ \ \ \ | | | | | | | | | | | | Use https instead of http or git in guide [ci skip]
| * | | | | Use https instead of http or git in guide [ci skip]Yoshiyuki Hirano2017-08-191-8/+8
|/ / / / / | | | | | | | | | | | | | | | * Update url in Development Dependencies Install
* | | | | Cleanup development_dependencies_install.mdJon Moss2017-08-181-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lots of grammar cleanup, and also changing to use macOS. [ci skip]
* | | | | Add Yarn installation instructions for Active StorageJon Moss2017-08-181-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a requirement when working on the JS portions of ASt. Using npm instead of Yarn is a bad idea here since the lockfile is in Yarn's format. [ci skip]
* | | | | Merge pull request #30311 from maclover7/jm-rm-ccMatthew Draper2017-08-191-7/+0
|\ \ \ \ \ | | | | | | | | | | | | Remove Active Storage code climate config file
| * | | | | Remove Active Storage code climate config fileJon Moss2017-08-181-7/+0
|/ / / / / | | | | | | | | | | | | | | | There's already a .codeclimate.yml file at the root of the project.
* | | | | Improve `migration/column_attributes_test.rb` (#25286)Ryuta Kamizono2017-08-181-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | * Test `test_unabstracted_database_dependent_types` for `PostgreSQLAdapter` * Add `test_change_column_with_new_precision_and_scale` for `SQLite3Adapter` * This test case and comment was lost at 28bb02a78fd47527bb7a208d01a4594bb212812c
* | | | | Add deterministic sorting order for `test_taking_with_a_number`Ryuta Kamizono2017-08-181-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise random CI failure will be caused. https://travis-ci.org/rails/rails/jobs/265848046#L777
* | | | | Restore the ability that SQL with binds for `insert`, `update`, and `delete` ↵Ryuta Kamizono2017-08-182-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#29944) Since 213796f, it was lost the ability that SQL with binds for `insert`, `update`, and `delete` (like `select_all`). This restores the ability because `insert`, `update`, and `delete` are public API, so it should not be removed without deprecation.
* | | | | Add test cases that class level `destroy`, `delete`, and `update` are ↵Ryuta Kamizono2017-08-181-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | affected by scoping (#29997) I tried to change the expectation in #29976, but it is expected behavior at least for now. So I added the test cases to prevent anyone change the expectation.
* | | | | Restore `to_sql` to return only SQL (#29945)Ryuta Kamizono2017-08-186-13/+15
| | | | | | | | | | | | | | | | | | | | Because `to_sql` is public API. I introduced `to_sql_and_binds` internal API to return SQL and binds.
* | | | | Add test cases for `where.not` with polymorphic associationRyuta Kamizono2017-08-181-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `where.not` with multiple conditions is still unexpected behavior. But `where.not` with only polymorphic association has already been fixed in 213796fb. Closes #14161. Closes #16983. Closes #17010. Closes #26207.
* | | | | Merge pull request #30274 from bogdanvlviv/dry-in-generators-testsRafael França2017-08-175-200/+118
|\ \ \ \ \ | | | | | | | | | | | | Move common tests to `SharedGeneratorTests`
| * | | | | Move common tests from `AppGeneratorTest` and `PluginGeneratorTest` to ↵bogdanvlviv2017-08-175-200/+118
| | | | | | | | | | | | | | | | | | | | | | | | `SharedGeneratorTests`
* | | | | | Merge pull request #30275 from msimonborg/deep_merge_patchRafael França2017-08-171-12/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | Faster and more readable implementation of Hash#deep_merge
| * | | | | | faster implementation of Hash#deep_mergeM. Simon Borg2017-08-161-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add missing newline call #deep_merge instead of #dup.deep_merge! make variable and parameter naming more consistent change `_key` to `key` faster implementation of Hash#deep_merge
* | | | | | | Add note about JSON/JSONB serialization changesJon Moss2017-08-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial commit (efaa6e4f79d457c2cdd08cbc56d63bc972a6993c) that changed this behavior was intended to be a minor change, but ended up becoming a large-ish breaking change within Active Record. This is because instead of only JSON encoding `Hash`es or `Array`s in `#serialize`, we now encode all values passed in. This is an issue if you're passing in a `String`, that has already been transformed from a `Hash` to a `String`, since your data is now being double encoded. Unfortunately, the change was included in one of the v5.0.0 beta releases, and it is too late to revert without huge ripple effects. Thus, all we can do is update the documentation (via this commit), and add some test coverage (coming soon in a PR) for the new behavior. Please note that in the documentation I talk about deserialization, not about serialization, where the actual change occurred. This is because you won't notice any changes in serialized data until you try and deserialize it. Also to make the change itself (confusing until you read through everything multiple times) easier to understand. Related #27788, #25594, #26101, #24234, #28292, #28285, #28285, and probably others. [ci skip]
* | | | | | | Merge pull request #30199 from robin850/upgrade-sdocRafael França2017-08-172-4/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Temporarily point to a fork of SDoc
| * | | | | | | Temporarily point to a fork of SDocRobin Dupret2017-08-172-4/+10
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fork brings: * A tiny refresh of the default theme. * SEO tags to class files. * The removal of HTML tags from search results. * Some general template clean-up (HTML 5, removal of the jQuery effect library, etc.). * A speed up of the generation time (by ~30 seconds).
* | | | | | | Merge pull request #30294 from ↵Ryuta Kamizono2017-08-181-11/+11
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | yahonda/move_test_index_is_created_for_both_timestamps_to_without_transaction Move `test_index_is_created_for_both_timestamps` to `TimestampsWithou…
| * | | | | | | Move `test_index_is_created_for_both_timestamps` to ↵Yasuo Honda2017-08-171-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `TimestampsWithoutTransactionTest` This commit addresses these failures when the backend RDBMS executes implicit commit for DDL like MySQL and Oracle. ```ruby $ ARCONN=mysql2 bin/test test/cases/integration_test.rb test/cases/timestamp_test.rb --seed 58225 -n '/^(?:TimestampTest#(?:test_index_is_created_for_both_timestamps)|IntegrationTest#(?:test_cache_key_for_newer_updated_at|test_cache_key_format_for_existing_record_with_updated_at|test_cache_key_format_for_existing_record_with_updated_at_and_custom_cache_timestamp_format))$/' -v Using mysql2 Run options: --seed 58225 -n "/^(?:TimestampTest#(?:test_index_is_created_for_both_timestamps)|IntegrationTest#(?:test_cache_key_for_newer_updated_at|test_cache_key_format_for_existing_record_with_updated_at|test_cache_key_format_for_existing_record_with_updated_at_and_custom_cache_timestamp_format))$/" -v TimestampTest#test_index_is_created_for_both_timestamps = 0.19 s = . IntegrationTest#test_cache_key_format_for_existing_record_with_updated_at = 0.05 s = F IntegrationTest#test_cache_key_format_for_existing_record_with_updated_at_and_custom_cache_timestamp_format = 0.02 s = F IntegrationTest#test_cache_key_for_newer_updated_at = 0.01 s = F Finished in 0.272880s, 14.6585 runs/s, 14.6585 assertions/s. 1) Failure: IntegrationTest#test_cache_key_format_for_existing_record_with_updated_at [/home/yahonda/git/rails/activerecord/test/cases/integration_test.rb:111]: --- expected +++ actual @@ -1 +1 @@ -"developers/1-20170717135609430848" +"developers/1-20170817135609283207" 2) Failure: IntegrationTest#test_cache_key_format_for_existing_record_with_updated_at_and_custom_cache_timestamp_format [/home/yahonda/git/rails/activerecord/test/cases/integration_test.rb:116]: --- expected +++ actual @@ -1 +1 @@ -"cached_developers/1-20170717135609" +"cached_developers/1-20170817135609" 3) Failure: IntegrationTest#test_cache_key_for_newer_updated_at [/home/yahonda/git/rails/activerecord/test/cases/integration_test.rb:147]: --- expected +++ actual @@ -1 +1 @@ -"developers/1-20170717145609430848" +"developers/1-20170817135609283207" 4 runs, 4 assertions, 3 failures, 0 errors, 0 skips $ ``` `ActiveRecord::TestCase::TimestampTest#test_index_is_created_for_both_timestamps` calls`ActiveRecord::TestCase::TimestampTest#setup` which updates `updated_at` column value. ```ruby @developer = Developer.first ... snip ... @developer.update_columns(updated_at: Time.now.prev_month) ``` This transaction expected to be rolled back, but if the backend RDBMS like MySQL perfomes implicit commit when DDL executed, this transacion is committed by `create table` statement inside `ActiveRecord::TestCase::TimestampTest#test_index_is_created_for_both_timestamps`. It causes these failures above which expect `update_at` column value are not changed(rollbacked).
* | | | | | | | Merge pull request #30292 from maclover7/jm-ast-purgeGeorge Claghorn2017-08-171-0/+7
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add missing test for Blob#purge
| * | | | | | | | Add missing test for Blob#purgeJon Moss2017-08-171-0/+7
| | | | | | | | |
* | | | | | | | | Merge pull request #30293 from maclover7/jm-ast-logsGeorge Claghorn2017-08-171-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Use nil Logger for tests
| * | | | | | | | | Use nil Logger for testsJon Moss2017-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes tests much more quietly, as opposed to the enormous amount of logging that appears right now. This setting is used in AJ, as well as other frameworks. Output from test run: ``` ......................................................... Finished in 3.003355s, 18.9788 runs/s, 45.2827 assertions/s. 57 runs, 136 assertions, 0 failures, 0 errors, 0 skips ```
* | | | | | | | | | Merge pull request #30295 from ohbarye/follow_up_to_28058Jon Moss2017-08-171-1/+1
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | Remove obsolete explanation about passing string to `:if` and `:unless` [ci skip]
| * | | | | | | | | Remove obsolete explanationohbarye2017-08-171-1/+1
| | |_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | about passing string to `:if` and `:unless`. This is a follow up to https://github.com/rails/rails/pull/28058 [ci skip]
* / | | | | | | | Capitalize RedisJon Moss2017-08-171-1/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | / / / / / / Encrypt the IRC notification setting, so it's not used on forksMatthew Draper2017-08-171-1/+2
| |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | The value isn't actually secret, so I've kept it as a comment.
* | | | | | | Merge pull request #30287 from y-yagi/use_queue_adapter_name_to_get_adapter_nameKasper Timm Hansen2017-08-171-3/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Use `ActiveJob::Base.queue_adapter_name` to get adapter name
| * | | | | | | Use `ActiveJob::Base.queue_adapter_name` to get adapter nameyuuji.yaginuma2017-08-171-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 673606a, it holds adapter name.
* | | | | | | | Merge pull request #30288 from y-yagi/bump_thor_and_bladeRafael França2017-08-161-3/+3
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | Bump `thor` and `blade`