sidekiq-belt 0.3.4 → 0.3.5

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: fb4d769018b00b231892ae9852e6fd7d8c51074f6752332fa46ce6e606d68ba7
4
- data.tar.gz: 9b05f6c1a3a505c7e6028bd6248f07ed7964a307129d7f8fc3206d96817c2b61
3
+ metadata.gz: 22715eaf1b97cc17ccba000c8afe03226a8d6c53b330eaa09e7c145b37c3ec62
4
+ data.tar.gz: 539f10b1b8f408e046b908d9e88bddc092348f9c43177374f6ed716523190abf
5
5
  SHA512:
6
- metadata.gz: d7c1f6c6ef57da7f982bc3c1c2cfc8ffec1982ed0030a37f9b829fc9ff4e2dcabd1f606283d81014e668fa1063504f6b2dcf77837b45939a3654f91d5f99354b
7
- data.tar.gz: 6cb88155712149c79268f4f0a27a49c81e60eccc890c6eed0a1a9c29b9697ff561d9730f333c16b428bbf3ca0b50a2857da1439e7b049f367b8511b3b269af3a
6
+ metadata.gz: 4692c9cbf5354af3a7fd7ca42552d1da901a837dc4c59d433784127732e4edb3a4980b607875491e9f332a052aef5b714441883a77981e4cec427a09e72de0d5
7
+ data.tar.gz: d592e7f91d8364cbe6df0fa786f19edfbdcc4d05a6cc4632779134dafa1854e55d872fe8c3ba50c7d617e6a83d0c8da7bd7ab6500226d34c4210c14e31ce8ab8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.5] - 2024-09-27
4
+
5
+ - Fix replace_content to dynamic routes
6
+
3
7
  ## [0.3.4] - 2024-01-07
4
8
 
5
9
  - Feature top label
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sidekiq
4
4
  module Belt
5
- VERSION = "0.3.4"
5
+ VERSION = "0.3.5"
6
6
  end
7
7
  end
@@ -6,21 +6,19 @@ require "sidekiq/web/action"
6
6
  module Sidekiq
7
7
  module WebActionHelper
8
8
  def render(engine, content, options = {})
9
- begin
10
- path_info = /"([^"]*)"/.match(block.source.to_s)[1]
11
- rescue StandardError
12
- path_info = nil
13
- end
14
-
15
- path_info ||= ::Rack::Utils.unescape(env["PATH_INFO"])
9
+ path_info = ::Rack::Utils.unescape(env["PATH_INFO"])
16
10
 
17
11
  replace_views = Sidekiq::Config::DEFAULTS[:replace_views] || {}
18
12
 
19
- replace_views.fetch(path_info.to_s, []).each do |content_block|
20
- content_block.call(content)
13
+ replace_views.each do |key, content_blocks|
14
+ next if WebRoute.new("", key, true).match("", path_info).nil?
15
+
16
+ content_blocks.each do |content_block|
17
+ content_block.call(content)
18
+ end
21
19
  end
22
20
 
23
- super(engine, content, options)
21
+ super
24
22
  end
25
23
 
26
24
  def self.change_layout(&block)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-belt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danilo Jeremias da Silva
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-16 00:00:00.000000000 Z
11
+ date: 2024-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
79
  requirements: []
80
- rubygems_version: 3.5.3
80
+ rubygems_version: 3.5.16
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: This Ruby gem enhances the capabilities of Sidekiq, Sidekiq Pro, and Sidekiq