ika3 0.8.0 → 0.9.0

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: acd81ebd4f504e0ea9da7d4fea8a7a6fa28d9107b88afe2d43a2524fbbbf0b75
4
- data.tar.gz: c743adeb966479061899159c63929e6672754342bef84b27d4daa7ffcfc8a49d
3
+ metadata.gz: 2dbdf7e1866208961aede5fa64fe9f56a5afb6f751bb34dc7b903120a7969dd1
4
+ data.tar.gz: c836f625303b2398f5b04b16dea0a8c94041e45fac40db1b3d8b4ec5e89ceba4
5
5
  SHA512:
6
- metadata.gz: 6737a5765cf9c63680b4575da78921492fa59c59c6d29b767e5fb7aa4cd7c28c8eaf50e96da995b31af69a40e23c4a669d1b4053966536a628cdec9119428323
7
- data.tar.gz: fe5fd7bee6fece6e3c7964b4b53df88352067acb9ca7c1ab9a06553fe93528f2dd9546666ed563488d97af6ec8d62676a390457889b5388622be85c8e1303d01
6
+ metadata.gz: 0d8784996da4c847b7691b01d06e82ca55f79d78d45ca64442a0e790161fb15b6d64519d9970bb359c6a9ecda52aad9ef86d439533fc25e4280a47c9d5564820
7
+ data.tar.gz: 425e06475611ea9ab715e214526ccb2ac8e2262f68de33c92d4e69c421e4f884781cc3ad3602b4485b8939ee909230acc3053d71a103dabadcb9dc17276a3027
data/.rubocop.yml CHANGED
@@ -4,7 +4,7 @@ require:
4
4
 
5
5
  AllCops:
6
6
  NewCops: enable
7
- TargetRubyVersion: 2.7
7
+ TargetRubyVersion: 3.0
8
8
 
9
9
  Layout/LineLength:
10
10
  Exclude:
data/Gemfile CHANGED
@@ -7,10 +7,10 @@ gemspec
7
7
 
8
8
  gem 'rake', '~> 13.1'
9
9
  gem 'rbs'
10
- gem 'rspec', '~> 3.0'
10
+ gem 'rspec', '~> 3.13'
11
11
  gem 'rubocop', require: false
12
12
  gem 'steep'
13
+ gem 'typeprof'
13
14
 
14
15
  gem 'rubocop-rake', '~> 0.6.0'
15
-
16
- gem 'rubocop-rspec', '~> 2.25'
16
+ gem 'rubocop-rspec', '~> 2.26'
data/Gemfile.lock CHANGED
@@ -1,14 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ika3 (0.8.0)
5
- activesupport (>= 5.0.0)
4
+ ika3 (0.9.0)
5
+ activesupport (>= 6.0.0)
6
6
  faraday (>= 2.7.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.1.2)
11
+ abbrev (0.1.2)
12
+ activesupport (7.1.3.2)
12
13
  base64
13
14
  bigdecimal
14
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -20,83 +21,83 @@ GEM
20
21
  tzinfo (~> 2.0)
21
22
  ast (2.4.2)
22
23
  base64 (0.2.0)
23
- bigdecimal (3.1.4)
24
- concurrent-ruby (1.2.2)
24
+ bigdecimal (3.1.6)
25
+ concurrent-ruby (1.2.3)
25
26
  connection_pool (2.4.1)
26
- csv (3.2.7)
27
- diff-lcs (1.5.0)
28
- drb (2.2.0)
29
- ruby2_keywords
30
- faraday (2.7.12)
31
- base64
32
- faraday-net_http (>= 2.0, < 3.1)
33
- ruby2_keywords (>= 0.0.4)
34
- faraday-net_http (3.0.2)
35
- ffi (1.15.5)
36
- fileutils (1.7.1)
27
+ csv (3.2.8)
28
+ diff-lcs (1.5.1)
29
+ drb (2.2.1)
30
+ faraday (2.9.0)
31
+ faraday-net_http (>= 2.0, < 3.2)
32
+ faraday-net_http (3.1.0)
33
+ net-http
34
+ ffi (1.16.3)
35
+ fileutils (1.7.2)
37
36
  i18n (1.14.1)
38
37
  concurrent-ruby (~> 1.0)
39
- json (2.6.3)
38
+ json (2.7.1)
40
39
  language_server-protocol (3.17.0.3)
41
40
  listen (3.8.0)
42
41
  rb-fsevent (~> 0.10, >= 0.10.3)
43
42
  rb-inotify (~> 0.9, >= 0.9.10)
44
- logger (1.5.3)
45
- minitest (5.20.0)
43
+ logger (1.6.0)
44
+ minitest (5.22.2)
46
45
  mutex_m (0.2.0)
