diff --git a/Gemfile b/Gemfile index 6017dcd909302f859bd291f6908f722c0d1e5be2..cee93bd87a138f2d8e647dfddab9941538a8cabf 100644 --- a/Gemfile +++ b/Gemfile @@ -349,7 +349,7 @@ group :development do gem 'solargraph', '~> 0.46.0', require: false gem 'letter_opener_web', '~> 2.0.0' - gem 'lookbook' + gem 'lookbook', '~> 1.0' # Better errors handler gem 'better_errors', '~> 2.9.1' diff --git a/Gemfile.lock b/Gemfile.lock index 4ba19e79aeac8351cee81a7e351b7025529d7214..a185a19276f801f61768c914142add81eb858cdf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -815,9 +815,11 @@ GEM loofah (2.18.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - lookbook (0.9.3) + lookbook (1.0.3) actioncable + css_parser htmlbeautifier (~> 1.3) + htmlentities (~> 4.3.4) listen (~> 3.0) railties (>= 5.0) redcarpet (~> 3.5) @@ -1095,7 +1097,7 @@ GEM randexp (0.1.7) rash_alt (0.4.12) hashie (>= 3.4) - rb-fsevent (0.11.1) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) rbtrace (0.4.14) @@ -1648,7 +1650,7 @@ DEPENDENCIES lockbox (~> 0.6.2) lograge (~> 0.5) loofah (~> 2.18.0) - lookbook + lookbook (~> 1.0) lru_redux mail (= 2.7.1) mail-smtp_pool (~> 0.1.0)! diff --git a/config/environments/development.rb b/config/environments/development.rb index d475a2a664228f61168ddfdb403a745307488d29..2b40657a7176e289752bc18d1a76868ad76f963e 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -49,6 +49,7 @@ config.view_component.preview_paths << "#{config.root}/spec/components/previews" # Push preview path now to prevent FrozenError during view_component's initialzer config.autoload_paths.push("#{config.root}/spec/components/previews") + config.lookbook.page_paths = ["#{config.root}/spec/components/docs"] # Adds additional error checking when serving assets at runtime. # Checks for improperly declared sprockets dependencies. diff --git a/config/initializers/lookbook.rb b/config/initializers/lookbook.rb deleted file mode 100644 index 4cb1b8272865f83e20583892d8f9636b486a9b26..0000000000000000000000000000000000000000 --- a/config/initializers/lookbook.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -if Rails.env.development? - # :nocov: Lookbook is only available in development - Lookbook::ApplicationController.class_eval do - content_security_policy false - end - - Rails.application.configure do - config.lookbook.experimental_features = [:pages] - config.lookbook.page_paths = ["#{config.root}/spec/components/docs"] - end - # :nocov: -end