openhab-scripting 3.4.0 → 3.4.1
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/image_item.rb +4 -3
- data/lib/openhab/dsl/rules/triggers/cron.rb +1 -4
- data/lib/openhab/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dc9b053a3ac139909642f0e790a231dbd4e0b370a94836b740af22283f60315
|
4
|
+
data.tar.gz: 9debccaf47bdf3d8b4c80e05d861d3e43f658f22ad569a9f60acf7a214bc0f37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f04e70a4126f41f204b803617e757d66fe8e03f50543cc0a7a5c6c046b3567178f32d6cc6b97fbd9f0b0ca8b90c8c1fceb75b855bfe5565d4b8b7c8732e2efb8
|
7
|
+
data.tar.gz: 5b2092565032d2431b488250d6dc442178ecab80642f86495f56f2f199f5b05cae2f48a78b53dea118043f96c174811a0705af5596b26c9b784d315cd0bb720d
|
@@ -1,9 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'base64'
|
4
|
+
require 'pathname'
|
4
5
|
require 'net/http'
|
5
6
|
require 'java'
|
6
|
-
require '
|
7
|
+
require 'marcel'
|
7
8
|
require 'openhab/dsl/items/item_command'
|
8
9
|
require 'openhab/dsl/items/item_delegate'
|
9
10
|
|
@@ -57,7 +58,7 @@ module OpenHAB
|
|
57
58
|
#
|
58
59
|
def update_from_file(file, mime_type: nil)
|
59
60
|
file_data = IO.binread(file)
|
60
|
-
mime_type ||= (
|
61
|
+
mime_type ||= Marcel::MimeType.for(Pathname.new(file)) || Marcel::MimeType.for(file_data)
|
61
62
|
update_from_bytes(file_data, mime_type: mime_type)
|
62
63
|
end
|
63
64
|
|
@@ -130,7 +131,7 @@ module OpenHAB
|
|
130
131
|
#
|
131
132
|
def detect_mime_from_bytes(bytes:)
|
132
133
|
logger.trace('Detecting mime type from file image contents')
|
133
|
-
|
134
|
+
Marcel::MimeType.for(bytes)
|
134
135
|
end
|
135
136
|
end
|
136
137
|
end
|
@@ -30,11 +30,8 @@ module OpenHAB
|
|
30
30
|
dow: '?'
|
31
31
|
}
|
32
32
|
end
|
33
|
-
|
34
|
-
# the method definition
|
35
|
-
# rubocop:disable Style/AccessModifierDeclarations
|
33
|
+
|
36
34
|
module_function :cron_expression_map
|
37
|
-
# rubocop:enable Style/AccessModifierDeclarations
|
38
35
|
|
39
36
|
# @return [Hash] Map of days of the week from symbols to to OpenHAB cron strings
|
40
37
|
DAY_OF_WEEK_MAP = {
|
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: 3.4.
|
4
|
+
version: 3.4.1
|
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-
|
11
|
+
date: 2021-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: marcel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
40
|
+
version: '1.0'
|
41
41
|
description: JRuby Helper Libraries for OpenHAB Scripting
|
42
42
|
email:
|
43
43
|
- broconne@gmail.com
|