sidekiq-dry 1.1.1 → 1.1.4

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: c64ab9affeebd68fc36380d88605da8f76b7ac92885ae5cbc9173f5120fc7cd8
4
- data.tar.gz: 40fd08a75380dd98d8f98d712397d1f39f37887b33a07bc21479436fa439d504
3
+ metadata.gz: 57e30bd8819bdbfdeadffae41a3312d9213f5430bd03e2120aca5cc1ee72ff73
4
+ data.tar.gz: 4b94d998c7fdf5b0e2fe0f412f1f82fb73318e2b1d8fd3372ba60e17c798a6b5
5
5
  SHA512:
6
- metadata.gz: 7d3533a66422beb638e784a45bee9dfffdbd6e1b12e4cc37b9cafbdcf5895a5b86c11e616e4283190f2a640cd27849f7838b17d7921e4b6bd2ae33fef6d37828
7
- data.tar.gz: be4483f697430720a376f1b1c50dd71efea48072c8be82000828463d6e17d36fc978b146b8cad37303a08e6c3b82c096cb17157f48280a7478c243face90077c
6
+ metadata.gz: 92778724b3dcc11d3475ed27a699c0ddb4b99d9dc881037e3a8cf1bc8d8f38ace99565a75841854b4c784c85fb76c4e9947b17321f1439168cadbb47b9ed6b15
7
+ data.tar.gz: d456da5f0fe5ca46997fdbda39e5523633fd742be683a183e393005ac193bee4415c5630d00ddd8234504933d3e95767b0132ea9720b85481be32a83cf47647a
data/CHANGELOG CHANGED
@@ -4,7 +4,28 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
5
  ## Unreleased
6
6
 
