openhab-scripting 4.8.1 → 4.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openhab/dsl/items/image_item.rb +1 -1
- data/lib/openhab/dsl/rules/automation_rule.rb +5 -1
- data/lib/openhab/log/logger.rb +1 -1
- data/lib/openhab/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04e0efcb683ac15c3b82af5e7837412e84b1038a822468de155b5825068e9593
|
4
|
+
data.tar.gz: 8b2da1406b372c7164a47d3fec3ac5da4d35af8ee3ceb207148f977ad1cab91d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2227a683fa379ca71f96cb1fd5ca0944906a7f94f3413d7d775a0082a99a62f53631215272db38c3ce85984e4ffcbe382d882ab3a3c76a7c06adac69354854e5
|
7
|
+
data.tar.gz: 91b9855912c8b309b01369f833a1c89845708c61beaf655d08965ab09dd5e0231eec4a6d508f9941934e9b4c8cda36c8ea88db74e7dbbfb9880f8cf233afc65d
|
@@ -21,7 +21,7 @@ module OpenHAB
|
|
21
21
|
#
|
22
22
|
#
|
23
23
|
def update_from_file(file, mime_type: nil)
|
24
|
-
file_data =
|
24
|
+
file_data = File.binread(file)
|
25
25
|
mime_type ||= Marcel::MimeType.for(Pathname.new(file)) || Marcel::MimeType.for(file_data)
|
26
26
|
update_from_bytes(file_data, mime_type: mime_type)
|
27
27
|
end
|
@@ -77,7 +77,6 @@ module OpenHAB
|
|
77
77
|
# Create the run queue based on guards
|
78
78
|
#
|
79
79
|
# @param [Map] inputs rule inputs
|
80
|
-
#
|
81
80
|
# @return [Queue] <description>
|
82
81
|
#
|
83
82
|
def create_queue(inputs)
|
@@ -243,6 +242,8 @@ module OpenHAB
|
|
243
242
|
#
|
244
243
|
# @return [Boolean] True if guards says rule should execute, false otherwise
|
245
244
|
#
|
245
|
+
# rubocop:disable Metrics/MethodLength
|
246
|
+
# Loggging inflates method length
|
246
247
|
def check_guards(event:)
|
247
248
|
if @guard.should_run? event
|
248
249
|
now = TimeOfDay::TimeOfDay.now
|
@@ -254,7 +255,10 @@ module OpenHAB
|
|
254
255
|
logger.trace("Skipped execution of rule '#{name}' because of guard #{@guard}")
|
255
256
|
end
|
256
257
|
false
|
258
|
+
rescue StandardError => e
|
259
|
+
print_backtrace(e)
|
257
260
|
end
|
261
|
+
# rubocop:enable Metrics/MethodLength
|
258
262
|
|
259
263
|
#
|
260
264
|
# Process the run queue
|
data/lib/openhab/log/logger.rb
CHANGED
@@ -73,7 +73,7 @@ module OpenHAB
|
|
73
73
|
return error if debug_enabled?
|
74
74
|
|
75
75
|
if error.respond_to? :backtrace_locations
|
76
|
-
backtrace = error.backtrace_locations.map(&:to_s).
|
76
|
+
backtrace = error.backtrace_locations.map(&:to_s).grep_v(INTERNAL_CALL_REGEX)
|
77
77
|
error.set_backtrace(backtrace)
|
78
78
|
elsif error.respond_to? :stack_trace
|
79
79
|
backtrace = error.stack_trace.reject { |line| JAVA_INTERNAL_CALL_REGEX.match? line.to_s }
|
data/lib/openhab/version.rb
CHANGED