openhab-scripting 5.39.2 → 5.39.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/openhab/core_ext/ruby/object.rb +1 -5
- data/lib/openhab/dsl/rules/builder.rb +1 -7
- data/lib/openhab/dsl/rules/triggers.rb +0 -4
- data/lib/openhab/dsl/version.rb +1 -1
- data/lib/openhab/dsl.rb +7 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe8887e94a7426dee0441b26957d6f3f1e1fc38077d524b2e12ed9662cf46df1
|
4
|
+
data.tar.gz: 89fc920bdbca5c6e6450070eda98ab8d2987797603cb0caa4344b08b424ec949
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f57da9ed57b2ee5395b1699d215d5a49bfb5621604baa5f016400773deef78b8faf8d0b962491ccdefacb758d5971e6fcda443702fe4779e4c331ec898a99767
|
7
|
+
data.tar.gz: 7ec7bd617e3342900ff1e1d05b58048caa230460d7b57d790807c720cba1a8f46c7a61a57afd78ec98fd4b0cfccb1303123d967b89129fe2259017d02452aa03
|
@@ -5,10 +5,6 @@ module OpenHAB
|
|
5
5
|
module Ruby
|
6
6
|
# @!visibility private
|
7
7
|
module Object
|
8
|
-
class << self
|
9
|
-
attr_reader :top_self
|
10
|
-
end
|
11
|
-
|
12
8
|
# @!visibility private
|
13
9
|
module ClassMethods
|
14
10
|
# capture methods defined at top level (which get added to Object)
|
@@ -18,7 +14,7 @@ module OpenHAB
|
|
18
14
|
if DSL.private_instance_methods.include?(method)
|
19
15
|
# Duplicate methods that conflict with DSL onto `main`'s singleton class,
|
20
16
|
# so that they'll take precedence over DSL's method.
|
21
|
-
|
17
|
+
TOPLEVEL_BINDING.receiver.singleton_class.define_method(method, instance_method(method))
|
22
18
|
end
|
23
19
|
|
24
20
|
super
|
@@ -2,13 +2,7 @@
|
|
2
2
|
|
3
3
|
require "forwardable"
|
4
4
|
|
5
|
-
|
6
|
-
require_relative "guard"
|
7
|
-
require_relative "triggers"
|
8
|
-
require_relative "rule_triggers"
|
9
|
-
require_relative "terse"
|
10
|
-
|
11
|
-
Dir[File.expand_path("triggers/*.rb", __dir__)].each do |f|
|
5
|
+
Dir[File.expand_path("**/*.rb", __dir__)].each do |f|
|
12
6
|
require f
|
13
7
|
end
|
14
8
|
|
data/lib/openhab/dsl/version.rb
CHANGED
data/lib/openhab/dsl.rb
CHANGED
@@ -45,13 +45,14 @@ module OpenHAB
|
|
45
45
|
|
46
46
|
module Rules
|
47
47
|
# sorted alphabetically
|
48
|
-
autoload :AutomationRule, "openhab/dsl/rules/
|
48
|
+
autoload :AutomationRule, "openhab/dsl/rules/builder"
|
49
49
|
autoload :Builder, "openhab/dsl/rules/builder"
|
50
|
-
autoload :Guard, "openhab/dsl/rules/
|
51
|
-
autoload :NameInference, "openhab/dsl/rules/
|
52
|
-
autoload :Property, "openhab/dsl/rules/
|
53
|
-
autoload :RuleTriggers, "openhab/dsl/rules/
|
54
|
-
autoload :Terse, "openhab/dsl/rules/
|
50
|
+
autoload :Guard, "openhab/dsl/rules/builder"
|
51
|
+
autoload :NameInference, "openhab/dsl/rules/builder"
|
52
|
+
autoload :Property, "openhab/dsl/rules/builder"
|
53
|
+
autoload :RuleTriggers, "openhab/dsl/rules/builder"
|
54
|
+
autoload :Terse, "openhab/dsl/rules/builder"
|
55
|
+
autoload :Triggers, "openhab/dsl/rules/builder"
|
55
56
|
end
|
56
57
|
|
57
58
|
# include this before Core::Actions so that Core::Action's method_missing
|
@@ -1138,6 +1139,5 @@ OpenHAB::Core::Items.import_into_global_namespace
|
|
1138
1139
|
singleton_class.include(OpenHAB::DSL)
|
1139
1140
|
# Patch Object to work around https://github.com/openhab/openhab-jruby/issues/4
|
1140
1141
|
Object.extend(OpenHAB::CoreExt::Ruby::Object::ClassMethods)
|
1141
|
-
OpenHAB::CoreExt::Ruby::Object.instance_variable_set(:@top_self, self)
|
1142
1142
|
|
1143
1143
|
logger.debug { "openHAB JRuby Scripting Library Version #{OpenHAB::DSL::VERSION} Loaded" }
|