csb 0.8.0 → 0.9.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/CHANGELOG.md +5 -1
- data/lib/csb/railtie.rb +28 -0
- data/lib/csb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 838fb73c6e13f3232f1fac402667ff00e92ac6f7f814d8605d2b850f52e449cc
|
4
|
+
data.tar.gz: 8c0016c9bff8210a55882ba0afa442d5fd9efca701800cc031a13ecfbe6ef21b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 679a875a5174204aa3cfdc5713083c5a25be1c704049ff63a84e5969e9ecc6a582804d15177a3febd86fbb58e614772556d78730df10f3bef266a14644e968e4
|
7
|
+
data.tar.gz: abfb009c641e057a4d6b35992e409d9de8329d598dc0c61a2689a0cbef1564b247e813d1bf740d4572dedb38557bbd82f73f47b934ccf0fd82c2dbdd10424bcc
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
## 0.9.0
|
2
|
+
|
3
|
+
- Fixing Issue with config.streaming Enabled in Rails 7.1 (#17)
|
4
|
+
|
1
5
|
## 0.8.0
|
2
6
|
|
3
|
-
- Add `csv_options` as an option to pass to `CSV.generate_line` (
|
7
|
+
- Add `csv_options` as an option to pass to `CSV.generate_line` (https://github.com/aki77/csb/pull/18)
|
4
8
|
|
5
9
|
## 0.7.0
|
6
10
|
|
data/lib/csb/railtie.rb
CHANGED
@@ -6,6 +6,34 @@ module Csb
|
|
6
6
|
ActiveSupport.on_load :action_view do
|
7
7
|
require 'csb/handler'
|
8
8
|
ActionView::Template.register_template_handler :csb, Csb::Handler
|
9
|
+
|
10
|
+
# SEE: https://github.com/rails/rails/pull/51023
|
11
|
+
rails_version = Gem::Version.new(Rails.version)
|
12
|
+
if rails_version >= Gem::Version.new('7.1.0') && rails_version < Gem::Version.new('7.1.4')
|
13
|
+
ActionView::Template.prepend(Module.new do
|
14
|
+
# SEE: https://github.com/Shopify/rails/blob/0601929486398954a17b1985fcf7f9f0611d2d55/actionview/lib/action_view/template.rb#L262C5-L281C8
|
15
|
+
def render(view, locals, buffer = nil, implicit_locals: [], add_to_stack: true, &block)
|
16
|
+
instrument_render_template do
|
17
|
+
compile!(view)
|
18
|
+
|
19
|
+
if strict_locals? && @strict_local_keys && !implicit_locals.empty?
|
20
|
+
locals_to_ignore = implicit_locals - @strict_local_keys
|
21
|
+
locals.except!(*locals_to_ignore)
|
22
|
+
end
|
23
|
+
|
24
|
+
if buffer
|
25
|
+
view._run(method_name, self, locals, buffer, add_to_stack: add_to_stack, has_strict_locals: strict_locals?, &block)
|
26
|
+
nil
|
27
|
+
else
|
28
|
+
result = view._run(method_name, self, locals, ActionView::OutputBuffer.new, add_to_stack: add_to_stack, has_strict_locals: strict_locals?, &block)
|
29
|
+
result.is_a?(ActionView::OutputBuffer) ? result.to_s : result
|
30
|
+
end
|
31
|
+
end
|
32
|
+
rescue => e
|
33
|
+
handle_render_error(view, e)
|
34
|
+
end
|
35
|
+
end)
|
36
|
+
end
|
9
37
|
end
|
10
38
|
end
|
11
39
|
end
|
data/lib/csb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aki77
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|