lookbook 0.7.2.beta.5 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/lookbook/previews/panels/_params.html.erb +1 -1
- data/config/routes.rb +1 -1
- data/lib/lookbook/engine.rb +12 -16
- data/lib/lookbook/version.rb +1 -1
- data/lib/lookbook.rb +0 -1
- metadata +4 -5
- data/lib/lookbook/null_logger.rb +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96f31c2b265d871a152627dfb10b0c0e1f6db8ae42e811abfeb138c7bf45d806
|
4
|
+
data.tar.gz: 9ae695f9a3fc7c28bd5a7fbf77fc0959d92d46661525e7593961555cd41d76fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b658dc2f0e2b7213761be9197f916594381319927f02097c3901af13d9c35194e45d568d70a21c3da05407ea79e589ffa1c3530905c73dc5cbfa1100cc2ac3f
|
7
|
+
data.tar.gz: 55bc108c5a1ee957970709efe01c75956ee7b925043bab7b5c6aba1bafa1f998191d7872a7e08ddbd85daad2d7713437ec9340c8f2273568ecffa17bbb78a738
|
data/config/routes.rb
CHANGED
data/lib/lookbook/engine.rb
CHANGED
@@ -10,7 +10,7 @@ module Lookbook
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def logger
|
13
|
-
@logger ||=
|
13
|
+
@logger ||= Rails.logger
|
14
14
|
end
|
15
15
|
|
16
16
|
def version
|
@@ -54,10 +54,8 @@ module Lookbook
|
|
54
54
|
options.listen_paths << (vc_options.view_component_path || Rails.root.join("app/components"))
|
55
55
|
options.listen_paths.filter! { |path| Dir.exist? path }
|
56
56
|
|
57
|
-
options.
|
58
|
-
options.
|
59
|
-
options.cable.mount_path ||= "/lookbook-cable"
|
60
|
-
options.cable.connection_class = -> { Lookbook::Connection }
|
57
|
+
options.cable_mount_path ||= "/lookbook-cable"
|
58
|
+
options.cable_logger ||= Rails.logger
|
61
59
|
|
62
60
|
options.experimental_features = false unless options.experimental_features.present?
|
63
61
|
end
|
@@ -73,14 +71,6 @@ module Lookbook
|
|
73
71
|
)
|
74
72
|
end
|
75
73
|
|
76
|
-
initializer "lookbook.logging" do
|
77
|
-
if config.lookbook.debug == true
|
78
|
-
config.lookbook.cable.logger ||= Rails.logger
|
79
|
-
else
|
80
|
-
config.lookbook.cable.logger = Lookbook::NullLogger.new
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
74
|
config.after_initialize do
|
85
75
|
@preview_listener = Listen.to(*config.lookbook.listen_paths, only: /\.(rb|html.*)$/) do |modified, added, removed|
|
86
76
|
begin
|
@@ -118,18 +108,24 @@ module Lookbook
|
|
118
108
|
class << self
|
119
109
|
def websocket
|
120
110
|
if config.lookbook.auto_refresh
|
111
|
+
cable = ActionCable::Server::Configuration.new
|
112
|
+
cable.cable = {adapter: "async"}.with_indifferent_access
|
113
|
+
cable.mount_path = config.lookbook.cable_mount_path
|
114
|
+
cable.connection_class = -> { Lookbook::Connection }
|
115
|
+
cable.logger = config.lookbook.cable_logger
|
116
|
+
|
121
117
|
@websocket ||= if Rails.version.to_f >= 6.0
|
122
|
-
ActionCable::Server::Base.new(config:
|
118
|
+
ActionCable::Server::Base.new(config: cable)
|
123
119
|
else
|
124
120
|
websocket ||= ActionCable::Server::Base.new
|
125
|
-
websocket.config =
|
121
|
+
websocket.config = cable
|
126
122
|
websocket
|
127
123
|
end
|
128
124
|
end
|
129
125
|
end
|
130
126
|
|
131
127
|
def websocket_mount_path
|
132
|
-
"#{mounted_path}#{config.lookbook.
|
128
|
+
"#{mounted_path}#{config.lookbook.cable_mount_path}" if websocket
|
133
129
|
end
|
134
130
|
|
135
131
|
def mounted_path
|
data/lib/lookbook/version.rb
CHANGED
data/lib/lookbook.rb
CHANGED
@@ -20,7 +20,6 @@ module Lookbook
|
|
20
20
|
autoload :PreviewExample, "lookbook/preview_example"
|
21
21
|
autoload :PreviewGroup, "lookbook/preview_group"
|
22
22
|
autoload :CodeInspector, "lookbook/code_inspector"
|
23
|
-
autoload :NullLogger, "lookbook/null_logger"
|
24
23
|
autoload :CodeFormatter, "lookbook/code_formatter"
|
25
24
|
autoload :Markdown, "lookbook/markdown"
|
26
25
|
|
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.
|
4
|
+
version: 0.7.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-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actioncable
|
@@ -290,7 +290,6 @@ files:
|
|
290
290
|
- lib/lookbook/features.rb
|
291
291
|
- lib/lookbook/lang.rb
|
292
292
|
- lib/lookbook/markdown.rb
|
293
|
-
- lib/lookbook/null_logger.rb
|
294
293
|
- lib/lookbook/page.rb
|
295
294
|
- lib/lookbook/page_collection.rb
|
296
295
|
- lib/lookbook/params.rb
|
@@ -325,9 +324,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
325
324
|
version: '0'
|
326
325
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
327
326
|
requirements:
|
328
|
-
- - "
|
327
|
+
- - ">="
|
329
328
|
- !ruby/object:Gem::Version
|
330
|
-
version:
|
329
|
+
version: '0'
|
331
330
|
requirements: []
|
332
331
|
rubygems_version: 3.2.22
|
333
332
|
signing_key:
|
data/lib/lookbook/null_logger.rb
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
module Lookbook
|
2
|
-
class NullLogger
|
3
|
-
def unknown(*)
|
4
|
-
nil
|
5
|
-
end
|
6
|
-
|
7
|
-
def fatal(*)
|
8
|
-
nil
|
9
|
-
end
|
10
|
-
|
11
|
-
def fatal?
|
12
|
-
false
|
13
|
-
end
|
14
|
-
|
15
|
-
def error(*)
|
16
|
-
nil
|
17
|
-
end
|
18
|
-
|
19
|
-
def error?
|
20
|
-
false
|
21
|
-
end
|
22
|
-
|
23
|
-
def warn(*)
|
24
|
-
nil
|
25
|
-
end
|
26
|
-
|
27
|
-
def warn?
|
28
|
-
false
|
29
|
-
end
|
30
|
-
|
31
|
-
def info(*)
|
32
|
-
nil
|
33
|
-
end
|
34
|
-
|
35
|
-
def info?
|
36
|
-
false
|
37
|
-
end
|
38
|
-
|
39
|
-
def debug(*)
|
40
|
-
nil
|
41
|
-
end
|
42
|
-
|
43
|
-
def debug?
|
44
|
-
false
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|