Hello community,

here is the log from the commit of package rubygem-delayed_job for 
openSUSE:Factory checked in at 2017-06-02 10:33:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-delayed_job (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-delayed_job.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-delayed_job"

Fri Jun  2 10:33:14 2017 rev:13 rq:499968 version:4.1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-delayed_job/rubygem-delayed_job.changes  
2016-06-12 18:54:29.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-delayed_job.new/rubygem-delayed_job.changes 
    2017-06-02 10:34:03.185794599 +0200
@@ -1,0 +2,15 @@
+Tue May 30 05:11:16 UTC 2017 - co...@suse.com
+
+- updated to version 4.1.3
+ see installed CHANGELOG.md
+
+  4.1.3 - 2017-05-26
+  =================
+  * Don't mutate the options hash (#877)
+  * Log an error message when a deserialization error occurs (#894)
+  * Adding the queue name to the log output (#917)
+  * Don't include ClassMethods with MessageSending (#924)
+  * Fix YAML deserialization error if original object is soft-deleted (#947)
+  * Add support for Rails 5.1 (#982)
+
+-------------------------------------------------------------------

Old:
----
  delayed_job-4.1.2.gem

New:
----
  delayed_job-4.1.3.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-delayed_job.spec ++++++
--- /var/tmp/diff_new_pack.3O1v03/_old  2017-06-02 10:34:03.709720571 +0200
+++ /var/tmp/diff_new_pack.3O1v03/_new  2017-06-02 10:34:03.713720006 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-delayed_job
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-delayed_job
-Version:        4.1.2
+Version:        4.1.3
 Release:        0
 %define mod_name delayed_job
 %define mod_full_name %{mod_name}-%{version}

++++++ delayed_job-4.1.2.gem -> delayed_job-4.1.3.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2016-05-16 18:29:42.000000000 +0200
+++ new/CHANGELOG.md    2017-05-26 20:11:43.000000000 +0200
@@ -1,4 +1,14 @@
+4.1.3 - 2017-05-26
+=================
+* Don't mutate the options hash (#877)
+* Log an error message when a deserialization error occurs (#894)
+* Adding the queue name to the log output (#917)
+* Don't include ClassMethods with MessageSending (#924)
+* Fix YAML deserialization error if original object is soft-deleted (#947)
+* Add support for Rails 5.1 (#982)
+
 4.1.2 - 2016-05-16
+==================
 * Added Delayed::Worker.queue_attributes
 * Limit what we require in ActiveSupport
 * Fix pid file creation when there is no tmp directory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2016-05-16 18:29:42.000000000 +0200
+++ new/README.md       2017-05-26 20:11:43.000000000 +0200
@@ -1,7 +1,7 @@
 **If you're viewing this at https://github.com/collectiveidea/delayed_job,
 you're reading the documentation for the master branch.
 [View documentation for the latest release
-(4.1.2).](https://github.com/collectiveidea/delayed_job/tree/v4.1.2)**
+(4.1.3).](https://github.com/collectiveidea/delayed_job/tree/v4.1.3)**
 
 Delayed::Job
 ============
@@ -37,8 +37,7 @@
 
 Installation
 ============
-delayed_job 3.0.0 only supports Rails 3.0+. See the [2.0
-branch](https://github.com/collectiveidea/delayed_job/tree/v2.0) for Rails 2.
+delayed_job 3.0.0 only supports Rails 3.0+.
 
 delayed_job supports multiple backends for storing the job queue. [See the wiki
 for other 
backends](https://github.com/collectiveidea/delayed_job/wiki/Backends).
@@ -220,6 +219,12 @@
 object.delay(:queue => 'high_priority', priority: 0).method
 ```
 
+You can start processes to only work certain queues with the `queue` and 
`queues`
+options defined below. Processes started without specifying a queue will run 
jobs
+from **any** queue. To effectively have a process that runs jobs where a queue 
is not
+specified, set a default queue name with `Delayed::Worker.default_queue_name` 
and 
+have the processes run that queue.
+
 Running Jobs
 ============
 `script/delayed_job` can be used to manage a background process which will
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/delayed_job.gemspec new/delayed_job.gemspec
--- old/delayed_job.gemspec     2016-05-16 18:29:42.000000000 +0200
+++ new/delayed_job.gemspec     2017-05-26 20:11:43.000000000 +0200
@@ -1,7 +1,7 @@
 # -*- encoding: utf-8 -*-
 
 Gem::Specification.new do |spec|
-  spec.add_dependency 'activesupport', ['>= 3.0', '< 5.1']
+  spec.add_dependency 'activesupport', ['>= 3.0', '< 5.2']
   spec.authors        = ['Brandon Keepers', 'Brian Ryckbost', 'Chris Gaffney', 
'David Genord II', 'Erik Michaels-Ober', 'Matt Griffin', 'Steve Richert', 
'Tobias Lütke']
   spec.description    = 'Delayed_job (or DJ) encapsulates the common pattern 
of asynchronously executing longer tasks in the background. It is a direct 
extraction from Shopify where the job table is responsible for a multitude of 
core tasks.'
   spec.email          = ['br...@collectiveidea.com']
@@ -13,5 +13,5 @@
   spec.require_paths  = ['lib']
   spec.summary        = 'Database-backed asynchronous priority queue system -- 
Extracted from Shopify'
   spec.test_files     = Dir.glob('spec/**/*')
-  spec.version        = '4.1.2'
+  spec.version        = '4.1.3'
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/delayed/backend/base.rb 
new/lib/delayed/backend/base.rb
--- old/lib/delayed/backend/base.rb     2016-05-16 18:29:42.000000000 +0200
+++ new/lib/delayed/backend/base.rb     2017-05-26 20:11:43.000000000 +0200
@@ -30,16 +30,13 @@
         end
 
         # Allow the backend to attempt recovery from reserve errors
-        def recover_from(_error)
-        end
+        def recover_from(_error); end
 
         # Hook method that is called before a new worker is forked
-        def before_fork
-        end
+        def before_fork; end
 
         # Hook method that is called after a new worker is forked
-        def after_fork
-        end
+        def after_fork; end
 
         def work_off(num = 100)
           warn '[DEPRECATION] `Delayed::Job.work_off` is deprecated. Use 
`Delayed::Worker.new.work_off instead.'
@@ -101,7 +98,7 @@
       def hook(name, *args)
         if payload_object.respond_to?(name)
           method = payload_object.method(name)
-          method.arity == 0 ? method.call : method.call(self, *args)
+          method.arity.zero? ? method.call : method.call(self, *args)
         end
       rescue DeserializationError # rubocop:disable HandleExceptions
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/delayed/backend/job_preparer.rb 
new/lib/delayed/backend/job_preparer.rb
--- old/lib/delayed/backend/job_preparer.rb     2016-05-16 18:29:42.000000000 
+0200
+++ new/lib/delayed/backend/job_preparer.rb     2017-05-26 20:11:43.000000000 
+0200
@@ -4,7 +4,7 @@
       attr_reader :options, :args
 
       def initialize(*args)
-        @options = args.extract_options!
+        @options = args.extract_options!.dup
         @args = args
       end
 
@@ -42,9 +42,11 @@
           options[:run_at]   = args[1]
         end
 
+        # rubocop:disable GuardClause
         unless options[:payload_object].respond_to?(:perform)
           raise ArgumentError, 'Cannot enqueue items which do not respond to 
perform'
         end
+        # rubocop:enabled GuardClause
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/delayed/backend/shared_spec.rb 
new/lib/delayed/backend/shared_spec.rb
--- old/lib/delayed/backend/shared_spec.rb      2016-05-16 18:29:42.000000000 
+0200
+++ new/lib/delayed/backend/shared_spec.rb      2017-05-26 20:11:43.000000000 
+0200
@@ -113,6 +113,12 @@
         job = described_class.enqueue M::ModuleJob.new
         expect { job.invoke_job }.to change { M::ModuleJob.runs }.from(0).to(1)
       end
+
+      it 'does not mutate the options hash' do
+        options = {:priority => 1}
+        described_class.enqueue SimpleJob.new, options
+        expect(options).to eq(:priority => 1)
+      end
     end
 
     context 'with delay_jobs = false' do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/delayed/command.rb new/lib/delayed/command.rb
--- old/lib/delayed/command.rb  2016-05-16 18:29:42.000000000 +0200
+++ new/lib/delayed/command.rb  2017-05-26 20:11:43.000000000 +0200
@@ -77,8 +77,11 @@
         opt.on('--exit-on-complete', 'Exit when no more jobs are available to 
run. This will exit if all jobs are scheduled to run in the future.') do
           @options[:exit_on_complete] = true
         end
+        opt.on('--daemon-options a, b, c', Array, 'options to be passed 
through to daemons gem') do |daemon_options|
+          @daemon_options = daemon_options
+        end
       end
-      @args = opts.parse!(args)
+      @args = opts.parse!(args) + (@daemon_options || [])
     end
 
     def daemonize # rubocop:disable PerceivedComplexity
@@ -88,11 +91,13 @@
       if worker_pools
         setup_pools
       elsif @options[:identifier]
+        # rubocop:disable GuardClause
         if worker_count > 1
           raise ArgumentError, 'Cannot specify both --number-of-workers and 
--identifier'
         else
           run_process("delayed_job.#{@options[:identifier]}", @options)
         end
+        # rubocop:enable GuardClause
       else
         worker_count.times do |worker_index|
           process_name = worker_count == 1 ? 'delayed_job' : 
"delayed_job.#{worker_index}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/delayed/exceptions.rb 
new/lib/delayed/exceptions.rb
--- old/lib/delayed/exceptions.rb       2016-05-16 18:29:42.000000000 +0200
+++ new/lib/delayed/exceptions.rb       2017-05-26 20:11:43.000000000 +0200
@@ -8,5 +8,5 @@
     end
   end
 
-  class FatalBackendError < Exception; end
+  class FatalBackendError < RuntimeError; end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/delayed/lifecycle.rb new/lib/delayed/lifecycle.rb
--- old/lib/delayed/lifecycle.rb        2016-05-16 18:29:42.000000000 +0200
+++ new/lib/delayed/lifecycle.rb        2017-05-26 20:11:43.000000000 +0200
@@ -1,5 +1,5 @@
 module Delayed
-  class InvalidCallback < Exception; end
+  class InvalidCallback < RuntimeError; end
 
   class Lifecycle
     EVENTS = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/delayed/message_sending.rb 
new/lib/delayed/message_sending.rb
--- old/lib/delayed/message_sending.rb  2016-05-16 18:29:42.000000000 +0200
+++ new/lib/delayed/message_sending.rb  2017-05-26 20:11:43.000000000 +0200
@@ -6,9 +6,11 @@
       @options = options
     end
 
+    # rubocop:disable MethodMissing
     def method_missing(method, *args)
       Job.enqueue({:payload_object => @payload_class.new(@target, 
method.to_sym, args)}.merge(@options))
     end
+    # rubocop:enable MethodMissing
   end
 
   module MessageSending
@@ -26,36 +28,36 @@
       warn '[DEPRECATION] `object.send_at(time, :method)` is deprecated. Use 
`object.delay(:run_at => time).method'
       __delay__(:run_at => time).__send__(method, *args)
     end
+  end
 
-    module ClassMethods
-      def handle_asynchronously(method, opts = {}) # rubocop:disable 
PerceivedComplexity
-        aliased_method = method.to_s.sub(/([?!=])$/, '')
-        punctuation = $1 # rubocop:disable PerlBackrefs
-        with_method = "#{aliased_method}_with_delay#{punctuation}"
-        without_method = "#{aliased_method}_without_delay#{punctuation}"
-        define_method(with_method) do |*args|
-          curr_opts = opts.clone
-          curr_opts.each_key do |key|
-            next unless (val = curr_opts[key]).is_a?(Proc)
-            curr_opts[key] = if val.arity == 1
-              val.call(self)
-            else
-              val.call
-            end
+  module MessageSendingClassMethods
+    def handle_asynchronously(method, opts = {}) # rubocop:disable 
PerceivedComplexity
+      aliased_method = method.to_s.sub(/([?!=])$/, '')
+      punctuation = $1 # rubocop:disable PerlBackrefs
+      with_method = "#{aliased_method}_with_delay#{punctuation}"
+      without_method = "#{aliased_method}_without_delay#{punctuation}"
+      define_method(with_method) do |*args|
+        curr_opts = opts.clone
+        curr_opts.each_key do |key|
+          next unless (val = curr_opts[key]).is_a?(Proc)
+          curr_opts[key] = if val.arity == 1
+            val.call(self)
+          else
+            val.call
           end
-          delay(curr_opts).__send__(without_method, *args)
         end
+        delay(curr_opts).__send__(without_method, *args)
+      end
 
-        alias_method without_method, method
-        alias_method method, with_method
+      alias_method without_method, method
+      alias_method method, with_method
 
-        if public_method_defined?(without_method)
-          public method
-        elsif protected_method_defined?(without_method)
-          protected method
-        elsif private_method_defined?(without_method)
-          private method
-        end
+      if public_method_defined?(without_method)
+        public method
+      elsif protected_method_defined?(without_method)
+        protected method
+      elsif private_method_defined?(without_method)
+        private method
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/delayed/performable_method.rb 
new/lib/delayed/performable_method.rb
--- old/lib/delayed/performable_method.rb       2016-05-16 18:29:42.000000000 
+0200
+++ new/lib/delayed/performable_method.rb       2017-05-26 20:11:43.000000000 
+0200
@@ -30,9 +30,11 @@
       object.method(sym)
     end
 
+    # rubocop:disable MethodMissing
     def method_missing(symbol, *args)
       object.send(symbol, *args)
     end
+    # rubocop:enable MethodMissing
 
     def respond_to?(symbol, include_private = false)
       super || object.respond_to?(symbol, include_private)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/delayed/psych_ext.rb new/lib/delayed/psych_ext.rb
--- old/lib/delayed/psych_ext.rb        2016-05-16 18:29:42.000000000 +0200
+++ new/lib/delayed/psych_ext.rb        2017-05-26 20:11:43.000000000 +0200
@@ -37,7 +37,7 @@
             klass = result.class
             id = result[klass.primary_key]
             begin
-              klass.find(id)
+              klass.unscoped.find(id)
             rescue ActiveRecord::RecordNotFound => error # rubocop:disable 
BlockNesting
               raise Delayed::DeserializationError, 
"ActiveRecord::RecordNotFound, class: #{klass}, primary key: #{id} 
(#{error.message})"
             end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/delayed/worker.rb new/lib/delayed/worker.rb
--- old/lib/delayed/worker.rb   2016-05-16 18:29:42.000000000 +0200
+++ new/lib/delayed/worker.rb   2017-05-26 20:11:44.000000000 +0200
@@ -233,6 +233,8 @@
       job_say job, format('COMPLETED after %.4f', runtime)
       return true # did work
     rescue DeserializationError => error
+      job_say job, "FAILED permanently with #{error.class.name}: 
#{error.message}", 'error'
+
       job.error = error
       failed(job)
     rescue Exception => error # rubocop:disable RescueException
@@ -268,7 +270,7 @@
     end
 
     def job_say(job, text, level = default_log_level)
-      text = "Job #{job.name} (id=#{job.id}) #{text}"
+      text = "Job #{job.name} (id=#{job.id})#{say_queue(job.queue)} #{text}"
       say text, level
     end
 
@@ -293,6 +295,10 @@
 
   protected
 
+    def say_queue(queue)
+      " (queue=#{queue})" if queue
+    end
+
     def handle_failed_job(job, error)
       job.error = error
       job_say job, "FAILED (#{job.attempts} prior attempts) with 
#{error.class.name}: #{error.message}", 'error'
@@ -320,8 +326,12 @@
 
     def reload!
       return unless self.class.reload_app?
-      ActionDispatch::Reloader.cleanup!
-      ActionDispatch::Reloader.prepare!
+      if defined?(ActiveSupport::Reloader)
+        Rails.application.reloader.reload!
+      else
+        ActionDispatch::Reloader.cleanup!
+        ActionDispatch::Reloader.prepare!
+      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/delayed_job.rb new/lib/delayed_job.rb
--- old/lib/delayed_job.rb      2016-05-16 18:29:42.000000000 +0200
+++ new/lib/delayed_job.rb      2017-05-26 20:11:44.000000000 +0200
@@ -1,3 +1,4 @@
+require 'active_support'
 require 'delayed/compatibility'
 require 'delayed/exceptions'
 require 'delayed/message_sending'
@@ -19,4 +20,4 @@
 require 'delayed/railtie' if defined?(Rails::Railtie)
 
 Object.send(:include, Delayed::MessageSending)
-Module.send(:include, Delayed::MessageSending::ClassMethods)
+Module.send(:include, Delayed::MessageSendingClassMethods)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/generators/delayed_job/delayed_job_generator.rb 
new/lib/generators/delayed_job/delayed_job_generator.rb
--- old/lib/generators/delayed_job/delayed_job_generator.rb     2016-05-16 
18:29:42.000000000 +0200
+++ new/lib/generators/delayed_job/delayed_job_generator.rb     2017-05-26 
20:11:44.000000000 +0200
@@ -6,6 +6,6 @@
 
   def create_executable_file
     template 'script', 
"#{Delayed::Compatibility.executable_prefix}/delayed_job"
-    chmod "#{Delayed::Compatibility.executable_prefix}/delayed_job", 0755
+    chmod "#{Delayed::Compatibility.executable_prefix}/delayed_job", 0o755
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2016-05-16 18:29:42.000000000 +0200
+++ new/metadata        2017-05-26 20:11:43.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: delayed_job
 version: !ruby/object:Gem::Version
-  version: 4.1.2
+  version: 4.1.3
 platform: ruby
 authors:
 - Brandon Keepers
@@ -15,7 +15,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2016-05-16 00:00:00.000000000 Z
+date: 2017-05-26 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: activesupport
@@ -26,7 +26,7 @@
         version: '3.0'
     - - "<"
       - !ruby/object:Gem::Version
-        version: '5.1'
+        version: '5.2'
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
@@ -36,7 +36,7 @@
         version: '3.0'
     - - "<"
       - !ruby/object:Gem::Version
-        version: '5.1'
+        version: '5.2'
 description: Delayed_job (or DJ) encapsulates the common pattern of 
asynchronously
   executing longer tasks in the background. It is a direct extraction from 
Shopify
   where the job table is responsible for a multitude of core tasks.
@@ -119,7 +119,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.5.1
+rubygems_version: 2.6.11
 signing_key: 
 specification_version: 4
 summary: Database-backed asynchronous priority queue system -- Extracted from 
Shopify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/autoloaded/clazz.rb new/spec/autoloaded/clazz.rb
--- old/spec/autoloaded/clazz.rb        2016-05-16 18:29:42.000000000 +0200
+++ new/spec/autoloaded/clazz.rb        2017-05-26 20:11:44.000000000 +0200
@@ -1,7 +1,6 @@
 # Make sure this file does not get required manually
 module Autoloaded
   class Clazz
-    def perform
-    end
+    def perform; end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/autoloaded/instance_clazz.rb 
new/spec/autoloaded/instance_clazz.rb
--- old/spec/autoloaded/instance_clazz.rb       2016-05-16 18:29:42.000000000 
+0200
+++ new/spec/autoloaded/instance_clazz.rb       2017-05-26 20:11:44.000000000 
+0200
@@ -1,6 +1,5 @@
 module Autoloaded
   class InstanceClazz
-    def perform
-    end
+    def perform; end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/autoloaded/instance_struct.rb 
new/spec/autoloaded/instance_struct.rb
--- old/spec/autoloaded/instance_struct.rb      2016-05-16 18:29:42.000000000 
+0200
+++ new/spec/autoloaded/instance_struct.rb      2017-05-26 20:11:44.000000000 
+0200
@@ -1,7 +1,6 @@
 module Autoloaded
   InstanceStruct = ::Struct.new(nil)
   class InstanceStruct
-    def perform
-    end
+    def perform; end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/autoloaded/struct.rb 
new/spec/autoloaded/struct.rb
--- old/spec/autoloaded/struct.rb       2016-05-16 18:29:42.000000000 +0200
+++ new/spec/autoloaded/struct.rb       2017-05-26 20:11:44.000000000 +0200
@@ -2,7 +2,6 @@
 module Autoloaded
   Struct = ::Struct.new(nil)
   class Struct
-    def perform
-    end
+    def perform; end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/message_sending_spec.rb 
new/spec/message_sending_spec.rb
--- old/spec/message_sending_spec.rb    2016-05-16 18:29:42.000000000 +0200
+++ new/spec/message_sending_spec.rb    2017-05-26 20:11:44.000000000 +0200
@@ -1,6 +1,11 @@
 require 'helper'
 
 describe Delayed::MessageSending do
+  it 'does not include ClassMethods along with MessageSending' do
+    expect { ClassMethods }.to raise_error(NameError)
+    expect(defined?(String::ClassMethods)).to eq(nil)
+  end
+
   describe 'handle_asynchronously' do
     class Story
       def tell!(_arg); end
@@ -19,7 +24,7 @@
         expect(job.payload_object.class).to eq(Delayed::PerformableMethod)
         expect(job.payload_object.method_name).to eq(:tell_without_delay!)
         expect(job.payload_object.args).to eq([1])
-      end.to change { Delayed::Job.count }
+      end.to(change { Delayed::Job.count })
     end
 
     describe 'with options' do
@@ -42,8 +47,7 @@
       describe 'using a proc with parameters' do
         class Yarn
           attr_accessor :importance
-          def spin
-          end
+          def spin; end
           handle_asynchronously :spin, :priority => proc { |y| y.importance }
         end
 
@@ -107,7 +111,7 @@
         expect do
           fairy_tail.delay.tell
         end.to change(fairy_tail, :happy_ending).from(nil).to(true)
-      end.not_to change { Delayed::Job.count }
+      end.not_to(change { Delayed::Job.count })
     end
 
     it 'does delay the job when delay_jobs is true' do
@@ -137,7 +141,7 @@
         expect do
           fairy_tail.delay.tell
         end.to change(fairy_tail, :happy_ending).from(nil).to(true)
-      end.not_to change { Delayed::Job.count }
+      end.not_to(change { Delayed::Job.count })
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/performable_method_spec.rb 
new/spec/performable_method_spec.rb
--- old/spec/performable_method_spec.rb 2016-05-16 18:29:42.000000000 +0200
+++ new/spec/performable_method_spec.rb 2017-05-26 20:11:44.000000000 +0200
@@ -30,8 +30,7 @@
 
   it 'does not raise NoMethodError if target method is private' do
     clazz = Class.new do
-      def private_method
-      end
+      def private_method; end
       private :private_method
     end
     expect { Delayed::PerformableMethod.new(clazz.new, :private_method, []) 
}.not_to raise_error
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/worker_spec.rb new/spec/worker_spec.rb
--- old/spec/worker_spec.rb     2016-05-16 18:29:42.000000000 +0200
+++ new/spec/worker_spec.rb     2017-05-26 20:11:44.000000000 +0200
@@ -24,15 +24,23 @@
   describe 'job_say' do
     before do
       @worker = Delayed::Worker.new
-      @job = double('job', :id => 123, :name => 'ExampleJob')
+      @job = double('job', :id => 123, :name => 'ExampleJob', :queue => nil)
     end
 
     it 'logs with job name and id' do
+      expect(@job).to receive(:queue)
       expect(@worker).to receive(:say).
         with('Job ExampleJob (id=123) message', 
Delayed::Worker.default_log_level)
       @worker.job_say(@job, 'message')
     end
 
+    it 'logs with job name, queue and id' do
+      expect(@job).to receive(:queue).and_return('test')
+      expect(@worker).to receive(:say).
+        with('Job ExampleJob (id=123) (queue=test) message', 
Delayed::Worker.default_log_level)
+      @worker.job_say(@job, 'message')
+    end
+
     it 'has a configurable default log level' do
       Delayed::Worker.default_log_level = 'error'
 


Reply via email to