actionview-component 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/Gemfile.lock +1 -1
- data/actionview-component.gemspec +1 -1
- data/lib/action_view/component/base.rb +14 -2
- data/lib/action_view/component/test_helpers.rb +5 -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: 03a3c04aa78f3fcc16c350b49955870f60e712ad0383eb924e7053d7208431d0
|
4
|
+
data.tar.gz: 299741730bcfe4eb6640e5899e3973d4fd303dc28aadc79103eb72bdcd2382ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01091f9da0436fcbfcbdfd602bcf7595c9c061738f49b9fb70305474218b6b928382daed58c4a3ebc1d08991815ecc965cc6a19b8c4384c35338d672ee5b456e'
|
7
|
+
data.tar.gz: 32fae5a27cb1f1f939ce5b59947b3785f1b4ee73a8e9b3b1a95eb1351800aa005518b61b6f24d8570790c1e45d128bf87ab28e4f14cecac1479d33a4ed30a524
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -6,7 +6,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = "actionview-component"
|
9
|
-
spec.version = "1.3.
|
9
|
+
spec.version = "1.3.4"
|
10
10
|
spec.authors = ["GitHub Open Source"]
|
11
11
|
spec.email = ["opensource+actionview-component@github.com"]
|
12
12
|
|
@@ -60,7 +60,6 @@ module ActionView
|
|
60
60
|
#
|
61
61
|
def render_in(view_context, *args, &block)
|
62
62
|
self.class.compile
|
63
|
-
self.controller = view_context.controller
|
64
63
|
@view_context = view_context
|
65
64
|
@view_renderer ||= view_context.view_renderer
|
66
65
|
@lookup_context ||= view_context.lookup_context
|
@@ -94,7 +93,12 @@ module ActionView
|
|
94
93
|
def compile
|
95
94
|
return if @compiled && ActionView::Base.cache_template_loading
|
96
95
|
|
97
|
-
class_eval
|
96
|
+
class_eval <<-RUBY, __FILE__, __LINE__ + 1
|
97
|
+
def call
|
98
|
+
@output_buffer = ActionView::OutputBuffer.new
|
99
|
+
#{compiled_template}
|
100
|
+
end
|
101
|
+
RUBY
|
98
102
|
|
99
103
|
@compiled = true
|
100
104
|
end
|
@@ -152,6 +156,14 @@ module ActionView
|
|
152
156
|
|
153
157
|
private
|
154
158
|
|
159
|
+
def controller
|
160
|
+
@controller ||= view_context.controller
|
161
|
+
end
|
162
|
+
|
163
|
+
def request
|
164
|
+
@request ||= controller.request
|
165
|
+
end
|
166
|
+
|
155
167
|
attr_reader :content, :view_context
|
156
168
|
end
|
157
169
|
end
|
@@ -8,7 +8,11 @@ module ActionView
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def controller
|
11
|
-
@controller ||= ApplicationController.new.tap { |c| c.request =
|
11
|
+
@controller ||= ApplicationController.new.tap { |c| c.request = request }
|
12
|
+
end
|
13
|
+
|
14
|
+
def request
|
15
|
+
@request ||= ActionDispatch::TestRequest.create
|
12
16
|
end
|
13
17
|
|
14
18
|
def render_component(component, **args, &block)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionview-component
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Open Source
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|