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 +4 -4
- data/lib/openhab/dsl/items/item_registry.rb +1 -1
- data/lib/openhab/dsl/types/decimal_type.rb +2 -2
- data/lib/openhab/log/logger.rb +4 -3
- data/lib/openhab/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 937ebf36e5a0263536ce6b16f246ffa46cff4d9697fed234a9db203ea776f8a8
|
4
|
+
data.tar.gz: e0a393c3fb4ef78ca9bf20cab5e44adbdd5705e1ac70a28837d1bd18e9a73688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24ade32611b92e4b3a646700e973453dd8344d3b5325772ddfe3b589b71b4306c710582374de1819ef0bc0ae80d7f2e17853f4b8faa744bed9963d5fdd6cf67a
|
7
|
+
data.tar.gz: cd443d2c01bcefd586a37d5563136b600e325806a220940290a4f90f49e907daf0d6c5ad229717d66806b722aa8b4f66798028e9b3315e27ae4bdba3e5846b7f
|
@@ -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
|
data/lib/openhab/log/logger.rb
CHANGED
@@ -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.
|
212
|
-
|
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
|
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.45.
|
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-
|
11
|
+
date: 2022-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|