1. 07 11月, 2017 11 次提交
    • R
      Merge pull request #30101 from bogdanvlviv/initialization-active_storage · 63f0c048
      Rafael França 提交于
      Provide initialization of Active Storage
      63f0c048
    • R
      Merge pull request #22435 from yui-knk/fix_engine_route_test · 256a44c4
      Rafael Mendonça França 提交于
      Make `assert_recognizes` to traverse mounted engines
      256a44c4
    • M
      Merge pull request #28360 from kbrock/transaction_fix · 05eccb11
      Matthew Draper 提交于
      Handle Timeout.timeout in rails queries
      05eccb11
    • R
      Merge pull request #22115 from bogdan/refactor-preloader · a705cd8d
      Rafael França 提交于
      Refactored preloading of a though assocations
      a705cd8d
    • B
    • B
      f4af77ab
    • B
      `rails new` runs `rails active_storage:install` · 0835527d
      bogdanvlviv 提交于
      Omit `rails activestorage:install` for jdbcmysql, jdbc and shebang tests
      
      AppGeneratorTest#test_config_jdbcmysql_database
      
        rails aborted!
        LoadError: Could not load 'active_record/connection_adapters/mysql_adapter'.
        Make sure that the adapter in config/database.yml is valid.
        If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add
        the necessary adapter gem to the Gemfile.
        (compressed)
        bin/rails:4:in `<main>'
        Tasks: TOP => activestorage:install => environment
        (See full trace by running task with --trace)
      
      AppGeneratorTest#test_config_jdbc_database
      
        rails aborted!
        LoadError: Could not load 'active_record/connection_adapters/jdbc_adapter'.
        Make sure that the adapter in config/database.yml is valid.
        If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add
        the necessary adapter gem to the Gemfile.
        (compressed)
        bin/rails:4:in `<main>'
        Tasks: TOP => activestorage:install => environment
        (See full trace by running task with --trace)
      
      AppGeneratorTest#test_shebang_is_added_to_rails_file
      
        /home/ubuntu/.rbenv/versions/2.4.1/bin/ruby: no Ruby script found in input (LoadError)
      
      Prevent PendingMigrationError in tests
      
       * Run `bin/rails db:migrate RAILS_ENV=test` in test_cases before start tests to prevent PendingMigrationError
       * FileUtils.rm_r("db/migrate")
       * --skip-active-storage
      
      Fix failed tests in `railties/test/railties/engine_test.rb`
      
      Related to #30111
      
      Imporve `SharedGeneratorTests#test_default_frameworks_are_required_when_others_are_removed`
      
       - Explicitly skip active_storage
       - Ensure that skipped frameworks are commented
       - Ensure that default frameworks are not commented
      
      Fix error `Errno::ENOSPC: No space left on device - sendfile`
      
      Since `rails new` runs `rails active_storage:install`
      that boots an app.
      
      Since adding Bootsnap 0312a5c6
      during booting an app, it creates the cache:
      
         264K    tmp/cache/bootsnap-load-path-cache
         27M     tmp/cache/bootsnap-compile-cache
      
      * teardown_app must remove app
      0835527d
    • B
      Add --skip-active-storage and do so automatically when --skip-active-record is used · 4a835aa3
      bogdanvlviv 提交于
      Closes #30102
      
      Revert part 787fe90d
      
      --skip-active-storage pass throughs `rails plugin new`
      
      Add changelog entry about default initialization of Active Storage
      4a835aa3
    • K
      Properly check transaction in persistence · 01c70324
      Keenan Brock 提交于
      ```
      [NoMethodError]: undefined method `state' for nil:NilClass  Method:[rescue in block in refresh]
      ```
      
      In `within_new_transaction`, there is the possibility that
      `begin_transaction` returns a `nil`. (i.e.: so `transaction = nil`)
      So this method is checking `transaction` for nil in 2 spots.
      
      Unfortunately, there is one line that is not checking `transaction` for `nil`
      That line, `commit_transaction`, throws an exception for us in AR 5.0.0.1
      
      The problem with the method is finally realized in the error checking itself.
      it calls `transaction.state` (i.e.: nil.state) and that is the final exception
      raised.
      
      The actual underlying (user) issue is hidden by this line.
      
      Solution is test transaction for nil.
      01c70324
    • R
      Merge pull request #31069 from danott/resolve-minitest-deprecation-in-assert_no_changes · 204b22fa
      Rafael França 提交于
      Resolve Minitest 6 deprecation in assert_no_changes
      204b22fa
    • D
      Resolve Minitest 6 deprecation in assert_no_changes · 1fe7168d
      Dan Ott 提交于
      These changes resolve a deprecation warning in `assert_no_changes`
      when asserting that an expression evaluates to `nil` before and after
      the passed block is evaluated.
      
      The smallest demonstration of this edge case:
      
      ```ruby
      assert_no_changes "nil" do
        true # noop
      end
      ```
      
      Under the covers, this is evaluating
      
      ```ruby
      assert_equal nil, nil
      ```
      
      Minitest 5 issues a deprecation warning, and Minitest will fail
      completely.
      
      For additional context, the motivations and implications of this change
      to Minitest have been discussed at length in [seattlerb/minitest#666][].
      
      [seattlerb/minitest#666]: https://github.com/seattlerb/minitest/issues/666
      1fe7168d
  2. 06 11月, 2017 14 次提交
  3. 05 11月, 2017 5 次提交
  4. 04 11月, 2017 7 次提交
  5. 03 11月, 2017 3 次提交