hotloader 1.0.3 → 1.0.4
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/lib/hotloader/version.rb +1 -1
- data/lib/hotloader.rb +12 -4
- metadata +1 -2
- data/config/routes.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52dd190bfbe1cb14b9a8fe19698c942be3d6d939d4dd3d8d98ebd001830e99d5
|
4
|
+
data.tar.gz: 9bf7d13be6420d1290aacbbb1dd9f2e56f03094d37787dcb08fe196e19f0c8f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cc8c658d5f15a2fd38b295ce5d83c206737044caa9fbd6a046ca147789047233625d9025d264eca1e428cd7dbaad405ddc9e57c5f13b71d107f63d81bb188fe
|
7
|
+
data.tar.gz: 6265ae6e4db46fc79350017a696d24ef301e0307426662d19dfb2870b1e96602a31a656652f2dc326198acd965f4f500c16c7a9572b93cabc6badd45e5e58119
|
data/lib/hotloader/version.rb
CHANGED
data/lib/hotloader.rb
CHANGED
@@ -7,20 +7,28 @@ module Hotloader
|
|
7
7
|
Rails.application.routes.append do
|
8
8
|
mount ActionCable.server => '/cable'
|
9
9
|
end
|
10
|
-
|
11
10
|
# Rails.application.configure do
|
12
11
|
# ActionCable.server.config.logger = Logger.new(nil)
|
13
12
|
# end
|
14
|
-
# app.paths.add "config/cable", with: "config/refesh.yml"
|
15
13
|
|
16
|
-
|
14
|
+
Hotloader.load_files.each do |file|
|
15
|
+
require_relative File.join("../", file)
|
16
|
+
end
|
17
|
+
|
18
|
+
app.config.assets.precompile << "hotloader.js"
|
17
19
|
|
18
20
|
listener = Listen.to("app") do
|
21
|
+
puts "listening"
|
19
22
|
ActionCable.server.broadcast "refresh_channel", {title: "refresh"}
|
20
23
|
end
|
21
24
|
listener.start
|
22
|
-
end
|
25
|
+
end
|
23
26
|
end
|
27
|
+
def self.load_files
|
28
|
+
[
|
29
|
+
"app/channels/refresh_channel.rb"
|
30
|
+
]
|
31
|
+
end
|
24
32
|
end
|
25
33
|
|
26
34
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hotloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Voxoff
|
@@ -104,7 +104,6 @@ files:
|
|
104
104
|
- Rakefile
|
105
105
|
- app/assets/javascripts/hotloader.js
|
106
106
|
- app/channels/refresh_channel.rb
|
107
|
-
- config/routes.rb
|
108
107
|
- lib/hotloader.rb
|
109
108
|
- lib/hotloader/version.rb
|
110
109
|
homepage: https://www.github.com/Voxoff
|
data/config/routes.rb
DELETED