rails_live_reload 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_live_reload/client.rb +3 -2
- data/lib/rails_live_reload/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 196b1a989e9edbbb5a2e50612eb9aab60f6cb84b8715e1cc5c9d762bc3a3fb88
|
4
|
+
data.tar.gz: 90ea51cc27fd92551f44093fcf37e86f7cd7f1a7f456ac28ed26b853fabe6244
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b76a54f034ae6077091db8feb2d8aa1995845c442880fa198c03b9ee2381eccd4a692bf9d3fd3bc073b9c569fb8f93fc64a8315050da80d60346cb09abbab9e
|
7
|
+
data.tar.gz: 47260a57c05b2d3b895609f6dc162a4f37fc042eeba997109abdc44c5b085efc895cc7d8530c9aced2082e5eecac001ca0e01c31b29f7bb27d086ab11df6e69b
|
@@ -5,7 +5,7 @@ module RailsLiveReload
|
|
5
5
|
%Q{
|
6
6
|
<script>
|
7
7
|
const files = #{CurrentRequest.current.data.to_a.to_json};
|
8
|
-
setInterval(
|
8
|
+
const timer = setInterval(
|
9
9
|
() => {
|
10
10
|
const formData = new FormData();
|
11
11
|
formData.append('dt', #{Time.now.to_i})
|
@@ -22,7 +22,8 @@ module RailsLiveReload
|
|
22
22
|
.then(response => response.json())
|
23
23
|
.then(data => {
|
24
24
|
if(data['command'] === 'RELOAD') {
|
25
|
-
|
25
|
+
clearInterval(timer);
|
26
|
+
window.location.reload();
|
26
27
|
}
|
27
28
|
})
|
28
29
|
}, #{RailsLiveReload.timeout}
|
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.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Kasyanchuk
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
- !ruby/object:Gem::Version
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
|
-
rubygems_version: 3.
|
153
|
+
rubygems_version: 3.2.3
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Ruby on Rails Live Reload
|