lookbook 0.7.2.beta.3 → 0.7.2.beta.4
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fade881318cf86e1a2531169e35458632e7822647de9707103b3875c4e6c2305
|
|
4
|
+
data.tar.gz: 776e91f2fe6cb3d2175d4f29d135731198406cf4c4529b6b9bb8ba392ad5ae45
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73249cfe3598621f8ccb60c57d2516801e2cd5574c45f043ed777b7b3d9502df554b883a3f9822c31fa8046768c064506358c5e7281cd2f240df5b073400b5e3
|
|
7
|
+
data.tar.gz: 83d7478bdde7ceb4845ee6729e5a5280c8b144082d01d31be3012e405567ad6a9e3cd68973f2b8aa66d3479100f8787ea70f921c8ef006b26a57c56c5d44c95e
|
|
@@ -66,7 +66,7 @@ module Lookbook
|
|
|
66
66
|
{
|
|
67
67
|
label: example.label,
|
|
68
68
|
notes: example.notes,
|
|
69
|
-
html: preview_controller.render_example_to_string
|
|
69
|
+
html: preview_controller.process(:render_example_to_string, @preview, example.name),
|
|
70
70
|
source: has_template ? example.template_source(render_args[:template]) : example.method_source,
|
|
71
71
|
source_lang: has_template ? example.template_lang(render_args[:template]) : example.source_lang,
|
|
72
72
|
params: example.params
|
|
@@ -74,7 +74,7 @@ module Lookbook
|
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
def render_examples(examples)
|
|
77
|
-
preview_controller.render_in_layout_to_string
|
|
77
|
+
preview_controller.process(:render_in_layout_to_string, "layouts/lookbook/preview", {examples: examples}, @preview.layout)
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
def set_params
|
|
@@ -167,7 +167,6 @@ module Lookbook
|
|
|
167
167
|
message_parts = exception.message.split("\n").first.split
|
|
168
168
|
component_class = message_parts.first.constantize
|
|
169
169
|
naughty_method = message_parts.last.delete("#").delete("`").delete(".")
|
|
170
|
-
p naughty_method
|
|
171
170
|
method = component_class.instance_method(naughty_method.to_sym)
|
|
172
171
|
if method
|
|
173
172
|
{
|
data/lib/lookbook/preview.rb
CHANGED
|
@@ -125,7 +125,7 @@ module Lookbook
|
|
|
125
125
|
@errors = []
|
|
126
126
|
preview_files.each do |file|
|
|
127
127
|
require_dependency file[:path]
|
|
128
|
-
rescue => exception
|
|
128
|
+
rescue SyntaxError, StandardError => exception
|
|
129
129
|
@errors.push(
|
|
130
130
|
Lookbook::Error.new(exception,
|
|
131
131
|
title: "Preview #{exception.class}",
|
|
@@ -11,12 +11,12 @@ module Lookbook
|
|
|
11
11
|
opts = {}
|
|
12
12
|
opts[:layout] = nil
|
|
13
13
|
opts[:locals] = locals if locals.present?
|
|
14
|
-
render_to_string
|
|
14
|
+
render html: render_to_string(template, **opts)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def render_in_layout_to_string(template, locals, layout = nil)
|
|
18
18
|
append_view_path Lookbook::Engine.root.join("app/views")
|
|
19
|
-
render_to_string
|
|
19
|
+
render html: render_to_string(template, locals: locals, **determine_layout(layout))
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
end
|
data/lib/lookbook/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lookbook
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.2.beta.
|
|
4
|
+
version: 0.7.2.beta.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mark Perkins
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-04-
|
|
11
|
+
date: 2022-04-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actioncable
|