rails_band 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -13
- data/lib/rails_band/action_dispatch/event/request.rb +14 -0
- data/lib/rails_band/action_dispatch/log_subscriber.rb +5 -0
- data/lib/rails_band/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba808adbe0481a5e503e5a8bd5e621bdc3d40b08c6166081277546b7773a3291
|
4
|
+
data.tar.gz: 1795c39ac09d86aa3840364eb9a5266503f41933654c95202eb1aaf6ce737ba7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf0b8203cf992058b1a02257d5f7ffa873bfcf0e26e63786f869272085f50459ac3fb0a26ddc603210f009160afe623251272d78786f2d6aec7537968346b74c
|
7
|
+
data.tar.gz: cf539bdb9ddb74150f5551ce9e87f7ec2c92130a36ec4ce6987a72cca2845813dce5ce86dde8a8d97403558a80e24d19f74d182689d8dd1689ca134227154bca
|
data/README.md
CHANGED
@@ -76,6 +76,7 @@ These are Rails Instrumentation API hooks supported by this gem so far.
|
|
76
76
|
| --------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
|
77
77
|
| [`process_middleware.action_dispatch`](https://guides.rubyonrails.org/active_support_instrumentation.html#process-middleware-action-dispatch) | ✅ |
|
78
78
|
| [`redirect.action_dispatch`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#redirect-action-dispatch) | ✅ |
|
79
|
+
| [`request.action_dispatch`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#request-action-dispatch) | ✅ |
|
79
80
|
|
80
81
|
### Action View
|
81
82
|
|
@@ -101,19 +102,30 @@ These are Rails Instrumentation API hooks supported by this gem so far.
|
|
101
102
|
| [`deliver.action_mailer`](https://guides.rubyonrails.org/active_support_instrumentation.html#deliver-action-mailer) | ✅ |
|
102
103
|
| [`process.action_mailer`](https://guides.rubyonrails.org/active_support_instrumentation.html#process-action-mailer) | ✅ |
|
103
104
|
|
104
|
-
### Active Support
|
105
|
-
|
106
|
-
| Event name
|
107
|
-
|
|
108
|
-
| [`cache_read.active_support`](https://guides.rubyonrails.org/active_support_instrumentation.html#cache-read-active-support)
|
109
|
-
| `cache_read_multi.active_support`
|
110
|
-
| [`cache_generate.active_support`](https://guides.rubyonrails.org/active_support_instrumentation.html#cache-generate-active-support)
|
111
|
-
| [`cache_fetch_hit.active_support`](https://guides.rubyonrails.org/active_support_instrumentation.html#cache-fetch-hit-active-support)
|
112
|
-
| [`cache_write.active_support`](https://guides.rubyonrails.org/active_support_instrumentation.html#cache-write-active-support)
|
113
|
-
| `cache_write_multi.active_support`
|
114
|
-
| [`
|
115
|
-
| `
|
116
|
-
| [`
|
105
|
+
### Active Support — Caching
|
106
|
+
|
107
|
+
| Event name | Supported |
|
108
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
|
109
|
+
| [`cache_read.active_support`](https://guides.rubyonrails.org/active_support_instrumentation.html#cache-read-active-support) | ✅ |
|
110
|
+
| [`cache_read_multi.active_support`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#cache-read-multi-active-support) | ✅ |
|
111
|
+
| [`cache_generate.active_support`](https://guides.rubyonrails.org/active_support_instrumentation.html#cache-generate-active-support) | ✅ |
|
112
|
+
| [`cache_fetch_hit.active_support`](https://guides.rubyonrails.org/active_support_instrumentation.html#cache-fetch-hit-active-support) | ✅ |
|
113
|
+
| [`cache_write.active_support`](https://guides.rubyonrails.org/active_support_instrumentation.html#cache-write-active-support) | ✅ |
|
114
|
+
| [`cache_write_multi.active_support`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#cache-write-multi-active-support) | ✅ |
|
115
|
+
| [`cache_increment.active_support`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#cache-increment-active-support) | |
|
116
|
+
| [`cache_decrement.active_support `](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#cache-decrement-active-support) | |
|
117
|
+
| [`cache_delete.active_support`](https://guides.rubyonrails.org/active_support_instrumentation.html#cache-delete-active-support) | ✅ |
|
118
|
+
| [`cache_delete_multi.active_support`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#cache-delete-multi-active-support) | ✅ |
|
119
|
+
| [`cache_delete_matched.active_support`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#cache-delete-matched-active-support) | |
|
120
|
+
| [`cache_cleanup.active_support`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#cache-cleanup-active-support) | |
|
121
|
+
| [`cache_prune.active_support`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#cache-prune-active-support) | |
|
122
|
+
| [`cache_exist?.active_support`](https://guides.rubyonrails.org/active_support_instrumentation.html#cache-exist-questionmark-active-support) | ✅ |
|
123
|
+
|
124
|
+
### Active Support — Messages
|
125
|
+
|
126
|
+
| Event name | Supported |
|
127
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
|
128
|
+
| [`message_serializer_fallback.active_support`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#message-serializer-fallback-active-support) | |
|
117
129
|
|
118
130
|
### Active Job
|
119
131
|
|
@@ -155,6 +167,12 @@ These are Rails Instrumentation API hooks supported by this gem so far.
|
|
155
167
|
| [`transform.active_storage`](https://guides.rubyonrails.org/active_support_instrumentation.html#transform-active-storage) | ✅ |
|
156
168
|
| [`analyze.active_storage`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#analyze-active-storage) | ✅ |
|
157
169
|
|
170
|
+
### Action Mailbox
|
171
|
+
|
172
|
+
| Event name | Supported |
|
173
|
+
| ------------------------------------------------------------------------------------------------------------------------- | --------- |
|
174
|
+
| [`process.action_mailbox`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#process-action-mailbox) | |
|
175
|
+
|
158
176
|
### Railties
|
159
177
|
|
160
178
|
| Event name | Supported |
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsBand
|
4
|
+
module ActionDispatch
|
5
|
+
module Event
|
6
|
+
# A wrapper for the event that is passed to `redirect.action_dispatch`.
|
7
|
+
class Request < BaseEvent
|
8
|
+
def request
|
9
|
+
@request ||= @event.payload.fetch(:request)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'rails_band/action_dispatch/event/process_middleware'
|
4
4
|
require 'rails_band/action_dispatch/event/redirect'
|
5
|
+
require 'rails_band/action_dispatch/event/request'
|
5
6
|
|
6
7
|
module RailsBand
|
7
8
|
module ActionDispatch
|
@@ -17,6 +18,10 @@ module RailsBand
|
|
17
18
|
consumer_of(__method__)&.call(Event::Redirect.new(event))
|
18
19
|
end
|
19
20
|
|
21
|
+
def request(event)
|
22
|
+
consumer_of(__method__)&.call(Event::Request.new(event))
|
23
|
+
end
|
24
|
+
|
20
25
|
private
|
21
26
|
|
22
27
|
def consumer_of(sub_event)
|
data/lib/rails_band/version.rb
CHANGED
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.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yutaka Kamei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- lib/rails_band/action_controller/log_subscriber.rb
|
63
63
|
- lib/rails_band/action_dispatch/event/process_middleware.rb
|
64
64
|
- lib/rails_band/action_dispatch/event/redirect.rb
|
65
|
+
- lib/rails_band/action_dispatch/event/request.rb
|
65
66
|
- lib/rails_band/action_dispatch/log_subscriber.rb
|
66
67
|
- lib/rails_band/action_mailer/event/deliver.rb
|
67
68
|
- lib/rails_band/action_mailer/event/process.rb
|
@@ -135,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
136
|
- !ruby/object:Gem::Version
|
136
137
|
version: '0'
|
137
138
|
requirements: []
|
138
|
-
rubygems_version: 3.5.
|
139
|
+
rubygems_version: 3.5.9
|
139
140
|
signing_key:
|
140
141
|
specification_version: 4
|
141
142
|
summary: Easy-to-use Rails Instrumentation API
|