47
- parallel (1.23.0)
48
- parser (3.2.2.4)
46
+ net-http (0.4.1)
47
+ uri
48
+ parallel (1.24.0)
49
+ parser (3.3.0.5)
49
50
  ast (~> 2.4.1)
50
51
  racc
51
- racc (1.7.1)
52
+ racc (1.7.3)
52
53
  rainbow (3.1.1)
53
54
  rake (13.1.0)
54
55
  rb-fsevent (0.11.2)
55
56
  rb-inotify (0.10.1)
56
57
  ffi (~> 1.0)
57
- rbs (3.1.3)
58
- regexp_parser (2.8.2)
58
+ rbs (3.4.4)
59
+ abbrev
60
+ regexp_parser (2.9.0)
59
61
  rexml (3.2.6)
60
- rspec (3.12.0)
61
- rspec-core (~> 3.12.0)
62
- rspec-expectations (~> 3.12.0)
63
- rspec-mocks (~> 3.12.0)
64
- rspec-core (3.12.0)
65
- rspec-support (~> 3.12.0)
66
- rspec-expectations (3.12.0)
62
+ rspec (3.13.0)
63
+ rspec-core (~> 3.13.0)
64
+ rspec-expectations (~> 3.13.0)
65
+ rspec-mocks (~> 3.13.0)
66
+ rspec-core (3.13.0)
67
+ rspec-support (~> 3.13.0)
68
+ rspec-expectations (3.13.0)
67
69
  diff-lcs (>= 1.2.0, < 2.0)
68
- rspec-support (~> 3.12.0)
69
- rspec-mocks (3.12.0)
70
+ rspec-support (~> 3.13.0)
71
+ rspec-mocks (3.13.0)
70
72
  diff-lcs (>= 1.2.0, < 2.0)
71
- rspec-support (~> 3.12.0)
72
- rspec-support (3.12.0)
73
- rubocop (1.57.2)
73
+ rspec-support (~> 3.13.0)
74
+ rspec-support (3.13.0)
75
+ rubocop (1.60.2)
74
76
  json (~> 2.3)
75
77
  language_server-protocol (>= 3.17.0)
76
78
  parallel (~> 1.10)
77
- parser (>= 3.2.2.4)
79
+ parser (>= 3.3.0.2)
78
80
  rainbow (>= 2.2.2, < 4.0)
79
81
  regexp_parser (>= 1.8, < 3.0)
80
82
  rexml (>= 3.2.5, < 4.0)
81
- rubocop-ast (>= 1.28.1, < 2.0)
83
+ rubocop-ast (>= 1.30.0, < 2.0)
82
84
  ruby-progressbar (~> 1.7)
83
85
  unicode-display_width (>= 2.4.0, < 3.0)
84
86
  rubocop-ast (1.30.0)
85
87
  parser (>= 3.2.1.0)
86
- rubocop-capybara (2.19.0)
88
+ rubocop-capybara (2.20.0)
89
+ rubocop (~> 1.41)
90
+ rubocop-factory_bot (2.25.1)
87
91
  rubocop (~> 1.41)
88
- rubocop-factory_bot (2.24.0)
89
- rubocop (~> 1.33)
90
92
  rubocop-rake (0.6.0)
91
93
  rubocop (~> 1.0)
92
- rubocop-rspec (2.25.0)
94
+ rubocop-rspec (2.26.1)
93
95
  rubocop (~> 1.40)
94
96
  rubocop-capybara (~> 2.17)
95
97
  rubocop-factory_bot (~> 2.22)
96
98
  ruby-progressbar (1.13.0)
97
- ruby2_keywords (0.0.5)
98
- securerandom (0.2.2)
99
- steep (1.5.3)
99
+ securerandom (0.3.1)
100
+ steep (1.6.0)
100
101
  activesupport (>= 5.1)
101
102
  concurrent-ruby (>= 1.1.10)
102
103
  csv (>= 3.0.9)
@@ -111,12 +112,15 @@ GEM
111
112
  securerandom (>= 0.1)
112
113
  strscan (>= 1.0.0)
113
114
  terminal-table (>= 2, < 4)
114
- strscan (3.0.6)
115
+ strscan (3.0.7)
115
116
  terminal-table (3.0.2)
116
117
  unicode-display_width (>= 1.1.1, < 3)
118
+ typeprof (0.21.11)
119
+ rbs (>= 1.8.1)
117
120
  tzinfo (2.0.6)
118
121
  concurrent-ruby (~> 1.0)
119
122
  unicode-display_width (2.5.0)
123
+ uri (0.13.0)
120
124
 
121
125
  PLATFORMS
122
126
  x86_64-linux
@@ -125,11 +129,12 @@ DEPENDENCIES
125
129
  ika3!
126
130
  rake (~> 13.1)
127
131
  rbs
