rspec-openhab-scripting 0.0.14-java → 0.0.15-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rspec/openhab/core/item_proxy.rb +19 -0
- data/lib/rspec/openhab/version.rb +1 -1
- data/lib/rspec-openhab-scripting.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d267863174213b2996edf9c92a8704499fb6e4c5136289fb2d2b2aae1a810bf
|
4
|
+
data.tar.gz: 0cd9ff249e7a045265337bbb8603c0ab7e87d2c7e24145454e08917869202d98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4881e2d5e6cd7149dc15fa518fa6198d189db5177889571db981c204b299b674ac7a8e773fe1b3d14c0c4afeab244ef4653e3c1075a8585188dce465f9acbf5b
|
7
|
+
data.tar.gz: 7d4f79653bf22e61ea06e19f42efc08544cbf4ad3a3ce3226c28dbd9f54df41f4cfdccec2df8dd6bbdbf4bc42d3d05076fb4217e416ea8f0492ce19b2062c92d
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenHAB
|
4
|
+
module Core
|
5
|
+
class ItemProxy
|
6
|
+
@proxies = {}
|
7
|
+
|
8
|
+
class << self
|
9
|
+
# ensure each item only has a single proxy, so that
|
10
|
+
# expect(item).to receive(:method) works
|
11
|
+
def new(item)
|
12
|
+
@proxies.fetch(item.name) do
|
13
|
+
@proxies[item.name] = super
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -73,7 +73,8 @@ require "openhab"
|
|
73
73
|
require "rspec/openhab/actions"
|
74
74
|
require "rspec/openhab/core/cron_scheduler"
|
75
75
|
|
76
|
-
# override several
|
76
|
+
# override several openhab-scripting methods
|
77
|
+
require_relative "rspec/openhab/core/item_proxy"
|
77
78
|
require_relative "rspec/openhab/dsl/timers/timer"
|
78
79
|
require_relative "rspec/openhab/dsl/rules/triggers/watch"
|
79
80
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-openhab-scripting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- lib/rspec/openhab/actions.rb
|
190
190
|
- lib/rspec/openhab/api.rb
|
191
191
|
- lib/rspec/openhab/core/cron_scheduler.rb
|
192
|
+
- lib/rspec/openhab/core/item_proxy.rb
|
192
193
|
- lib/rspec/openhab/core/load_path.rb
|
193
194
|
- lib/rspec/openhab/core/logger.rb
|
194
195
|
- lib/rspec/openhab/core/openhab_setup.rb
|