CHANGELOG.md 4.0 KB
Newer Older
G
v6.0.1  
George Claghorn 已提交
1
## Rails 6.0.1 (November 5, 2019) ##
G
George Claghorn 已提交
2 3 4 5

*   No changes.


6 7
## Rails 6.0.0 (August 16, 2019) ##

8 9 10 11 12
*   `assert_enqueued_with` and `assert_performed_with` can now test jobs with relative delay.

    *Vlado Cingel*


13 14 15 16 17
## Rails 6.0.0.rc2 (July 22, 2019) ##

*   No changes.


18 19
## Rails 6.0.0.rc1 (April 24, 2019) ##

20 21 22 23
*   Use individual execution counters when calculating retry delay.

    *Patrik Bóna*

24 25 26 27 28
*   Make job argument assertions with `Time`, `ActiveSupport::TimeWithZone`, and `DateTime` work by dropping microseconds. Microsecond precision is lost during serialization.

    *Gannon McGibbon*


E
eileencodes 已提交
29 30 31 32 33
## Rails 6.0.0.beta3 (March 11, 2019) ##

*   No changes.


34 35 36 37 38
## Rails 6.0.0.beta2 (February 25, 2019) ##

*   No changes.


39 40
## Rails 6.0.0.beta1 (January 18, 2019) ##

41 42 43 44 45 46 47
*   Return false instead of the job instance when `enqueue` is aborted.

    This will be the behavior in Rails 6.1 but it can be controlled now with
    `config.active_job.return_false_on_aborted_enqueue`.

    *Kir Shatrov*

48 49 50 51 52 53 54
*   Keep executions for each specific declaration

    Each `retry_on` declaration has now its own specific executions counter. Before it was
    shared between all executions of a job.

    *Alberto Almagro*

55 56 57 58 59
*   Allow all assertion helpers that have a `only` and `except` keyword to accept
    Procs.

    *Edouard Chin*

60
*   Restore `HashWithIndifferentAccess` support to `ActiveJob::Arguments.deserialize`.
61 62 63

    *Gannon McGibbon*

64 65 66 67 68
*   Include deserialized arguments in job instances returned from
    `assert_enqueued_with` and `assert_performed_with`

    *Alan Wu*

69 70 71 72 73 74
*   Allow `assert_enqueued_with`/`assert_performed_with` methods to accept
    a proc for the `args` argument. This is useful to check if only a subset of arguments
    matches your expectations.

    *Edouard Chin*

75 76 77 78
*   `ActionDispatch::IntegrationTest` includes `ActiveJob::TestHelper` module by default.

    *Ricardo Díaz*

79 80 81 82
*   Added `enqueue_retry.active_job`, `retry_stopped.active_job`, and `discard.active_job` hooks.

    *steves*

83 84 85 86
*   Allow `assert_performed_with` to be called without a block.

    *bogdanvlviv*

87 88 89 90 91
*   Execution of `assert_performed_jobs`, and `assert_no_performed_jobs`
    without a block should respect passed `:except`, `:only`, and `:queue` options.

    *bogdanvlviv*

92 93 94 95
*   Allow `:queue` option to job assertions and helpers.

    *bogdanvlviv*

96 97 98 99 100 101
*   Allow `perform_enqueued_jobs` to be called without a block.

    Performs all of the jobs that have been enqueued up to this point in the test.

    *Kevin Deisz*

102 103 104 105
*   Move `enqueue`/`enqueue_at` notifications to an around callback.

    Improves timing accuracy over the old after callback by including
    time spent writing to the adapter's IO implementation.
106 107 108

    *Zach Kemp*

109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
*   Allow call `assert_enqueued_with` with no block.

    Example:
    ```
    def test_assert_enqueued_with
      MyJob.perform_later(1,2,3)
      assert_enqueued_with(job: MyJob, args: [1,2,3], queue: 'low')

      MyJob.set(wait_until: Date.tomorrow.noon).perform_later
      assert_enqueued_with(job: MyJob, at: Date.tomorrow.noon)
    end
    ```

    *bogdanvlviv*

124 125 126 127
*   Allow passing multiple exceptions to `retry_on`, and `discard_on`.

    *George Claghorn*

128 129 130 131 132 133
*   Pass the error instance as the second parameter of block executed by `discard_on`.

    Fixes #32853.

    *Yuji Yaginuma*

A
Alberto Almagro 已提交
134 135 136 137 138 139 140 141
*   Remove support for Qu gem.

    Reasons are that the Qu gem wasn't compatible since Rails 5.1,
    gem development was stopped in 2014 and maintainers have
    confirmed its demise. See issue #32273

    *Alberto Almagro*

B
bogdanvlviv 已提交
142
*   Add support for timezones to Active Job.
143 144 145 146 147 148 149

    Record what was the current timezone in effect when the job was
    enqueued and then restore when the job is executed in same way
    that the current locale is recorded and restored.

    *Andrew White*

K
Kasper Timm Hansen 已提交
150
*   Rails 6 requires Ruby 2.5.0 or newer.
J
Jeremy Daer 已提交
151

K
Kasper Timm Hansen 已提交
152
    *Jeremy Daer*, *Kasper Timm Hansen*
J
Jeremy Daer 已提交
153

R
Rafael Mendonça França 已提交
154 155 156
*   Add support to define custom argument serializers.

    *Evgenii Pecherkin*, *Rafael Mendonça França*
157 158


159
Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/activejob/CHANGELOG.md) for previous changes.