rspec-openhab-scripting 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14c2866f832e36d59f6e3fda3c6c3b05b78a07ea1f14ad2d2dbfb237dd20951f
4
- data.tar.gz: 5e294c19788f5ff79b2ab0de597a1cef68f0a36cf1181b407beffae9ecbb1b64
3
+ metadata.gz: 116f3664ed9d88e87a4030cf7006dc82c3c517b7b6f54b2611989f5aa48f7988
4
+ data.tar.gz: d257ff1821dad6bca67eaa1cb848d3cc55b1a05f7cb02d5f20e9e34d2b2c3c17
5
5
  SHA512:
6
- metadata.gz: 0db3ac4f2f9bf4b0a77a8d97bd9f6c0c96592f1c62002a55801ce63c9ae0bf294eeed974d978e2d8ef80f4af7b7aa51876ad693b044057bc078096714e21164f
7
- data.tar.gz: 5fa61081ef0e73146cab8225a6d5717579b6f0fb12fc86df716aa2fa215435bd84fcc07270fdb167005bfd54130e7026f0e535d0a3ce7a3d38e039940f661ba9
6
+ metadata.gz: c29fdc081461392dcad67246de4b784c012c0963d971acc1ca4f2c4f78e9229698ef36c7c1946c1b14e290b7bf11c77977f4d20a0e39b41fa950b3e2609663b6
7
+ data.tar.gz: 859f14916f43496a242adf17896a2d8bb5cd46027d101c5e3da70ebc215fba5bcecf9f71d0dd4eb41b9022e8879d427af3cbb4624a909af33864f5011ccdaeee
@@ -35,6 +35,8 @@ module RSpec
35
35
  end
36
36
 
37
37
  config.before do
38
+ next unless defined?(::OpenHAB::DSL::Items::ItemProvider)
39
+
38
40
  @item_provider = ::OpenHAB::DSL::Items::ItemProvider.send(:new)
39
41
  allow(::OpenHAB::DSL::Items::ItemProvider).to receive(:instance).and_return(@item_provider)
40
42
  end
@@ -44,7 +46,7 @@ module RSpec
44
46
  (::OpenHAB::Core.rule_registry.all.map(&:uid) - @known_rules).each do |uid|
45
47
  ::OpenHAB::Core.rule_registry.remove(uid)
46
48
  end
47
- $ir.remove_provider(@item_provider) if @item_provider
49
+ $ir.remove_provider(@item_provider) if instance_variable_defined?(:@item_provider) && @item_provider
48
50
  ::OpenHAB::DSL::Timers.timer_manager.cancel_all
49
51
  Timecop.return
50
52
  restore_autoupdate_items
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module OpenHAB
5
- VERSION = "1.0.4"
5
+ VERSION = "1.0.5"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-openhab-scripting
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer