allq 0.3.7 → 0.3.8
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 +4 -4
- data/lib/allq/connection.rb +3 -5
- data/lib/allq/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5a179d72534b0a07bb5b87d02bc7447a48078213
|
|
4
|
+
data.tar.gz: d96e35f43118aa616418072ac35a121a757ee472
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31c4823fe3be1fa669e8316f328482e7f2651f23bd18cb388f0fac52b769ab13b957efd68dfee915a363d343c7612f10ebafeccd6d46b0a0bd8af369c768ef88
|
|
7
|
+
data.tar.gz: 06a81172215aece6a413fe9de35f4f7fbab2cbe00a4664c746ab7fc8642cb6f2350354a84e8c7c35ce970afbfa8388802c2d56847245fdac5ef63a2c2467cfc7
|
data/lib/allq/connection.rb
CHANGED
|
@@ -46,8 +46,8 @@ class AllQ
|
|
|
46
46
|
yield block.call(res)
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
def call_socat(data)
|
|
50
|
-
cmd_string = "echo '#{data}' | socat - tcp4-connect:#{@address}"
|
|
49
|
+
def call_socat(data, timeout = 1.0)
|
|
50
|
+
cmd_string = "echo '#{data}' | socat -t #{timeout} - tcp4-connect:#{@address}"
|
|
51
51
|
output = `#{cmd_string}`
|
|
52
52
|
return output
|
|
53
53
|
end
|
|
@@ -64,9 +64,7 @@ class AllQ
|
|
|
64
64
|
def transmit(command, options={}, &block)
|
|
65
65
|
_with_retry(options[:retry_interval], options[:init]) do
|
|
66
66
|
@mutex.synchronize do
|
|
67
|
-
|
|
68
|
-
@connection.puts(command.to_s)
|
|
69
|
-
res = @connection.readline
|
|
67
|
+
res = call_socat(command.to_s, 20.0)
|
|
70
68
|
yield block.call(res)
|
|
71
69
|
end
|
|
72
70
|
end
|
data/lib/allq/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: allq
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-07-
|
|
11
|
+
date: 2018-07-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|