7
- ## [1.1.1] - 2020-02-24
7
+ ## [1.1.4] - 2022-06-14
8
+
9
+ ### Changed
10
+
11
+ * Convert all values in the struct to JSON representations when serialising. (PR #3)
12
+
13
+ ## [1.1.3] - 2022-05-15
14
+
15
+ ### Changed
16
+
17
+ * Bumped sidekiq to 6.4.2
18
+ * Stringified args to ensure JSON-compatiblity to fix - Job arguments
19
+ do not serialize to JSON safely. This would have raised an error in
20
+ Sidekiq 7.0.
21
+
22
+ ## [1.1.2] - 2021-12-11
23
+
24
+ ### Changed
25
+
26
+ * Bumped sidekiq dependency for CVE-2021-30151
27
+
28
+ ## [1.1.1] - 2021-02-24
8
29
 
9
30
  ### Changed
10
31
 
data/Gemfile.lock CHANGED
@@ -1,60 +1,56 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sidekiq-dry (1.1.0)
4
+ sidekiq-dry (1.1.2)
5
5
  activesupport
6
6
  dry-struct (~> 1.0)
7
- sidekiq (~> 6.0)
7
+ sidekiq (>= 6.4.2)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (6.1.1)
12
+ activesupport (7.0.3)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
14
  i18n (>= 1.6, < 2)
15
15
  minitest (>= 5.1)
16
16
  tzinfo (~> 2.0)
17
- zeitwerk (~> 2.3)
18
17
  coderay (1.1.3)
19
- concurrent-ruby (1.1.7)
20
- connection_pool (2.2.3)
18
+ concurrent-ruby (1.1.10)
19
+ connection_pool (2.2.5)
21
20
  diff-lcs (1.4.4)
22
- dry-configurable (0.12.0)
21
+ dry-configurable (0.15.0)
23
22
  concurrent-ruby (~> 1.0)
24
- dry-core (~> 0.5, >= 0.5.0)
25
- dry-container (0.7.2)
23
+ dry-core (~> 0.6)
24
+ dry-container (0.9.0)
26
25
  concurrent-ruby (~> 1.0)
27
- dry-configurable (~> 0.1, >= 0.1.3)
28
- dry-core (0.5.0)
26
+ dry-configurable (~> 0.13, >= 0.13.0)
27
+ dry-core (0.7.1)
29
28
  concurrent-ruby (~> 1.0)
30
- dry-equalizer (0.3.0)
31
- dry-inflector (0.2.0)
32
- dry-logic (1.1.0)
29
+ dry-inflector (0.2.1)
30
+ dry-logic (1.2.0)
33
31
  concurrent-ruby (~> 1.0)
34
32
  dry-core (~> 0.5, >= 0.5)
35
- dry-struct (1.3.0)
36
- dry-core (~> 0.4, >= 0.4.4)
37
- dry-equalizer (~> 0.3)
38
- dry-types (~> 1.3)
33
+ dry-struct (1.4.0)
34
+ dry-core (~> 0.5, >= 0.5)
35
+ dry-types (~> 1.5)
39
36
  ice_nine (~> 0.11)
40
- dry-types (1.4.0)
37
+ dry-types (1.5.1)
41
38
  concurrent-ruby (~> 1.0)
42
39
  dry-container (~> 0.3)
43
- dry-core (~> 0.4, >= 0.4.4)
44
- dry-equalizer (~> 0.3)
40
+ dry-core (~> 0.5, >= 0.5)
45
41
  dry-inflector (~> 0.1, >= 0.1.2)
46
42
  dry-logic (~> 1.0, >= 1.0.2)
47
- i18n (1.8.7)
43
+ i18n (1.10.0)
48
44
  concurrent-ruby (~> 1.0)
49
45
  ice_nine (0.11.2)
50
46
  method_source (1.0.0)
51
- minitest (5.14.3)
47
+ minitest (5.15.0)
52
48
  pry (0.13.1)
53
49
  coderay (~> 1.1)
54
50
  method_source (~> 1.0)
55
51
  rack (2.2.3)
56
52
  rake (12.3.3)
57
- redis (4.2.5)
53
+ redis (4.6.0)
58
54
  rspec (3.10.0)
59
55
  rspec-core (~> 3.10.0)
60
56
  rspec-expectations (~> 3.10.0)
@@ -68,13 +64,12 @@ GEM
68
64
  diff-lcs (>= 1.2.0, < 2.0)
69
65
  rspec-support (~> 3.10.0)
70
66
  rspec-support (3.10.1)
71
- sidekiq (6.1.2)
67
+ sidekiq (6.4.2)
72
68
  connection_pool (>= 2.2.2)
73
69
  rack (~> 2.0)
74
70
  redis (>= 4.2.0)
75
71
  tzinfo (2.0.4)
76
72
  concurrent-ruby (~> 1.0)
77
- zeitwerk (2.4.2)
78
73
 
79
74
  PLATFORMS
80
75
  ruby
data/README.md CHANGED
@@ -81,11 +81,16 @@ Configure Sidekiq to use the middlewares provided by this gem:
81
81
  # File: config/initializers/sidekiq.rb
82
82
  Sidekiq.configure_client do |config|
83
83
  config.client_middleware do |chain|
84
- chain.add Sidekiq::Dry::Client::SerializationMiddleware
84
+ chain.prepend Sidekiq::Dry::Client::SerializationMiddleware
85
85
  end
86
86
  end
87
87
 
88
88
  Sidekiq.configure_server do |config|
89
+ # Ensure jobs enqueued by other jobs serialize their structs
90
+ config.client_middleware do |chain|
91
+ chain.prepend Sidekiq::Dry::Client::SerializationMiddleware
92
+ end
93
+
89
94
  config.server_middleware do |chain|
90
95
  chain.add Sidekiq::Dry::Server::DeserializationMiddleware
91
96
  end
@@ -13,7 +13,7 @@ module Sidekiq
13
13
 
14
14
  # Set a `_type` argument to be able to instantiate
15
15
  # the struct when the job is performed
16
- arg.to_h.merge(_type: arg.class)
16
+ arg.to_h.merge(_type: arg.class.to_s).as_json
17
17
  end
18
18
 
19
19
  yield
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Dry
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.4"
4
4
  end
5
5
  end
data/sidekiq-dry.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ["lib"]
27
27
 
28
- spec.add_dependency 'sidekiq', '~> 6.0'
28
+ spec.add_dependency 'sidekiq', '>= 6.4.2'
29
29
  spec.add_dependency 'dry-struct', '~> 1.0'
30
30
  spec.add_dependency 'activesupport'
31
31
 
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-dry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitris Zorbas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-24 00:00:00.000000000 Z
11
+ date: 2022-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '6.0'
19
+ version: 6.4.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '6.0'
26
+ version: 6.4.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dry-struct
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  requirements: []
145
- rubygems_version: 3.1.4
145
+ rubygems_version: 3.3.3
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Dry::Struct arguments for Sidekiq jobs