lookbook 0.4.1 → 0.4.2

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: 6556e23e693e27f706b4989f25c13c75a453ce5582e835e6c380a226840feff8
4
- data.tar.gz: c28f4d88136a02522fb23adc826ec1066c0800ef6a223451149b4516448d318c
3
+ metadata.gz: ea3c9193679ce30a8af8657a1c02c78f7651a54aeffcb67f1a64585f7ad6b6cc
4
+ data.tar.gz: df6c3467fb9d9414efabb6b8939df401629c3540ba77640f23177303f7e2a615
5
5
  SHA512:
6
- metadata.gz: 92076777e5a0e2ca449eec799a4702965bc78c12ae1d48f0a7de9276832f02b320f25ecc5384d56aeb5138a953b26a8251ad44756d6a36a58c7fbe84255078e4
7
- data.tar.gz: e840534cd52b19c9db2b39316739b7ee8df820c96837f59cfd03e96fe99d90778eddc5518ffc5ac0167f61e27f74a2fafaa83642eb7697fd433d34cd09f28550
6
+ metadata.gz: c2df05db3f8a2f88fd3099e49ec6c2b510b16008f6c45f13e82c1bf6f2959e18ab68a0fdde304743ec5da00e6eb5c00de64de78f8c0e36bc410ab5577676076a
7
+ data.tar.gz: 4c6814008e6e8360cdb6e6592e099e26fc74df31840bb9fba2569984c0a019284b0c7f4a3f0c27e186697ef0425d94f7d6940dee5a00461a6009dc49c2f43ab6
@@ -96,8 +96,7 @@ module Lookbook
96
96
  }
97
97
  end
98
98
  set_params
99
- layout = @preview.lookbook_layout || Rails.configuration.view_component.default_preview_layout || current_layout
100
- preview_controller.render_in_layout_to_string("lookbook/preview/group", {examples: examples}, layout)
99
+ preview_controller.render_in_layout_to_string("lookbook/preview/group", {examples: examples}, @preview.lookbook_layout)
101
100
  else
102
101
  set_params(@example)
103
102
  preview_controller.params[:path] = "#{@preview.preview_name}/#{@example.name}".chomp("/")
@@ -114,10 +113,6 @@ module Lookbook
114
113
  })
115
114
  end
116
115
 
117
- def current_layout
118
- preview_controller.send :_layout, preview_controller.lookup_context, [:html]
119
- end
120
-
121
116
  def assign_inspector
122
117
  @inspector = {
123
118
  panes: {
@@ -14,10 +14,9 @@ module Lookbook
14
14
  render_to_string template, opts
15
15
  end
16
16
 
17
- def render_in_layout_to_string(template, locals, layout_override = nil)
17
+ def render_in_layout_to_string(template, locals, layout = nil)
18
18
  append_view_path Lookbook::Engine.root.join("app/views")
19
- layout = determine_layout(layout_override, prepend_views: false)[:layout]
20
- render_to_string template, locals: locals, layout: layout
19
+ render_to_string template, locals: locals, **determine_layout(@preview.lookbook_layout)
21
20
  end
22
21
  end
23
22
  end
@@ -1,3 +1,3 @@
1
1
  module Lookbook
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
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.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Perkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-21 00:00:00.000000000 Z
11
+ date: 2021-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails