rails_band 0.8.2 → 0.8.3

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: 91329eec539d360a220ee7a4c70f76142ec308ae4bc9991f1db4f95748670bb1
4
- data.tar.gz: 5c91e6f1f4dead6bfc2e77b3383a3283179d2cdf60d1e58317c761455a40bd8b
3
+ metadata.gz: 701f0145b497d440d86c0d184c83369e3be51930e83d83924b2b906c0656f9ed
4
+ data.tar.gz: a8622e602a198d831f9e7b5c8621e6853b3ed1b65ecd396a7f4d352693823c5c
5
5
  SHA512:
6
- metadata.gz: 8630761c9694505ca02e59fb82f9ff602dfe59c96887aa76ce50be174667353fcb5d0a19370c3af73eba3f09fcd04f60add90de72bd1bcea4cb63ee345ce4ad3
7
- data.tar.gz: fd6c2dd83fe5a5eb99f96b010e82cd8d3acede169f5cdffb39e1447ec2935379efcefe083a377e95f62eb956ed1a78b7addea076aed2bbd30592ec1edffffad6
6
+ metadata.gz: e305b382c73f079434911ea4c379ba9137b47dface3e89e6670df649e4165210328a0d0855de33ad9b5b8db0d76b4670383159f4df7ed58ec2131b82649880a7
7
+ data.tar.gz: 7b68379f4452d9057f1bfda12c16efd85ff151de8a1d6a170610f8ba0b303769455c24a70695ca3759a9f91d5e61262d3dd90dc83071da40f1f49be35f54cda4
data/README.md CHANGED
@@ -125,6 +125,7 @@ These are Rails Instrumentation API hooks supported by this gem so far.
125
125
  | [`perform.active_job`](https://guides.rubyonrails.org/active_support_instrumentation.html#perform-active-job) | ✅ |
126
126
  | [`retry_stopped.active_job`](https://guides.rubyonrails.org/active_support_instrumentation.html#retry-stopped-active-job) | ✅ |
127
127
  | [`discard.active_job`](https://guides.rubyonrails.org/active_support_instrumentation.html#discard-active-job) | ✅ |
128
+ | [`enqueue_all.active_job`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#enqueue-all-active-job) | ✅ |
128
129
 
129
130
  ### Action Cable
130
131
 
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsBand
4
+ module ActiveJob
5
+ module Event
6
+ # A wrapper for the event that is passed to `enqueue.active_job`.
7
+ class EnqueueAll < BaseEvent
8
+ def adapter
9
+ @adapter ||= @event.payload.fetch(:adapter)
10
+ end
11
+
12
+ def jobs
13
+ @jobs ||= @event.payload.fetch(:jobs)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rails_band/active_job/event/enqueue_at'
4
+ require 'rails_band/active_job/event/enqueue_all'
4
5
  require 'rails_band/active_job/event/enqueue'
5
6
  require 'rails_band/active_job/event/enqueue_retry'
6
7
  require 'rails_band/active_job/event/perform_start'
@@ -42,6 +43,10 @@ module RailsBand
42
43
  consumer_of(__method__)&.call(Event::Discard.new(event))
43
44
  end
44
45
 
46
+ def enqueue_all(event)
47
+ consumer_of(__method__)&.call(Event::EnqueueAll.new(event))
48
+ end
49
+
45
50
  private
46
51
 
47
52
  def consumer_of(sub_event)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsBand
4
- VERSION = '0.8.2'
4
+ VERSION = '0.8.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_band
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yutaka Kamei
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-08 00:00:00.000000000 Z
11
+ date: 2023-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -73,6 +73,7 @@ files:
73
73
  - lib/rails_band/action_view/log_subscriber.rb
74
74
  - lib/rails_band/active_job/event/discard.rb
75
75
  - lib/rails_band/active_job/event/enqueue.rb
76
+ - lib/rails_band/active_job/event/enqueue_all.rb
76
77
  - lib/rails_band/active_job/event/enqueue_at.rb
77
78
  - lib/rails_band/active_job/event/enqueue_retry.rb
78
79
  - lib/rails_band/active_job/event/perform.rb