sc2ai 0.3.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0a278a3ea02f2a4f704c0a4b4d9d1dde21af472fa4156fcc0f19c6b511e1e05
4
- data.tar.gz: 1758454ee3154c1355c655088889cb556b979e6cff917fdc236655c5d513ba66
3
+ metadata.gz: 0e0b154fe7c1d86ed183b43f3a3ee0b915b1d745ca839a86f9150d571e792864
4
+ data.tar.gz: 56a466963b5fd4b8d6ad7878bad675a270b90a53caf174b6abb749a4a4265b6d
5
5
  SHA512:
6
- metadata.gz: 340805a3b13c57217ea8d2039f7d2315fbeb571ce2e2af34bc53a8cdeec0c474973be6ca3e1a5d8fe6a7b24d4f205c5e48ae504b3202dc29ab996cb8d5644186
7
- data.tar.gz: 7010aa8da052b1962ef478a6b4c8447613bbccba2969293788ad61ec977aad98f0ec67eb01734c2b17471085eb55c740f6ee3768d272c716328e05fbfc07b195
6
+ metadata.gz: 6de08591f8bfd744cac376b46aeb0eb4fe8027aadb31a7d9ce9eaee1e7b030636ca9b098e76383d879cd1b9f19e72fc5e1d7f8db5161ecde98be5ea8197994ce
7
+ data.tar.gz: cfc3ecab272e6157dd26661e5a1d085e9b3bd41a98e32f788eab4d1955a6c82d179387f7bb05e214ece46ce93c847522e56ece97f251e5a021c5b91243475432
@@ -4,7 +4,7 @@ LABEL service="bot-ruby-local"
4
4
  USER root
5
5
  WORKDIR /root/ruby-builder
6
6
 
7
- ARG RUBY_VERSION=3.3.5
7
+ ARG RUBY_VERSION=3.4.1
8
8
  ARG DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=true
9
9
 
10
10
  # Deps - Ruby build
@@ -17,7 +17,7 @@ RUN tar -zxf yaml-0.2.5.tar.gz
17
17
 
18
18
  # Ruby
19
19
  RUN mkdir -p /root/ruby-builder/.ruby
20
- RUN curl https://cache.ruby-lang.org/pub/ruby/3.3/ruby-$RUBY_VERSION.tar.gz -o ruby-$RUBY_VERSION.tar.gz
20
+ RUN curl https://cache.ruby-lang.org/pub/ruby/3.4/ruby-$RUBY_VERSION.tar.gz -o ruby-$RUBY_VERSION.tar.gz
21
21
  RUN tar -zxf ruby-$RUBY_VERSION.tar.gz
22
22
  RUN mkdir ruby-$RUBY_VERSION/build
23
23
  WORKDIR /root/ruby-builder/ruby-$RUBY_VERSION/build
@@ -54,9 +54,8 @@ module Sc2
54
54
  # do initial ping to ensure status is set and connection is working
55
55
  response_ping = ping
56
56
  Sc2.logger.debug { "Game version: #{response_ping.game_version}" }
57
- rescue Errno::ECONNREFUSED, Errno::ECONNRESET
57
+ rescue Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::EADDRNOTAVAIL
58
58
  raise Error, "Connection timeout. Max retry exceeded." unless (attempt += 1) < 30 # 30s attempts
59
-
60
59
  @listeners[ConnectionListener.name]&.each { _1.on_connection_waiting(self) }
61
60
  sleep(1)
62
61
  retry
@@ -5,9 +5,9 @@ module Sc2
5
5
  # Attributes shared by Configuration and Client
6
6
  module ConfigurableOptions
7
7
  # @!attribute host
8
- # Sc2 host param on which to listen for connections, default '0.0.0.0'
8
+ # Sc2 host param on which to listen for connections, default '127.0.0.1'
9
9
  #
10
- # Launch param: -host 0.0.0.0
10
+ # Launch param: -host 127.0.0.1
11
11
  # @return [String,nil]
12
12
  attr_accessor :host
13
13
 
@@ -88,11 +88,10 @@ module Sc2
88
88
 
89
89
  # Resets configurable launch options to their defaults
90
90
  def load_default_launch_options
