arkrb 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arkrb.rb +1 -0
- data/lib/arkrb/output_parsing.rb +3 -1
- data/lib/arkrb/server.rb +7 -3
- 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: de8adff396a86832903fd6e1c0da7cbad03249649265438743ce3daec927433a
|
4
|
+
data.tar.gz: d56bc1ad811b4bdddd5920b150602c506fa71337f25e261df5d4181e3231c680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9ebb70dc621d1bf6bd336351310e722cf09dcdde7fc301138136e2a1d18596b50a5ca595f8c58d5ca881244c5632238d5d5c327c77d517fa56a2aa87df06e32
|
7
|
+
data.tar.gz: 4741db523f328980af2e6f30c67344bb33454395051c3900717c00c5b0d6fcfa4d40af9344053c473942575a782b3c6661c87c1876bed70fd23a67498c159cf7
|
data/lib/arkrb.rb
CHANGED
@@ -21,6 +21,7 @@ module Arkrb
|
|
21
21
|
# @return [Integer, String]
|
22
22
|
def self.execute(command, command_opts = '', instance = 'main', sanitize = false)
|
23
23
|
exec_this = format('%s %s %s @%s', executable, command.to_s.tr('_', ''), command_opts, instance)
|
24
|
+
pp exec_this
|
24
25
|
stdin, stdout, stderr = Open3.popen3(exec_this)
|
25
26
|
output = stdout.read.chomp
|
26
27
|
errors = stderr.read.chomp
|
data/lib/arkrb/output_parsing.rb
CHANGED
@@ -84,7 +84,9 @@ module Arkrb
|
|
84
84
|
|
85
85
|
# @return [True, Exception]
|
86
86
|
def update(output)
|
87
|
-
if output =~ /#{'already up to date
|
87
|
+
if output =~ /#{'already up to date'}/im || output =~ /#{'updated'}/im
|
88
|
+
# output
|
89
|
+
true
|
88
90
|
else
|
89
91
|
raise_unknown_error(__method__.to_sym, output)
|
90
92
|
end
|
data/lib/arkrb/server.rb
CHANGED
@@ -40,8 +40,12 @@ module Arkrb
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# @return [True, Exception]
|
43
|
-
def update!
|
44
|
-
|
43
|
+
def update!(update_mods = false)
|
44
|
+
if update_mods
|
45
|
+
arkmanager_exec :update, '--update-mods'
|
46
|
+
else
|
47
|
+
arkmanager_exec :update
|
48
|
+
end
|
45
49
|
end
|
46
50
|
|
47
51
|
# @return [True, Exception]
|
@@ -137,4 +141,4 @@ module Arkrb
|
|
137
141
|
end
|
138
142
|
|
139
143
|
end
|
140
|
-
end
|
144
|
+
end
|
data/lib/arkrb/version.rb
CHANGED