openhab-scripting 4.32.4 → 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: 5b99944ff8d378d0c6b9dbcffa3de3e1d8337625aea405841edad758b9595450
4
- data.tar.gz: 2cbdc97d7d8b425c32a5b3b030f6f35d0103df2c230ecffb175b58c4a7b27edf
3
+ metadata.gz: bf1f1c2ae201fe502bf830cdfd68be82d9489931f4122e2ab196581ac0b2793a
4
+ data.tar.gz: 7b85b254e1ef2cf2d26a50c94719b2cbe12a7140eba86f9b9d70a428ccd7a960
5
5
  SHA512:
6
- metadata.gz: e3dc7186b93fab441e08fc2c0c6f0a3c4df5d20429168a6ad5d62f221260ee338fe87d8f980d30f8127fb4f671baa93727606c57665ae0a1c8e2d4a346a19336
7
- data.tar.gz: 9a9987c6560789e8a4f6e9ff419618b5493a526e6c5b662bb83919d928b08f5623e1108f2bb28e82ecba26b55372b05c8bb629f867be332f01f409874fc23bb0
6
+ metadata.gz: 4299bc30c7f47b534653808258263a9d1bca1cf5284a86e94bdece0f6084989a25db5ccba277c44b0fc1d59cb54e30eddccc0e63535cbe98669ced090860baad
7
+ data.tar.gz: 52acd07934bc24858bdfeebe257b423909db886549582b32a66e8efea6fa213be7259b9e7829def39e9a1c01ac8e9f4869ad209553cd7bcb0a99bbf1e5b734d5
@@ -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
- rule
74
+ added_rule
78
75
  end
79
76
 
80
77
  #
@@ -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
@@ -5,5 +5,5 @@
5
5
  #
6
6
  module OpenHAB
7
7
  # @return [String] Version of OpenHAB helper libraries
8
- VERSION = '4.32.4'
8
+ VERSION = '4.32.5'
9
9
  end
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
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-27 00:00:00.000000000 Z
11
+ date: 2022-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler