openhab-scripting 4.32.2 → 4.32.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf1f1c2ae201fe502bf830cdfd68be82d9489931f4122e2ab196581ac0b2793a
|
4
|
+
data.tar.gz: 7b85b254e1ef2cf2d26a50c94719b2cbe12a7140eba86f9b9d70a428ccd7a960
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4299bc30c7f47b534653808258263a9d1bca1cf5284a86e94bdece0f6084989a25db5ccba277c44b0fc1d59cb54e30eddccc0e63535cbe98669ced090860baad
|
7
|
+
data.tar.gz: 52acd07934bc24858bdfeebe257b423909db886549582b32a66e8efea6fa213be7259b9e7829def39e9a1c01ac8e9f4869ad209553cd7bcb0a99bbf1e5b734d5
|
@@ -9,12 +9,10 @@ module OpenHAB
|
|
9
9
|
# Patches OpenHAB actions
|
10
10
|
#
|
11
11
|
module Actions
|
12
|
-
java_import Java::OrgOpenhabCoreAutomationModuleScriptInternalDefaultscope::ScriptThingActions
|
13
|
-
|
14
12
|
#
|
15
13
|
# MonkeyPatching ScriptThingActions
|
16
14
|
#
|
17
|
-
class
|
15
|
+
class << $actions # rubocop:disable Style/GlobalVars
|
18
16
|
field_reader :THING_ACTIONS_MAP
|
19
17
|
|
20
18
|
#
|
@@ -23,7 +21,7 @@ module OpenHAB
|
|
23
21
|
# @return [Set] of keys for defined actions in the form of 'scope-thing_uid'
|
24
22
|
#
|
25
23
|
def action_keys
|
26
|
-
|
24
|
+
self.class.THING_ACTIONS_MAP.keys
|
27
25
|
end
|
28
26
|
end
|
29
27
|
end
|
@@ -34,7 +34,6 @@ module OpenHAB
|
|
34
34
|
# @yield [] Block executed in context of a RuleConfig
|
35
35
|
#
|
36
36
|
#
|
37
|
-
# rubocop: disable Metrics/MethodLength
|
38
37
|
def rule(rule_name, &block)
|
39
38
|
thread_local(RULE_NAME: rule_name) do
|
40
39
|
@rule_name = rule_name
|
@@ -43,12 +42,10 @@ module OpenHAB
|
|
43
42
|
config.guard = Guard::Guard.new(run_context: config.caller, only_if: config.only_if, not_if: config.not_if)
|
44
43
|
logger.trace { config.inspect }
|
45
44
|
process_rule_config(config)
|
46
|
-
nil # Must return something other than the rule object. See https://github.com/boc-tothefuture/openhab-jruby/issues/438
|
47
45
|
end
|
48
46
|
rescue StandardError => e
|
49
47
|
logger.log_exception(e, @rule_name)
|
50
48
|
end
|
51
|
-
# rubocop: enable Metrics/MethodLength
|
52
49
|
|
53
50
|
#
|
54
51
|
# Cleanup rules in this script file
|
@@ -71,10 +68,10 @@ module OpenHAB
|
|
71
68
|
|
72
69
|
rule = AutomationRule.new(config: config)
|
73
70
|
Rules.script_rules << rule
|
74
|
-
add_rule(rule)
|
71
|
+
added_rule = add_rule(rule)
|
75
72
|
|
76
73
|
rule.execute(nil, { 'event' => Struct.new(:attachment).new(config.start_attachment) }) if config.on_start?
|
77
|
-
|
74
|
+
added_rule
|
78
75
|
end
|
79
76
|
|
80
77
|
#
|
data/lib/openhab/log/logger.rb
CHANGED
@@ -270,8 +270,7 @@ module OpenHAB
|
|
270
270
|
#
|
271
271
|
def log_caller
|
272
272
|
caller_locations.map(&:path)
|
273
|
-
.grep_v(/rubygems
|
274
|
-
.grep_v(/openhab-scripting/)
|
273
|
+
.grep_v(/rubygems|openhab-scripting|<script>/)
|
275
274
|
.first
|
276
275
|
.then { |caller| File.basename(caller, '.*') if caller }
|
277
276
|
end
|
data/lib/openhab/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openhab-scripting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.32.
|
4
|
+
version: 4.32.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian O'Connell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|