arkrb 0.4.0 → 0.5.0
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/Gemfile.lock +1 -1
- data/lib/arkrb/error.rb +3 -0
- data/lib/arkrb/error_parsing.rb +19 -12
- data/lib/arkrb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 861713679df17a88ef78c42a2cd6421abe3c7f8b00e3bbaa1f4cd711a515e560
|
4
|
+
data.tar.gz: bd67fd5f0e660eb7f95d2632739e731e5decfe04c74c2828be38d0bad4fb1852
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 645e69c587722c21a5e2645e76b74a895f57043709440103cd8d1d9b29697d9706401ef8ee2fc10ddc4161d2547f2683f5739b8d687901fd5682e57ff36696d2
|
7
|
+
data.tar.gz: 70863d8c9ccb29fdd9bb5a162e8363a8201d3856f9e564b83183fcb8814b6e950f93c8cc6497f1c6f211c6c63eda95a23b720682e5d0facb85e2a6690e2e789c
|
data/Gemfile.lock
CHANGED
data/lib/arkrb/error.rb
CHANGED
data/lib/arkrb/error_parsing.rb
CHANGED
@@ -4,6 +4,8 @@ module Arkrb
|
|
4
4
|
def sanitize!(command, error_output, command_opts = nil)
|
5
5
|
ark_exe_not_found = potential_errors[:ark_exe_not_found]
|
6
6
|
raise ark_exe_not_found[:class], ark_exe_not_found[:message] if error_output =~ /#{ark_exe_not_found[:cause]}/im
|
7
|
+
server_offline = potential_errors[:server_offline]
|
8
|
+
raise server_offline[:class], server_offline[:message] if error_output =~ /#{server_offline[:cause]}/im
|
7
9
|
|
8
10
|
case command
|
9
11
|
when :install
|
@@ -27,23 +29,28 @@ module Arkrb
|
|
27
29
|
|
28
30
|
def potential_errors
|
29
31
|
@potential_errors ||= {
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
32
|
+
missing_32_gcc: {
|
33
|
+
cause: '/steamcmd/linux32/steamcmd: No such file or directory',
|
34
|
+
class: Arkrb::Error::SteamCMDError,
|
35
|
+
message: 'It appears that you are missing the lib32gcc1 package please have an Administrator install it!'
|
36
|
+
},
|
37
|
+
ark_exe_not_found: {
|
38
|
+
cause: 'ARK server exec could not be found',
|
39
|
+
class: Arkrb::Error::ArkExecutableNotFound,
|
40
|
+
message: 'Whooah! The Ark Server Executable was not found, please install the ark server using `arkrb install ark`'
|
41
|
+
},
|
42
|
+
server_offline: {
|
43
|
+
cause: 'connection refused',
|
44
|
+
class: Arkrb::Error::ServerOffline,
|
45
|
+
message: 'The server appears to be offline!'
|
46
|
+
}
|
40
47
|
}
|
41
48
|
end
|
42
49
|
|
43
50
|
def raise_unknown_error(command, error_output, command_opts = nil)
|
44
51
|
error_message = (command_opts.nil?) ?
|
45
|
-
|
46
|
-
|
52
|
+
format("An unknown error has occurred while attempting to run command %s\n%s", command, error_output) :
|
53
|
+
format("An unknown error has occurred while attempting to run command %s with opts %s\n%s", command, command_opts, error_output)
|
47
54
|
raise Arkrb::Error::UnknownError, error_message
|
48
55
|
end
|
49
56
|
|
data/lib/arkrb/version.rb
CHANGED