lookbook 0.3.0 → 0.3.1
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 +4 -4
- data/README.md +5 -3
- data/lib/lookbook/engine.rb +8 -1
- data/lib/lookbook/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1f01b55ea75634f7e4cf2f7fe438ce6b56042daa5d7f178e50d0db7c267a644
|
4
|
+
data.tar.gz: 81fddb93ab9aed2d51a59ecd00deced19c97a395ced5de3223db0d229f3a57dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 535340241df2352ba1c0fa5983f178cdb76d5fc39f0b4c9bcc8c34e4dc782177a4110f85a47ac6632064ac52b064f6936fe9cb764d5a5f2a8b527c9a80342bff
|
7
|
+
data.tar.gz: 1d580f19491db04693d6e31941c198c4b1416665836d90436e84ddf4dadad7e325612be88c959fd2fff1900c061e2e54e2b8cbf82cda5ce947addcdba7bd251d
|
data/README.md
CHANGED
@@ -27,9 +27,9 @@ Lookbook uses [RDoc/Yard-style comment tags](https://rubydoc.info/gems/yard/file
|
|
27
27
|
- Resizable preview window for responsive testing
|
28
28
|
- Highlighted preview source code and HTML output
|
29
29
|
- Add notes via comments in the preview file (markdown supported)
|
30
|
-
- Auto-updating UI when component or preview files are updated
|
31
|
-
-
|
32
|
-
-
|
30
|
+
- Auto-updating UI when component or preview files are updated _(Rails v6.0+ only)_
|
31
|
+
- Hide, group and rename preview examples using comment tags
|
32
|
+
- Fully compatible with standard the ViewComponent preview system
|
33
33
|
|
34
34
|
## Lookbook demo
|
35
35
|
|
@@ -248,6 +248,8 @@ However the following Lookbook-specific config options are also available:
|
|
248
248
|
|
249
249
|
### UI auto-refresh
|
250
250
|
|
251
|
+
> ⚠️ UI auto-refresh is only supported in Rails v6.0+
|
252
|
+
|
251
253
|
Disable/enable the auto-updating of the Lookbook UI when files change. Enabled by default.
|
252
254
|
|
253
255
|
```ruby
|
data/lib/lookbook/engine.rb
CHANGED
@@ -83,7 +83,14 @@ module Lookbook
|
|
83
83
|
|
84
84
|
class << self
|
85
85
|
def websocket
|
86
|
-
|
86
|
+
if Rails.version.to_f >= 6.0
|
87
|
+
@websocket ||= ActionCable::Server::Base.new(config: Lookbook::Engine.cable)
|
88
|
+
else
|
89
|
+
@websocket = ActionCable::Server::Base.new
|
90
|
+
@websocket.config = Lookbook::Engine.cable
|
91
|
+
|
92
|
+
@websocket
|
93
|
+
end
|
87
94
|
end
|
88
95
|
|
89
96
|
def cable
|
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.3.
|
4
|
+
version: 0.3.1
|
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-
|
11
|
+
date: 2021-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.0'
|
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: '
|
26
|
+
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: view_component
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
75
|
+
version: '3.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '3.
|
82
|
+
version: '3.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: yard
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|