phlex-rails 0.8.0 → 0.8.1
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: 1d500a3ff8d27e51acd27c6901159a5878ee3bf86548d621e4d3deae2d04ad18
|
4
|
+
data.tar.gz: 076fce2ab65191941c6f5f7e72e861e9f0c8768909051977c840661b76811d90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a48694a35ddc236320b5467548cf5a509a8cd6cb069277aa39109be4e49f6d299459b14a2c8d8afa3debc559deecdec90743536fbad42b2e2ba4250aadcb7d92
|
7
|
+
data.tar.gz: 3dbd6856b20b5c27471cded9cb6600da3d71de126134564b9367eafa88bdbf3c9e18463c442892d63d58ac118a3c39d91959dd52be6b8aba373071cc4b7d75fb
|
data/lib/phlex/rails/buffered.rb
CHANGED
@@ -29,7 +29,7 @@ module Phlex::Rails
|
|
29
29
|
|
30
30
|
case output
|
31
31
|
when ::ActiveSupport::SafeBuffer
|
32
|
-
@view.instance_variable_get(:@
|
32
|
+
@view.instance_variable_get(:@_context).target << output
|
33
33
|
end
|
34
34
|
|
35
35
|
nil
|
@@ -56,7 +56,7 @@ module Phlex::Rails
|
|
56
56
|
|
57
57
|
case output
|
58
58
|
when ::ActiveSupport::SafeBuffer
|
59
|
-
@view.instance_variable_get(:@
|
59
|
+
@view.instance_variable_get(:@_context).target << output
|
60
60
|
end
|
61
61
|
|
62
62
|
nil
|
@@ -11,7 +11,7 @@ module Phlex::Rails::HelperMacros
|
|
11
11
|
|
12
12
|
case output
|
13
13
|
when ActiveSupport::SafeBuffer
|
14
|
-
@
|
14
|
+
@_context.target << output
|
15
15
|
end
|
16
16
|
|
17
17
|
nil
|
@@ -32,7 +32,7 @@ module Phlex::Rails::HelperMacros
|
|
32
32
|
|
33
33
|
case output
|
34
34
|
when ActiveSupport::SafeBuffer
|
35
|
-
@
|
35
|
+
@_context.target << output
|
36
36
|
end
|
37
37
|
|
38
38
|
nil
|
@@ -85,7 +85,7 @@ module Phlex::Rails::HelperMacros
|
|
85
85
|
|
86
86
|
case output
|
87
87
|
when ActiveSupport::SafeBuffer
|
88
|
-
@
|
88
|
+
@_context.target << output
|
89
89
|
end
|
90
90
|
|
91
91
|
nil
|
@@ -17,9 +17,9 @@ module Phlex
|
|
17
17
|
return super if renderable.is_a?(Class) && renderable < Phlex::SGML
|
18
18
|
|
19
19
|
if renderable
|
20
|
-
@
|
20
|
+
@_context.target << @_view_context.render(renderable, *args, **kwargs, &block)
|
21
21
|
else
|
22
|
-
@
|
22
|
+
@_context.target << @_view_context.render(*args, **kwargs, &block)
|
23
23
|
end
|
24
24
|
|
25
25
|
nil
|
@@ -28,7 +28,7 @@ module Phlex
|
|
28
28
|
def render_in(view_context, &block)
|
29
29
|
if block_given?
|
30
30
|
call(view_context: view_context) do |*args|
|
31
|
-
original_length = @
|
31
|
+
original_length = @_context.target.length
|
32
32
|
|
33
33
|
if args.length == 1 && Phlex::SGML === args[0]
|
34
34
|
output = view_context.capture(
|
@@ -38,12 +38,12 @@ module Phlex
|
|
38
38
|
output = view_context.capture(*args, &block)
|
39
39
|
end
|
40
40
|
|
41
|
-
unchanged = (original_length == @
|
41
|
+
unchanged = (original_length == @_context.target.length)
|
42
42
|
|
43
43
|
if unchanged
|
44
44
|
case output
|
45
45
|
when ActiveSupport::SafeBuffer
|
46
|
-
@
|
46
|
+
@_context.target << output
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end.html_safe
|
@@ -59,7 +59,7 @@ module Phlex
|
|
59
59
|
def plain(content)
|
60
60
|
case content
|
61
61
|
when ActiveSupport::SafeBuffer
|
62
|
-
@
|
62
|
+
@_context.target << content
|
63
63
|
else
|
64
64
|
super
|
65
65
|
end
|
@@ -8,7 +8,11 @@ module Phlex::Rails::UnbufferedOverrides
|
|
8
8
|
@object.capture do
|
9
9
|
if b
|
10
10
|
@object.public_send(name, *a, **k) do |*aa|
|
11
|
-
|
11
|
+
if aa.length == 1 && aa[0].is_a?(Phlex::SGML)
|
12
|
+
@object.helpers.capture(aa[0].unbuffered, &b)
|
13
|
+
else
|
14
|
+
@object.helpers.capture(*aa, &b)
|
15
|
+
end
|
12
16
|
end
|
13
17
|
else
|
14
18
|
@object.public_send(name, *a, **k)
|
data/lib/phlex/rails/version.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: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Drapper
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: phlex
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.6'
|
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: '1.
|
26
|
+
version: '1.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|