csb 0.8.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +2 -5
- data/CHANGELOG.md +9 -1
- data/csb.gemspec +1 -1
- data/gemfiles/{rails60.gemfile → rails71.gemfile} +1 -1
- data/lib/csb/railtie.rb +28 -0
- data/lib/csb/version.rb +1 -1
- metadata +6 -7
- data/gemfiles/rails61.gemfile +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0b3bd4ea67fda334584460b781468b6b4f2429332776ca89e0aa0ccdd4e3ecb
|
4
|
+
data.tar.gz: f0116afcdea2a359f499fe2bfc59ddcc165cda66dfb85ec39f8a02b6c4d42378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 968babfce1879531fe2d0559ccc58f3a03b7d98f2052bcb15011b4d5e86a4203a79795d5b3d79e30a1149c95391bb80730e07a4db0278be5e5536fe65428ed09
|
7
|
+
data.tar.gz: 1d9afd1a7b315793d20fdbfae184a7ebc5685bb13a4acb0e08bb91ae3b91e8eed6d45c9de97f79f5f7abc7e09ed678276c06bb6798d6b2320a4946f948325cff
|
data/.github/workflows/rspec.yml
CHANGED
@@ -16,12 +16,9 @@ jobs:
|
|
16
16
|
fail-fast: false
|
17
17
|
matrix:
|
18
18
|
ruby: ["3.0", "3.1", "3.2", "3.3"]
|
19
|
-
gemfile: ["
|
20
|
-
exclude:
|
21
|
-
- ruby: "3.1"
|
22
|
-
gemfile: "rails61"
|
19
|
+
gemfile: ["rails70", "rails71"]
|
23
20
|
steps:
|
24
|
-
- uses: actions/checkout@
|
21
|
+
- uses: actions/checkout@v4
|
25
22
|
|
26
23
|
- name: Set up Ruby
|
27
24
|
uses: ruby/setup-ruby@v1
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
|
+
## 0.10.0
|
2
|
+
|
3
|
+
- Drop support for rails 6.1
|
4
|
+
|
5
|
+
## 0.9.0
|
6
|
+
|
7
|
+
- Fixing Issue with config.streaming Enabled in Rails 7.1 (https://github.com/aki77/csb/pull/17)
|
8
|
+
|
1
9
|
## 0.8.0
|
2
10
|
|
3
|
-
- Add `csv_options` as an option to pass to `CSV.generate_line` (
|
11
|
+
- Add `csv_options` as an option to pass to `CSV.generate_line` (https://github.com/aki77/csb/pull/18)
|
4
12
|
|
5
13
|
## 0.7.0
|
6
14
|
|
data/csb.gemspec
CHANGED
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.10.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-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 7.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 7.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: csv
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,9 +99,8 @@ files:
|
|
99
99
|
- bin/console
|
100
100
|
- bin/setup
|
101
101
|
- csb.gemspec
|
102
|
-
- gemfiles/rails60.gemfile
|
103
|
-
- gemfiles/rails61.gemfile
|
104
102
|
- gemfiles/rails70.gemfile
|
103
|
+
- gemfiles/rails71.gemfile
|
105
104
|
- lib/csb.rb
|
106
105
|
- lib/csb/builder.rb
|
107
106
|
- lib/csb/col.rb
|
@@ -131,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
130
|
- !ruby/object:Gem::Version
|
132
131
|
version: '0'
|
133
132
|
requirements: []
|
134
|
-
rubygems_version: 3.
|
133
|
+
rubygems_version: 3.5.3
|
135
134
|
signing_key:
|
136
135
|
specification_version: 4
|
137
136
|
summary: A simple and streaming support CSV template engine for Ruby on Rails.
|