128
- rspec (~> 3.0)
132
+ rspec (~> 3.13)
129
133
  rubocop
130
134
  rubocop-rake (~> 0.6.0)
131
- rubocop-rspec (~> 2.25)
135
+ rubocop-rspec (~> 2.26)
132
136
  steep
137
+ typeprof
133
138
 
134
139
  BUNDLED WITH
135
140
  2.3.11
data/Steepfile CHANGED
@@ -1,8 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ D = Steep::Diagnostic
4
+
3
5
  target :lib do
4
6
  signature 'sig'
5
7
 
6
8
  check 'lib'
7
9
  repo_path '.gem_rbs_collection'
10
+
11
+ configure_code_diagnostics do |hash|
12
+ hash[D::Ruby::MethodDefinitionMissing] = :warning
13
+ hash[D::Ruby::UnknownConstant] = :information
14
+ end
8
15
  end
data/config/weapons.yml CHANGED
@@ -53,6 +53,11 @@ tentatek_splattershot: &tentatek_splattershot
53
53
  sub: スプラッシュシールド
54
54
  special: メガホンレーザー5.1ch
55
55
 
56
+ 52_gal_deco: &52_gal_deco
57
+ name: .52ガロンデコ
58
+ sub: カーリングボム
59
+ special: メガホンレーザー5.1ch
60
+
56
61
  n_zap_85: &n_zap_85
57
62
  name: N-ZAP '85
58
63
  sub: キューバンボム
@@ -168,6 +173,11 @@ flingza_roller: &flingza_roller
168
173
  sub: トラップ
169
174
  special: マルチミサイル
170
175
 
176
+ foil_flingza_roller: &foil_flingza_roller
177
+ name: ヴァリアブルローラーフォイル
178
+ sub: キューバンボム
179
+ special: スミナガシート
180
+
171
181
  big_swig_roller: &big_swig_roller
172
182
  name: ワイドローラー
173
183
  sub: スプラッシュシールド
@@ -183,6 +193,11 @@ classic_squiffer: &classic_squiffer
183
193
  sub: ポイントセンサー
184
194
  special: グレートバリア
185
195
 
196
+ new_squiffer: &new_squiffer
197
+ name: スクイックリンβ
198
+ sub: ロボットボム
199
+ special: ショクワンダー
200
+
186
201
  splat_charger: &splat_charger
187
202
  name: スプラチャージャー
188
203
  sub: スプラボム
@@ -208,11 +223,22 @@ e_liter_4k: &e_liter_4k
208
223
  sub: トラップ
209
224
  special: ホップソナー
210
225
 
226
+ custom_e_liter_4k: &custom_e_liter_4k
227
+ name: リッター4Kカスタム
228
+ sub: ジャンプビーコン
229
+ special: テイオウイカ
230
+
211
231
  e_liter_4K_scope: &e_liter_4K_scope
212
232
  name: 4Kスコープ
213
233
  sub: トラップ
214
234
  special: ホップソナー
215
235
 
236
+ custom_e_liter_4k_scope: &custom_e_liter_4k_scope
237
+ name: 4Kスコープカスタム
238
+ sub: ジャンプビーコン
239
+ special: テイオウイカ
240
+
241
+
216
242
  bamboozler_14_mk_1: &bamboozler_14_mk_1
217
243
  name: 14式竹筒銃・甲
218
244
  sub: ロボットボム
@@ -283,11 +309,21 @@ explosher: &explosher
283
309
  sub: ポイントセンサー
284
310
  special: アメフラシ
285
311
 
312
+ custom_explosher: &custom_explosher
313
+ name: エクスプロッシャーカスタム
314
+ sub: スプラッシュシールド
315
+ special: ウルトラチャクチ
316
+
286
317
  dread_wringer: &dread_wringer
287
318
  name: モップリン
288
319
  sub: キューバンボム
289
320
  special: サメライド
290
321
 
322
+ dread_wringer_d: &dread_wringer_d
323
+ name: モップリンD
324
+ sub: ジャンプビーコン
325
+ special: ホップソナー
326
+
291
327
  mini_splatling: &mini_splatling
292
328
  name: スプラスピナー
293
329
  sub: クイックボム
@@ -328,6 +364,11 @@ nautilus_47: &nautilus_47
328
364
  sub: ポイントセンサー
329
365
  special: アメフラシ
330
366
 
367
+ nautilus_79: &nautilus_79
368
+ name: ノーチラス79
369
+ sub: キューバンボム
370
+ special: ウルトラチャクチ
371
+
331
372
  heavy_edit_splatling: &heavy_edit_splatling
332
373
  name: イグザミナー
333
374
  sub: カーリングボム
@@ -418,6 +459,11 @@ tenta_sorella_brella: &tenta_sorella_brella
418
459
  sub: トラップ
