openhab-scripting 3.8.2 → 3.9.2

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: 6e5a2f4aad9380ac2a1d1d9acbed2916759e565e19fe3917808ea52639129b68
4
- data.tar.gz: 160c5df3daaf6e6b034d7eabcb3caadfefa288c82d43332130edae7a70b08348
3
+ metadata.gz: 56b3593e694d3bc367977cdd3514712c452977d4644cb59610e3e25e4c7e651b
4
+ data.tar.gz: 0c45d6f6c9c4e493f7baca477e88cb8ec0ab3a3325fad60926d987875711ef62
5
5
  SHA512:
6
- metadata.gz: e2775580d79a40bad1497eb9da0ec51fa5f62f19b2584be8a0691caad518c6d80c0db3b5f1e1a73ea157fa8ffaeee58dd1503e24dd2574d34162c2e918815434
7
- data.tar.gz: e237f4309d21a9bef6f3f386c4ad4b3ccdc426e67019ede7a8bc28cacac7bc858b570af9a4fd0fa20eddf53da07ad12b4fd2b6ffe57a47d4093098da4b8040ea
6
+ metadata.gz: 806e64e7bb07ff62fb8d99b3ad10505733340482b28c3c9e867b08fe0e40c2a43de586b56ca019cbc5b2408b57b4175c947e54d4020b20c6a8494791ab62cfc5
7
+ data.tar.gz: 7285604ad3b6898441b7290143893d7488414ef91809b676639fb0ad100049305d15e48c95e1d6ad0afe4f98541d7c5e0f55070157b8675c5839cc2fe8b441fd
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenHAB
4
+ #
5
+ # Core support for OpenHAB JRuby Library
6
+ #
7
+ module Core
8
+ #
9
+ # JRuby isn't respecting $RUBYLIB when run embedded inside of OpenHAB, so do it manually
10
+ #
11
+ def self.add_rubylib_to_load_path
12
+ ENV['RUBYLIB']&.split(File::PATH_SEPARATOR)&.each do |path|
13
+ next if path.empty?
14
+
15
+ $LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -5,5 +5,5 @@
5
5
  #
6
6
  module OpenHAB
7
7
  # @return [String] Version of OpenHAB helper libraries
8
- VERSION = '3.8.2'
8
+ VERSION = '3.9.2'
9
9
  end
data/lib/openhab.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'openhab/core/load_path'
3
4
  require 'openhab/core/openhab_setup'
4
5
  require 'openhab/log/logger'
5
6
  require 'openhab/dsl/dsl'
@@ -28,6 +29,8 @@ module OpenHAB
28
29
  base.send :include, OpenHAB::DSL::Items
29
30
  base.send :include, OpenHAB::DSL::Types
30
31
  logger.info "OpenHAB JRuby Scripting Library Version #{OpenHAB::VERSION} Loaded"
32
+
33
+ OpenHAB::Core.add_rubylib_to_load_path
31
34
  end
32
35
  end
33
36
 
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: 3.8.2
4
+ version: 3.9.2
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: 2021-09-15 00:00:00.000000000 Z
11
+ date: 2021-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -47,6 +47,7 @@ extra_rdoc_files: []
47
47
  files:
48
48
  - lib/openhab.rb
49
49
  - lib/openhab/core/entity_lookup.rb
50
+ - lib/openhab/core/load_path.rb
50
51
  - lib/openhab/core/openhab_setup.rb
51
52
  - lib/openhab/core/osgi.rb
52
53
  - lib/openhab/dsl/actions.rb