openhab-scripting 5.30.0 → 5.30.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: ec8c705070eb9fa18e95281eb9247ec66e53b9656810f785cf1690ae7b9812f5
4
- data.tar.gz: 32fbf23e31ab742a9799579d51a4fa3e5b59274a771321129af1f085ed6170ed
3
+ metadata.gz: 93b780d352d981919615e78e687910eb11ee024c6c567a6294db4538ddd8712a
4
+ data.tar.gz: dbdcb9b48ee07a0d626bf8aa5ef6da60273d330395c89647dd5a360b28bc3f1c
5
5
  SHA512:
6
- metadata.gz: 66643a7bf0b77e60d0277ece16fa71a8f8fe51f3a84d26c38b726e76dcfaf336a11c6688b26a5a426569f98ee1ffee97f53491084959c00f217bb3468866f579
7
- data.tar.gz: 0a8d019c6de74b12183382680334606103be3878cd0b4ac2785df324fc82301e81d2f9c3e9b9d5ae747bb612439c2b25260106a5fd3bd092d83303015cde2e0d
6
+ metadata.gz: 12c20ab4f52a6fac707f62d004c5eb9268ca6a00a9d9490f96892530091a7da6bc812d5b729b3041a51c1567690269b91dd77e31325a826b15ba3e2d32f5a53a
7
+ data.tar.gz: 718e2af872273b04125d64edce10d248883654388a14ca126c12fdcdaef68ebc25032466fa0bb20963b491fccb753406c668acdb1499ec9ac1567baeb02b10ff
@@ -103,10 +103,10 @@ module Enumerable
103
103
 
104
104
  # Send a command to every item in the collection, even when {OpenHAB::DSL.ensure_states! ensure_states!} is in effect.
105
105
  # @return [self]
106
- def command!(command)
106
+ def command!(command, **kwargs)
107
107
  # We cannot alias this to #command above, otherwise it will call
108
108
  # DSL::Items::Ensure::Item#command which checks for ensure_states
109
- each { |i| i.command!(command) }
109
+ each { |i| i.command!(command, **kwargs) }
110
110
  self
111
111
  end
112
112
 
@@ -198,7 +198,7 @@ module Enumerable
198
198
  # Send a toggle command to every item in the collection
199
199
  # @return [self]
200
200
  #
201
- def toggle
202
- each(&:toggle)
201
+ def toggle(source: nil)
202
+ each { |i| i.toggle(source: source) }
203
203
  end
204
204
  end
@@ -49,10 +49,10 @@ module OpenHAB
49
49
  #
50
50
  # @return [self]
51
51
  #
52
- def toggle
53
- return on! unless state?
52
+ def toggle(source: nil)
53
+ return on!(source: source) unless state?
54
54
 
55
- command!(!state)
55
+ command!(!state, source: source)
56
56
  end
57
57
 
58
58
  # @!method on?
@@ -4,6 +4,6 @@ module OpenHAB
4
4
  module DSL
5
5
  # Version of openHAB helper libraries
6
6
  # @return [String]
7
- VERSION = "5.30.0"
7
+ VERSION = "5.30.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.30.0
4
+ version: 5.30.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: 2024-10-02 00:00:00.000000000 Z
13
+ date: 2024-10-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler