rails_band 0.8.4 → 0.9.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34881b30e4915c22757b49f247fcc759cdffded452f6f7ac2951fed5500d95b9
|
4
|
+
data.tar.gz: 53e59f258f2cbbffc68d461a28490a39164915115902be3fbb4bec12a03383bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3780f2f7fd5fcdfeb98fc45ffb37578c53c0fb88bdb9bfd9ca6acd88241e6d9597a41fdac2bc7f7e47852a0c5f8e6d11db8db132478d99d3609d3d6b401cf49a
|
7
|
+
data.tar.gz: 056bbf55db47f21019af355e89dc7de001d71a45c67a219e4836ed37014e43b45b142ee73b3ee0fc44366e84865490e37447e90f572ca99a59ef89e210e357b4
|
data/README.md
CHANGED
@@ -64,6 +64,7 @@ These are Rails Instrumentation API hooks supported by this gem so far.
|
|
64
64
|
| [`start_processing.action_controller`](https://guides.rubyonrails.org/active_support_instrumentation.html#start-processing-action-controller) | ✅ |
|
65
65
|
| [`process_action.action_controller`](https://guides.rubyonrails.org/active_support_instrumentation.html#process-action-action-controller) | ✅ |
|
66
66
|
| [`send_file.action_controller`](https://guides.rubyonrails.org/active_support_instrumentation.html#send-file-action-controller) | ✅ |
|
67
|
+
| [`send_stream.action_controller`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#send-stream-action-controller) | ✅ |
|
67
68
|
| [`send_data.action_controller`](https://guides.rubyonrails.org/active_support_instrumentation.html#send-data-action-controller) | ✅ |
|
68
69
|
| [`redirect_to.action_controller`](https://guides.rubyonrails.org/active_support_instrumentation.html#redirect-to-action-controller) | ✅ |
|
69
70
|
| [`halted_callback.action_controller`](https://guides.rubyonrails.org/active_support_instrumentation.html#halted-callback-action-controller) | ✅ |
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsBand
|
4
|
+
module ActionController
|
5
|
+
module Event
|
6
|
+
# A wrapper for the event that is passed to `send_stream.action_controller`.
|
7
|
+
class SendStream < BaseEvent
|
8
|
+
def filename
|
9
|
+
return @filename if defined? @filename
|
10
|
+
|
11
|
+
@filename = @event.payload[:filename]
|
12
|
+
end
|
13
|
+
|
14
|
+
def type
|
15
|
+
return @type if defined? @type
|
16
|
+
|
17
|
+
@type = @event.payload[:type]
|
18
|
+
end
|
19
|
+
|
20
|
+
def disposition
|
21
|
+
return @disposition if defined? @disposition
|
22
|
+
|
23
|
+
@disposition = @event.payload[:disposition]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -7,6 +7,7 @@ require 'rails_band/action_controller/event/exist_fragment'
|
|
7
7
|
require 'rails_band/action_controller/event/start_processing'
|
8
8
|
require 'rails_band/action_controller/event/process_action'
|
9
9
|
require 'rails_band/action_controller/event/send_file'
|
10
|
+
require 'rails_band/action_controller/event/send_stream'
|
10
11
|
require 'rails_band/action_controller/event/send_data'
|
11
12
|
require 'rails_band/action_controller/event/redirect_to'
|
12
13
|
require 'rails_band/action_controller/event/halted_callback'
|
@@ -50,6 +51,10 @@ module RailsBand
|
|
50
51
|
consumer_of(__method__)&.call(Event::SendFile.new(event))
|
51
52
|
end
|
52
53
|
|
54
|
+
def send_stream(event)
|
55
|
+
consumer_of(__method__)&.call(Event::SendStream.new(event))
|
56
|
+
end
|
57
|
+
|
53
58
|
def send_data(event)
|
54
59
|
consumer_of(__method__)&.call(Event::SendData.new(event))
|
55
60
|
end
|
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.9.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-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- lib/rails_band/action_controller/event/redirect_to.rb
|
56
56
|
- lib/rails_band/action_controller/event/send_data.rb
|
57
57
|
- lib/rails_band/action_controller/event/send_file.rb
|
58
|
+
- lib/rails_band/action_controller/event/send_stream.rb
|
58
59
|
- lib/rails_band/action_controller/event/start_processing.rb
|
59
60
|
- lib/rails_band/action_controller/event/unpermitted_parameters.rb
|
60
61
|
- lib/rails_band/action_controller/event/write_fragment.rb
|