openhab-scripting 5.39.0 → 5.39.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 +4 -4
- data/lib/openhab/core/items/semantics.rb +3 -2
- data/lib/openhab/core/value_cache.rb +13 -0
- data/lib/openhab/core.rb +8 -0
- data/lib/openhab/dsl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55fbb5f57901f9c8ceeab748598794fe7d166e2ecb7247d87c3fd6dc747888e2
|
4
|
+
data.tar.gz: e9c9011dd20c0ff748fa6bbb6e4b3a19df6bf465e238f846139076da9bcad0ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90a1d26ca9cf15ecd9a15b713980b563438cffa7545b32f95d7149f3d0cc591cc210b341802b4f6480cfd8b6fd9219b909e038381923184150ff32e7bd274fde
|
7
|
+
data.tar.gz: 2f0b4a1bbaa973becb887a5d20e3e04c8b95e6f39cb63e45d29a3efa74eaec47037b30bd695ec63c95dccd41556c9d4723e707fdd7c74743103a27aaba77051a
|
@@ -212,8 +212,9 @@ module OpenHAB
|
|
212
212
|
# Java21 added #first method, which overrides Ruby's #first.
|
213
213
|
# It throws an error if the list is Empty instead of returning nil.
|
214
214
|
# So we use #ruby_first to ensure we get Ruby's behaviour
|
215
|
-
tag_class =
|
216
|
-
|
215
|
+
tag_class = Provider.registry.get_tag_class_by_id(id) ||
|
216
|
+
service.get_by_label_or_synonym(id, locale).ruby_first
|
217
|
+
|
217
218
|
return unless tag_class
|
218
219
|
|
219
220
|
Provider.registry.get(Provider.registry.class.build_id(tag_class))
|
@@ -50,6 +50,19 @@ module OpenHAB
|
|
50
50
|
get(key)
|
51
51
|
end
|
52
52
|
|
53
|
+
# @!method compute(key, &)
|
54
|
+
# Attempts to compute a mapping for the specified key and its current mapped value
|
55
|
+
# (or null if there is no current mapping).
|
56
|
+
# See {java.util.Map#compute(K,java.util.function.BiFunction) java.util.Map#compute} for details.
|
57
|
+
#
|
58
|
+
# @param [String] key the key whose mapping is to be computed
|
59
|
+
# @yield [key, current_value] a block to compute the new value
|
60
|
+
# @yieldparam [String] key
|
61
|
+
# @yieldparam [Object] current_value the current value, or nil if there is no current mapping
|
62
|
+
# @yieldreturn [Object] new value, or nil to remove the key
|
63
|
+
#
|
64
|
+
# @since openHAB 5.0
|
65
|
+
|
53
66
|
#
|
54
67
|
# Compute and store new value for key if the key is absent. This method is atomic.
|
55
68
|
#
|
data/lib/openhab/core.rb
CHANGED
@@ -67,6 +67,14 @@ module OpenHAB
|
|
67
67
|
Pathname.new(org.openhab.core.OpenHAB.config_folder)
|
68
68
|
end
|
69
69
|
|
70
|
+
#
|
71
|
+
# @!attribute [r] user_data_folder
|
72
|
+
# @return [Pathname] The userdata folder path.
|
73
|
+
#
|
74
|
+
def user_data_folder
|
75
|
+
Pathname.new(org.openhab.core.OpenHAB.user_data_folder)
|
76
|
+
end
|
77
|
+
|
70
78
|
#
|
71
79
|
# @!attribute [r] automation_manager
|
72
80
|
# @return [org.openhab.core.automation.module.script.rulesupport.shared.ScriptedAutomationManager]
|
data/lib/openhab/dsl/version.rb
CHANGED
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.39.
|
4
|
+
version: 5.39.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian O'Connell
|
@@ -326,7 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
326
326
|
- !ruby/object:Gem::Version
|
327
327
|
version: '0'
|
328
328
|
requirements: []
|
329
|
-
rubygems_version: 3.6.
|
329
|
+
rubygems_version: 3.6.9
|
330
330
|
specification_version: 4
|
331
331
|
summary: JRuby Helper Libraries for openHAB Scripting
|
332
332
|
test_files: []
|