rsmp 0.16.8 → 0.17.0

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: f4060389b1398d8bf006419c7536bced8d46dfdb2d6852fe1ce625d08f913eda
4
- data.tar.gz: 4623b52e36898a400f82a7b9807c1437010e39509c91d3a693165a6766d75a84
3
+ metadata.gz: 1892a38bd08ed7d72ab19c3807bf142249c5a1a86784b88e19ca126e73a07aa1
4
+ data.tar.gz: 5aa9489971886d03b93dc2de1130cffa736bbe0184167b51638da601e2622777
5
5
  SHA512:
6
- metadata.gz: 8422abc49a3db9d5d9239612ff81af6cb741945e16231b96292c80bc1a6d2e072a62ddc204373a67efc3afbfb7eb9cafcbc3c060c292a589335ba6a13ed8f490
7
- data.tar.gz: 5f8a271d7e76d0c0e710c457861a36260bfdd26fdbc69b66ea1035c6c6927512c1a5a8191f8e2ae0b87b763393e178fb0f72228a9d7574719bf2d6c411cff7c3
6
+ metadata.gz: 39ee3bbf2fe62b0929696f955e08d3839b46486357207461d4024ae5a090f4812a9d04d93ee85f974bdd5de9eb9c1999e68ece874079baee2dbb36eb269cf6eb
7
+ data.tar.gz: 35d5eb80b1f68f04b196250d9976be66e3663886e39d325b5f6a954008da6fa479ef59f78c22549620c1bc3d85bae9b195af95bc8ecbc08ebf186d037715c938
data/Gemfile.lock CHANGED
@@ -1,11 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rsmp (0.16.8)
4
+ rsmp (0.17.0)
5
5
  async (~> 1.30.3)
6
6
  async-io (~> 1.33.0)
7
7
  colorize (~> 0.8.1)
8
- rsmp_schema (~> 0.3.2)
8
+ rsmp_schema (~> 0.4.0)
9
9
  thor (~> 1.2.1)
10
10
 
11
11
  GEM
@@ -27,7 +27,7 @@ GEM
27
27
  builder (3.2.4)
28
28
  childprocess (4.1.0)
29
29
  colorize (0.8.1)
30
- console (1.15.3)
30
+ console (1.16.2)
31
31
  fiber-local
32
32
  contracts (0.17)
33
33
  cucumber (7.1.0)
@@ -68,7 +68,7 @@ GEM
68
68
  ffi (1.15.5-x64-mingw32)
69
69
  fiber-local (1.0.0)
70
70
  hana (1.3.7)
71
- json_schemer (0.2.21)
71
+ json_schemer (0.2.24)
72
72
  ecma-re-validator (~> 0.3)
73
73
  hana (~> 1.3)
74
74
  regexp_parser (~> 2.0)
@@ -77,10 +77,10 @@ GEM
77
77
  mime-types-data (~> 3.2015)
78
78
  mime-types-data (3.2022.0105)
79
79
  multi_test (0.1.2)
80
- nio4r (2.5.8)
80
+ nio4r (2.5.9)
81
81
  rake (13.0.6)
82
- regexp_parser (2.5.0)
83
- rsmp_schema (0.3.2)
82
+ regexp_parser (2.7.0)
83
+ rsmp_schema (0.4.0)
84
84
  json_schemer (~> 0.2.21)
85
85
  thor (~> 1.2.1)
86
86
  rspec (3.10.0)
@@ -100,7 +100,7 @@ GEM
100
100
  ffi (~> 1.1)
101
101
  thor (1.2.1)
102
102
  timecop (0.9.5)
103
- timers (4.3.4)
103
+ timers (4.3.5)
104
104
  uri_template (0.7.0)
105
105
 
106
106
  PLATFORMS
data/config/tlc.yaml CHANGED
@@ -58,6 +58,3 @@ log:
58
58
  debug: true
59
59
  json: true
60
60
  live_output: tmp/tlc.state
