rspec-openhab-scripting 0.0.11-java → 0.0.12-java

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: 3ef6a42e87b4466cf53972b65523d3a810060cbeac84497796ab4514b377d445
4
- data.tar.gz: 0b3be611dddf1a4e5643cdb48fd3f8a05d35eda32e50e9b4062a063f49f6ad17
3
+ metadata.gz: 826f0aaf58b9c4d57282365b2022123b632614c972c4236e4cbaef54f7112277
4
+ data.tar.gz: 04d5dbd825e8136d99ab46a435a7d1e073b4399efc9df9e787d871ebf604b7dd
5
5
  SHA512:
6
- metadata.gz: 0ffaf54c3e64d9a4f1be5ff0ecec757976db0e5ebbddec2d916d254fb9f9f730f3e1e1245fc478a970e8e42509613877ac535f9983aa94288cbb9c1f7abfa826
7
- data.tar.gz: 3333117270aa1e6b2de597ad9570df51a9f829d0c5da345cdbb1aed5f50d5bf841cdd1b9a140a94cf06695982acce024280ec814f4cbe5b46ab94dce88566b40
6
+ metadata.gz: 0f21ccb93cb88bdcd1dc469b68c7d85c9e0ecb8c087be90cda85973d0435bf222428bfdc87956f14bab26f6b546627a74dab16d00640860ff61d9b8c9aac6389
7
+ data.tar.gz: 6bf658c0b46e17faed956322bfe950af70b232ec80579252c921ba59649ea70cfe350532d0388a4fe499e63f74b9c78768235169bf66927d4d2be11788148356
@@ -1,15 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "faraday_middleware"
3
+ require "faraday"
4
4
 
5
5
  module OpenHAB
6
6
  class API
7
7
  def initialize(url)
8
8
  @faraday = Faraday.new(url) do |f|
9
- f.request :retry
10
9
  f.response :raise_error
11
10
  f.response :json
12
- f.adapter :net_http_persistent
13
11
  f.path_prefix = "/rest/"
14
12
  end
15
13
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  RSpec.configure do |config|
4
- config.before(:all) { OpenHAB::DSL::Timers.timer_manager.cancel_all }
5
-
6
4
  config.before do
7
5
  suspend_rules do
8
6
  $ir.for_each do |_provider, item|
7
+ next if item.is_a?(GroupItem) # groups only have calculated states
8
+
9
9
  item.state = NULL unless item.raw_state == NULL
10
10
  end
11
11
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module OpenHAB
5
- VERSION = "0.0.11"
5
+ VERSION = "0.0.12"
6
6
  end
7
7
  end
@@ -78,7 +78,6 @@ require_relative "rspec/openhab/dsl/timers/timer"
78
78
 
79
79
  # RSpec additions
80
80
  require "rspec/core"
81
- require "rspec/openhab/dsl/rules/rspec"
82
81
  require "rspec/openhab/items"
83
82
  require "rspec/openhab/helpers"
84
83
  require "rspec/openhab/hooks"
@@ -102,9 +101,11 @@ end
102
101
  # load rules files
103
102
  OPENHAB_AUTOMATION_PATH = "#{org.openhab.core.OpenHAB.config_folder}/automation/jsr223/ruby/personal"
104
103
 
105
- Dir["#{OPENHAB_AUTOMATION_PATH}/*.rb"].each do |f|
106
- load f
107
- rescue Exception => e
108
- warn "Failed loading #{f}: #{e.inspect}"
109
- warn e.backtrace
104
+ RSpec::OpenHAB::SuspendRules.suspend_rules do
105
+ Dir["#{OPENHAB_AUTOMATION_PATH}/*.rb"].each do |f|
106
+ load f
107
+ rescue Exception => e
108
+ warn "Failed loading #{f}: #{e.inspect}"
109
+ warn e.backtrace
110
+ end
110
111
  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: 0.0.11
4
+ version: 0.0.12
5
5
  platform: java
6
6
  authors:
7
7
  - Cody Cutrer
@@ -15,15 +15,15 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '1.1'
19
- name: faraday_middleware
18
+ version: '2.3'
19
+ name: faraday
20
20
  prerelease: false
21
21
  type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.1'
26
+ version: '2.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
@@ -195,7 +195,6 @@ files:
195
195
  - lib/rspec/openhab/core/osgi.rb
196
196
  - lib/rspec/openhab/core/script_handling.rb
197
197
  - lib/rspec/openhab/dsl/imports.rb
198
- - lib/rspec/openhab/dsl/rules/rspec.rb
199
198
  - lib/rspec/openhab/dsl/timers/timer.rb
200
199
  - lib/rspec/openhab/helpers.rb
201
200
  - lib/rspec/openhab/hooks.rb
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module OpenHAB
4
- module DSL
5
- module Rules
6
- class RuleConfig
7
- # override on_start to never work
8
- def on_start?
9
- false
10
- end
11
- end
12
- end
13
- end
14
- end