ika3 0.10.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -1
- data/.yamllint.yaml +9 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +47 -49
- data/config/special_weapons.yml +56 -0
- data/ika3.gemspec +1 -1
- data/lib/ika3/schedule.rb +14 -12
- data/lib/ika3/version.rb +1 -1
- data/lib/ika3/weapons.rb +26 -3
- data/sig/ika3/schedule.rbs +9 -7
- data/sig/ika3/weapon.rbs +12 -7
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86383c0eb5f100a657f05f0aaba2ae54e38110b9efe6b21e11163390ad46d880
|
4
|
+
data.tar.gz: d78a670bbd8d884539f268d746cd116a026f6e007066ffadf8d5f336fbd1528f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4415279ca2ff1808a3575b052d7adb679b841d276a886031185d8df5d83569a3e3d8ef24e8ed0efec796dd1fbeb2de7fdff3803bd86ffaf4e02b8cd2ae41314
|
7
|
+
data.tar.gz: 0b77f4bce907b88e535a8730cf6e28e7011ac755895c5b6256c482352796e3aa676c5fcd4113297ed578273ec0e7afe48e496172ba4b953e25a5e5ace94e59f8
|
data/.rubocop.yml
CHANGED
data/.yamllint.yaml
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,64 +1,66 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ika3 (
|
4
|
+
ika3 (1.1.0)
|
5
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
|
-
|
12
|
-
activesupport (7.1.3.3)
|
11
|
+
activesupport (7.2.2)
|
13
12
|
base64
|
13
|
+
benchmark (>= 0.3)
|
14
14
|
bigdecimal
|
15
|
-
concurrent-ruby (~> 1.0, >= 1.
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
16
16
|
connection_pool (>= 2.2.5)
|
17
17
|
drb
|
18
18
|
i18n (>= 1.6, < 2)
|
19
|
+
logger (>= 1.4.2)
|
19
20
|
minitest (>= 5.1)
|
20
|
-
|
21
|
-
tzinfo (~> 2.0)
|
21
|
+
securerandom (>= 0.3)
|
22
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
22
23
|
ast (2.4.2)
|
23
24
|
base64 (0.2.0)
|
25
|
+
benchmark (0.4.0)
|
24
26
|
bigdecimal (3.1.8)
|
25
|
-
concurrent-ruby (1.
|
27
|
+
concurrent-ruby (1.3.4)
|
26
28
|
connection_pool (2.4.1)
|
27
|
-
csv (3.
|
29
|
+
csv (3.3.0)
|
28
30
|
diff-lcs (1.5.1)
|
29
31
|
drb (2.2.1)
|
30
|
-
faraday (2.
|
31
|
-
faraday-net_http (>= 2.0, < 3.
|
32
|
-
|
32
|
+
faraday (2.12.0)
|
33
|
+
faraday-net_http (>= 2.0, < 3.4)
|
34
|
+
json
|
35
|
+
logger
|
36
|
+
faraday-net_http (3.3.0)
|
33
37
|
net-http
|
34
|
-
ffi (1.
|
35
|
-
fileutils (1.7.
|
36
|
-
i18n (1.14.
|
38
|
+
ffi (1.17.0-x86_64-linux-gnu)
|
39
|
+
fileutils (1.7.3)
|
40
|
+
i18n (1.14.6)
|
37
41
|
concurrent-ruby (~> 1.0)
|
38
|
-
json (2.
|
42
|
+
json (2.8.1)
|
39
43
|
language_server-protocol (3.17.0.3)
|
40
|
-
listen (3.
|
44
|
+
listen (3.9.0)
|
41
45
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
42
46
|
rb-inotify (~> 0.9, >= 0.9.10)
|
43
|
-
logger (1.6.
|
44
|
-
minitest (5.
|
45
|
-
|
46
|
-
net-http (0.4.1)
|
47
|
+
logger (1.6.1)
|
48
|
+
minitest (5.25.1)
|
49
|
+
net-http (0.5.0)
|
47
50
|
uri
|
48
|
-
parallel (1.
|
49
|
-
parser (3.3.
|
51
|
+
parallel (1.26.3)
|
52
|
+
parser (3.3.6.0)
|
50
53
|
ast (~> 2.4.1)
|
51
54
|
racc
|
52
|
-
racc (1.8.
|
55
|
+
racc (1.8.1)
|
53
56
|
rainbow (3.1.1)
|
54
57
|
rake (13.2.1)
|
55
58
|
rb-fsevent (0.11.2)
|
56
|
-
rb-inotify (0.
|
59
|
+
rb-inotify (0.11.1)
|
57
60
|
ffi (~> 1.0)
|
58
|
-
rbs (3.
|
59
|
-
|
61
|
+
rbs (3.6.1)
|
62
|
+
logger
|
60
63
|
regexp_parser (2.9.2)
|
61
|
-
rexml (3.2.6)
|
62
64
|
rspec (3.13.0)
|
63
65
|
rspec-core (~> 3.13.0)
|
64
66
|
rspec-expectations (~> 3.13.0)
|
@@ -72,35 +74,29 @@ GEM
|
|
72
74
|
diff-lcs (>= 1.2.0, < 2.0)
|
73
75
|
rspec-support (~> 3.13.0)
|
74
76
|
rspec-support (3.13.0)
|
75
|
-
rubocop (1.
|
77
|
+
rubocop (1.68.0)
|
76
78
|
json (~> 2.3)
|
77
79
|
language_server-protocol (>= 3.17.0)
|
78
80
|
parallel (~> 1.10)
|
79
81
|
parser (>= 3.3.0.2)
|
80
82
|
rainbow (>= 2.2.2, < 4.0)
|
81
|
-
regexp_parser (>=
|
82
|
-
|
83
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
83
|
+
regexp_parser (>= 2.4, < 3.0)
|
84
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
84
85
|
ruby-progressbar (~> 1.7)
|
85
86
|
unicode-display_width (>= 2.4.0, < 3.0)
|
86
|
-
rubocop-ast (1.
|
87
|
+
rubocop-ast (1.33.1)
|
87
88
|
parser (>= 3.3.1.0)
|
88
|
-
rubocop-
|
89
|
-
|
90
|
-
|
91
|
-
|
89
|
+
rubocop-on-rbs (1.1.0)
|
90
|
+
rbs (~> 3.5)
|
91
|
+
rubocop (~> 1.61)
|
92
|
+
zlib
|
92
93
|
rubocop-rake (0.6.0)
|
93
94
|
rubocop (~> 1.0)
|
94
|
-
rubocop-rspec (2.
|
95
|
-
rubocop (~> 1.
|
96
|
-
rubocop-capybara (~> 2.17)
|
97
|
-
rubocop-factory_bot (~> 2.22)
|
98
|
-
rubocop-rspec_rails (~> 2.28)
|
99
|
-
rubocop-rspec_rails (2.28.3)
|
100
|
-
rubocop (~> 1.40)
|
95
|
+
rubocop-rspec (3.2.0)
|
96
|
+
rubocop (~> 1.61)
|
101
97
|
ruby-progressbar (1.13.0)
|
102
98
|
securerandom (0.3.1)
|
103
|
-
steep (1.
|
99
|
+
steep (1.8.3)
|
104
100
|
activesupport (>= 5.1)
|
105
101
|
concurrent-ruby (>= 1.1.10)
|
106
102
|
csv (>= 3.0.9)
|
@@ -111,19 +107,20 @@ GEM
|
|
111
107
|
logger (>= 1.3.0)
|
112
108
|
parser (>= 3.1)
|
113
109
|
rainbow (>= 2.2.2, < 4.0)
|
114
|
-
rbs (
|
110
|
+
rbs (~> 3.6.0)
|
115
111
|
securerandom (>= 0.1)
|
116
112
|
strscan (>= 1.0.0)
|
117
113
|
terminal-table (>= 2, < 4)
|
118
|
-
strscan (3.0
|
114
|
+
strscan (3.1.0)
|
119
115
|
terminal-table (3.0.2)
|
120
116
|
unicode-display_width (>= 1.1.1, < 3)
|
121
117
|
typeprof (0.21.11)
|
122
118
|
rbs (>= 1.8.1)
|
123
119
|
tzinfo (2.0.6)
|
124
120
|
concurrent-ruby (~> 1.0)
|
125
|
-
unicode-display_width (2.
|
126
|
-
uri (0.
|
121
|
+
unicode-display_width (2.6.0)
|
122
|
+
uri (1.0.1)
|
123
|
+
zlib (3.1.1)
|
127
124
|
|
128
125
|
PLATFORMS
|
129
126
|
x86_64-linux
|
@@ -134,8 +131,9 @@ DEPENDENCIES
|
|
134
131
|
rbs
|
135
132
|
rspec (~> 3.13)
|
136
133
|
rubocop
|
134
|
+
rubocop-on-rbs (~> 1.1)
|
137
135
|
rubocop-rake (~> 0.6.0)
|
138
|
-
rubocop-rspec (~> 2
|
136
|
+
rubocop-rspec (~> 3.2)
|
139
137
|
steep
|
140
138
|
typeprof
|
141
139
|
|
@@ -0,0 +1,56 @@
|
|
1
|
+
big_bubbler: &big_bubbler
|
2
|
+
name: グレートバリア
|
3
|
+
|
4
|
+
booyah_bomb: &booyah_bomb
|
5
|
+
name: ナイスダマ
|
6
|
+
|
7
|
+
crab_tank: &crab_tank
|
8
|
+
name: カニタンク
|
9
|
+
|
10
|
+
ink_storm: &ink_storm
|
11
|
+
name: アメフラシ
|
12
|
+
|
13
|
+
ink_vac: &ink_vac
|
14
|
+
name: キューインキ
|
15
|
+
|
16
|
+
inkjet: &inkjet
|
17
|
+
name: ジェットパック
|
18
|
+
|
19
|
+
killer_wall_5_1: &killer_wall_5_1
|
20
|
+
name: メガホンレーザー5.1ch
|
21
|
+
|
22
|
+
kraken_royale: &kraken_royale
|
23
|
+
name: テイオウイカ
|
24
|
+
|
25
|
+
reefslider: &reefslider
|
26
|
+
name: サメライド
|
27
|
+
|
28
|
+
splattercolor_screen: &splattercolor_screen
|
29
|
+
name: スミナガシート
|
30
|
+
|
31
|
+
super_chump: &super_chump
|
32
|
+
name: デコイチラシ
|
33
|
+
|
34
|
+
tacticooler: &tacticooler
|
35
|
+
name: エナジースタンド
|
36
|
+
|
37
|
+
tenta_missiles: &tenta_missiles
|
38
|
+
name: マルチミサイル
|
39
|
+
|
40
|
+
triple_inkstrike: &triple_inkstrike
|
41
|
+
name: トリプルトルネード
|
42
|
+
|
43
|
+
triple_splashdown: &triple_splashdown
|
44
|
+
name: ウルトラチャクチ
|
45
|
+
|
46
|
+
trizooka: &trizooka
|
47
|
+
name: ウルトラショット
|
48
|
+
|
49
|
+
ultra_stamp: &ultra_stamp
|
50
|
+
name: ウルトラハンコ
|
51
|
+
|
52
|
+
wave_breaker: &wave_breaker
|
53
|
+
name: ホップソナー
|
54
|
+
|
55
|
+
zipcaster: &zipcaster
|
56
|
+
name: ショクワンダー
|
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 = '>= 3.
|
15
|
+
spec.required_ruby_version = '>= 3.1.0'
|
16
16
|
|
17
17
|
spec.metadata['homepage_uri'] = spec.homepage
|
18
18
|
spec.metadata['source_code_uri'] = 'https://github.com/YutaGoto/ika3'
|
data/lib/ika3/schedule.rb
CHANGED
@@ -6,7 +6,7 @@ module Ika3
|
|
6
6
|
@contact = contact
|
7
7
|
end
|
8
8
|
|
9
|
-
modes = %w[regular bankara_challenge bankara_open x fest]
|
9
|
+
modes = %w[regular bankara_challenge bankara_open x fest fest_challenge]
|
10
10
|
schedules = %w[now next]
|
11
11
|
|
12
12
|
schedules.each do |schedule|
|
@@ -28,24 +28,24 @@ module Ika3
|
|
28
28
|
"@salmon_run_#{schedule}", Salmon.new(send_request(:get, "/api/coop-grouping/#{schedule}").body['results'][0])
|
29
29
|
)
|
30
30
|
end
|
31
|
+
end
|
31
32
|
|
32
|
-
|
33
|
-
|
33
|
+
def salmon_run_team_contest
|
34
|
+
return @salmon_run_team_contest unless @salmon_run_team_contest.nil?
|
34
35
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
@salmon_run_team_contest = Salmon.new(
|
37
|
+
send_request(:get, '/api/coop-grouping-team-contest/schedule').body['results'][0]
|
38
|
+
)
|
39
|
+
end
|
39
40
|
|
40
|
-
|
41
|
-
|
41
|
+
def event
|
42
|
+
return @event_match unless @event_match.nil?
|
42
43
|
|
43
|
-
|
44
|
-
end
|
44
|
+
@event_match = Battle.new(send_request(:get, '/api/event/schedule').body['results'][0])
|
45
45
|
end
|
46
46
|
|
47
47
|
class Battle
|
48
|
-
attr_reader :start_time, :end_time, :rule, :stages, :is_fest
|
48
|
+
attr_reader :start_time, :end_time, :rule, :stages, :is_fest, :is_tricolor, :tricolor_stage
|
49
49
|
|
50
50
|
def initialize(data)
|
51
51
|
@start_time = data&.[]('start_time')
|
@@ -53,6 +53,8 @@ module Ika3
|
|
53
53
|
@rule = Rule.new(data&.[]('rule'))
|
54
54
|
@stages = data&.[]('stages')&.map { |stage| Stage.new(stage) }
|
55
55
|
@is_fest = data&.[]('is_fest')
|
56
|
+
@is_tricolor = data&.[]('is_tricolor')
|
57
|
+
@tricolor_stage = Stage.new(data&.[]('tricolor_stage'))
|
56
58
|
end
|
57
59
|
|
58
60
|
class Stage
|
data/lib/ika3/version.rb
CHANGED
data/lib/ika3/weapons.rb
CHANGED
@@ -41,12 +41,20 @@ module Ika3
|
|
41
41
|
weapons.map { |weapon| W.new(weapon) }
|
42
42
|
end
|
43
43
|
|
44
|
+
def filter_by_special(special_name)
|
45
|
+
raise "unknown special weapon: #{special_name}" unless special_weapons.values.include?(special_name)
|
46
|
+
|
47
|
+
weapons = config.values.filter { |weapon| weapon[:special] == special_name }
|
48
|
+
weapons.map { |weapon| W.new(weapon) }
|
49
|
+
end
|
50
|
+
|
44
51
|
def reload_config!
|
45
52
|
@cache = {}
|
46
53
|
@config = nil
|
47
54
|
@sub_weapons = nil
|
48
55
|
config
|
49
56
|
config_sub_weapons
|
57
|
+
config_special_weapons
|
50
58
|
end
|
51
59
|
|
52
60
|
private
|
@@ -75,21 +83,36 @@ module Ika3
|
|
75
83
|
@sub_weapon_hash
|
76
84
|
end
|
77
85
|
|
86
|
+
def special_weapons
|
87
|
+
@special_weapon_hash ||= {}
|
88
|
+
if @special_weapon_hash.empty?
|
89
|
+
config_special_weapons.each do |key, value|
|
90
|
+
@special_weapon_hash[key] = value[:name]
|
91
|
+
end
|
92
|
+
end
|
93
|
+
@special_weapon_hash
|
94
|
+
end
|
95
|
+
|
78
96
|
def config
|
79
|
-
@config ||=
|
97
|
+
@config ||= load_yaml("#{File.dirname(__FILE__)}/../../config/weapons.yml").deep_symbolize_keys
|
80
98
|
@config
|
81
99
|
end
|
82
100
|
|
83
101
|
def config_sub_weapons
|
84
|
-
@sub_weapons ||=
|
102
|
+
@sub_weapons ||= load_yaml("#{File.dirname(__FILE__)}/../../config/sub_weapons.yml").deep_symbolize_keys
|
85
103
|
@sub_weapons
|
86
104
|
end
|
87
105
|
|
106
|
+
def config_special_weapons
|
107
|
+
@special_weapons ||= load_yaml("#{File.dirname(__FILE__)}/../../config/special_weapons.yml").deep_symbolize_keys
|
108
|
+
@special_weapons
|
109
|
+
end
|
110
|
+
|
88
111
|
def valid?(weapon_key)
|
89
112
|
names.include?(weapon_key)
|
90
113
|
end
|
91
114
|
|
92
|
-
def
|
115
|
+
def load_yaml(file)
|
93
116
|
YAML.safe_load_file(file, aliases: true)
|
94
117
|
end
|
95
118
|
end
|
data/sig/ika3/schedule.rbs
CHANGED
@@ -6,8 +6,8 @@ module Ika3
|
|
6
6
|
@event_match: Battle
|
7
7
|
|
8
8
|
def initialize: (String) -> void
|
9
|
-
def salmon_run_team_contest: -> Salmon
|
10
|
-
def event: -> Battle
|
9
|
+
def salmon_run_team_contest: () -> Salmon
|
10
|
+
def event: () -> Battle
|
11
11
|
|
12
12
|
private
|
13
13
|
|
@@ -21,18 +21,20 @@ module Ika3
|
|
21
21
|
@end_time: untyped
|
22
22
|
@rule: Rule
|
23
23
|
@stages: Array[Stage]
|
24
|
-
@is_fest:
|
24
|
+
@is_fest: bool
|
25
|
+
@is_tricolor: bool
|
26
|
+
@tricolor_stage: Stage?
|
25
27
|
def initialize: (Hash[untyped, untyped] data) -> void
|
26
28
|
|
27
29
|
class Stage
|
28
30
|
@id: untyped
|
29
31
|
@name: String
|
30
|
-
@image:
|
32
|
+
@image: String
|
31
33
|
def initialize: (Hash[untyped, untyped] data) -> void
|
32
34
|
end
|
33
35
|
|
34
36
|
class Rule
|
35
|
-
@name:
|
37
|
+
@name: String
|
36
38
|
@key: untyped
|
37
39
|
def initialize: (Hash[untyped, untyped] data) -> void
|
38
40
|
end
|
@@ -43,7 +45,7 @@ module Ika3
|
|
43
45
|
@end_time: untyped
|
44
46
|
@stage: Stage
|
45
47
|
@weapons: Array[Weapon]
|
46
|
-
@boss:
|
48
|
+
@boss: Boss?
|
47
49
|
def initialize: (Hash[untyped, untyped] data) -> void
|
48
50
|
|
49
51
|
class Stage
|
@@ -59,8 +61,8 @@ module Ika3
|
|
59
61
|
end
|
60
62
|
|
61
63
|
class Boss
|
64
|
+
@id: String
|
62
65
|
@name: String
|
63
|
-
@image: String
|
64
66
|
def initialize: (Hash[untyped, untyped] data) -> void
|
65
67
|
end
|
66
68
|
end
|
data/sig/ika3/weapon.rbs
CHANGED
@@ -5,18 +5,23 @@ module Ika3
|
|
5
5
|
self.@weapon_hash: Hash[untyped, untyped]
|
6
6
|
self.@sub_weapon_hash: Hash[untyped, untyped]
|
7
7
|
self.@sub_weapons: untyped
|
8
|
+
self.@special_weapon_hash: Hash[untyped, untyped]
|
9
|
+
self.@special_weapons: untyped
|
8
10
|
|
9
11
|
def self.find: (Symbol weapon_key) -> W
|
10
12
|
def self.find_by_name: (String weapon_name) -> W
|
11
13
|
def self.filter_by_sub: (String sub_name) -> Array[W]
|
12
|
-
def self.
|
13
|
-
def self.
|
14
|
-
def self.
|
15
|
-
def self.
|
16
|
-
def self.
|
17
|
-
def self.
|
14
|
+
def self.filter_by_special: (String special_name) -> Array[W]
|
15
|
+
def self.reload_config!: () -> nil
|
16
|
+
def self.names: () -> Array[Symbol]
|
17
|
+
def self.weapons: () -> Hash[untyped, untyped]
|
18
|
+
def self.sub_weapons: () -> Hash[untyped, untyped]
|
19
|
+
def self.special_weapons: () -> Hash[untyped, untyped]
|
20
|
+
def self.config: () -> untyped
|
21
|
+
def self.config_sub_weapons: () -> untyped
|
22
|
+
def self.config_special_weapons: () -> untyped
|
18
23
|
def self.valid?: (Symbol weapon_key) -> bool
|
19
|
-
def self.
|
24
|
+
def self.load_yaml: (String file) -> untyped
|
20
25
|
|
21
26
|
class W
|
22
27
|
@name: String
|
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:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YutaGoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -50,12 +50,14 @@ files:
|
|
50
50
|
- ".rspec"
|
51
51
|
- ".rubocop.yml"
|
52
52
|
- ".vscode/settings.json"
|
53
|
+
- ".yamllint.yaml"
|
53
54
|
- Gemfile
|
54
55
|
- Gemfile.lock
|
55
56
|
- LICENSE.txt
|
56
57
|
- README.md
|
57
58
|
- Rakefile
|
58
59
|
- Steepfile
|
60
|
+
- config/special_weapons.yml
|
59
61
|
- config/sub_weapons.yml
|
60
62
|
- config/weapons.yml
|
61
63
|
- ika3.gemspec
|
@@ -86,14 +88,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
86
88
|
requirements:
|
87
89
|
- - ">="
|
88
90
|
- !ruby/object:Gem::Version
|
89
|
-
version: 3.
|
91
|
+
version: 3.1.0
|
90
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
93
|
requirements:
|
92
94
|
- - ">="
|
93
95
|
- !ruby/object:Gem::Version
|
94
96
|
version: '0'
|
95
97
|
requirements: []
|
96
|
-
rubygems_version: 3.5.
|
98
|
+
rubygems_version: 3.5.16
|
97
99
|
signing_key:
|
98
100
|
specification_version: 4
|
99
101
|
summary: Splatoon3 weapons information library.
|