419
460
  special: ウルトラショット
420
461
 
462
+ recycled_brella_24_mk_1: &recycled_brella_24_mk_1
463
+ name: 24式張替傘・甲
464
+ sub: ラインマーカー
465
+ special: グレートバリア
466
+
421
467
  undercover_brella: &undercover_brella
422
468
  name: スパイガジェット
423
469
  sub: トラップ
@@ -503,6 +549,16 @@ glooga_dualies: &glooga_dualies
503
549
  sub: スプラッシュシールド
504
550
  special: ナイスダマ
505
551
 
552
+ glooga_dualies_deco: &glooga_dualies_deco
553
+ name: ケルビン525デコ
554
+ sub: ポイントセンサー
555
+ special: ウルトラショット
556
+
557
+ douser_dualies_ff: &douser_dualies_ff
558
+ name: ガエンFF
559
+ sub: トラップ
560
+ special: メガホンレーザー5.1ch
561
+
506
562
  tri_stringer: &tri_stringer
507
563
  name: トライストリンガー
508
564
  sub: ポイズンミスト
data/ika3.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = 'Splatoon3 weapons information library. This gem provide weapon name, sub, and special. not official'
13
13
  spec.homepage = 'https://github.com/YutaGoto/ika3'
14
14
  spec.license = 'MIT'
15
- spec.required_ruby_version = '>= 2.7.0'
15
+ spec.required_ruby_version = '>= 3.0.0'
16
16
 
17
17
  spec.metadata['homepage_uri'] = spec.homepage
18
18
  spec.metadata['source_code_uri'] = 'https://github.com/YutaGoto/ika3'
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ['lib']
30
30
 
31
- spec.add_dependency 'activesupport', '>= 5.0.0'
31
+ spec.add_dependency 'activesupport', '>= 6.0.0'
32
32
  spec.add_dependency 'faraday', '>= 2.7.0'
33
33
 
34
34
  # For more information and examples about making a new gem, check out our
data/lib/ika3/schedule.rb CHANGED
@@ -1,18 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Hash
4
- def respond_to_missing?(sym)
5
- key? name ? true : super
6
- end
7
-
8
- def method_missing(name)
9
- return self[name] if key? name
10
-
11
- each { |k, v| return v if k.to_s.to_sym == name }
12
- super.method_missing(name)
13
- end
14
- end
15
-
16
3
  module Ika3
17
4
  class Schedule
18
5
  def initialize(contact)
@@ -24,38 +11,107 @@ module Ika3
24
11
 
25
12
  schedules.each do |schedule|
26
13
  modes.each do |mode|
27
- define_method("#{mode}_#{schedule}".to_sym) do
28
- if instance_variable_defined?("@#{mode}_#{schedule}_obj")
29
- return instance_variable_get("@#{mode}_#{schedule}_obj")
30
- end
14
+ define_method(:"#{mode}_#{schedule}") do
15
+ return instance_variable_get("@#{mode}_#{schedule}") if instance_variable_defined?("@#{mode}_#{schedule}")
31
16
 
32
- instance_variable_set("@#{mode}_#{schedule}_obj",
33
- send_request(:get, "/api/#{mode.dasherize}/#{schedule}").body.results[0])
17
+ instance_variable_set(
18
+ "@#{mode}_#{schedule}",
19
+ Battle.new(send_request(:get, "/api/#{mode.dasherize}/#{schedule}").body['results'][0])
20
+ )
34
21
  end
35
22
  end
36
23
 
37
- define_method("salmon_run_#{schedule}".to_sym) do
38
- if instance_variable_defined?("@salmon_run_#{schedule}_obj")
39
- return instance_variable_get("@salmon_run_#{schedule}_obj")
40
- end
24
+ define_method(:"salmon_run_#{schedule}") do
25
+ return instance_variable_get("@salmon_run_#{schedule}") if instance_variable_defined?("@salmon_run_#{schedule}")
41
26
 
42
- instance_variable_set("@salmon_run_#{schedule}_obj",
43
- send_request(:get, "/api/coop-grouping/#{schedule}").body.results[0])
27
+ instance_variable_set(
28
+ "@salmon_run_#{schedule}", Salmon.new(send_request(:get, "/api/coop-grouping/#{schedule}").body['results'][0])
29
+ )
44
30
  end
45
31
 
46
32
  def salmon_run_team_contest
47
- return @salmon_run_team_contest_obj unless @salmon_run_team_contest_obj.nil?
33
+ return @salmon_run_team_contest unless @salmon_run_team_contest.nil?
48
34
 
49
- @salmon_run_team_contest_obj = send_request(:get, '/api/coop-grouping-team-contest/schedule').body.results[0]
35
+ @salmon_run_team_contest = Salmon.new(
36
+ send_request(:get, '/api/coop-grouping-team-contest/schedule').body['results'][0]
37
+ )
50
38
  end