91
- @host = "0.0.0.0" # -listen
92
- if Paths.wsl?
93
- @host = "#{Socket.gethostname}.mshome.net"
94
- elsif Gem.win_platform?
95
- @host = "127.0.0.1"
91
+ @host = if Paths.wsl?
92
+ "#{Socket.gethostname}.mshome.net"
93
+ else
94
+ "127.0.0.1" # -listen
96
95
  end
97
96
 
98
97
  @display_mode = 0 # -displayMode
@@ -31,7 +31,7 @@ module Sc2
31
31
  end
32
32
 
33
33
  # Initialize new Sc2 client (starts with #launch)
34
- # @param host [String] to listen on, i.e. "0.0.0.0", "127.0.0.1"
34
+ # @param host [String] to listen on, i.e. "127.0.0.1"
35
35
  # @param port [Integer] 5001
36
36
  # @param options [Hash] (see Sc2::Client::ConfigurableOptions)
37
37
  def initialize(host:, port:, **options)
data/lib/sc2ai/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Sc2
2
2
  # gem version
3
3
  # @return [String]
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.1"
5
5
  end
data/sig/sc2ai.rbs CHANGED
@@ -3872,7 +3872,7 @@ module Sc2
3872
3872
 
3873
3873
  # Initialize new Sc2 client (starts with #launch)
3874
3874
  #
3875
- # _@param_ `host` — to listen on, i.e. "0.0.0.0", "127.0.0.1"
3875
+ # _@param_ `host` — to listen on, i.e. "127.0.0.1"
3876
3876
  #
3877
3877
  # _@param_ `port` — 5001
3878
3878
  #
@@ -3936,9 +3936,9 @@ module Sc2
3936
3936
  # Resets configurable launch options to their defaults
3937
3937
  def load_default_launch_options: () -> untyped
3938
3938
 
3939
- # Sc2 host param on which to listen for connections, default '0.0.0.0'
3939
+ # Sc2 host param on which to listen for connections, default '127.0.0.1'
3940
3940
  #
3941
- # Launch param: -host 0.0.0.0
3941
+ # Launch param: -host 127.0.0.1
3942
3942
  attr_accessor host: String?
3943
3943
 
3944
3944
  # Override the path to find the data package.
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sc2ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dyson Returns
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-11-28 00:00:00.000000000 Z
10
+ date: 2025-01-11 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: async
@@ -100,16 +99,44 @@ dependencies:
100
99
  requirements:
101
100
  - - "~>"
102
101
  - !ruby/object:Gem::Version
103
- version: '0.29'
102
+ version: '1.0'
104
103
  type: :runtime
105
104
  prerelease: false
106
105
  version_requirements: !ruby/object:Gem::Requirement
107
106
  requirements:
108
107
  - - "~>"
109
108
  - !ruby/object:Gem::Version
110
- version: '0.29'
109
+ version: '1.0'
111
110
  - !ruby/object:Gem::Dependency
112
- name: csv
111
+ name: logger
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ type: :runtime
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ - !ruby/object:Gem::Dependency
125
+ name: fiddle
126
+ requirement: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ type: :runtime
132
+ prerelease: false
133
+ version_requirements: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ - !ruby/object:Gem::Dependency
139
+ name: reline
113
140
  requirement: !ruby/object:Gem::Requirement
114
141
  requirements:
115
142
  - - ">="
@@ -156,14 +183,14 @@ dependencies:
156
183
  requirements:
157
184
  - - "~>"
158
185
  - !ruby/object:Gem::Version
159
- version: 0.9.36
186
+ version: 0.9.37
160
187
  type: :development
161
188
  prerelease: false
162
189
  version_requirements: !ruby/object:Gem::Requirement
163
190
  requirements:
164
191
  - - "~>"
165
192
  - !ruby/object:Gem::Version
166
- version: 0.9.36
193
+ version: 0.9.37
167
194
  - !ruby/object:Gem::Dependency
168
195
  name: abbrev
169
196
  requirement: !ruby/object:Gem::Requirement
@@ -198,28 +225,28 @@ dependencies:
198
225
  requirements:
199
226
  - - "~>"
200
227
  - !ruby/object:Gem::Version
201
- version: '1.8'
228
+ version: '1.9'
202
229
  type: :development
203
230
  prerelease: false
204
231
  version_requirements: !ruby/object:Gem::Requirement
205
232
  requirements:
206
233
  - - "~>"
207
234
  - !ruby/object:Gem::Version
208
- version: '1.8'
235
+ version: '1.9'
209
236
  - !ruby/object:Gem::Dependency
