diff options
Diffstat (limited to 'activejob/lib')
-rw-r--r-- | activejob/lib/active_job/core.rb | 2 | ||||
-rw-r--r-- | activejob/lib/active_job/gem_version.rb | 2 | ||||
-rw-r--r-- | activejob/lib/active_job/queue_adapters.rb | 6 | ||||
-rw-r--r-- | activejob/lib/active_job/test_helper.rb | 14 |
4 files changed, 19 insertions, 5 deletions
diff --git a/activejob/lib/active_job/core.rb b/activejob/lib/active_job/core.rb index 2ce008e3da..283125698d 100644 --- a/activejob/lib/active_job/core.rb +++ b/activejob/lib/active_job/core.rb @@ -40,7 +40,7 @@ module ActiveJob # Timezone to be used during the job. attr_accessor :timezone - # Track when a job was enqueded + # Track when a job was enqueued attr_accessor :enqueued_at # These methods will be included into any Active Job object, adding diff --git a/activejob/lib/active_job/gem_version.rb b/activejob/lib/active_job/gem_version.rb index 2b894397e3..5313a4ab9e 100644 --- a/activejob/lib/active_job/gem_version.rb +++ b/activejob/lib/active_job/gem_version.rb @@ -10,7 +10,7 @@ module ActiveJob MAJOR = 6 MINOR = 0 TINY = 0 - PRE = "beta1" + PRE = "beta3" STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".") end diff --git a/activejob/lib/active_job/queue_adapters.rb b/activejob/lib/active_job/queue_adapters.rb index 525e79e302..a4b7eb86f1 100644 --- a/activejob/lib/active_job/queue_adapters.rb +++ b/activejob/lib/active_job/queue_adapters.rb @@ -10,11 +10,11 @@ module ActiveJob # * {Que}[https://github.com/chanks/que] # * {queue_classic}[https://github.com/QueueClassic/queue_classic] # * {Resque}[https://github.com/resque/resque] - # * {Sidekiq}[http://sidekiq.org] + # * {Sidekiq}[https://sidekiq.org] # * {Sneakers}[https://github.com/jondot/sneakers] # * {Sucker Punch}[https://github.com/brandonhilkert/sucker_punch] - # * {Active Job Async Job}[http://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/AsyncAdapter.html] - # * {Active Job Inline}[http://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/InlineAdapter.html] + # * {Active Job Async Job}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/AsyncAdapter.html] + # * {Active Job Inline}[https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/InlineAdapter.html] # * Please Note: We are not accepting pull requests for new adapters. See the {README}[link:files/activejob/README_md.html] for more details. # # === Backends Features diff --git a/activejob/lib/active_job/test_helper.rb b/activejob/lib/active_job/test_helper.rb index f03780b91e..e5e2b086bc 100644 --- a/activejob/lib/active_job/test_helper.rb +++ b/activejob/lib/active_job/test_helper.rb @@ -631,6 +631,20 @@ module ActiveJob def prepare_args_for_assertion(args) args.dup.tap do |arguments| arguments[:at] = arguments[:at].to_f if arguments[:at] + arguments[:args] = round_time_arguments(arguments[:args]) if arguments[:args] + end + end + + def round_time_arguments(argument) + case argument + when Time, ActiveSupport::TimeWithZone, DateTime + argument.change(usec: 0) + when Hash + argument.transform_values { |value| round_time_arguments(value) } + when Array + argument.map { |element| round_time_arguments(element) } + else + argument end end |