1. 08 1月, 2020 13 次提交
    • V
      Deprecate using `Range#include?` to check the inclusion of a value in a date time range · 740bb178
      Vishal Telangre 提交于
      Use `Range#cover?` instead of `Range#include?` to check the inclusion of a value in a date time range.
      740bb178
    • R
      Merge pull request #38183 from Tietew/test_session_dig · b50ce8d6
      Ryuta Kamizono 提交于
      Add AC::TestSession#dig method like AD::Request::Session
      b50ce8d6
    • I
      Add AC::TestSession#dig method like AD::Request::Session · 8e9c48b5
      IWASE 提交于
      8e9c48b5
    • E
      Merge pull request #38179 from eileencodes/fix-resolve-symbol-conn · 09fbee82
      Eileen M. Uchitelle 提交于
      Restore previous behavior of parallel test databases
      09fbee82
    • R
      Merge pull request #38177 from RicardoTrindade/bump_image_processing · 8c65783d
      Ryuta Kamizono 提交于
      Bump image_processing gem version to fixe ruby 2.7 warnings
      8c65783d
    • E
      Restore previous behavior of parallel test databases · c0509885
      eileencodes 提交于
      This commit is somewhat of a bandaid fix for a bug that was revealed in #38029
      and then #38151. #38151 can cause problems in certain cases when an app has
      a 3-tier config, with replicas, because it reorders the configuration
      and changes the implict default connection that gets picked up.
      
      If an app calls `establish_connection` with no arguments or doesn't call
      `connects_to` in `ApplicationRecord` AND uses parallel testing
      databases, the application may pick up the wrong configuration.
      
      This is because when the code in #38151 loops through the configurations
      it will update the non-replica configurations and then put them at the
      end of the list. If you don't specify which connection you want, Rails
      will pick up the _first_ connection for that environment. So given the
      following configuration:
      
      ```
      test:
        primary:
          database: my_db
        replica:
          database: my_db
          replica: true
      ```
      
      The database configurations will get reordered to be `replica`,
      `primary` and when Rails calls `establish_connection` with no arguments
      it will pick up `replica` because it's first in the list.
      
      Looking at this bug it shows that calling `establish_connection` with no
      arguments (which will pick up the default env + first configuration in
      the list) OR when `establish_connection` is called with an environment
      like `:test` it will also pick up that env's first configuration. This
      can have surprising behavior in a couple cases:
      
      1) In the parallel testing changes we saw users getting the wrong db
      configuration and hitting an `ActiveRecord::ReadOnlyError`
      2) Writing a configuration that puts `replica` before `primary`, also
      resulting in a `ActiveRecord::ReadOnlyError`
      
      The real fix for this issue is to deprecate calling
      `establish_connection` with an env or nothing and require an explcit
      configuration (like `primary`). This would also involve blessing
      `:primary` as the default connection Rails looks for on boot. In
      addition, this would require us deprecating connection specification
      name "primary" in favor of the class name always since that will get
      mega-confusing (seriously, it's already mega-confusing).
      
      We'll work on fixing these underlying issues, but wanted to get a fix
      out that restores previous behavior.
      Co-authored-by: NJohn Crepezzi <john.crepezzi@gmail.com>
      c0509885
    • X
      addresses RuboCop feedback · ad04bc0d
      Xavier Noria 提交于
      ad04bc0d
    • R
    • X
      restores the ability to manually eager load applications · c0d91a4f
      Xavier Noria 提交于
      The main interface to eager loading is config.eager_load. The logic that
      implies happens during the boot process.
      
      With the introduction of Zeitwerk, application code is loaded in the
      finisher as everything else, but in previous versions of Rails users
      could eager load the application code regardless of config.eager_load.
      
      Use cases:
      
         * Some gems like indexers need to have everything in memory and would
         be a bad user experience to ask users to conditionally set the eager
         load flag.
      
         * Some tests may need to have everything in memory and would be a bad
         experience to have the flag enabled globally in the test environment.
      
      I personally feel that the contract between this method and the entire
      eager loading process is ill-defined. I believe this method is
      essentially internal. The purpose of this patch is simply to restore this
      functionality emulating what it did before because rethinking the design
      of this interface may need time.
      c0d91a4f
    • J
      Merge pull request #38124 from weilandia/direct_upload_xls_in_chrome · 11781d06
      Javan Makhmali 提交于
      Defaults content_type to application/octet-stream in blob_record.js
      11781d06
    • N
      Defaults content_type to application/octet-stream · 1d133e8a
      Nick Weiland 提交于
      Defaults content_type to application/octet-stream in blob_record.js
      
      [direct_upload_xls_in_chrome]
      1d133e8a
    • E
      Merge pull request #37955 from Manfred/named-routes-metal-integration · ee2ec973
      Eileen M. Uchitelle 提交于
      Prevent NoMethodError on named route in integration test
      ee2ec973
    • C
      99d2d356
  2. 07 1月, 2020 14 次提交
  3. 06 1月, 2020 5 次提交
  4. 05 1月, 2020 8 次提交