netsoul 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/netsoul-ruby +7 -8
- data/lib/netsoul/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d274d3247bb4ca9fe3bcd6470ce972df31a202b
|
4
|
+
data.tar.gz: 910ed29d27347a72a60810e4ad0ee3f8357baaa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a84e494c128cbcb213f044ea1bef5210565987995ee4b19b930532a8ebd49229704cae6c89a867bfc24242d1add7e2a81a99b5072e54166bfdaa06609204d87
|
7
|
+
data.tar.gz: a8ce1612fe46fd0fd986436c31d6299f83098a75f5ba8f9478121e586f8a844548c49310a620bf3c4297220a37ec2584f5e5d2ba3b1887ce88ab7d63ae9f91ed
|
data/bin/netsoul-ruby
CHANGED
@@ -13,12 +13,10 @@ require 'socket'
|
|
13
13
|
module Netsoul
|
14
14
|
class Client
|
15
15
|
include Logging
|
16
|
-
|
16
|
+
attr_reader :started
|
17
17
|
SOCKET_READ_TIMEOUT = 12 * 60
|
18
18
|
SOCKET_WRITE_TIMEOUT = 10
|
19
19
|
|
20
|
-
attr_reader :started
|
21
|
-
|
22
20
|
def initialize(*args)
|
23
21
|
opts = args.last.is_a?(Hash) ? args.last : {}
|
24
22
|
@config = Config.new(opts)
|
@@ -37,7 +35,7 @@ module Netsoul
|
|
37
35
|
else
|
38
36
|
sock_send(Message.standard_auth(@config))
|
39
37
|
end
|
40
|
-
fail Netsoul::AuthenticationError, 'Authentication failed.'.freeze unless sock_get.split(' ')[1] == '002'
|
38
|
+
fail Netsoul::AuthenticationError, 'Authentication failed. See your config file or environment variables'.freeze unless sock_get.split(' ')[1] == '002'
|
41
39
|
end
|
42
40
|
private :auth_method
|
43
41
|
|
@@ -111,10 +109,11 @@ OptionParser.new do |opts|
|
|
111
109
|
end
|
112
110
|
end.parse!
|
113
111
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
112
|
+
if options.empty? || options[:user_opts].size == 0
|
113
|
+
unless ENV.to_a.count { |k, _v| %w(NETSOUL_LOGIN NETSOUL_SOCKS_PASSWORD NETSOUL_LOGIN NETSOUL_UNIX_PASSWORD NETSOUL_AUTH_METHOD).include?(k) } >= 2
|
114
|
+
puts '[ERROR] You have to specify a configuration file or environment variables'
|
115
|
+
exit
|
116
|
+
end
|
118
117
|
end
|
119
118
|
|
120
119
|
retry_count = 10
|
data/lib/netsoul/version.rb
CHANGED