rsmp 0.14.3 → 0.14.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: 9c07e65e3ac7d42b90156c102853bcc8032fff95f11f6022ee14e3357244e6d3
4
- data.tar.gz: '0999a7324481ab082047399b959d62afea347952eca6ec3f589292ba90eb62d1'
3
+ metadata.gz: 7a6dc2bc424c24c351ee90fd41bdcbd7210992474e93cb2e80bec07840520d84
4
+ data.tar.gz: 1b3a3de219e8ea71f7c4584c1453cdd6affcedd278754964a4208f426588e4e5
5
5
  SHA512:
6
- metadata.gz: 8de8c0d2a6e43612d78a9546d2de3d7da8130a6901f5d84d7d9b5ba1336bef99960bd4b27e1cb345dd5fe3ec2e5e15f1622f241ab66501adac18b23987a00350
7
- data.tar.gz: 37324e18e9440e1727dbf7313dbc8bdd9c02c2ad256f09fab416ec49dda90b808f56270f332365ece5b15ab50c1b638d7583d1e5b8b73915d91bba38c3c32d02
6
+ metadata.gz: 9993016c7c539af8ca717a63819376dbcae83acc5831197f4f133d7b0be9e1919c64773161317b963df01c69ded980bfc7feaec545fdbd547d1b21d7b1a1eda9
7
+ data.tar.gz: f0d4dfae8f8ac17bc079caac97086274853929a05b5b5d9b631feac11aef8058511b90650deb02802840e19ff324388bb4a16235fcc9b6e4455d6db92eae34ea
data/Gemfile.lock CHANGED
@@ -1,11 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rsmp (0.14.3)
4
+ rsmp (0.14.6)
5
5
  async (~> 1.30.3)
6
6
  async-io (~> 1.33.0)
7
7
  colorize (~> 0.8.1)
8
- rsmp_schema (~> 0.2.0)
8
+ rsmp_schema (~> 0.2.2)
9
9
  thor (~> 1.2.1)
10
10
 
11
11
  GEM
@@ -80,7 +80,7 @@ GEM
80
80
  nio4r (2.5.8)
81
81
  rake (13.0.6)
82
82
  regexp_parser (2.5.0)
83
- rsmp_schema (0.2.0)
83
+ rsmp_schema (0.2.2)
84
84
  json_schemer (~> 0.2.21)
85
85
  thor (~> 1.2.1)
86
86
  rspec (3.10.0)
data/lib/rsmp/message.rb CHANGED
@@ -61,21 +61,21 @@ module RSMP
61
61
 
62
62
  def self.build_alarm attributes
63
63
  case attributes["aSp"]
64
- when /Issue/i
64
+ when /^Issue$/i
65
65
  AlarmIssue.new attributes
66
- when /Request/i
66
+ when /^Request$/i
67
67
  AlarmRequest.new attributes
68
- when /Acknowledge/i
68
+ when /^Acknowledge$/i
69
69
  AlarmAcknowledged.new attributes
70
- when /Suspend/i
71
- if attributes['sS'] =~ /suspended/i
70
+ when /^Suspend$/i
71
+ if attributes['sS'] =~ /^suspended$/i
72
72
  AlarmSuspended.new attributes
73
- elsif attributes['sS'] =~ /notSuspended/i
73
+ elsif attributes['sS'] =~ /^notSuspended$/i
74
74
  AlarmResumed.new attributes
75
75
  else
76
76
  AlarmSuspend.new attributes
77
77
  end
78
- when /Resume/i
78
+ when /^Resume$/i
79
79
  AlarmResume.new attributes
80
80
  else
81
81
  Alarm.new attributes
data/lib/rsmp/proxy.rb CHANGED
@@ -317,8 +317,8 @@ module RSMP
317
317
  # normally we have an sxl, but during connection, it hasn't been established yet
318
318
  # at these times we only validate against the core schema
319
319
  # TODO
320
- # what schema should we use to validate the intial Version and MessageAck messages?
321
- schemas = { core: '3.1.5' }
320
+ # what schema should we use to validate the initial Version and MessageAck messages?
321
+ schemas = { core: RSMP::Schema.latest_core_version } # use latest core
322
322
  schemas[sxl] = RSMP::Schema.sanitize_version(sxl_version) if sxl && sxl_version
323
323
  schemas
324
324
  end
@@ -458,8 +458,8 @@ module RSMP
458
458
  end
459
459
 
460
460
  def rsmp_versions
461
- return ['3.1.5'] if @site_settings["rsmp_versions"] == 'latest'
462
- return ['3.1.1','3.1.2','3.1.3','3.1.4','3.1.5'] if @site_settings["rsmp_versions"] == 'all'
461
+ return [RSMP::Schema.latest_core_version] if @site_settings["rsmp_versions"] == 'latest'
462
+ return RSMP::Schema.core_versions if @site_settings["rsmp_versions"] == 'all'
463
463
  @site_settings["rsmp_versions"]
464
464
  end
465
465
 
@@ -510,9 +510,9 @@ module RSMP
510
510
 
511
511
  def send_version site_id, rsmp_versions
512
512
  if rsmp_versions=='latest'
513
- versions = ['3.1.5']
513
+ versions = [RSMP::Schema.latest_core_version]
514
514
  elsif rsmp_versions=='all'
515
- versions = ['3.1.1','3.1.2','3.1.3','3.1.4','3.1.5']
515
+ versions = RSMP::Schema.core_versions
516
516
  else
517
517
  versions = [rsmp_versions].flatten
518
518
  end
data/lib/rsmp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RSMP
2
- VERSION = "0.14.3"
2
+ VERSION = "0.14.6"
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.2.0"
37
+ spec.add_dependency "rsmp_schema", "~> 0.2.2"
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.14.3
4
+ version: 0.14.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: 2022-08-24 00:00:00.000000000 Z
11
+ date: 2022-08-25 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.2.0
75
+ version: 0.2.2
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.2.0
82
+ version: 0.2.2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement