openhab-scripting 5.1.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5064300df1e62e03270a15425080c31ce101bb688c8f91f9f0fa0393f7a1f4c
4
- data.tar.gz: 8ff582399587b468ac80d525f55648ab997e2d866b7d6b2bf8fc9715171f138e
3
+ metadata.gz: 17db43cc91f70e705ab8002d2653afe72cad963ad92907d9535ee906082cca97
4
+ data.tar.gz: 0cf4c4c56fbf427fbf37a47571b20294176b29a89140428cb2b6f29c495c5a92
5
5
  SHA512:
6
- metadata.gz: cd9c5fcfd966a435ac782e3c2cb00e0b7e10e3c3e22fb64c83ce674da9f1476a92c1072df8d44aab536f6ee774ed6ba0960160d09b554b5d9728e669855fdcfb
7
- data.tar.gz: a88bd0a48d8740d04874fdc2a5ae7de454ed17d363bedb653ebc57cf818e2818d03675cdf47a033ac037400e5a0d3988b6ead3be4c63a816c01f12c3a1103d8c
6
+ metadata.gz: 0a20f62e3c416f1801d92216a64495737cacb017257644506040c8412908ffa15575356707c947757160b9d03ff340a6c8abeab25924bdca2f79979f63b0a148
7
+ data.tar.gz: ce9de9508194ae985223f92457184bb1c42af089605171950d13cdbf93d132a1955dcd8d9773a9749272ec13a3c956d4b0788e1cc632e50900204568c0276181
@@ -490,13 +490,17 @@ module OpenHAB
490
490
  def self.const_missing(sym)
491
491
  logger.trace("const missing, performing Semantics Lookup for: #{sym}")
492
492
  # @deprecated OH3.4 - the Property tag had an ID of "MeasurementProperty" in OH3.4. This was corrected in OH4.
493
- sym = :MeasurementProperty if sym == :Property && Gem::Version.new(Core::VERSION) < Gem::Version.new("4.0.0")
493
+ # make sure we compare against pre-release versions
494
+ target_sym = sym
495
+ if sym == :Property && Gem::Version.new(Core::VERSION) < Gem::Version.new("4.0.0.M1")
496
+ sym = :MeasurementProperty
497
+ end
494
498
 
495
499
  org.openhab.core.semantics.SemanticTags.get_by_id(sym.to_s)
496
500
  &.then do |tag|
497
501
  tag = tag.ruby_class
498
502
  tag.singleton_class.include(TagClassMethods)
499
- const_set(sym, tag)
503
+ const_set(target_sym, tag)
500
504
  end
501
505
  end
502
506
 
@@ -4,6 +4,6 @@ module OpenHAB
4
4
  module DSL
5
5
  # Version of openHAB helper libraries
6
6
  # @return [String]
7
- VERSION = "5.1.0"
7
+ VERSION = "5.1.1"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openhab-scripting
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian O'Connell
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-04-19 00:00:00.000000000 Z
13
+ date: 2023-04-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler