lookbook 0.3.0 → 0.3.1

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: 55670a652a3259ba1f28e3c6ec9be4201ce3348e7a7190e2d6ca2b8f05628e72
4
- data.tar.gz: a77a7b1b038ba8d4bdd5262cd4e97542244788e1812d86f6ee31ba753e9396d3
3
+ metadata.gz: e1f01b55ea75634f7e4cf2f7fe438ce6b56042daa5d7f178e50d0db7c267a644
4
+ data.tar.gz: 81fddb93ab9aed2d51a59ecd00deced19c97a395ced5de3223db0d229f3a57dd
5
5
  SHA512:
6
- metadata.gz: 136864d246c2269673654d2dae4dac3b6688abb0b9812a443b7e47d3bf0ab378103b3d070bdf6c0e78b15be56740a88d223cd86b241d0428cde7aa194dbf316f
7
- data.tar.gz: 3458476f1781994cc442d11b9142976cd30ddc447bb4afa9cf41911dfbcd5813d56e6e67179288f18325fea61e8bd6e41b34fe2e2e75bb634f278e7639508ba3
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
- - Supports 'hidden' previews and examples
32
- - Works with standard the ViewComponent preview system
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
@@ -83,7 +83,14 @@ module Lookbook
83
83
 
84
84
  class << self
85
85
  def websocket
86
- @websocket ||= ActionCable::Server::Base.new(config: Lookbook::Engine.cable)
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
@@ -1,3 +1,3 @@
1
1
  module Lookbook
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
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.3.0
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-09-27 00:00:00.000000000 Z
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: '6.0'
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: '6.0'
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.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.3'
82
+ version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: yard
85
85
  requirement: !ruby/object:Gem::Requirement