openhab-scripting 4.45.0 → 4.45.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: 92e2d3cfb9d4cda1452db68930c6f0d291ee3c81b1df4f9cbf4cfe9e0946d1a3
4
- data.tar.gz: b2df2b5577372f44b0a7ab265abc9e03c8ee3fcec1c24152302f42cf66892221
3
+ metadata.gz: 937ebf36e5a0263536ce6b16f246ffa46cff4d9697fed234a9db203ea776f8a8
4
+ data.tar.gz: e0a393c3fb4ef78ca9bf20cab5e44adbdd5705e1ac70a28837d1bd18e9a73688
5
5
  SHA512:
6
- metadata.gz: d0f865451318a850196975f2d5482eaba83a33229c050475bf8ea46fdf058ad95ca494dc2cf2ae1f0b1aae38fd29a78fbeffefbaf2eadd2d669dbbe66ab33fb5
7
- data.tar.gz: 8b268e91ca36f4450a1ea73a6794b0b7fe8651a0e8566573f5168d046260c3b6b8d11fae78ada7d2c86331ce6c08ed9c4cdf66ad3ff08e6bcb049e76823cd46b
6
+ metadata.gz: 24ade32611b92e4b3a646700e973453dd8344d3b5325772ddfe3b589b71b4306c710582374de1819ef0bc0ae80d7f2e17853f4b8faa744bed9963d5fdd6cf67a
7
+ data.tar.gz: cd443d2c01bcefd586a37d5563136b600e325806a220940290a4f90f49e907daf0d6c5ad229717d66806b722aa8b4f66798028e9b3315e27ae4bdba3e5846b7f
@@ -46,7 +46,7 @@ module OpenHAB
46
46
  # Explicit conversion to array
47
47
  # @return [Array]
48
48
  def to_a
49
- $ir.items.to_a
49
+ $ir.items.map { |item| OpenHAB::Core::ItemProxy.new(item) }
50
50
  end
51
51
  end
52
52
  end
@@ -159,9 +159,9 @@ module OpenHAB
159
159
  <<~RUBY, __FILE__, __LINE__ + 1
160
160
  def #{ruby_op}(other)
161
161
  if other.is_a?(DecimalType)
162
- self.class.new(to_big_decimal.#{java_op}(other.to_big_decimal))
162
+ self.class.new(to_big_decimal.#{java_op}(other.to_big_decimal, java.math.MathContext::DECIMAL128))
163
163
  elsif other.is_a?(java.math.BigDecimal)
164
- self.class.new(to_big_decimal.#{java_op}(other))
164
+ self.class.new(to_big_decimal.#{java_op}(other, java.math.MathContext::DECIMAL128))
165
165
  elsif other.respond_to?(:to_d)
166
166
  result = to_d #{ruby_op} other
167
167
  # result could already be a QuantityType
@@ -208,8 +208,8 @@ module OpenHAB
208
208
  # @param [Object] object to derive class name for
209
209
  # @return [String] name of class for logging
210
210
  def klass_name(object)
211
- object.then(&:class)
212
- .then { |klass| java_klass(klass) }
211
+ object = object.class unless object.is_a?(Class)
212
+ object.then { |klass| java_klass(klass) }
213
213
  .then(&:name)
214
214
  .then { |name| filter_base_classes(name) }
215
215
  .then { |name| ".#{name}" unless name.nil? } # name is frozen in jruby 9.4
@@ -222,7 +222,8 @@ module OpenHAB
222
222
  def java_klass(klass)
223
223
  if klass.respond_to?(:java_class) &&
224
224
  klass.java_class &&
225
- !klass.java_class.name.start_with?('org.jruby.Ruby')
225
+ !klass.java_class.name.start_with?('org.jruby.Ruby') &&
226
+ !klass.java_class.name.start_with?('org.jruby.gen')
226
227
  klass = klass.java_class
227
228
  end
228
229
  klass
@@ -5,5 +5,5 @@
5
5
  #
6
6
  module OpenHAB
7
7
  # @return [String] Version of OpenHAB helper libraries
8
- VERSION = '4.45.0'
8
+ VERSION = '4.45.2'
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.45.0
4
+ version: 4.45.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: 2022-09-18 00:00:00.000000000 Z
11
+ date: 2022-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler