sidekiq-delay_extensions 6.4.0 → 6.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 716a9aa8fc7cb10a70fa3677b0f23c782cf07bb31fe9ad5423da4c1b065a8477
4
- data.tar.gz: a2652e237b7de3ca5a8a4cbb72655f805fb535b4e52b8aacf8d3c0b9a479515c
3
+ metadata.gz: beb5bfc9e96d466f3243e2a46d1826f67463b973fc9d6ce72687abe085cb61ab
4
+ data.tar.gz: 17d9241ad6cde74793d0e5c860b962044a8c9b592a8059566c4391a55f068b49
5
5
  SHA512:
6
- metadata.gz: e9a1f926727cb57afc4221a2b23ea5c025f0ab566e9c2b000b46a51258376cede7bddb3795128456e2792a92a1352cc6a3e7c9b6793a4e8ff91dd1cf9993e7ae
7
- data.tar.gz: 800db7a111af06c8854f348ce117d535bb4b88f9e54f2435f80bbcbf3db5a48b10f67ec1ba7655030d4b8dbc7fbbc2c13aa53e7bbc53eda0e84c597380401adc
6
+ metadata.gz: f8ac369b7701a8c979c729a512287d0956b1f952c87f48660d2f1262c14ab992cea51970626fc01eb737263e7c67b9dc1ad220542695964a74ad591ec2970fd8
7
+ data.tar.gz: a1cd9feaaae12197787b9b707689c61b6631e559f61cec18b0d35eac56165046100dba4822f5d0dd0c8ceae56e648113e3ee4bdd97a602a2b0df1af2072fcc01
data/Changes.md CHANGED
@@ -6,8 +6,3 @@
6
6
  ---------
7
7
 
8
8
  - Extracted from https://github.com/mperham/sidekiq/tree/v6.4.1
9
-
10
- 6.4.0
11
- ---------
12
-
13
- - Extracted from https://github.com/mperham/sidekiq/tree/v6.4.0
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem "sidekiq", ">= 6.4.0"
5
+ gem "sidekiq", ">= 6.4.1"
6
6
  gem "rake"
7
7
  gem "redis-namespace"
8
8
  gem "rails", ">= 6.0.2"
data/README.md CHANGED
@@ -14,7 +14,7 @@ When Sidekiq reaches 7.0, this gem will begin being maintained on its own. Maint
14
14
  Requirements
15
15
  -----------------
16
16
 
17
- - See https://github.com/mperham/sidekiq/tree/v6.4.0
17
+ - See https://github.com/mperham/sidekiq/tree/v6.4.1
18
18
  - Redis: 4.0+
19
19
  - Ruby: MRI 2.5+ or JRuby 9.2+.
20
20
  - Sidekiq 6.0 supports Rails 5.0+ but does not require it.
@@ -16,8 +16,8 @@ module Sidekiq
16
16
  include Sidekiq::Worker
17
17
 
18
18
  def perform(yml)
19
- (target, method_name, args, kwargs) = YAML.load(yml)
20
- msg = kwargs.empty? ? target.public_send(method_name, *args) : target.public_send(method_name, *args, **kwargs)
19
+ (target, method_name, args) = YAML.load(yml)
20
+ msg = target.public_send(method_name, *args)
21
21
  # The email method can return nil, which causes ActionMailer to return
22
22
  # an undeliverable empty message.
23
23
  if msg
@@ -18,8 +18,8 @@ module Sidekiq
18
18
  include Sidekiq::Worker
19
19
 
20
20
  def perform(yml)
21
- (target, method_name, args, kwargs) = YAML.load(yml)
22
- kwargs.empty? ? target.__send__(method_name, *args) : target.__send__(method_name, *args, **kwargs)
21
+ (target, method_name, args) = YAML.load(yml)
22
+ target.__send__(method_name, *args)
23
23
  end
24
24
  end
25
25
 
@@ -23,10 +23,13 @@ module Sidekiq
23
23
  # Unwrap known wrappers so they show up in a human-friendly manner in the Web UI
24
24
  @display_args ||= case klass
25
25
  when /\ASidekiq::DelayExtensions::Delayed/
26
- safe_load(args[0], args) do |_, _, arg|
27
- arg
26
+ safe_load(args[0], args) do |_, _, arg, kwarg|
27
+ if !kwarg || kwarg.empty?
28
+ arg
29
+ else
30
+ [arg, kwarg]
31
+ end
28
32
  end
29
-
30
33
  else
31
34
  super
32
35
  end
@@ -16,8 +16,8 @@ module Sidekiq
16
16
  include Sidekiq::Worker
17
17
 
18
18
  def perform(yml)
19
- (target, method_name, args, kwargs) = YAML.load(yml)
20
- kwargs.empty? ? target.__send__(method_name, *args) : target.__send__(method_name, *args, **kwargs)
19
+ (target, method_name, args) = YAML.load(yml)
20
+ target.__send__(method_name, *args)
21
21
  end
22
22
  end
23
23
 
@@ -13,13 +13,13 @@ module Sidekiq
13
13
  @opts = options
14
14
  end
15
15
 
16
- def method_missing(name, *args, **kwargs)
16
+ def method_missing(name, *args)
17
17
  # Sidekiq has a limitation in that its message must be JSON.
18
18
  # JSON can't round trip real Ruby objects so we use YAML to
19
19
  # serialize the objects to a String. The YAML will be converted
20
20
  # to JSON and then deserialized on the other side back into a
21
21
  # Ruby object.
22
- obj = [@target, name, args, kwargs]
22
+ obj = [@target, name, args]
23
23
  marshalled = ::YAML.dump(obj)
24
24
  if marshalled.size > SIZE_LIMIT
25
25
  ::Sidekiq.logger.warn { "#{@target}.#{name} job argument is #{marshalled.bytesize} bytes, you should refactor it to reduce the size" }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sidekiq
4
4
  module DelayExtensions
5
- VERSION = "6.4.0"
5
+ VERSION = "6.4.1"
6
6
  end
7
7
  end
@@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
28
28
  "source_code_uri" => "https://github.com/gemhome/sidekiq-delay_extensions"
29
29
  }
30
30
 
31
- spec.add_dependency "sidekiq", ">= 6.4.0"
31
+ spec.add_dependency "sidekiq", ">= 6.4.1"
32
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-delay_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.4.0
4
+ version: 6.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 6.4.0
20
+ version: 6.4.1
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 6.4.0
27
+ version: 6.4.1
28
28
  description: Extracted from Sidekiq 6.0
29
29
  email:
30
30
  - mperham@gmail.com