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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d239d8e0131adf3a0b8aa970b4d606e547c4b3f2e8dcb369e053d7cff6557dbe
4
- data.tar.gz: 9efb7529880db2532140ea38c0acbbfc73b6d8e805bdc6e4ba47733948d0ee91
3
+ metadata.gz: 52dd190bfbe1cb14b9a8fe19698c942be3d6d939d4dd3d8d98ebd001830e99d5
4
+ data.tar.gz: 9bf7d13be6420d1290aacbbb1dd9f2e56f03094d37787dcb08fe196e19f0c8f8
5
5
  SHA512:
6
- metadata.gz: be6277848ad3fd5f0df9a9aa336b8c1396f27e98262ccc41adec989f03ff20704fcb6c896a361ac481cc6ae18145e6aa47d8a55ef8fdbb4297aab32e49f53a34
7
- data.tar.gz: df081fe3ea2958471e939fad0ecef369acff5c5c7c3b917087abf6a4c5c9dc968396c2a774679a1ee6cdabbfebdb7ac9b90648e5ad406ed1f911dc239e43eac7
6
+ metadata.gz: 0cc8c658d5f15a2fd38b295ce5d83c206737044caa9fbd6a046ca147789047233625d9025d264eca1e428cd7dbaad405ddc9e57c5f13b71d107f63d81bb188fe
7
+ data.tar.gz: 6265ae6e4db46fc79350017a696d24ef301e0307426662d19dfb2870b1e96602a31a656652f2dc326198acd965f4f500c16c7a9572b93cabc6badd45e5e58119
@@ -1,3 +1,3 @@
1
1
  module Hotloader
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
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
- app.config.assets.precompile << "hotloader/hotloader.js"
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.3
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
@@ -1,3 +0,0 @@
1
- Hotloader::Engine.routes.draw do
2
- get 'hotloaders', to: "refesh#refresh"
3
- end