acpc_dealer 2.3.3 → 2.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/acpc_dealer/dealer_runner.rb +12 -7
- data/lib/acpc_dealer/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: b6219d88cdb69d48523cb35212381da0f00a827b
|
4
|
+
data.tar.gz: 330c6832c5c7dc78fd585a89e23ed0f017ea5bb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e08bac3459eadf7f2d36dbd26fc5b9f0c2b88e3e299f15e4f1f6ccd3dc610587b7a0aea7ef3882e41742dd8f678cf086196479415662904cf4ed60c5fdf7728b
|
7
|
+
data.tar.gz: 3b7aa861ae6c302a35fb9ef1d3412679cdcd33251953a10e6d2a627183c62d4a597ab20d79725753a0bcacfb604faaa3518650e8a343be5a2999f356deaff1d1
|
@@ -26,12 +26,9 @@ module AcpcDealer
|
|
26
26
|
|
27
27
|
# @param [Array] dealer_arguments Arguments to the new dealer instance.
|
28
28
|
# @param [Array] port_numbers The port numbers to which each player will connect.
|
29
|
-
# => Defaults to the ACPC's default.
|
30
|
-
# @return [
|
31
|
-
|
32
|
-
# @raise (see ProcessRunner::go)
|
33
|
-
# @raise (see FileUtils::mkdir_p)
|
34
|
-
def self.command(dealer_arguments, port_numbers=nil)
|
29
|
+
# => Defaults to the ACPC Dealer's default.
|
30
|
+
# @return [Array] The components of the ACPC Dealer command that would be run (the executable, followed by arguments)
|
31
|
+
def self.command_components(dealer_arguments, port_numbers=nil)
|
35
32
|
dealer_start_command = DEALER_COMMAND_FORMAT.inject([AcpcDealer::DEALER_PATH]) do |command_, parameter|
|
36
33
|
command_ += dealer_arguments[parameter].to_s.split
|
37
34
|
end
|
@@ -39,6 +36,14 @@ module AcpcDealer
|
|
39
36
|
dealer_start_command
|
40
37
|
end
|
41
38
|
|
39
|
+
# @param [Array] dealer_arguments Arguments to the new dealer instance.
|
40
|
+
# @param [Array] port_numbers The port numbers to which each player will connect.
|
41
|
+
# => Defaults to the ACPC Dealer's default.
|
42
|
+
# @return [String] The ACPC Dealer command that would be run
|
43
|
+
def self.command(dealer_arguments, port_numbers=nil)
|
44
|
+
command_components(dealer_arguments, port_numbers).join(' ')
|
45
|
+
end
|
46
|
+
|
42
47
|
# @param [Array] dealer_arguments Arguments to the new dealer instance.
|
43
48
|
# @param [String] log_directory The directory in which logs will be placed.
|
44
49
|
# => Defaults to +<dealer_arguments[:match_name]>.logs+.
|
@@ -57,7 +62,7 @@ module AcpcDealer
|
|
57
62
|
|
58
63
|
IO.pipe do |read_io, write_io|
|
59
64
|
pid = ProcessRunner.go(
|
60
|
-
|
65
|
+
command_components(dealer_arguments, port_numbers),
|
61
66
|
err: [
|
62
67
|
File.join(log_directory, "#{dealer_arguments[:match_name]}.actions.log"),
|
63
68
|
File::CREAT|File::WRONLY
|
data/lib/acpc_dealer/version.rb
CHANGED