home_assistant-ble 1.4.0.pre.alpha.pre.37 → 1.4.0.pre.alpha.pre.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/home_assistant-ble.gemspec +1 -1
- data/lib/home_assistant/ble.rb +9 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dac99efc77b9277dd24d04358f95666bc0175d07
|
4
|
+
data.tar.gz: 14027f12248c9a5cbac9831ebdf0aeaf52940a3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 938e8dca97845776800d8b9705bb92ec0225985cb36a8bf728ab92d4b817985d6264b4cc9f193ecc4e263019a9a419d70b3f039d3c00b2a88e647575545e3095
|
7
|
+
data.tar.gz: 539c82f629532879ee628bf70f0d5a23f3e6d8f1042aeb664cd85f44f1d4d21cc37b4523560f9552fd63b99df2f2b05c5beff4e1a26d53d51bb1555e01129197
|
data/.rubocop.yml
CHANGED
data/home_assistant-ble.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bundler'
|
28
28
|
spec.add_development_dependency 'rake'
|
29
|
-
spec.add_development_dependency 'rubocop'
|
29
|
+
spec.add_development_dependency 'rubocop', '= 0.48.0'
|
30
30
|
|
31
31
|
spec.add_runtime_dependency 'ble'
|
32
32
|
spec.add_runtime_dependency 'mash'
|
data/lib/home_assistant/ble.rb
CHANGED
@@ -116,8 +116,15 @@ module HomeAssistant
|
|
116
116
|
request.body = ha_conf.to_json
|
117
117
|
req_options = { use_ssl: uri.scheme == 'https' }
|
118
118
|
|
119
|
-
|
120
|
-
|
119
|
+
begin
|
120
|
+
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
|
121
|
+
http.request(request)
|
122
|
+
end
|
123
|
+
rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
|
124
|
+
Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError,
|
125
|
+
Net::ProtocolError, Errno::ECONNREFUSED => e
|
126
|
+
log "Could not update HA: #{e.message}"
|
127
|
+
return
|
121
128
|
end
|
122
129
|
|
123
130
|
if response.code.to_i == 200
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: home_assistant-ble
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.0.pre.alpha.pre.
|
4
|
+
version: 1.4.0.pre.alpha.pre.44
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grégoire Seux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: rubocop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.48.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.48.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: ble
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|