51
39
 
52
40
  def event
53
- return @event_match_obj unless @event_match_obj.nil?
41
+ return @event_match unless @event_match.nil?
54
42
 
55
- @event_match_obj = send_request(:get, '/api/event/schedule').body.results[0]
43
+ @event_match = Battle.new(send_request(:get, '/api/event/schedule').body['results'][0])
56
44
  end
57
45
  end
58
46
 
47
+ class Battle
48
+ attr_reader :start_time, :end_time, :rule, :stages, :is_fest
49
+
50
+ def initialize(data)
51
+ @start_time = data&.[]('start_time')
52
+ @end_time = data&.[]('end_time')
53
+ @rule = Rule.new(data&.[]('rule'))
54
+ @stages = data&.[]('stages')&.map { |stage| Stage.new(stage) }
55
+ @is_fest = data&.[]('is_fest')
56
+ end
57
+
58
+ class Stage
59
+ attr_reader :id, :name, :image
60
+
61
+ def initialize(data)
62
+ @id = data&.[]('id')
63
+ @name = data&.[]('name')
64
+ @image = data&.[]('image')
65
+ end
66
+ end
67
+
68
+ class Rule
69
+ attr_reader :name, :key
70
+
71
+ def initialize(data)
72
+ @name = data&.[]('name')
73
+ @key = data&.[]('key')
74
+ end
75
+ end
76
+
77
+ private_constant :Stage, :Rule
78
+ end
79
+
80
+ class Salmon
81
+ attr_reader :start_time, :end_time, :stage, :weapons
82
+
83
+ def initialize(data)
84
+ return unless data
85
+
86
+ @start_time = data['start_time']
87
+ @end_time = data['end_time']
88
+ @stage = Stage.new(data['stage'])
89
+ @weapons = data['weapons'].map { |weapon| Weapon.new(weapon) }
90
+ end
91
+
92
+ class Stage
93
+ attr_reader :name, :image
94
+
95
+ def initialize(data)
96
+ @name = data['name']
97
+ @image = data['image']
98
+ end
99
+ end
100
+
101
+ class Weapon
102
+ attr_reader :name, :image
103
+
104
+ def initialize(data)
105
+ @name = data['name']
106
+ @image = data['image']
107
+ end
108
+ end
109
+
110
+ private_constant :Stage, :Weapon
111
+ end
112
+
113
+ private_constant :Battle, :Salmon
114
+
59
115
  private
60
116
 
61
117
  def send_request(method, path)
data/lib/ika3/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ika3
4
- VERSION = '0.8.0'
4
+ VERSION = '0.9.0'
5
5
  end
data/lib/ika3/weapons.rb CHANGED
@@ -2,18 +2,18 @@
2
2
 
3
3
  module Ika3
4
4
  class Weapon
5
- ATTRIBUTES = %i[
6
- name sub special
7
- ].freeze
5
+ class << self
6
+ class W
7
+ attr_reader :name, :sub, :special
8
8
 
9
- ATTRIBUTES.each do |attribute|
10
- define_method attribute do
11
- self[attribute]
9
+ def initialize(data)
10
+ @name = data[:name]
11
+ @sub = data[:sub]
12
+ @special = data[:special]
13
+ end
12
14
  end
13
- end
14
15
 
15
- class << self
16
- include Ika3::Concerns::Utils
16
+ private_constant :W
17
17
 
18
18
  def find(weapon_key)
19
19
  raise "unknown weapon: #{weapon_key}" unless valid?(weapon_key)
@@ -24,7 +24,7 @@ module Ika3
24
24
  @cache[weapon_key] = weapon_config
25
25
  end
26
26
 
27
- @cache[weapon_key]
27
+ W.new(@cache[weapon_key])
28
28
  end
29
29
 
30
30
  def find_by_name(weapon_name)
@@ -37,7 +37,8 @@ module Ika3
37
37
  def filter_by_sub(sub_name)
38
38
  raise "unknown sub weapon: #{sub_name}" unless sub_weapons.values.include?(sub_name)
39
39
 
40
- config.values.filter { |weapon| weapon[:sub] == sub_name }
40
+ weapons = config.values.filter { |weapon| weapon[:sub] == sub_name }
41
+ weapons.map { |weapon| W.new(weapon) }
41
42
  end
42
43
 
43
44
  def reload_config!
@@ -87,6 +88,10 @@ module Ika3
87
88
  def valid?(weapon_key)
88
89
  names.include?(weapon_key)
89
90
  end
91
+
92
+ def load_yaml_file(file)
93
+ YAML.safe_load_file(file, aliases: true)
94
+ end
90
95
  end
