openhab-scripting 5.32.0 → 5.33.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b3cabdd904345f261d74852f4b69e4fe5d278c17eb4a82e93f136c8473e6575
|
4
|
+
data.tar.gz: 517f1bd249ed610f8c34582160af9f344e94e5ce936efac4844772dcd6ffb20c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faca8e7200488377b7a15100fcf17e325b0d10121f8d360f3a7ef8083e812341dd91af00d8a4da9b6ca2344763a7ee964e6c2ad8822eed073b698b662dd17972
|
7
|
+
data.tar.gz: 9c8cb3e6fdff0aa65efe3fb674249ea44211e8fbb9dfde808f57e4c16a924815e3fa2addef3016ec6772a1a92d34d0c943a471fe21ab39b0f472446456e20334
|
@@ -12,7 +12,7 @@ module OpenHAB
|
|
12
12
|
# "User-Agent": "JRuby/1.2.3", # enclose in quotes if the key contains dashes
|
13
13
|
# Accept: "application/json",
|
14
14
|
# }
|
15
|
-
# response = HTTP.
|
15
|
+
# response = HTTP.get("http://example.com/list", headers: headers)
|
16
16
|
#
|
17
17
|
# @see https://www.openhab.org/docs/configuration/actions.html#http-actions HTTP Actions
|
18
18
|
class HTTP
|
@@ -33,6 +33,7 @@ module OpenHAB
|
|
33
33
|
|
34
34
|
sendHttpGetRequest(url, headers.transform_keys(&:to_s), timeout)
|
35
35
|
end
|
36
|
+
alias_method :get, :send_http_get_request
|
36
37
|
|
37
38
|
#
|
38
39
|
# Sends an HTTP PUT request and returns the result as a String.
|
@@ -52,6 +53,7 @@ module OpenHAB
|
|
52
53
|
|
53
54
|
sendHttpPutRequest(url, content_type, content, headers.transform_keys(&:to_s), timeout)
|
54
55
|
end
|
56
|
+
alias_method :put, :send_http_put_request
|
55
57
|
|
56
58
|
#
|
57
59
|
# Sends an HTTP POST request and returns the result as a String.
|
@@ -71,6 +73,7 @@ module OpenHAB
|
|
71
73
|
|
72
74
|
sendHttpPostRequest(url, content_type, content, headers.transform_keys(&:to_s), timeout)
|
73
75
|
end
|
76
|
+
alias_method :post, :send_http_post_request
|
74
77
|
|
75
78
|
#
|
76
79
|
# Sends an HTTP DELETE request and returns the result as a String.
|
@@ -89,6 +92,7 @@ module OpenHAB
|
|
89
92
|
|
90
93
|
sendHttpDeleteRequest(url, headers.transform_keys(&:to_s), timeout)
|
91
94
|
end
|
95
|
+
alias_method :delete, :send_http_delete_request
|
92
96
|
end
|
93
97
|
end
|
94
98
|
end
|
@@ -88,10 +88,14 @@ module OpenHAB
|
|
88
88
|
# @!attribute [r] timestamp
|
89
89
|
# @return [ZonedDateTime]
|
90
90
|
|
91
|
+
# @!attribute [r] instant
|
92
|
+
# @return [Instant] The timestamp as an Instant
|
93
|
+
# @since openHAB 4.3
|
94
|
+
|
91
95
|
# @!attribute [r] name
|
92
96
|
# @return [String] Item name
|
93
97
|
|
94
|
-
delegate %i[timestamp name] => :@historic_item
|
98
|
+
delegate %i[timestamp instant name] => :@historic_item
|
95
99
|
|
96
100
|
def initialize(historic_item, state = nil)
|
97
101
|
@historic_item = historic_item
|
data/lib/openhab/dsl/version.rb
CHANGED
@@ -19,12 +19,13 @@ module OpenHAB
|
|
19
19
|
class HistoricItem
|
20
20
|
include org.openhab.core.persistence.HistoricItem
|
21
21
|
|
22
|
-
attr_reader :timestamp, :state, :name
|
22
|
+
attr_reader :timestamp, :instant, :state, :name
|
23
23
|
|
24
24
|
def initialize(timestamp, state, name)
|
25
25
|
@timestamp = timestamp
|
26
26
|
@state = state
|
27
27
|
@name = name
|
28
|
+
@instant = @timestamp.to_instant
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openhab-scripting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian O'Connell
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-12-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -490,7 +490,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
490
490
|
- !ruby/object:Gem::Version
|
491
491
|
version: '0'
|
492
492
|
requirements: []
|
493
|
-
rubygems_version: 3.5.
|
493
|
+
rubygems_version: 3.5.23
|
494
494
|
signing_key:
|
495
495
|
specification_version: 4
|
496
496
|
summary: JRuby Helper Libraries for openHAB Scripting
|