lookbook 0.9.5 → 0.9.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b46fc66383c91d07e598a8d2be4a8b8bf5d7d45c0155a8176f69f194aead1d2
4
- data.tar.gz: 4e539b1fd03bacd9ad9df6d71802cd5a1d1ab95c7d9364797ecfe9af60843b55
3
+ metadata.gz: 07ac7a807c773f61e8cdd20c1e15555942c353b4df72ad5c3ddc508ac6fcb2b3
4
+ data.tar.gz: 0f79a3eed3f148cef2443b881a3ec1adab876b1f916d665cf83e0aa6783505a9
5
5
  SHA512:
6
- metadata.gz: 833ff99b67b2367f379c0699cd5ef4f73fae26ac8dc6e27378f8f3f1ef5b830669caf2f6ebda07e4c150645438522ee7691de3582d898d1cabc54e75578bfd4e
7
- data.tar.gz: 507225b27f5b2966c95da2f70eb936d5f6da1b92cdf59fa815a39f99c3478c6d37f9a08fbe1b6bf2df4acf020003a61d148f373465ce7e053a21153c49784a7c
6
+ metadata.gz: 8937407314598d4a04510a5e2b1d905b42664a183480de571410b7655643a4e13806f11300e9cc84679c161404d4054063712f8cbd718463c627dfe8599dca0b
7
+ data.tar.gz: 20a00588effcfa3ea55c10d1d8c45fcd1e496dc6632d6d8ab5274fe35a6d74e035a0024c851a936384c68379635a91a138139ae98e79cf63df6cd28650956073
@@ -84,12 +84,16 @@ module Lookbook
84
84
  @preview_controller = Lookbook.config.preview_controller.constantize
85
85
  @preview_controller.include(Lookbook::PreviewController)
86
86
 
87
- if Rails.application&.server.present?
88
- # Rails.application.server is only available for Rails >= v6.1.3.1
89
- Rails.application.server { init_listeners }
87
+ if Gem::Version.new(Rails.version) >= Gem::Version.new("6.1.3.1")
88
+ # Rails.application.server is only available for newer Rails versions
89
+ Rails.application.server do
90
+ init_listeners
91
+ end
90
92
  else
91
- # So fallback to not listening if running in a rake task
92
- init_listeners unless File.basename($0) == "rake" || Rake.application.top_level_tasks.any?
93
+ # Fallback for older Rails versions - don't start listeners if running in a rake task.
94
+ unless File.basename($0) == "rake" || Rake.application.top_level_tasks.any?
95
+ init_listeners
96
+ end
93
97
  end
94
98
 
95
99
  if config.lookbook.runtime_parsing
@@ -1,3 +1,3 @@
1
1
  module Lookbook
2
- VERSION = "0.9.5"
2
+ VERSION = "0.9.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lookbook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Perkins