91
96
  end
92
97
  end
data/lib/ika3.rb CHANGED
@@ -7,7 +7,6 @@ require 'active_support/core_ext/string/inflections'
7
7
  require 'faraday'
8
8
 
9
9
  require 'ika3/version'
10
- require 'ika3/concerns/utils'
11
10
  require 'ika3/response'
12
11
  require 'ika3/weapons'
13
12
  require 'ika3/schedule'
@@ -1,9 +1,4 @@
1
1
  ---
2
- sources:
3
- - name: ruby/gem_rbs_collection
4
- remote: https://github.com/ruby/gem_rbs_collection.git
5
- revision: main
6
- repo_dir: gems
7
2
  path: ".gem_rbs_collection"
8
3
  gems:
9
4
  - name: activesupport
@@ -11,7 +6,7 @@ gems:
11
6
  source:
12
7
  type: git
13
8
  name: ruby/gem_rbs_collection
14
- revision: c42c09528dd99252db98f0744181a6de54ec2f55
9
+ revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
15
10
  remote: https://github.com/ruby/gem_rbs_collection.git
16
11
  repo_dir: gems
17
12
  - name: ast
@@ -22,15 +17,35 @@ gems:
22
17
  revision: c42c09528dd99252db98f0744181a6de54ec2f55
23
18
  remote: https://github.com/ruby/gem_rbs_collection.git
24
19
  repo_dir: gems
20
+ - name: base64
21
+ version: '0'
22
+ source:
23
+ type: stdlib
24
+ - name: bigdecimal
25
+ version: '0'
26
+ source:
27
+ type: stdlib
25
28
  - name: concurrent-ruby
26
29
  version: '1.1'
27
30
  source:
28
31
  type: git
29
32
  name: ruby/gem_rbs_collection
30
- revision: c42c09528dd99252db98f0744181a6de54ec2f55
33
+ revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
31
34
  remote: https://github.com/ruby/gem_rbs_collection.git
32
35
  repo_dir: gems
33
- - name: csv
36
+ - name: connection_pool
37
+ version: '2.4'
38
+ source:
39
+ type: git
40
+ name: ruby/gem_rbs_collection
41
+ revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
42
+ remote: https://github.com/ruby/gem_rbs_collection.git
43
+ repo_dir: gems
44
+ - name: date
45
+ version: '0'
46
+ source:
47
+ type: stdlib
48
+ - name: erb
34
49
  version: '0'
35
50
  source:
36
51
  type: stdlib
@@ -39,33 +54,29 @@ gems:
39
54
  source:
40
55
  type: git
41
56
  name: ruby/gem_rbs_collection
42
- revision: c42c09528dd99252db98f0744181a6de54ec2f55
57
+ revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
43
58
  remote: https://github.com/ruby/gem_rbs_collection.git
44
59
  repo_dir: gems
45
60
  - name: fileutils
46
61
  version: '0'
47
62
  source:
48
63
  type: stdlib
64
+ - name: forwardable
65
+ version: '0'
66
+ source:
67
+ type: stdlib
49
68
  - name: i18n
50
69
  version: '1.10'
51
70
  source:
52
71
  type: git
53
72
  name: ruby/gem_rbs_collection
54
- revision: c42c09528dd99252db98f0744181a6de54ec2f55
73
+ revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
55
74
  remote: https://github.com/ruby/gem_rbs_collection.git
56
75
  repo_dir: gems
57
76
  - name: json
58
77
  version: '0'
59
78
  source:
60
79
  type: stdlib
61
- - name: listen
62
- version: '3.2'
63
- source:
64
- type: git
65
- name: ruby/gem_rbs_collection
66
- revision: c42c09528dd99252db98f0744181a6de54ec2f55
67
- remote: https://github.com/ruby/gem_rbs_collection.git
68
- repo_dir: gems
69
80
  - name: logger
70
81
  version: '0'
71
82
  source:
@@ -74,6 +85,22 @@ gems:
74
85
  version: '0'
75
86
  source:
76
87
  type: stdlib
88
+ - name: monitor
89
+ version: '0'
90
+ source:
91
+ type: stdlib
92
+ - name: mutex_m
93
+ version: '0'
94
+ source:
95
+ type: stdlib
96
+ - name: net-http
97
+ version: '0'
98
+ source:
99
+ type: stdlib
100
+ - name: net-protocol
101
+ version: '0'
102
+ source:
103
+ type: stdlib
77
104
  - name: parallel
78
105
  version: '1.20'
79
106
  source:
@@ -82,6 +109,14 @@ gems:
82
109
  revision: c42c09528dd99252db98f0744181a6de54ec2f55
83
110
  remote: https://github.com/ruby/gem_rbs_collection.git
84
111
  repo_dir: gems
112
+ - name: parser
113
+ version: '3.2'
114
+ source:
115
+ type: git
116
+ name: ruby/gem_rbs_collection
117
+ revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
118
+ remote: https://github.com/ruby/gem_rbs_collection.git
119
+ repo_dir: gems
85
120
  - name: rainbow
86
121
  version: '3.0'
87
122
  source:
@@ -90,27 +125,39 @@ gems:
90
125
  revision: c42c09528dd99252db98f0744181a6de54ec2f55
91
126
  remote: https://github.com/ruby/gem_rbs_collection.git
92
127
  repo_dir: gems
93
- - name: securerandom
94
- version: '0'
95
- source:
96
- type: stdlib
97
- - name: steep
98
- version: 1.3.0
128
+ - name: rake
129
+ version: '13.0'
99
130
  source:
100
- type: rubygems
101
- - name: strscan
102
- version: '0'
131
+ type: git
132
+ name: ruby/gem_rbs_collection
133
+ revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
134
+ remote: https://github.com/ruby/gem_rbs_collection.git
135
+ repo_dir: gems
136
+ - name: regexp_parser
137
+ version: '2.8'
103
138
  source:
104
- type: stdlib
105
- - name: date
106
- version: '0'
139
+ type: git
140
+ name: ruby/gem_rbs_collection
141
+ revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
142
+ remote: https://github.com/ruby/gem_rbs_collection.git
143
+ repo_dir: gems
144
+ - name: rubocop
145
+ version: '1.57'
107
146
  source:
108
- type: stdlib
109
- - name: monitor
110
- version: '0'
147
+ type: git
148
+ name: ruby/gem_rbs_collection
149
+ revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
150
+ remote: https://github.com/ruby/gem_rbs_collection.git
151
+ repo_dir: gems
152
+ - name: rubocop-ast
153
+ version: '1.30'
111
154
  source:
112
- type: stdlib
113
- - name: mutex_m
155
+ type: git
156
+ name: ruby/gem_rbs_collection
157
+ revision: 846c09971455f0e144cef2f5a6c9fe6d8905d3e1
158
+ remote: https://github.com/ruby/gem_rbs_collection.git
159
+ repo_dir: gems
160
+ - name: securerandom
114
161
  version: '0'
115
162
  source:
116
163
  type: stdlib
@@ -122,7 +169,7 @@ gems:
122
169
  version: '0'
123
170
  source:
124
171
  type: stdlib
125
- - name: forwardable
172
+ - name: timeout
126
173
  version: '0'
127
174
  source:
128
175
  type: stdlib
data/rbs_collection.yaml CHANGED
@@ -13,3 +13,5 @@ gems:
13
13
  # It's unnecessary if you don't use rbs as a library.
14
14
  - name: rbs
15
15
  ignore: true
16
+ - name: steep
17
+ ignore: true
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ika3
4
+ class Response
5
+ @raw_body: String
6
+ @raw_headers: untyped
7
+ @raw_status: Integer
8
+ @headers: untyped
9
+
10
+ def initialize: (Faraday::Response) -> void
11
+ def body: () -> untyped
12
+ def headers: () -> untyped
13
+ def status: () -> Integer
14
+ end
15
+ end
@@ -1,19 +1,61 @@
1
- class Hash[unchecked out K, unchecked out V] < Object
2
- def method_missing: (name: String) -> untyped
3
- end
4
-
5
1
  module Ika3
6
2
  class Schedule
7
- def initialize: (contact: String) -> void
3
+ @contact: String
4
+ @salmon_run_team_contest: Salmon
5
+ @splat3_connection: Faraday::Connection
6
+ @event_match: Battle
8
7
 
9
- private
8
+ def initialize: (String) -> void
9
+ def salmon_run_team_contest: -> Salmon
10
+ def event: -> Battle
10
11
 
11
- def send_request: (method: String, path: String) -> Object
12
+ private
12
13
 
14
+ def send_request: (Symbol, String) -> Ika3::Response
13
15
  def api_url: () -> "https://spla3.yuu26.com/"
16
+ def splat3_connection: () -> Faraday::Connection
17
+ def faraday_options: () -> { url: String, headers: { :"User-Agent" => ::String } }
14
18
 
15
- def splat3_connection: () -> untyped
19
+ class Battle
20
+ @start_time: untyped
21
+ @end_time: untyped
22
+ @rule: Rule
23
+ @stages: Array[Stage]
24
+ @is_fest: untyped
25
+ def initialize: (Hash[untyped, untyped] data) -> void
16
26
 
