1. 11 7月, 2017 8 次提交
    • R
      Extract `FakeKlass` in `relation_test.rb` and `relation/mutation_test.rb` · 23300f44
      Ryuta Kamizono 提交于
      `FakeKlass` in `relation_test.rb` and `relation/mutation_test.rb` are
      almost the same.
      23300f44
    • R
      · bfbae885
      Ryuta Kamizono 提交于
      [ci skip]
      bfbae885
    • R
      18d637e4
    • R
      Merge pull request #29742 from lugray/default_protect_from_forgery · 48cb8b3e
      Rafael França 提交于
      Default protect from forgery
      48cb8b3e
    • L
      Add ActionController::Base.skip_forgery_protection · 73b944ec
      Lisa Ugray 提交于
      Since we now default to `protect_from_forgery with: :exception`,
      provide a wrapper to `skip_before_action :verify_authenticity_token`
      for disabling forgery protection.
      73b944ec
    • L
      Protect from forgery by default · ec4a8369
      Lisa Ugray 提交于
      Rather than protecting from forgery in the generated
      ApplicationController, add it to ActionController::Base by config. This
      configuration defaults to false to support older versions which have
      removed it from their ApplicationController, but is set to true for
      Rails 5.2.
      ec4a8369
    • K
      Merge pull request #29572 from kaspth/test-runner-no-eager-require · 3fa66935
      Kasper Timm Hansen 提交于
      Don't eagerly require Rails' minitest plugin.
      3fa66935
    • K
      * Don't eagerly require Rails' minitest plugin. · 0d72489b
      Kasper Timm Hansen 提交于
      By making the Rails minitest behave like a standard minitest plugin
      we're much more likely to not break when people use other minitest
      plugins. Like minitest-focus and pride.
      
      To do this, we need to behave like minitest: require files up front
      and then perform the plugin behavior via the at_exit hook.
      This also saves us a fair bit of wrangling with test file loading.
      
      Finally, since the environment and warnings options have to be applied
      as early as possible, and since minitest loads plugins at_exit, they
      have to be moved to the test command.
      
      * Don't expect the root method.
      
      It's likely this worked because we eagerly loaded the Rails minitest plugin
      and that somehow defined a root method on `Rails`.
      
      * Assign a backtrace to failed exceptions.
      
      Otherwise Minitest pukes when attempting to filter the backtrace (which
      Rails' backtrace cleaner then removes).
      
      Means the exception message test has to be revised too.
      
      This is likely caused by the rails minitest plugin now being loaded for
      these tests and assigning a default backtrace cleaner.
      0d72489b
  2. 10 7月, 2017 8 次提交
  3. 09 7月, 2017 19 次提交
  4. 08 7月, 2017 5 次提交
    • E
      Don't call register on custom drivers · 91d22b78
      eileencodes 提交于
      It's possible for developers toadd a custom driver and then call it
      using `driven_by`. Because we were only skipping `register` for
      `:rack_test` that meant any custom driver would attempt to be registered
      as well.
      
      The three listed here are special because Rails registers them with
      special options. If you're registering your own custom driver then you
      don't want to separately register that driver.
      
      Fixes #29688
      91d22b78
    • E
      Merge pull request #29680 from koic/update_default_app_files_in_app_generator_test · a136c291
      Eileen M. Uchitelle 提交于
      Update default app files in app_generator_test
      a136c291
    • S
      Clarify i18n guide for how pluralization rules work by default · 6a8d618b
      Sage Ross 提交于
      The guide misleadingly indicates that the I18n gem will apply the CLDR pluralization rules for each language. This is not the case; only the English algorithm, with support for :zero, :one, and :other, is available by default. Locale-specific pluralization rules require additional configuration and must be supplied by the application (or by another gem).
      6a8d618b
    • P
      Don't allow uuids with orphan curly braces · 38b04171
      pdebelak 提交于
      The uuid validation regex was allowing uuids to have a single leading
      curly brace or single trailing curly brace. Saving with such a uuid
      would cause Postgres to generate an exception even though the record
      seemed valid. With this change, the regex requires both a leading *and*
      a trailing curly brace or neither to be valid.
      38b04171
    • R
      Merge pull request #29714 from jahfer/implement-errors-merge · 98f8f818
      Rafael França 提交于
      Add ActiveModel::Errors#merge!
      98f8f818