openhab-scripting 5.4.2 → 5.6.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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/openhab/core/configuration.rb +70 -0
  3. data/lib/openhab/core/emulate_hash.rb +241 -0
  4. data/lib/openhab/core/events/abstract_event.rb +11 -0
  5. data/lib/openhab/core/events/timer_event.rb +48 -0
  6. data/lib/openhab/core/items/group_function.rb +37 -0
  7. data/lib/openhab/core/items/group_item.rb +10 -4
  8. data/lib/openhab/core/items/item.rb +31 -0
  9. data/lib/openhab/core/items/metadata/hash.rb +9 -179
  10. data/lib/openhab/core/items/metadata/namespace_hash.rb +38 -141
  11. data/lib/openhab/core/items/persistence.rb +45 -12
  12. data/lib/openhab/core/items/semantics/semantic_tag.rb +5 -0
  13. data/lib/openhab/core/items/semantics/tag_class_methods.rb +9 -0
  14. data/lib/openhab/core/items/semantics.rb +3 -1
  15. data/lib/openhab/core/rules/rule.rb +17 -4
  16. data/lib/openhab/core/things/links/provider.rb +1 -1
  17. data/lib/openhab/core/things/thing.rb +23 -0
  18. data/lib/openhab/core/value_cache.rb +1 -1
  19. data/lib/openhab/dsl/items/builder.rb +10 -5
  20. data/lib/openhab/dsl/rules/automation_rule.rb +29 -5
  21. data/lib/openhab/dsl/rules/builder.rb +0 -3
  22. data/lib/openhab/dsl/rules/rule_triggers.rb +1 -1
  23. data/lib/openhab/dsl/rules/triggers/conditions/duration.rb +2 -1
  24. data/lib/openhab/dsl/rules/triggers/conditions/generic.rb +7 -0
  25. data/lib/openhab/dsl/rules/triggers/cron/cron.rb +10 -2
  26. data/lib/openhab/dsl/rules/triggers/cron/cron_handler.rb +101 -96
  27. data/lib/openhab/dsl/things/builder.rb +4 -4
  28. data/lib/openhab/dsl/thread_local.rb +1 -0
  29. data/lib/openhab/dsl/timer_manager.rb +4 -4
  30. data/lib/openhab/dsl/version.rb +1 -1
  31. data/lib/openhab/dsl.rb +23 -4
  32. data/lib/openhab/log.rb +2 -2
  33. data/lib/openhab/rspec/helpers.rb +10 -1
  34. data/lib/openhab/rspec/karaf.rb +2 -2
  35. data/lib/openhab/rspec.rb +1 -1
  36. metadata +6 -2
@@ -574,7 +574,7 @@ module OpenHAB
574
574
  bundle.fragment?
575
575
  end
576
576
 
577
- def wait
577
+ def wait(timeout: 30)
578
578
  mutex = Mutex.new
579
579
  cond = ConditionVariable.new
580
580
  skip_wait = false
@@ -587,7 +587,7 @@ module OpenHAB
587
587
  end
588
588
  mutex.synchronize do
589
589
  yield continue
590
- cond.wait(mutex) unless skip_wait
590
+ cond.wait(mutex, timeout) unless skip_wait
591
591
  end
592
592
  end
593
593
 
data/lib/openhab/rspec.rb CHANGED
@@ -16,7 +16,7 @@ require_relative "rspec/helpers"
16
16
  require_relative "rspec/karaf"
17
17
  require_relative "rspec/hooks"
18
18
 
19
- return unless defined?(RSpec)
19
+ require "rspec/core"
20
20
 
21
21
  RSpec.configure do |c|
22
22
  c.add_setting :openhab_automation_search_paths, default: [
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.4.2
4
+ version: 5.6.0
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-07-23 00:00:00.000000000 Z
13
+ date: 2023-09-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -394,10 +394,12 @@ files:
394
394
  - lib/openhab/core/actions/ping.rb
395
395
  - lib/openhab/core/actions/transformation.rb
396
396
  - lib/openhab/core/actions/voice.rb
397
+ - lib/openhab/core/configuration.rb
397
398
  - lib/openhab/core/dependency_tracking.rb
398
399
  - lib/openhab/core/dto.rb
399
400
  - lib/openhab/core/dto/item_channel_link.rb
400
401
  - lib/openhab/core/dto/thing.rb
402
+ - lib/openhab/core/emulate_hash.rb
401
403
  - lib/openhab/core/entity_lookup.rb
402
404
  - lib/openhab/core/events.rb
403
405
  - lib/openhab/core/events/abstract_event.rb
@@ -409,6 +411,7 @@ files:
409
411
  - lib/openhab/core/events/item_state_event.rb
410
412
  - lib/openhab/core/events/item_state_updated_event.rb
411
413
  - lib/openhab/core/events/thing_status_info_event.rb
414
+ - lib/openhab/core/events/timer_event.rb
412
415
  - lib/openhab/core/items.rb
413
416
  - lib/openhab/core/items/accepted_data_types.rb
414
417
  - lib/openhab/core/items/color_item.rb
@@ -416,6 +419,7 @@ files:
416
419
  - lib/openhab/core/items/date_time_item.rb
417
420
  - lib/openhab/core/items/dimmer_item.rb
418
421
  - lib/openhab/core/items/generic_item.rb
422
+ - lib/openhab/core/items/group_function.rb
419
423
  - lib/openhab/core/items/group_item.rb
420
424
  - lib/openhab/core/items/image_item.rb
421
425
  - lib/openhab/core/items/item.rb