openhab-scripting 5.48.0 → 5.49.0

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: ebd253fc1f0f462a281d219b0a102bb6f929e4fc9ae1555c60b8611e2e212487
4
- data.tar.gz: fc0e411cf1a935d87999ceaaf3750d9ef8d6deee6ebd642c751cd2d1d5085054
3
+ metadata.gz: 7cd17ad8e229eaed4db0be72e682f771612f10c59a1fed7612dae537eb5df073
4
+ data.tar.gz: a10d086518f1069b0f283f3ba680572f55ce4e5ef372397dde455259330b27ae
5
5
  SHA512:
6
- metadata.gz: 922a3b755a5258e853e4b3285d67f975d14acc03760adb9f3b66503068053dfa78377a83d60c366f43bac36784df03ff646794905a57883b9b1052b131486f2e
7
- data.tar.gz: b59b65d06610d7acaa9724b84993ade4464d000d0efe3490b6caf1a4aaaac4082540dfc9a8f5238ab44da85118af8b4e424ce8abb91fd69670070c4c54bd38fd
6
+ metadata.gz: ffd401dad6cd239b69f6c28c394d87fbfc9bbe557f3f080520ff579034170dfaabd84f9fc883d53a1b4c2a97bdffa767964a1526010764c7b28bac427cbc3d0a
7
+ data.tar.gz: d8e684891946c9b0fa67ff1b29f0a4ceabc1d1173611ff904993cf39589bc89aad7b882d647bf1eda1045d7f37210d5dc56ea04023bbc4d7638cf2f016f4c1e5
@@ -4,6 +4,6 @@ module OpenHAB
4
4
  module DSL
5
5
  # Version of openHAB helper libraries
6
6
  # @return [String]
7
- VERSION = "5.48.0"
7
+ VERSION = "5.49.0"
8
8
  end
9
9
  end
@@ -257,6 +257,13 @@ module OpenHAB
257
257
  rs.register_tracker(org.openhab.core.service.ReadyService::ReadyTracker.impl { continue.call }, filter)
258
258
  end
259
259
 
260
+ # openHAB 5.2.0.M5+ can leave RuleEngineImpl.started false in the rspec
261
+ # harness even after the rule-engine startlevel marker is reached.
262
+ # Force it on so RuleEngineImpl.runRule won't drop triggered events.
263
+ rule_manager = OSGi.service("org.openhab.core.automation.RuleManager")
264
+ rule_manager.class.field_accessor :started
265
+ rule_manager.started = true unless rule_manager.started
266
+
260
267
  begin
261
268
  # load storage based type providers
262
269
  ast = org.openhab.core.thing.binding.AbstractStorageBasedTypeProvider
@@ -26,15 +26,18 @@ module OpenHAB
26
26
  end
27
27
 
28
28
  def submit(runnable)
29
- return super unless Thread.current == main_thread
30
-
31
- runnable.respond_to?(:run) ? runnable.run : runnable.call
29
+ if OpenHAB::Core.version < "5.1.0" # @deprecated OH5.1 remove the version guard
30
+ return super unless Thread.current == main_thread # rubocop:disable Style/SoleNestedConditional
31
+ end
32
32
 
33
- java.util.concurrent.CompletableFuture.completed_future(nil)
33
+ value = runnable.respond_to?(:run) ? runnable.run : runnable.call
34
+ java.util.concurrent.CompletableFuture.completed_future(value)
34
35
  end
35
36
 
36
37
  def execute(runnable)
37
- return super unless Thread.current == main_thread
38
+ if OpenHAB::Core.version < "5.1.0" # @deprecated OH5.1 remove the version guard
39
+ return super unless Thread.current == main_thread # rubocop:disable Style/SoleNestedConditional
40
+ end
38
41
 
39
42
  runnable.run
40
43
  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.48.0
4
+ version: 5.49.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian O'Connell
@@ -68,7 +68,7 @@ dependencies:
68
68
  version: 5.0.0
69
69
  - - "<"
70
70
  - !ruby/object:Gem::Version
71
- version: '5.3'
71
+ version: '5.4'
72
72
  type: :runtime
73
73
  prerelease: false
74
74
  version_requirements: !ruby/object:Gem::Requirement
@@ -78,7 +78,7 @@ dependencies:
78
78
  version: 5.0.0
79
79
  - - "<"
80
80
  - !ruby/object:Gem::Version
81
- version: '5.3'
81
+ version: '5.4'
82
82
  email:
83
83
  - broconne+github@gmail.com
84
84
  - cody@cutrer.us
@@ -360,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
360
360
  - !ruby/object:Gem::Version
361
361
  version: '0'
362
362
  requirements: []
363
- rubygems_version: 4.0.11
363
+ rubygems_version: 4.0.15
364
364
  specification_version: 4
365
365
  summary: JRuby Helper Libraries for openHAB Scripting
366
366
  test_files: []