hotswap 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: badcf933f86c51e18eb84dd18518302cf51621e33dc1232385206a1df68d020a
4
- data.tar.gz: cf625050bb3be00cca1b23a95a45a6a3230f3a0dd42e1230766bf8b403f847aa
3
+ metadata.gz: 31ba7d63578622f3d225e863e638be171c949af98f6497019a3ce01c7371c71d
4
+ data.tar.gz: 772a73f952822313044f1a28d1b5013458eafa0685772f97bdefe41372ed933b
5
5
  SHA512:
6
- metadata.gz: a37c15429bc4bf308c122e3eca1258b4916e897cb77f7518e21f6f84f8880c25603340f61f406ede9e628c4aefbfbcd0a40e1259e5d5d0d6990bffdb203b19c1
7
- data.tar.gz: 86bcd2d70ffc9ce32513c609892f854e822cf9656ed9b4f94a7c7a5e1a6171eed70b5cc29adf00f2948912c064ad0874da84bdc0708eeeab34b536b05b4899ce
6
+ metadata.gz: f7c028345800763facf9a6a76c17d34f5b3e8c6aa930778f76f28e731248024a67c9f0b6fba6d548aa6562459c8a2c00d76aa4f4b2d3815fdf87c81e9518e2d1
7
+ data.tar.gz: e4c172d547d26c443030c720e537f95bfad0232f7a28f72458e8fb367f7b4f1c54d7a840f6c825c1bdf1892690e4e3e1c4e72e3c438b57eafa8ff9513793539f
data/exe/hotswap CHANGED
@@ -3,8 +3,8 @@
3
3
  require "socket"
4
4
  require "shellwords"
5
5
 
6
- socket_path = ENV.fetch("HOTSWAP_SOCKET", "tmp/hotswap.sock")
7
- stderr_socket_path = ENV.fetch("HOTSWAP_STDERR_SOCKET", "tmp/hotswap.stderr.sock")
6
+ socket_path = ENV.fetch("HOTSWAP_SOCKET", "tmp/sockets/hotswap.sock")
7
+ stderr_socket_path = ENV.fetch("HOTSWAP_STDERR_SOCKET", "tmp/sockets/hotswap.stderr.sock")
8
8
 
9
9
  unless File.exist?(socket_path)
10
10
  $stderr.puts "ERROR: socket not found at #{socket_path}"
@@ -17,13 +17,13 @@ module Hotswap
17
17
  if app.config.hotswap.socket_path
18
18
  Hotswap.socket_path = app.config.hotswap.socket_path
19
19
  else
20
- Hotswap.socket_path = File.join(app.root, "tmp", "hotswap.sock")
20
+ Hotswap.socket_path = File.join(app.root, "tmp", "sockets", "hotswap.sock")
21
21
  end
22
22
 
23
23
  if app.config.hotswap.stderr_socket_path
24
24
  Hotswap.stderr_socket_path = app.config.hotswap.stderr_socket_path
25
25
  else
26
- Hotswap.stderr_socket_path = File.join(app.root, "tmp", "hotswap.stderr.sock")
26
+ Hotswap.stderr_socket_path = File.join(app.root, "tmp", "sockets", "hotswap.stderr.sock")
27
27
  end
28
28
  end
29
29
 
@@ -31,7 +31,7 @@ module Hotswap
31
31
  app.middleware.use Hotswap::Middleware
32
32
  end
33
33
 
34
- initializer "hotswap.socket_server" do
34
+ server do
35
35
  server = Hotswap::SocketServer.new
36
36
  server.start
37
37
 
@@ -21,6 +21,7 @@ module Hotswap
21
21
  cleanup_stale_socket(@socket_path)
22
22
  cleanup_stale_socket(@stderr_socket_path)
23
23
 
24
+ FileUtils.mkdir_p(File.dirname(@socket_path))
24
25
  @server = UNIXServer.new(@socket_path)
25
26
  @stderr_server = UNIXServer.new(@stderr_socket_path)
26
27
 
@@ -1,3 +1,3 @@
1
1
  module Hotswap
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/hotswap.rb CHANGED
@@ -15,6 +15,6 @@ module Hotswap
15
15
  end
16
16
  end
17
17
 
18
- self.socket_path = "tmp/hotswap.sock"
19
- self.stderr_socket_path = "tmp/hotswap.stderr.sock"
18
+ self.socket_path = "tmp/sockets/hotswap.sock"
19
+ self.stderr_socket_path = "tmp/sockets/hotswap.stderr.sock"
20
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotswap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler