rails_live_reload 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 939afe7a09bcddd449e696c10118799ad2852b073e7db44289d19e3f24802049
|
4
|
+
data.tar.gz: 39d77ccf8dec080c29914e30c3a67cd509cef8dde544ebbbdcb3bea0c88fd81e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ed51bae3cc1dd8f940d004088a3141396acd8e0a2ba8b33b9339c4f81ce3cd9723a908d2337d22dc1c3ea851c95baf87532a51a8e60f60cd62a393dd710ea4f
|
7
|
+
data.tar.gz: 833333f6e32fecf52a1b70c70af3fe355436a68910022ca59337fa6da91fc5e8bc27058539edb77981b9311ab47d25b4862076daf8f43b17e75cc3d90f781afb
|
data/README.md
CHANGED
@@ -86,6 +86,10 @@ You are welcome to contribute. See list of `TODO's` below.
|
|
86
86
|
- CI (github actions)
|
87
87
|
- auto reload when rendered controller was changed
|
88
88
|
|
89
|
+
## Troubleshooting
|
90
|
+
|
91
|
+
- `Too many open files - pipe` - increase limits by `ulimit -n 10000`
|
92
|
+
|
89
93
|
## License
|
90
94
|
|
91
95
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -32,7 +32,7 @@ module RailsLiveReload
|
|
32
32
|
initializer "rails_live_reload.routes" do
|
33
33
|
config.after_initialize do |app|
|
34
34
|
app.routes.prepend do
|
35
|
-
mount RailsLiveReload.server => RailsLiveReload.config.url, internal: true
|
35
|
+
mount RailsLiveReload.server => RailsLiveReload.config.url, internal: true
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
@@ -31,11 +31,9 @@ module RailsLiveReload
|
|
31
31
|
private
|
32
32
|
|
33
33
|
def make_new_response(body)
|
34
|
-
|
34
|
+
index = body.rindex(/<\/body>/i) || body.rindex(/<\/html>/i)
|
35
|
+
body.insert(index, <<~HTML.html_safe)
|
35
36
|
<script defer type="text/javascript" src="#{RailsLiveReload.config.url}/script"></script>
|
36
|
-
</head>
|
37
|
-
HTML
|
38
|
-
body.sub("</body>", <<~HTML.html_safe)
|
39
37
|
<script id="rails-live-reload-options" type="application/json">
|
40
38
|
#{{
|
41
39
|
files: CurrentRequest.current.data.to_a,
|
@@ -43,7 +41,6 @@ module RailsLiveReload
|
|
43
41
|
url: RailsLiveReload.config.url
|
44
42
|
}.to_json}
|
45
43
|
</script>
|
46
|
-
</body>
|
47
44
|
HTML
|
48
45
|
end
|
49
46
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_live_reload
|
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
|
- Igor Kasyanchuk
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|