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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ff5918a753301ad3ed7c86b86c73336a9a948724
4
- data.tar.gz: 55ee964acc4b7708994f34cf74a1c6dbfffc265d
3
+ metadata.gz: dac99efc77b9277dd24d04358f95666bc0175d07
4
+ data.tar.gz: 14027f12248c9a5cbac9831ebdf0aeaf52940a3a
5
5
  SHA512:
6
- metadata.gz: e1a2f39f04a46dd1ba4770d5c4f86df2ca220d70ffc37bc2e83f2be382dd8ed34bc93bdb8957c13a392e7e44616699a74e82e21d32da0068308970ae3e3695c7
7
- data.tar.gz: 00ff99ae4f083d0ea658d8e4af803847bbd3dc24f2e596991bd2f13624f323879011c2a2c372ced679df74b086066acb5929a90a3a7e0ab2dff459d21c62eb6d
6
+ metadata.gz: 938e8dca97845776800d8b9705bb92ec0225985cb36a8bf728ab92d4b817985d6264b4cc9f193ecc4e263019a9a419d70b3f039d3c00b2a88e647575545e3095
7
+ data.tar.gz: 539c82f629532879ee628bf70f0d5a23f3e6d8f1042aeb664cd85f44f1d4d21cc37b4523560f9552fd63b99df2f2b05c5beff4e1a26d53d51bb1555e01129197
data/.rubocop.yml CHANGED
@@ -2,7 +2,7 @@ Metrics/LineLength:
2
2
  Max: 140
3
3
 
4
4
  Metrics/MethodLength:
5
- Max: 20
5
+ Max: 25
6
6
 
7
7
  Metrics/ClassLength:
8
8
  Max: 200
@@ -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'
@@ -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
- response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
120
- http.request(request)
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.37
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-02 00:00:00.000000000 Z
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: '0'
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: '0'
54
+ version: 0.48.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: ble
57
57
  requirement: !ruby/object:Gem::Requirement