phlex-rails 2.1.2 → 2.1.3
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/lib/phlex/rails/sgml/state.rb +14 -9
- data/lib/phlex/rails/sgml.rb +4 -21
- data/lib/phlex/rails/version.rb +1 -1
- data/lib/phlex/rails.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e92bd27548238ba8f3959289835d8322fda56bd99e44abc26a5a5f8f9e19d0d7
|
4
|
+
data.tar.gz: cb28ded3e10ad3cfdc3e0d7d227b9ae92c9e8404c52d73a939ff00162a239bde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0806fd6122a1557a5e588b5d6dbfe0a9e60ef7503ad4575478473e57ebb952207af0d2aae2aba06133a143f6aecc7721ff7f5d869ffd7a59d5ac9d7c7fe9df4c'
|
7
|
+
data.tar.gz: b87bcdbcb4100162d854c54379237f775236883ffefde10ee285afcb691d465bb770facbbd6734877f9bf00dcb5bbcd6022bd6215d0dacd863f2caa4db6858ba
|
@@ -5,16 +5,21 @@ module Phlex::Rails::SGML::State
|
|
5
5
|
@user_context[:capture_context]&.output_buffer&.raw_buffer || super
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
9
|
-
|
10
|
-
|
8
|
+
def capture
|
9
|
+
if (capture_context = @user_context[:capture_context])
|
10
|
+
original_capturing = @capturing
|
11
|
+
original_fragments = @fragments
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
capture_context.capture do
|
14
|
+
@capturing = true
|
15
|
+
@fragments = nil
|
16
|
+
yield
|
17
|
+
ensure
|
18
|
+
@capturing = original_capturing
|
19
|
+
@fragments = original_fragments
|
20
|
+
end
|
21
|
+
else
|
22
|
+
super
|
18
23
|
end
|
19
24
|
end
|
20
25
|
end
|
data/lib/phlex/rails/sgml.rb
CHANGED
@@ -104,6 +104,10 @@ module Phlex::Rails::SGML
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
+
def low_level_cache(...)
|
108
|
+
Rails.application.config.action_controller.perform_caching ? super : yield
|
109
|
+
end
|
110
|
+
|
107
111
|
def render_in(view_context, &erb)
|
108
112
|
case view_context
|
109
113
|
when defined?(ViewComponent::Base) && ViewComponent::Base
|
@@ -136,27 +140,6 @@ module Phlex::Rails::SGML
|
|
136
140
|
# no-op (see https://github.com/ViewComponent/view_component/issues/2207)
|
137
141
|
end
|
138
142
|
|
139
|
-
def vanish(...)
|
140
|
-
# Quick fix because we need rails to handle the capture now
|
141
|
-
capture(...)
|
142
|
-
end
|
143
|
-
|
144
|
-
def capture(*args, &block)
|
145
|
-
if capture_context
|
146
|
-
return "" unless block
|
147
|
-
|
148
|
-
@_state.around_capture do
|
149
|
-
if args.length == 0
|
150
|
-
capture_context.capture { __yield_content__(&block) }
|
151
|
-
else
|
152
|
-
capture_context.capture(*args) { __yield_content_with_args__(*args, &block) }
|
153
|
-
end
|
154
|
-
end
|
155
|
-
else
|
156
|
-
super
|
157
|
-
end
|
158
|
-
end
|
159
|
-
|
160
143
|
def enable_cache_reloading?
|
161
144
|
Rails.env.development?
|
162
145
|
end
|
data/lib/phlex/rails/version.rb
CHANGED
data/lib/phlex/rails.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phlex-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Drapper
|
8
8
|
- Will Cosgrove
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: phlex
|
@@ -16,21 +16,21 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.1.
|
19
|
+
version: 2.1.2
|
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: 2.1.
|
26
|
+
version: 2.1.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '7.1'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: '9'
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
43
|
+
version: '7.1'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '9'
|