openhab-scripting 4.42.1 → 4.42.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08c9201c21983751d80e9c2e4df683c39cef20763a5321fd2f8fdcd355cdb6c5'
|
4
|
+
data.tar.gz: f0b2c25837d2396e70d11ba503920ff443992bd9cf007b18a2003f6857a17929
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bff012a5dc7caf0e06fb9d0f3aede99afc9ad067004390ae606d392c34fe3662b017395fa3c200e759c2023e4801fb775ee097a29f0b90554f721d8fbbf9cf47
|
7
|
+
data.tar.gz: b862f6f69383d86e1a230d2c702c440c0b6dd465ed22ec16ad03a47166bd319004a8f82147eed2da514b301523f99c917c9d93de56f6ea7b9907ab5713f9d61d
|
@@ -37,7 +37,7 @@ module OpenHAB
|
|
37
37
|
end
|
38
38
|
|
39
39
|
# if we're NULL or UNDEF, implement special logic
|
40
|
-
return nil_comparison unless state?
|
40
|
+
return nil_comparison(other) unless state?
|
41
41
|
|
42
42
|
# delegate to how the state compares to the other object
|
43
43
|
state <=> other
|
@@ -45,9 +45,10 @@ module OpenHAB
|
|
45
45
|
|
46
46
|
# Special logic for NULL/UNDEF state comparison
|
47
47
|
# @!visibility private
|
48
|
-
def nil_comparison
|
48
|
+
def nil_comparison(other)
|
49
49
|
# if comparing to nil, consider ourselves equal
|
50
50
|
return 0 if other.nil?
|
51
|
+
|
51
52
|
# if the other object is an Item, only consider equal if we're
|
52
53
|
# in the same _kind_ of UnDefType state
|
53
54
|
return raw_state == other.raw_state if other.is_a?(GenericItem) && !other.state?
|
@@ -20,9 +20,6 @@ module OpenHAB
|
|
20
20
|
class Proc
|
21
21
|
include OpenHAB::Log
|
22
22
|
|
23
|
-
# Proc that doesn't check any fields
|
24
|
-
ANY = Proc.new.freeze
|
25
|
-
|
26
23
|
#
|
27
24
|
# Converts supplied ranges to procs that check range
|
28
25
|
# @param [Array] ranges objects to convert to range proc if they are ranges
|
@@ -83,6 +80,9 @@ module OpenHAB
|
|
83
80
|
@command = command
|
84
81
|
end
|
85
82
|
|
83
|
+
# Proc that doesn't check any fields
|
84
|
+
ANY = Proc.new.freeze # this needs to be defined _after_ initialize so its instance variables are set
|
85
|
+
|
86
86
|
#
|
87
87
|
# Process rule
|
88
88
|
# @param [Hash] inputs inputs from trigger
|
data/lib/openhab/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openhab-scripting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.42.
|
4
|
+
version: 4.42.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian O'Connell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|