rails_band 0.8.2 → 0.8.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: 91329eec539d360a220ee7a4c70f76142ec308ae4bc9991f1db4f95748670bb1
4
- data.tar.gz: 5c91e6f1f4dead6bfc2e77b3383a3283179d2cdf60d1e58317c761455a40bd8b
3
+ metadata.gz: 713aa5bd3f98387dd8ddc12985b66321793e5c6e2b95a9743c4358f58b63c6c2
4
+ data.tar.gz: c8739cee9be5b13ea9ba6726985ef94515483cc73e22a391319f2580d29eb477
5
5
  SHA512:
6
- metadata.gz: 8630761c9694505ca02e59fb82f9ff602dfe59c96887aa76ce50be174667353fcb5d0a19370c3af73eba3f09fcd04f60add90de72bd1bcea4cb63ee345ce4ad3
7
- data.tar.gz: fd6c2dd83fe5a5eb99f96b010e82cd8d3acede169f5cdffb39e1447ec2935379efcefe083a377e95f62eb956ed1a78b7addea076aed2bbd30592ec1edffffad6
6
+ metadata.gz: d3cd3683066cea10e7cbefa9df4e62c9a0b8303953969db43002218a2d7893f3958fc249049cda979a26f12fe5d3c240535ff8ba393155c9fb89cd49b531d318
7
+ data.tar.gz: f7ee796af08d421b834ee63c0f85771f4166cda13e822c4737117c1759b0711bb62a23ac3c58dcc6070227bea121c924dd641074e93f6c115b90e902051cc38d
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.4'
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.4
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: 2024-01-04 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
@@ -133,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
134
  - !ruby/object:Gem::Version
134
135
  version: '0'
135
136
  requirements: []
136
- rubygems_version: 3.4.10
137
+ rubygems_version: 3.5.3
137
138
  signing_key:
138
139
  specification_version: 4
139
140
  summary: Easy-to-use Rails Instrumentation API