thecore_print_commons 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/printer.rb +1 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4ade4721428be9aee5378e3643e7bcc47f5e518b6ff46e4b88839fab6c8ce57
4
- data.tar.gz: c1051c17921d2685ce61c3896dfb2d42bd2e7317ab28596d7f88bb1084bacb2a
3
+ metadata.gz: 829ba6967db5702fbb81b06cf5ecc8675789f3db08a5daf40077cf0c68379e04
4
+ data.tar.gz: 7f1fe99c3304ed59b4ada9213f9ea1ebcf533520c42680311c62e8302b27559a
5
5
  SHA512:
6
- metadata.gz: a86bc5fa0a85bada3886445801153b70b96bdd0e9786b491a482a03497dbbfb941d3f08c491d34fb9e55abdbe2c3b5e6d7c5332463667486a3a4269d3eecdc34
7
- data.tar.gz: 8aab7a93e08509e18ba2859049190b4e790f610be272746b2622eca01fced26cfb58facafbae37206ec336789e009c4261d2fde01ad2e86080bf0fb8865be236
6
+ metadata.gz: 8f939959025e29f4f2aaf69fc7efcc9c5bca00298a8699f4606957934148b1eeff3714d99e1434f27748f59e60df5ebaf084f2f08c67621f24917e866cb036c5
7
+ data.tar.gz: b0b4640b62e77e8f249f56de12700829da1dd5f9119c768ba49930d277c01fbe0cedc4b7ea2710436cd9f3071f796332535678589cb1780e3bc5b0827f6b0117
@@ -55,9 +55,7 @@ class Printer < ApplicationRecord
55
55
 
56
56
  def online?
57
57
  begin
58
- s = TCPSocket.new(self.ip, 9100)
59
- s.puts("~hs")
60
- s.close
58
+ Socket.tcp(self.ip, 9100, connect_timeout: 0.5).close
61
59
  rescue
62
60
  return false
63
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_print_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-14 00:00:00.000000000 Z
11
+ date: 2021-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_background_jobs