rsmp 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/rsmp/logger.rb +1 -1
- data/lib/rsmp/supervisor.rb +11 -8
- data/lib/rsmp/version.rb +1 -1
- data/rsmp.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6f7fa1f60ca721461cbd01259dbce26eaa84053a4f30417ab2fda58a6036488
|
4
|
+
data.tar.gz: 9a9a7585b0364d3359c96de831c16d6f2cf6efb831a1460460d897291e089235
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0e52d579f96ca22e6e836b137d48d894ed9007d8a638cfcd8adbaa2a4bcc9af7999c10ba9232ff4cef1cd83f30f0c0aef7da0ad0e684e73950bce36d45ac9be
|
7
|
+
data.tar.gz: 51a1b83230b74632bd37be1eb48f5f435fcb597e6a9b26e22f5cace165f20a8a3bfed5c866281cba590f9e188d05d073b2d8c3e3bafd76e69858aeaf7c37a185
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rsmp (0.1.
|
4
|
+
rsmp (0.1.6)
|
5
5
|
async (~> 1.23.0)
|
6
|
-
async-io (~> 1.27.
|
6
|
+
async-io (~> 1.27.1)
|
7
7
|
colorize (~> 0.8.1)
|
8
8
|
json_schemer (~> 0.2.8)
|
9
9
|
thor (~> 0.20.3)
|
@@ -22,7 +22,7 @@ GEM
|
|
22
22
|
console (~> 1.0)
|
23
23
|
nio4r (~> 2.3)
|
24
24
|
timers (~> 4.1)
|
25
|
-
async-io (1.27.
|
25
|
+
async-io (1.27.1)
|
26
26
|
async (~> 1.14)
|
27
27
|
backports (3.15.0)
|
28
28
|
builder (3.2.3)
|
data/lib/rsmp/logger.rb
CHANGED
data/lib/rsmp/supervisor.rb
CHANGED
@@ -44,7 +44,7 @@ module RSMP
|
|
44
44
|
check_required_settings @supervisor_settings, required
|
45
45
|
|
46
46
|
@rsmp_versions = @supervisor_settings["rsmp_versions"]
|
47
|
-
|
47
|
+
end
|
48
48
|
|
49
49
|
def start_action
|
50
50
|
@endpoint = Async::IO::Endpoint.tcp('0.0.0.0', @supervisor_settings["port"])
|
@@ -99,15 +99,18 @@ module RSMP
|
|
99
99
|
SiteProxy.new settings
|
100
100
|
end
|
101
101
|
|
102
|
-
def
|
102
|
+
def format_ip_and_port info
|
103
103
|
if @logger.settings['hide_ip_and_port']
|
104
|
-
|
104
|
+
'********'
|
105
105
|
else
|
106
|
-
|
106
|
+
"#{info[:ip]}:#{info[:port]}"
|
107
107
|
end
|
108
|
+
end
|
108
109
|
|
109
|
-
|
110
|
-
|
110
|
+
def connect socket, info
|
111
|
+
log "Site connected from #{format_ip_and_port(info)}",
|
112
|
+
ip: info[:ip],
|
113
|
+
port: info[:port],
|
111
114
|
level: :info,
|
112
115
|
timestamp: RSMP.now_object
|
113
116
|
|
@@ -137,7 +140,7 @@ module RSMP
|
|
137
140
|
|
138
141
|
def close socket, info
|
139
142
|
if info
|
140
|
-
log "Connection to #{info
|
143
|
+
log "Connection to #{format_ip_and_port(info)} closed", ip: info[:ip], level: :info, timestamp: RSMP.now_object
|
141
144
|
else
|
142
145
|
log "Connection closed", level: :info, timestamp: RSMP.now_object
|
143
146
|
end
|
@@ -166,7 +169,7 @@ module RSMP
|
|
166
169
|
RSMP::Wait.wait_for(@task,@site_id_condition,timeout) { true unless find_site site_id }
|
167
170
|
rescue Async::TimeoutError
|
168
171
|
false
|
169
|
-
end
|
172
|
+
end
|
170
173
|
|
171
174
|
def check_site_id site_id
|
172
175
|
check_site_already_connected site_id
|
data/lib/rsmp/version.rb
CHANGED
data/rsmp.gemspec
CHANGED
@@ -42,7 +42,7 @@ Gem::Specification.new do |spec|
|
|
42
42
|
spec.require_paths = ["lib"]
|
43
43
|
|
44
44
|
spec.add_dependency "async", "~> 1.23.0"
|
45
|
-
spec.add_dependency "async-io", "~> 1.27.
|
45
|
+
spec.add_dependency "async-io", "~> 1.27.1"
|
46
46
|
spec.add_dependency "colorize", "~> 0.8.1"
|
47
47
|
spec.add_dependency "thor", "~> 0.20.3"
|
48
48
|
spec.add_dependency "json_schemer", "~> 0.2.8"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsmp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emil Tin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.27.
|
33
|
+
version: 1.27.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.27.
|
40
|
+
version: 1.27.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: colorize
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|