210
237
  name: sord
211
238
  requirement: !ruby/object:Gem::Requirement
212
239
  requirements:
213
- - - ">="
240
+ - - "~>"
214
241
  - !ruby/object:Gem::Version
215
- version: '0'
242
+ version: '6.0'
216
243
  type: :development
217
244
  prerelease: false
218
245
  version_requirements: !ruby/object:Gem::Requirement
219
246
  requirements:
220
- - - ">="
247
+ - - "~>"
221
248
  - !ruby/object:Gem::Version
222
- version: '0'
249
+ version: '6.0'
223
250
  - !ruby/object:Gem::Dependency
224
251
  name: standard
225
252
  requirement: !ruby/object:Gem::Requirement
@@ -306,7 +333,6 @@ dependencies:
306
333
  version: '0'
307
334
  description: This is a Ruby interface to STARCRAFT® II. Write your own AI using an
308
335
  easy interface and compete against others.
309
- email:
310
336
  executables:
311
337
  - sc2ai
312
338
  extensions: []
@@ -416,13 +442,14 @@ metadata:
416
442
  homepage_uri: https://sc2ai.pages.dev/
417
443
  source_code_uri: https://gitlab.com/dysonreturns/sc2ai
418
444
  changelog_uri: https://sc2ai.pages.dev/file.CHANGELOG
419
- post_install_message: "BREAKING CHANGE: We upgraded to protoboeuf.\nApi constants
420
- are now capitalized, i.e.\n\e[1;91m:Air\e[0m is now \e[1;92m:AIR\e[0m, \e[1;91mApi::Race::Zerg\e[0m
421
- is now \e[1;92mApi::Race::ZERG\e[0m, etc.\nThe mild refactor is worth the speed.\n\n
422
- \ %@@% CHECK\n %++++% YOUR\n *+**++ ENUMS!\n %*+#\n
423
- \ *@#***%%\n #%@%*++%%%%%\n %%%@%%%%%%%%%%\n %%@%%%%%%%%@%%\n ++*@@%%%%%%@+**\n
424
- \ *+*%@@%%%%%%@#**\n *+*@@%%%%%%%@ **\n *+@@@@%%%%@@*+\n *+@@@@@@@@*+\n %@++++%@@+*%#\n
425
- \ %@@@***@#++*%%%\n %%%@@@@++@@@@@@%#\n @@@@@ @@@%%\n@@@@@ @@@@=\n"
445
+ post_install_message: "BREAKING CHANGE: Version 0.3.0 upgraded to protoboeuf.\nApi
446
+ constants are now capitalized, i.e.\n\e[1;91m:Air\e[0m is now \e[1;92m:AIR\e[0m,
447
+ \e[1;91mApi::Race::Zerg\e[0m is now \e[1;92mApi::Race::ZERG\e[0m, etc.\nThe mild
448
+ refactor is worth the speed.\n\n %@@% CHECK\n %++++% YOUR\n *+**++
449
+ \ ENUMS!\n %*+#\n *@#***%%\n #%@%*++%%%%%\n %%%@%%%%%%%%%%\n %%@%%%%%%%%@%%\n
450
+ \ ++*@@%%%%%%@+**\n *+*%@@%%%%%%@#**\n *+*@@%%%%%%%@ **\n *+@@@@%%%%@@*+\n
451
+ \ *+@@@@@@@@*+\n %@++++%@@+*%#\n %@@@***@#++*%%%\n %%%@@@@++@@@@@@%#\n @@@@@
452
+ \ @@@%%\n@@@@@ @@@@=\n"
426
453
  rdoc_options: []
427
454
  require_paths:
428
455
  - lib
@@ -430,15 +457,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
430
457
  requirements:
431
458
  - - ">="
432
459
  - !ruby/object:Gem::Version
433
- version: 3.2.6
460
+ version: 3.3.6
434
461
  required_rubygems_version: !ruby/object:Gem::Requirement
435
462
  requirements:
436
463
  - - ">="
437
464
  - !ruby/object:Gem::Version
438
465
  version: '0'
439
466
  requirements: []
440
- rubygems_version: 3.5.18
441
- signing_key:
467
+ rubygems_version: 3.6.2
442
468
  specification_version: 4
443
469
  summary: STARCRAFT® II AI API
444
470
  test_files: []