csb 0.8.0 → 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: 65631a79f4d83eb7a03b39ec88084daf60fb32249894116d4362c009bee3d9ff
4
- data.tar.gz: '04825902e66e259ea488c97884f9b0bb4540d0ec1f2b2d58e087fc84b3491516'
3
+ metadata.gz: 838fb73c6e13f3232f1fac402667ff00e92ac6f7f814d8605d2b850f52e449cc
4
+ data.tar.gz: 8c0016c9bff8210a55882ba0afa442d5fd9efca701800cc031a13ecfbe6ef21b
5
5
  SHA512:
6
- metadata.gz: 9bed968513f2be918b5c0fcefa1d711bc86858c118fa2561c5b5ec80d36de41460712ff82079ca006338d2ef2ce64c87b66a1252681aea964c80f2bf3b4ea6d6
7
- data.tar.gz: 567168271617cd1f96665dec7c9d5acd7e9f1dfb4ce017fefd95ceccc4ff40cbb8a94b58ca4fb989af7299d98abe2d1ca5f8ca8c638eb0d86d7a347d4f38c42a
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` (#18)
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
@@ -1,3 +1,3 @@
1
1
  module Csb
2
- VERSION = '0.8.0'
2
+ VERSION = '0.9.0'
3
3
  end
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.8.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-12 00:00:00.000000000 Z
11
+ date: 2024-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails