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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f56de7518625c2ed3840b32a1169c2e565d614c987d3197f573238a97f45f24f
4
- data.tar.gz: afcbab033ed8fd02cc2dfe1068ceb8891ec994ed3fbf803ef3d34ef30c2b41e3
3
+ metadata.gz: d6f7fa1f60ca721461cbd01259dbce26eaa84053a4f30417ab2fda58a6036488
4
+ data.tar.gz: 9a9a7585b0364d3359c96de831c16d6f2cf6efb831a1460460d897291e089235
5
5
  SHA512:
6
- metadata.gz: d9939dd05989a49edb1995589363187a44ce3a465d84d0f26b0624e4f8f3dde69d8eefb60e1143c1474bd5c94be3a878554e95074009e1d0385c088c319cd04a
7
- data.tar.gz: 9306e2f2aef9f7a522829c76cc51e6a5d7d433ccb6f90056603342f8e7c6004886eea32a3dbe485e39e26aac5bf57370868765fe0cc377d2291e67904a98d4c6
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.5)
4
+ rsmp (0.1.6)
5
5
  async (~> 1.23.0)
6
- async-io (~> 1.27.0)
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.0)
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
@@ -18,7 +18,7 @@ module RSMP
18
18
  'json'=>false,
19
19
  'debug'=>false,
20
20
  'statistics'=>false,
21
- 'hide_ip_and_port' => true
21
+ 'hide_ip_and_port' => false
22
22
  }
23
23
  if settings
24
24
  @settings = defaults.merge settings
@@ -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
- end
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 connect socket, info
102
+ def format_ip_and_port info
103
103
  if @logger.settings['hide_ip_and_port']
104
- port_and_port = '********'
104
+ '********'
105
105
  else
106
- port_and_port = "#{info[:ip]}:#{info[:port]}"
106
+ "#{info[:ip]}:#{info[:port]}"
107
107
  end
108
+ end
108
109
 
109
- log "Site connected from #{port_and_port}",
110
- ip: port_and_port,
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[:ip]}:#{info[:port]} closed", ip: info[:ip], level: :info, timestamp: RSMP.now_object
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
@@ -1,3 +1,3 @@
1
1
  module RSMP
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
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.0"
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.5
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-06 00:00:00.000000000 Z
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.0
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.0
40
+ version: 1.27.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: colorize
43
43
  requirement: !ruby/object:Gem::Requirement