acpc_dealer 2.3.3 → 2.3.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4021c985dfd37ebf2525a0bbad84f7891cac6784
4
- data.tar.gz: 77d1d22cb49c5a1de42130f687433bd44689ae09
3
+ metadata.gz: b6219d88cdb69d48523cb35212381da0f00a827b
4
+ data.tar.gz: 330c6832c5c7dc78fd585a89e23ed0f017ea5bb5
5
5
  SHA512:
6
- metadata.gz: 627f2b8b7c390f69006c9c1dcf561a4139570d2cad6873cbe7ce0ce8db42281519965b7dd7c92c77722c82284126466b57dee5420f44a556efd2e94025d836c9
7
- data.tar.gz: 32462ae365d8e1878eccc068cad0ad863e07ece1117696b4a55429adefce05a66de67e600195615c191126df8e94f1976a6c6a89bf996554b533a1deb7afd2d4
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 [Hash] The process ID of the started dealer (key +:pid+) and the array of ports that players may
31
- # => use to connect to the new dealer instance (key +:port_numbers+).
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
- command(dealer_arguments, port_numbers),
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
@@ -1,3 +1,3 @@
1
1
  module AcpcDealer
2
- VERSION = "2.3.3"
2
+ VERSION = "2.3.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acpc_dealer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Morrill