17
- def faraday_options: () -> { url: String, headers: { :"User-Agent" => ::String } }
27
+ class Stage
28
+ @id: untyped
29
+ @name: String
30
+ @image: untyped
31
+ def initialize: (Hash[untyped, untyped] data) -> void
32
+ end
33
+
34
+ class Rule
35
+ @name: untyped
36
+ @key: untyped
37
+ def initialize: (Hash[untyped, untyped] data) -> void
38
+ end
39
+ end
40
+
41
+ class Salmon
42
+ @start_time: untyped
43
+ @end_time: untyped
44
+ @stage: Stage
45
+ @weapons: Array[Weapon]
46
+ def initialize: (Hash[untyped, untyped] data) -> void
47
+
48
+ class Stage
49
+ @name: String
50
+ @image: untyped
51
+ def initialize: (Hash[untyped, untyped] data) -> void
52
+ end
53
+
54
+ class Weapon
55
+ @name: String
56
+ @image: String
57
+ def initialize: (Hash[untyped, untyped] data) -> void
58
+ end
59
+ end
18
60
  end
19
61
  end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ika3
4
+ VERSION: String
5
+ end
data/sig/ika3/weapon.rbs CHANGED
@@ -1,29 +1,28 @@
1
1
  module Ika3
2
2
  class Weapon
3
- ATTRIBUTES: ::Array[:name | :sub | :special]
4
-
5
- include Ika3::Concerns::Utils
6
-
7
- def self.find: (untyped weapon_key) -> untyped
8
-
9
- def self.find_by_name: (untyped weapon_name) -> untyped
10
-
11
- def self.filter_by_sub: (untyped sub_name) -> untyped
12
-
13
- def self.reload_config!: () -> untyped
14
-
15
- private
16
-
17
- def self.names: () -> Array[Symbol]
18
-
19
- def self.weapons: () -> Array[Object]
20
-
21
- def self.sub_weapons: () -> Array[Object]
22
-
23
- def self.config: () -> untyped
24
-
25
- def self.config_sub_weapons: () -> untyped
26
-
27
- def self.valid?: (untyped weapon_key) -> bool
3
+ self.@config: untyped
4
+ self.@cache: untyped
5
+ self.@weapon_hash: Hash[untyped, untyped]
6
+ self.@sub_weapon_hash: Hash[untyped, untyped]
7
+ self.@sub_weapons: untyped
8
+
9
+ def self.find: (Symbol weapon_key) -> W
10
+ def self.find_by_name: (String weapon_name) -> W
11
+ def self.filter_by_sub: (String sub_name) -> Array[W]
12
+ def self.reload_config!: -> nil
13
+ def self.names: -> Array[Symbol]
14
+ def self.weapons: -> Hash[untyped, untyped]
15
+ def self.sub_weapons: -> Hash[untyped, untyped]
16
+ def self.config: -> untyped
17
+ def self.config_sub_weapons: -> untyped
18
+ def self.valid?: (Symbol weapon_key) -> bool
19
+ def self.load_yaml_file: (String file) -> untyped
20
+
21
+ class W
22
+ @name: String
23
+ @sub: String
24
+ @special: String
25
+ def initialize: (Hash[untyped, untyped] data) -> void
26
+ end
28
27
  end
29
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ika3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - YutaGoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-03 00:00:00.000000000 Z
11
+ date: 2024-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.0.0
19
+ version: 6.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 5.0.0
26
+ version: 6.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -60,7 +60,6 @@ files:
60
60
  - config/weapons.yml
61
61
  - ika3.gemspec
62
62
  - lib/ika3.rb
63
- - lib/ika3/concerns/utils.rb
64
63
  - lib/ika3/response.rb
65
64
  - lib/ika3/schedule.rb
66
65
  - lib/ika3/version.rb
@@ -68,8 +67,9 @@ files:
68
67
  - rbs_collection.lock.yaml
69
68
  - rbs_collection.yaml
70
69
  - sig/ika3.rbs
71
- - sig/ika3/concerns/utils.rbs
70
+ - sig/ika3/response.rbs
72
71
  - sig/ika3/schedule.rbs
72
+ - sig/ika3/version.rbs
73
73
  - sig/ika3/weapon.rbs
74
74
  homepage: https://github.com/YutaGoto/ika3
75
75
  licenses:
@@ -86,14 +86,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 2.7.0
89
+ version: 3.0.0
90
90
  required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  requirements: []
96
- rubygems_version: 3.4.19
96
+ rubygems_version: 3.5.4
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Splatoon3 weapons information library.
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Ika3
4
- module Concerns
5
- module Utils
6
- module_function
7
-
8
- def load_yaml_file(file)
9
- YAML.safe_load(File.read(file), aliases: true)
10
- end
11
- end
12
- end
13
- end
@@ -1,7 +0,0 @@
1
- module Ika3
2
- module Concerns
3
- module Utils
4
- def self?.load_yaml_file: (file: String) -> Object
5
- end
6
- end
7
- end