rails_live_reload 0.1.1 → 0.1.2
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 +2 -0
- data/lib/rails_live_reload/config.rb +1 -1
- data/lib/rails_live_reload/engine.rb +1 -1
- data/lib/rails_live_reload/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04c014926a43e8cba8e586fa5aca93a4e002357fffee35d2a553db0ec88f04a0
|
4
|
+
data.tar.gz: 7c5b64509ab169603cd32b62adc9390eb2f1d939d2e626e9bca960f325d45876
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e365d7ffad4d351c35c84f8839c4b55318c9769c2191c8aab53cd441253d26950cfabeb98f76c8b556e7bb80d9b329f0b6e5d81ce1c4b0841239d106b38a406
|
7
|
+
data.tar.gz: ec660e96b97075b0c7663e5d0b3be0e59d3a505805feda8c0e7262c2e9c7889f560f0a308edaecf1dc03aaeb7e3a987e709718196ae7b42d47b98df03074449f
|
data/README.md
CHANGED
@@ -67,6 +67,8 @@ RailsLiveReload.configure do |config|
|
|
67
67
|
# More examples:
|
68
68
|
# config.watch %r{app/helpers/.+\.rb}, reload: :always
|
69
69
|
# config.watch %r{config/locales/.+\.yml}, reload: :always
|
70
|
+
|
71
|
+
# config.enabled = Rails.env.development?
|
70
72
|
end if defined?(RailsLiveReload)
|
71
73
|
```
|
72
74
|
|
@@ -29,7 +29,7 @@ module RailsLiveReload
|
|
29
29
|
@url = "/rails/live/reload"
|
30
30
|
@watcher = nil
|
31
31
|
@files = {}
|
32
|
-
@enabled = ::Rails.env.development?
|
32
|
+
@enabled = ::Rails.env.development?
|
33
33
|
|
34
34
|
# These configs work for 95% apps, see README for more info
|
35
35
|
@patterns = {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module RailsLiveReload
|
2
2
|
class Railtie < ::Rails::Engine
|
3
3
|
|
4
|
-
if RailsLiveReload.enabled?
|
4
|
+
if RailsLiveReload.enabled? && defined?(::Rails::Server)
|
5
5
|
initializer "rails_live_reload.middleware" do |app|
|
6
6
|
if ::Rails::VERSION::MAJOR.to_i >= 5
|
7
7
|
app.middleware.insert_after ActionDispatch::Executor, RailsLiveReload.middleware
|