61
- skip_validation:
62
- - AlarmSuspend
63
- - AlarmResume
data/lib/rsmp/proxy.rb CHANGED
@@ -648,8 +648,10 @@ module RSMP
648
648
  message.attributes['xNId'] = (main && main.xNId) ? main.xNId : ''
649
649
  end
650
650
 
651
- # use Gem class to check version requirement
652
- def self.version_requirement_met? requirement, version
651
+ # Use Gem class to check version requirement
652
+ # Requirement must be a string like '1.1', '>=1.0.3' or '<2.1.4',
653
+ # or list of strings, like ['<=1.4','<1.5']
654
+ def self.version_meets_requirement? version, requirement
653
655
  Gem::Requirement.new(requirement).satisfied_by?(Gem::Version.new(version))
654
656
  end
655
657
 
@@ -276,23 +276,13 @@ module RSMP
276
276
  v.to_s
277
277
  end
278
278
 
279
- # get name of q field, depending on the core version we're using
280
- # it changed from 'ageState' to 'q' in version 3.1.3
281
- def q_key
282
- if Proxy.version_requirement_met? '>=3.1.3', core_version
283
- q_key = 'q'
284
- else
285
- q_key = 'ageState'
286
- end
287
- end
288
-
289
279
  def process_status_request message, options={}
290
280
  component_id = message.attributes["cId"]
291
281
  component = @site.find_component component_id
292
282
  log "Received #{message.type}", message: message, level: :log
293
283
  sS = message.attributes["sS"].map do |arg|
294
284
  value, quality = component.get_status arg['sCI'], arg['n'], {sxl_version: sxl_version}
295
- { "s" => rsmpify_value(value), q_key => quality.to_s }.merge arg
285
+ { "s" => rsmpify_value(value), "q" => quality.to_s }.merge arg
296
286
  end
297
287
  response = StatusResponse.new({
298
288
  "cId"=>component_id,
@@ -430,7 +420,7 @@ module RSMP
430
420
  sS << { "sCI" => code,
431
421
  "n" => status_name,
432
422
  "s" => rsmpify_value(value),
433
- q_key => quality }
423
+ "q" => quality }
434
424
  end
435
425
  end
436
426
  update = StatusUpdate.new({
@@ -796,7 +796,7 @@ module RSMP
796
796
  end
797
797
 
798
798
  def handle_s0091 status_code, status_name=nil, options={}
799
- if Proxy.version_requirement_met? '>=1.1',options[:sxl_version]
799
+ if Proxy.version_requirement_met? options[:sxl_version], '>=1.1'
800
800
  case status_name
801
801
  when 'user'
802
802
  TrafficControllerSite.make_status 0
@@ -812,7 +812,7 @@ module RSMP
812
812
  end
813
813
 
814
814
  def handle_s0092 status_code, status_name=nil, options={}
815
- if Proxy.version_requirement_met? '>=1.1',options[:sxl_version]
815
+ if Proxy.version_requirement_met? options[:sxl_version], '>=1.1'
816
816
  case status_name
817
817
  when 'user'
818
818
  TrafficControllerSite.make_status 0
data/lib/rsmp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RSMP
2
- VERSION = "0.16.8"
2
+ VERSION = "0.17.0"
3
3
  end
data/rsmp.gemspec CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency "async-io", "~> 1.33.0"
35
35
  spec.add_dependency "colorize", "~> 0.8.1"
36
36
  spec.add_dependency "thor", "~> 1.2.1"
37
- spec.add_dependency "rsmp_schema", "~> 0.3.2"
37
+ spec.add_dependency "rsmp_schema", "~> 0.4.0"
38
38
 
39
39
  spec.add_development_dependency "bundler", "~> 2.3.7"
40
40
  spec.add_development_dependency "rake", "~> 13.0.6"
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.16.8
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Tin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-23 00:00:00.000000000 Z
11
+ date: 2023-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.3.2
75
+ version: 0.4.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.3.2
82
+ version: 0.4.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement