patronus_fati 0.8.9 → 0.8.10
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb413efee4a3b4a4804852f63c9d6929b6b22aa3
|
4
|
+
data.tar.gz: 7bf0278db9e8317ee699c2e84f6c7766080dc6b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7a04a984146e82ef6dee440a2dad9356ebc4efd7c12de375bda5f1866df4a67916b584de5d977701e68dcd61a740776fa70bf3b22801fabeb74b7f9b3c1cd96
|
7
|
+
data.tar.gz: 2d97babd5efa250bcc0dbfc187771034c93c25432be0b5f2a127c6430a5b7a5df92c7da53948ab0787f77e6c5ee9c458206733adaa8f1f742fd5b041645313c3
|
@@ -1,4 +1,10 @@
|
|
1
1
|
module PatronusFati
|
2
|
+
PatronusFatiError = Class.new(StandardError)
|
3
|
+
LostConnection = Class.new(PatronusFatiError)
|
4
|
+
ConnectionTimeout = Class.new(PatronusFatiError)
|
5
|
+
UnableToRead = Class.new(PatronusFatiError)
|
6
|
+
UnableToWrite = Class.new(PatronusFatiError)
|
7
|
+
|
2
8
|
class Connection
|
3
9
|
attr_reader :port, :read_queue, :server, :write_queue
|
4
10
|
|
@@ -54,15 +60,12 @@ module PatronusFati
|
|
54
60
|
while (line = socket.readline)
|
55
61
|
read_queue << line
|
56
62
|
end
|
57
|
-
rescue Timeout::Error
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
# We lost our connection...
|
62
|
-
exit 2
|
63
|
+
rescue Timeout::Error => e
|
64
|
+
raise ConnectionTimeout, e.message
|
65
|
+
rescue EOFError => e
|
66
|
+
raise LostConnection, e.message
|
63
67
|
rescue => e
|
64
|
-
|
65
|
-
exit 3
|
68
|
+
raise UnableToRead, e.message
|
66
69
|
end
|
67
70
|
end
|
68
71
|
end
|
@@ -76,8 +79,7 @@ module PatronusFati
|
|
76
79
|
count += 1
|
77
80
|
end
|
78
81
|
rescue => e
|
79
|
-
|
80
|
-
exit 1
|
82
|
+
raise UnableToWrite, e.message
|
81
83
|
end
|
82
84
|
end
|
83
85
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patronus_fati
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Stelfox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dm-constraints
|
@@ -344,6 +344,7 @@ files:
|
|
344
344
|
- lib/patronus_fati/message_processor/error.rb
|
345
345
|
- lib/patronus_fati/message_processor/protocols.rb
|
346
346
|
- lib/patronus_fati/message_processor/ssid.rb
|
347
|
+
- lib/patronus_fati/message_processor/terminate.rb
|
347
348
|
- lib/patronus_fati/version.rb
|
348
349
|
- patronus_fati.gemspec
|
349
350
|
- spec/data_models/access_point_spec.rb
|