kdwatch 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -4
- data/lib/kdwatch/version.rb +1 -1
- data/lib/kdwatch-app.rb +19 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6566f3e18e0382e8884beeca9cacc476052a969ca2fdb2b2444776cf5cbd841c
|
4
|
+
data.tar.gz: ec6c75ac9f53726c514263bc288862d3406d601e71e7cdc0a263a3a83eac04a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb70454412b047f97acb4906b471dcd87e8a56908ed976f7f2094e34422284f38032eea6d1b97a1653cb5d15965400935c9e271a503e52f2077ae2fec61a9e60
|
7
|
+
data.tar.gz: ea35944c3d007676c43c009f06a4deb506fbfaebf9ab71521e6f048818fcccaf89967d31076d710f5b1fb09fd4866412f8e4ce9c8e2a1e516a7c48d16292fca9
|
data/README.md
CHANGED
@@ -85,10 +85,6 @@ many
|
|
85
85
|
kdwatch -r5 weird-draft.md
|
86
86
|
```
|
87
87
|
|
88
|
-
(Glitches are to be expected if you *start* more than one server out of
|
89
|
-
the same directory at the same instant; TODO; for now, wait 10 seconds
|
90
|
-
before starting another from the same directory.)
|
91
|
-
|
92
88
|
### 7991, haven't I heard that number before?
|
93
89
|
|
94
90
|
The default port number was chosen after [RFC 7991], the initial (no
|
data/lib/kdwatch/version.rb
CHANGED
data/lib/kdwatch-app.rb
CHANGED
@@ -71,8 +71,6 @@ end
|
|
71
71
|
GF
|
72
72
|
guardfile.close
|
73
73
|
gfpath = guardfile.path
|
74
|
-
# gfpath = "#{path}.guardfile"
|
75
|
-
# File.rename(path, gfpath)
|
76
74
|
|
77
75
|
rd, _wr = IO.pipe
|
78
76
|
spawn("guard -G #{gfpath}", in: rd, close_others: true)
|
@@ -83,6 +81,22 @@ host = "localhost" if host == "::" # work around macOS peculiarity
|
|
83
81
|
host = "[#{host}]" if host =~ /:/
|
84
82
|
|
85
83
|
url = "http://#{host}:#{port}"
|
86
|
-
|
87
|
-
|
88
|
-
|
84
|
+
command = "open #{url} || xdg-open #{url} || echo @@@ Please open #{url}"
|
85
|
+
|
86
|
+
if Process.respond_to?(:fork) && fork do
|
87
|
+
begin
|
88
|
+
# warn "** Making connection to #{host} #{port}"
|
89
|
+
TCPSocket.new host, port
|
90
|
+
# warn "** Successful connection to #{host} #{port}"
|
91
|
+
rescue => _e
|
92
|
+
# warn "** #{e.detailed_message}"
|
93
|
+
sleep 0.5
|
94
|
+
retry
|
95
|
+
end
|
96
|
+
exec(command)
|
97
|
+
warn "** exec didn't work"
|
98
|
+
exit!
|
99
|
+
end
|
100
|
+
else
|
101
|
+
spawn("sleep 3; #{command}")
|
102
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kdwatch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carsten Bormann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
|
-
rubygems_version: 3.
|
162
|
+
rubygems_version: 3.4.6
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: 'kdwatch: open auto-reloaded HTML for kramdown-rfc in a browser.'
|