aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Don't expose internal methods in the associationsRyuta Kamizono2018-10-082-32/+32
|
* Fix test name to add missing "set"Ryuta Kamizono2018-10-081-1/+1
|
* Fix `AssociationRelation` not to set inverse instance key just like beforeRyuta Kamizono2018-10-073-3/+23
| | | | | | | | | | | | | | | | | Since #31575, `set_inverse_instance` replaces the foreign key by the current owner immediately to make it happen when a record is added to collection association. But `set_inverse_instance` is not only called when a record is added, but also when a record is loaded from queries. And also, that loaded records are not always associated records for some reason (using `or`, `unscope`, `rewhere`, etc). It is hard to distinguish whether or not we should invoke `set_inverse_instance`, but at least we should avoid the undesired side-effect which was brought from #31575. Fixes #34108.
* Merge pull request #34076 from gmcgibbon/fixtures_refactorEileen M. Uchitelle2018-10-074-243/+376
|\ | | | | Fixtures refactor
| * Move FixtureSet::ReflectionProxy and FixtureSet::HasManyThroughProxy to ↵Gannon McGibbon2018-10-052-32/+32
| | | | | | | | FixtureSet::TableRows
| * Introduce FixtureSet::TableRows and FixtureSet::TableRowGannon McGibbon2018-10-053-88/+183
| |
| * Introduce FixtureSet::ModelMetadataGannon McGibbon2018-10-052-29/+49
| |
| * Small refactors to FixtureSet::ClassCache and FixtureGannon McGibbon2018-10-051-9/+8
| |
| * Move FixtureSet.create_fixtures reading and inserting sections into private ↵Gannon McGibbon2018-10-051-41/+58
| | | | | | | | methods
| * Organize FixtureSet class methodsGannon McGibbon2018-10-051-102/+104
| |
* | Merge pull request #34114 from Madogiwa0124/update_getting_start_rails_versionEileen M. Uchitelle2018-10-071-1/+1
|\ \ | | | | | | getting started page rails version update to 5.2.1
| * | getting started page rails version update to 5.2.1Madogiwa2018-10-071-1/+1
| | |
* | | Merge pull request #34089 from lsylvester/test-cache-version-precisionRichard Schneeman2018-10-061-31/+55
|\ \ \ | | | | | | | | add test for cache_version precision
| * | | add test for cache_version precisionLachlan Sylvester2018-10-071-31/+55
|/ / /
* | | Merge pull request #34077 from cllns/clarify-activesupport-instructionYuji Yaginuma2018-10-061-0/+8
|\ \ \ | | | | | | | | ActiveStorage guide: Add instruction for test environment
| * | | Add instruction for test environmentSean Collins2018-10-051-0/+8
| | | |
* | | | Merge pull request #34005 from tgturner/expand-cache-key-bug-fixRichard Schneeman2018-10-052-1/+50
|\ \ \ \ | | | | | | | | | | Array with single item correctly uses cache_key
| * | | | Array with single item correctly uses cache_keyGraham Turner2018-10-052-1/+50
|/ / / /
* | | | Merge pull request #34084 from trustvox/masterRafael França2018-10-052-4/+2
|\ \ \ \ | |_|_|/ |/| | | Remove "include FileUtils" sentence in setup/update bin files
| * | | Remove "include FileUtils" sentence in setup/update bin filesBruno Casali2018-09-172-4/+2
| | | | | | | | | | | | | | | | | | | | According with rubocop style guide "Style/MixinUsage" is good to use only in class/module not directly in file.
* | | | Remove unnecessary use of `included` in ActiveJob::CoreAlan Wu2018-10-051-21/+19
| | | | | | | | | | | | | | | | | | | | Using `included` to define `attr_acessor` and `attr_writer` is causing these methods to not show up in the documentation.
* | | | Merge pull request #34103 from albertoalmagro/guides-running-test-with-seedGannon McGibbon2018-10-051-0/+20
|\ \ \ \ | | | | | | | | | | Add documentation to run tests with specific seed [ci skip]
| * | | | Add documentation to run tests with specific seed [ci skip]Alberto Almagro2018-10-051-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | This commit documents how to run all tests or a single test file with a specific randomization seed.
* | | | | Merge pull request #34101 from gmcgibbon/fix_bundler_1_16_6_test_failuresRafael França2018-10-051-8/+10
|\ \ \ \ \ | | | | | | | | | | | | Remove bundler warnings from bin/setup output
| * | | | | Remove bundler warnings from bin/setup outputGannon McGibbon2018-10-051-8/+10
| |/ / / /
* | | | | Merge pull request #34097 from kule/masterRafael França2018-10-054-1/+27
|\ \ \ \ \ | | | | | | | | | | | | Parameterized mailers can configure delivery job
| * | | | | Parameterized mailers can configure delivery jobLuke Pearce2018-10-054-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting parameterized_delivery_job on a mailer class will cause Parameterized::MessageDelivery to use the specified job instead of ActionMailer::Parameterized::DeliveryJob: class MyMailer < ApplicationMailer self.parameterized_delivery_job = MyCustomDeliveryJob ... end
* | | | | | Merge pull request #34102 from gmcgibbon/less_aggressive_auto_labelingRafael França2018-10-051-22/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove some autolabeling globs
| * | | | | | Remove some autolabeling globsGannon McGibbon2018-10-051-22/+0
| | |/ / / / | |/| | | | | | | | | | | | | | | | [ci skip]
* / | | | | update nokogiriGreg Molnar2018-10-051-4/+4
|/ / / / /
* | | | | Merge pull request #34096 from ↵Rafael França2018-10-051-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | prathamesh-sonpatki/exclude-node-modules-for-rubocop Skip node_modules dir in the rubocop check
| * | | | | Skip node_modules dir in the rubocop checkPrathamesh Sonpatki2018-10-051-0/+1
|/ / / / / | | | | | | | | | | | | | | | - Otherwise it is running the check against all files in node_modules
* | | | | Merge pull request #34095 from prathamesh-sonpatki/fix-tests-related-to-acGuillermo Iguaran2018-10-054-8/+6
|\ \ \ \ \ | |/ / / / |/| | | | Fix tests related to new JavaScript path for generators
| * | | | Fix tests related to new JavaScript path for generatorsPrathamesh Sonpatki2018-10-054-8/+6
| | | | | | | | | | | | | | | | | | | | - Followup of https://github.com/rails/rails/commit/4838c1716a0340137d858fab49bf460e23be5a4b
* | | | | Merge pull request #34068 from schneems/schneems/micro-optimize-try-nilRichard Schneeman2018-10-051-2/+2
|\ \ \ \ \ | | | | | | | | | | | | 23% faster Nil#try
| * | | | | This PR speeds up Nil#try by avoiding an allocation when only one argument ↵schneems2018-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is passed: ```ruby class FooNew def try(method_name = nil, *args) nil end end class FooOld def try(*args) nil end end require 'benchmark/ips' foo_new = FooNew.new foo_old = FooOld.new Benchmark.ips do |x| x.report("new") { foo_new.try(:anything) } x.report("old") { foo_old.try(:anything) } x.compare! end # Warming up -------------------------------------- # new 250.633k i/100ms # old 232.322k i/100ms # Calculating ------------------------------------- # new 6.476M (± 4.8%) i/s - 32.332M in 5.005777s # old 5.258M (± 3.2%) i/s - 26.485M in 5.042589s # Comparison: # new: 6476002.5 i/s # old: 5257912.5 i/s - 1.23x slower ``` It's worth noting that checking for nil separately as in https://github.com/rails/rails/pull/34067 seems to be MUCH faster. It might be worth it to apply a blanket `&.` to every internal `try` call.
* | | | | | Merge pull request #34092 from bogdanvlviv/follow-up-33968Ryuta Kamizono2018-10-051-0/+5
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Exercise stringify of database configurations
| * | | | | Exercise stringify of database configurationsbogdanvlviv2018-10-051-0/+5
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #33968 we stringify keys of database configuration This commit adds more assertions in order to ensure that and prevent any regression in the future. Currently, if remove `to_s` added in #33968 from `env_name.to_s` on the line (activerecord/lib/active_record/database_configurations.rb:107), there is no test that would fail. One of the added assertions should emphasize why we need this `to_s`. Follow up #33968
* | | | | Merge pull request #34087 from frodsan/application_job_suggestionsYuji Yaginuma2018-10-051-0/+5
|\ \ \ \ \ | | | | | | | | | | | | Add retry_on/discard suggestions for common cases to ApplicationJob for new apps.
| * | | | | Add retry_on/discard suggestions for common cases.Francesco Rodríguez2018-10-051-0/+5
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the same suggestions added here: https://github.com/rails/rails/blob/01a69e27a4e55504af8fe776826d659550e6f89e/activejob/lib/rails/generators/job/templates/application_job.rb These appear when `app/jobs/application_job.rb` doesn't exist, but not for new applications.
* | | | | Don't use deprecated `Module#parents`yuuji.yaginuma2018-10-051-1/+1
| | | | |
* | | | | Avoid `webpacker:install` if unnecessaryyuuji.yaginuma2018-10-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Since this is a test to check the behavior of `load_defaults`, webpacker is unnecessary.
* | | | | Bugfix: ActiveSupport::EncryptedConfiguration reading of comment-only ↵Martin Spickermann2018-10-052-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encrypted files (#34014) * Fix reading comment only encrypted files When a encrypted file contains only comments then reading that files raises an error: NoMethodError: undefined method `deep_symbolize_keys' for false:FalseClass activesupport/lib/active_support/encrypted_configuration.rb:33:in `config' test/encrypted_configuration_test.rb:52:in `block in <class:EncryptedConfigurationTest>' This happens because the previous implementation returned a `{}` fallback for blank YAML strings. But it did not handle YAML strings that are present but still do not contain any _usefull_ YAML - like the file created by `Rails::Generators::EncryptedFileGenerator` which looks like this: # aws: # access_key_id: 123 # secret_access_key: 345 * Fix coding style violation * Add backwardscompatible with Psych versions that were shipped with Ruby <2.5 * Do not rely on railties for Active Support test * Simplify error handling * Improve test naming * Simplify file creation in test
* | | | | Merge pull request #34083 from bogdanvlviv/follow-up-33953Ryuta Kamizono2018-10-051-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Wrap custom id of a header attribute into \" in rails guides
| * | | | | Wrap custom id of a header attribute into \" in rails guidesbogdanvlviv2018-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Related to https://github.com/rails/rails/pull/33953
* | | | | | Remove `ignore_none: false` to assert no queries more strictlyRyuta Kamizono2018-10-057-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | Follow up 811be477786455d144819a5e9fbb7f9f54b8da69.
* | | | | | Use `assert_no_queries` not to ignore BEGIN/COMMIT queriesRyuta Kamizono2018-10-0513-38/+37
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `test_update_does_not_run_sql_if_record_has_not_changed` would pass without #18501 since `assert_queries` ignores BEGIN/COMMIT unless `ignore_none: true` is given. Since #32647, empty BEGIN/COMMIT is ommited. So we no longer need to use `assert_queries(0)` to ignore BEGIN/COMMIT in the queries.
* | | | | Simplify the condition in `prepare_update_statement`Ryuta Kamizono2018-10-051-8/+2
| | | | |
* | | | | Merge pull request #34064 from ↵Richard Schneeman2018-10-0410-81/+36
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | schneems/schneems/revert-7f870a5ba2aa9177aa4a0e03a9d027928ba60e49 Revert "Merge pull request #33970 from rails/eager-url-helpers"
| * | | | | Revert "Merge pull request #33970 from rails/eager-url-helpers"schneems2018-10-0310-81/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until #34050 can be resolved This reverts commit 7f870a5ba2aa9177aa4a0e03a9d027928ba60e49, reversing changes made to 6556898884d636c59baae008e42783b8d3e16440.