openhab-scripting 3.8.3 → 3.9.0

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: 6a742ef099c8ac0a80c12d5516a5e6a442e74163dbcbcde65e14fc720893504f
4
- data.tar.gz: 2193be3d59ccf5acae8043e9b8cef08b60ff7f45f23ebe3a3eb417f4e5e5bbae
3
+ metadata.gz: 48f1fed81c95b87d55603069daa551fa6bdf4783124dd314710ce92153f6ef6f
4
+ data.tar.gz: dc9afee52b5ae6f0ac12b0db6c65c36e7ea26b641cd85db06237eed5d2d77dd0
5
5
  SHA512:
6
- metadata.gz: 63468e75bd85979595f70ade6dd670c383450175aab1ee1bf51b9695f436f455ec5b11d10fc922e5e877d3af318edf730309d82bdf8e1f6fe9cf4aa73b825f5d
7
- data.tar.gz: 23c99aef7e3ce17de6fc0ce34dfcceb62911a9b312a0d8f0a8ca19d0c7bdb45e93fd5860b11b22490c105fe030ef70554087e486ad5ef9227e3bed531c3362bc
6
+ metadata.gz: e86c4e605c3f34ed7f56110b3d87e7563d3b307661f6badab6c2f45eef3b9ec68533bc8fa9d5efe604a7ba6e4f1a65b4195cc1c71b2c0f19789b9789d9549e03
7
+ data.tar.gz: eb03372db897ac918d4d1f85ab11c84342c15785a3dae4e9bfdfc62c6774f85fe824f0b28f6bae3b4e98223bd38efdc1ac436d00801f87de1884c9591e3569ed
@@ -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.3'
8
+ VERSION = '3.9.0'
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.3
4
+ version: 3.9.0
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-16 00:00:00.000000000 Z
11
+ date: 2021-09-17 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