1. 07 8月, 2019 1 次提交
  2. 06 8月, 2019 5 次提交
  3. 05 8月, 2019 12 次提交
  4. 04 8月, 2019 7 次提交
  5. 03 8月, 2019 8 次提交
    • Y
      Merge pull request #36849 from yahonda/use_assert_nil · 99650550
      y-yagi 提交于
      Address `DEPRECATED: Use assert_nil if expecting nil`
      99650550
    • Y
      Address `DEPRECATED: Use assert_nil if expecting nil` · 20772f6c
      Yasuo Honda 提交于
      ```ruby
      $ cd activerecord
      $ bin/test test/cases/dirty_test.rb:494
      ... snip ...
      DEPRECATED: Use assert_nil if expecting nil from /home/yahonda/git/rails/activerecord/test/cases/dirty_test.rb:494. This will fail in Minitest 6.
      DEPRECATED: Use assert_nil if expecting nil from /home/yahonda/git/rails/activerecord/test/cases/dirty_test.rb:511. This will fail in Minitest 6.
      .
      
      Finished in 0.061593s, 16.2356 runs/s, 795.5428 assertions/s.
      1 runs, 49 assertions, 0 failures, 0 errors, 0 skips
      $
      ```
      
      Refer seattlerb/minitest#666 rails/rails#27712
      20772f6c
    • V
      Merge pull request #36846 from SGourshete/master · 5944a312
      Vipul A M 提交于
      typo in word compatibily -> compatibility [ci skip]
      5944a312
    • S
    • E
      Fix `PG::ConnectionBad` error when running fixtures · bfec23ae
      eileencodes 提交于
      At first this appeared to be a multi-db bug but after some invesitgation
      it was clear that this can occur just by calling `establish_connection`
      from ApplicationRecord.
      
      After some investigation we found that this only occurred when using
      fixtures. The console boots fine, the server runs fine, and the tests
      even run fine if we used paralellization or eager loading in the tests.
      
      I tracked the issue down to the line that calls
      `self.connection_specification_name = name` in the SchemaMigration
      changes for Rails 6.0. But how can this be? That is not that major of a
      change? How could `connection_specification_name` be a problem?
      
      First `connection_specification_name` caches the name of the connection
      specificatio. Second, fixtures were incorrectly holding onto a reference
      to that connection.
      
      So when you went to run the tests the models wouldn't be connected and
      when the fixtures tried to load the data it would choke on that
      unconnected database.
      
      The changes here move the connection into a lambda so we can call it
      when we need it rather than blowing up before the model is connected.
      
      Fixes #36743
      Co-authored-by: NAaron Patterson <aaron.patterson@gmail.com>
      bfec23ae
    • R
      1.hour needs core_ext to work · 1c7207a2
      Rafael Mendonça França 提交于
      Usually the application requires the entire active support at load time
      but the configuration happens before it is loaded. For that reason we
      need to require the core_ext that we want to use in this file.
      1c7207a2
    • E
      Merge pull request #36843 from eileencodes/add-ability-to-unset-preventing-writes · ac7c9381
      Eileen M. Uchitelle 提交于
      Add ability to unset preventing writes
      ac7c9381
    • E
      Add ability to unset preventing writes · f2de4481
      eileencodes 提交于
      Previously if an app attempts to do a write inside a read request it will be
      impossilbe to switch back to writing to the primary. This PR adds an
      argument to the `while_preventing_writes` so that we can make sure to
      turn it off if we're doing a write on a primary.
      
      Fixes #36830
      Co-authored-by: NJohn Crepezzi <john.crepezzi@gmail.com>
      f2de4481
  6. 02 8月, 2019 7 次提交