Package not found. Please check the package name and try again.

ika3 0.1.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: 548d040dbd4c648da79fb006c15ffde651e00327f242ddf101c8a4aa38161676
4
- data.tar.gz: 8cd525770d10cf8a36b0eed678b3117605ad526ac47c2b725a43ffa61636cf00
3
+ metadata.gz: 010310a4b067b39dfd3c92a4a43fd7b8af48ff9cc5d6f513d73c967df69e14fd
4
+ data.tar.gz: 410d4c6b446c85daf2675d06a611a4b8fc28f1653f62789843f4f8d94f7d18d4
5
5
  SHA512:
6
- metadata.gz: 605d7d6c03b39691cc77fe1ca80fa5331ba9c707ed23b5b7c6e127674af797e2f3f03a98e437d5ba173598e34eb806c18e3d5d2cc96958e90b6d4cdde7af69ee
7
- data.tar.gz: 8434fd143474068d51239ccd92d6ba4dae33377bef897baaba3009b804ca3a0576691dfc8a3809fca70919ec8b30696c41ca99bf3ca3937bf823160128a09558
6
+ metadata.gz: 2b13ba634e97b1c8ee57871cce0f6ee57f0373fcf4e552afb4467395e9ff65c5604847da8fba11edb69be7f5b1df0e6a50898f18117198468363fe0aed4eb050
7
+ data.tar.gz: ec349ce079c454f3e059aea4796839a06904e80ad0e1376008baac175e3472478d8dfce9ee3ecebcf4e8591c38e3a5aecbb733e4711e7a2fc48cb1e8532e7908
data/Gemfile.lock CHANGED
@@ -1,23 +1,27 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ika3 (0.1.0)
4
+ ika3 (0.2.1)
5
5
  activesupport (>= 5.0.0)
6
+ faraday (>= 2.7.0)
6
7
  hashie (>= 2.0.5)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
- activesupport (6.1.7)
12
+ activesupport (7.0.4.2)
12
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
14
  i18n (>= 1.6, < 2)
14
15
  minitest (>= 5.1)
15
16
  tzinfo (~> 2.0)
16
- zeitwerk (~> 2.3)
17
17
  ast (2.4.2)
18
- concurrent-ruby (1.1.10)
18
+ concurrent-ruby (1.2.0)
19
19
  csv (3.2.5)
20
20
  diff-lcs (1.5.0)
21
+ faraday (2.7.4)
22
+ faraday-net_http (>= 2.0, < 3.1)
23
+ ruby2_keywords (>= 0.0.4)
24
+ faraday-net_http (3.0.2)
21
25
  ffi (1.15.5)
22
26
  fileutils (1.6.0)
23
27
  hashie (5.0.0)
@@ -29,7 +33,7 @@ GEM
29
33
  rb-fsevent (~> 0.10, >= 0.10.3)
30
34
  rb-inotify (~> 0.9, >= 0.9.10)
31
35
  logger (1.5.1)
32
- minitest (5.16.3)
36
+ minitest (5.17.0)
33
37
  parallel (1.22.1)
34
38
  parser (3.1.3.0)
35
39
  ast (~> 2.4.1)
@@ -38,7 +42,7 @@ GEM
38
42
  rb-fsevent (0.11.2)
39
43
  rb-inotify (0.10.1)
40
44
  ffi (~> 1.0)
41
- rbs (2.8.1)
45
+ rbs (2.8.4)
42
46
  rspec (3.12.0)
43
47
  rspec-core (~> 3.12.0)
44
48
  rspec-expectations (~> 3.12.0)
@@ -52,6 +56,7 @@ GEM
52
56
  diff-lcs (>= 1.2.0, < 2.0)
53
57
  rspec-support (~> 3.12.0)
54
58
  rspec-support (3.12.0)
59
+ ruby2_keywords (0.0.5)
55
60
  securerandom (0.2.0)
56
61
  steep (1.3.0)
57
62
  activesupport (>= 5.1)
@@ -74,7 +79,6 @@ GEM
74
79
  tzinfo (2.0.5)
75
80
  concurrent-ruby (~> 1.0)
76
81
  unicode-display_width (2.3.0)
77
- zeitwerk (2.6.6)
78
82
 
79
83
  PLATFORMS
80
84
  x86_64-linux
data/config/weapons.yml CHANGED
@@ -8,6 +8,11 @@ splattershot_jr: &splattershot_jr
8
8
  sub: スプラボム
9
9
  special: グレートバリア
10
10
 
11
+ custom_splattershot_jr: &custom_splattershot_jr
12
+ mame: もみじシューター
13
+ sub: トーピード
14
+ special: ホップソナー
15
+
11
16
  splash_o_matic: &splash_o_matic
12
17
  name: シャープマーカー
13
18
  sub: クイックボム
@@ -18,11 +23,21 @@ aerosparay_mg: &aerosparay_mg
18
23
  sub: タンサンボム
19
24
  special: サメライド
20
25
 
26
+ aerosparay_rg: &aerosparay_rg
27
+ name: プロモデラーRG
28
+ sub: スプリンクラー
29
+ special: ナイスダマ
30
+
21
31
  splattershot: &splattershot
22
32
  name: スプラシューター
23
33
  sub: キューバンボム
24
34
  special: ウルトラショット
25
35
 
36
+ tentatek_splattershot: &tentatek_splattershot
37
+ name: スプラシューターコラボ
38
+ sub: スプラボム
39
+ special: トリプルトルネード
40
+
26
41
  52_gal: &52_gal
27
42
  name: .52ガロン
28
43
  sub: スプラッシュシールド
@@ -38,6 +53,11 @@ splattershot_pro: &splattershot_pro
38
53
  sub: ラインマーカー
39
54
  special: カニタンク
40
55
 
56
+ forge_splattershot_pro: &forge_splattershot_pro
57
+ name: プライムシューターコラボ
58
+ sub: キューバンボム
59
+ special: ナイスダマ
60
+
41
61
  96_gal: &96_gal
42
62
  name: .96ガロン
43
63
  sub: スプリンクラー
@@ -63,12 +83,21 @@ squeezer: &squeezer
63
83
  sub: スプラッシュシールド
64
84
  special: ウルトラショット
65
85
 
86
+ splattershot_nova: &splattershot_nova
87
+ name: スペースシューター
88
+ sub: ポイントセンサー
89
+ special: メガホンレーザー5.1ch
66
90
 
67
91
  carbon_roller: &carbon_roller
68
92
  name: カーボンローラー
69
93
  sub: ロボットボム
70
94
  special: ショクワンダー
71
95
 
96
+ carbon_roller_deco: &carbon_roller_deco
97
+ name: カーボンローラーデコ
98
+ sub: クイックボム
99
+ special: ウルトラショット
100
+
72
101
  splatroller: &splatroller
73
102
  name: スプラローラー
74
103
  sub: カーリングボム
@@ -84,6 +113,10 @@ flingza_roller: &flingza_roller
84
113
  sub: トラップ
85
114
  special: マルチミサイル
86
115
 
116
+ big_swig_roller: &big_swig_roller
117
+ name: ワイドローラー
118
+ sub: スプラッシュシールド
119
+ special: キューインキ
87
120
 
88
121
  classic_squiffer: &classic_squiffer
89
122
  name: スクイックリン
@@ -120,12 +153,21 @@ goo_tuber: &goo_tuber
120
153
  sub: トーピード
121
154
  special: マルチミサイル
122
155
 
156
+ snipewriter_5h: &snipewriter_5h
157
+ name: R-PEN/5H
158
+ sub: スプリンクラー
159
+ special: エナジースタンド
123
160
 
124
161
  slosher: &slosher
125
162
  name: バケットスロッシャー
126
163
  sub: キューバンボム
127
164
  special: トリプルトルネード
128
165
 
166
+ slosher_deco: &slosher_deco
167
+ name: バケットスロッシャーデコ
168
+ sub: ラインマーカー
169
+ special: ショクワンダー
170
+
129
171
  tri_slocher: &tri_slocher
130
172
  name: ヒッセン
131
173
  sub: ポイズンミスト
@@ -146,12 +188,16 @@ explosher: &explosher
146
188
  sub: ポイントセンサー
147
189
  special: アメフラシ
148
190
 
149
-
150
191
  mini_splatling: &mini_splatling
151
192
  name: スプラスピナー
152
193
  sub: クイックボム
153
194
  special: ウルトラハンコ
154
195
 
196
+ zink_mini_splatling: &zink_mini_splatling
197
+ name: スプラスピナーコラボ
198
+ sub: ポイズンミスト
199
+ special: グレートバリア
200
+
155
201
  heavy_splatling: &heavy_splatling
156
202
  name: バレルスピナー
157
203
  sub: スプリンクラー
@@ -172,12 +218,16 @@ nautilus_47: &nautilus_47
172
218
  sub: ポイントセンサー
173
219
  special: アメフラシ
174
220
 
175
-
176
221
  luna_blaster: &luna_blaster
177
222
  name: ノヴァブラスター
178
223
  sub: スプラボム
179
224
  special: ショクワンダー
180
225
 
226
+ luna_blaster_neo: &luna_blaster_neo
227
+ name: ノヴァブラスターネオ
228
+ sub: タンサンボム
229
+ special: ウルトラハンコ
230
+
181
231
  blaster: &blaster
182
232
  name: ホットブラスター
183
233
  sub: ロボットボム
@@ -203,17 +253,50 @@ rapid_blaster_pro: &rapid_blaster_pro
203
253
  sub: ポイズンミスト
204
254
  special: キューインキ
205
255
 
206
-
207
256
  inkbrush: &inkbrush
208
257
  name: パブロ
209
258
  sub: スプラボム
210
259
  special: メガホンレーザー5.1ch
211
260
 
261
+ inkbrush_nouveas: &inkbrush_nouveas
262
+ name: パブロ・ヒュー
263
+ sub: トラップ
264
+ special: ウルトラハンコ
265
+
212
266
  octobrush: &octobrush
213
267
  name: ホクサイ
214
268
  sub: キューバンボム
215
269
  special: ショクワンダー
216
270
 
271
+ dapple_dualies: &dapple_dualies
272
+ name: スパッタリー
273
+ sub: ジャンプビーコン
274
+ special: エナジースタンド
275
+
276
+ dapple_dualies_nouveas: &dapple_dualies_nouveas
277
+ name: スパッタリー・ヒュー
278
+ sub: トーピード
279
+ special: サメライド
280
+
281
+ splat_dualies: &splat_dualies
282
+ name: スプラマニューバー
283
+ sub: キューバンボム
284
+ special: カニタンク
285
+
286
+ dark_tetra_dualies: &dark_tetra_dualies
287
+ name: クアッドホッパーブラック
288
+ sub: ロボットボム
289
+ special: サメライド
290
+
291
+ dualie_squelchers: &dualie_squelchers
292
+ name: デュアルスイーパー
293
+ sub: スプラボム
294
+ special: ホップソナー
295
+
296
+ glooga_dualies: &glooga_dualies
297
+ name: ケルビン525
298
+ sub: スプラッシュシールド
299
+ special: ナイスダマ
217
300
 
218
301
  tri_stringer: &tri_stringer
219
302
  name: トライストリンガー
@@ -225,7 +308,6 @@ reef_lux_450: &reef_lux_450
225
308
  sub: カーリングボム
226
309
  special: マルチミサイル
227
310
 
228
-
229
311
  splatana_stamper: &splatana_stamper
230
312
  name: ジムワイパー
231
313
  sub: クイックボム
data/ika3.gemspec CHANGED
@@ -8,11 +8,11 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["YutaGoto"]
9
9
  spec.email = ["you.goto.510@gmail.com"]
10
10
 
11
- spec.summary = "いか3"
12
- spec.description = "いか3"
11
+ spec.summary = "Splatoon3 weapons infomation library."
12
+ spec.description = "Splatoon3 weapons infomation 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.6.0"
15
+ spec.required_ruby_version = ">= 2.7.0"
16
16
 
17
17
  # spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
18
18
 
@@ -30,12 +30,10 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
+ spec.add_dependency "faraday", ">= 2.7.0"
33
34
  spec.add_dependency "activesupport", ">= 5.0.0"
34
35
  spec.add_dependency "hashie", ">= 2.0.5"
35
36
 
36
- # Uncomment to register a new dependency of your gem
37
- # spec.add_dependency "example-gem", "~> 1.0"
38
-
39
37
  # For more information and examples about making a new gem, check out our
40
38
  # guide at: https://bundler.io/guides/creating_gem.html
41
39
  end
@@ -0,0 +1,23 @@
1
+ module Ika3
2
+ class Response
3
+ def initialize(faraday_response)
4
+ @raw_body = faraday_response.body
5
+ @raw_headers = faraday_response.headers
6
+ @raw_status = faraday_response.status
7
+ end
8
+
9
+ def body
10
+ @raw_body
11
+ end
12
+
13
+ def headers
14
+ @headers ||= @raw_headers.inject({}) do |result, (key, value)|
15
+ result.merge(key.split("-").map(&:capitalize).join("-") => value)
16
+ end
17
+ end
18
+
19
+ def status
20
+ @raw_status
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,56 @@
1
+ class Hash
2
+ def method_missing(name)
3
+ return self[name].extend Hash if key? name
4
+
5
+ each { |k, v| return v if k.to_s.to_sym == name }
6
+ super.method_missing(name)
7
+ end
8
+ end
9
+
10
+ module Ika3
11
+ class Schedule
12
+ class << self
13
+ modes = ["regular", "bankara_challenge", "bankara_open", "x"]
14
+ schedules = ["now", "next"]
15
+
16
+ schedules.each do |schedule|
17
+ modes.each do |mode|
18
+ define_method("#{mode}_#{schedule}".to_sym) do
19
+ return instance_variable_get("@#{mode}_#{schedule}_obj") if instance_variable_defined?("@#{mode}_#{schedule}_obj")
20
+
21
+ instance_variable_set("@#{mode}_#{schedule}_obj", send_request(:get, "/api/#{mode.dasherize}/#{schedule}").body.results[0])
22
+ end
23
+ end
24
+
25
+ define_method("salmon_run_#{schedule}".to_sym) do
26
+ return instance_variable_get("@salmon_run_#{schedule}_obj") if instance_variable_defined?("@salmon_run_#{schedule}_obj")
27
+
28
+ instance_variable_set("@salmon_run_#{schedule}_obj", send_request(:get, "/api/coop-grouping/#{schedule}").body.results[0])
29
+ end
30
+ end
31
+
32
+ private
33
+
34
+ def send_request(method, path, params = nil, headers = nil)
35
+ response = splat3_connection.send(method, path, params, headers)
36
+ Ika3::Response.new(response)
37
+ end
38
+
39
+ def api_url
40
+ "https://spla3.yuu26.com/"
41
+ end
42
+
43
+ def splat3_connection
44
+ @splat3_connection ||= Faraday::new(faraday_options) do |c|
45
+ c.request :json
46
+ c.response :json
47
+ c.adapter Faraday.default_adapter
48
+ end
49
+ end
50
+
51
+ def faraday_options
52
+ { url: api_url }
53
+ end
54
+ end
55
+ end
56
+ end
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.1.0"
4
+ VERSION = "0.2.1"
5
5
  end
data/lib/ika3.rb CHANGED
@@ -4,10 +4,14 @@ require "yaml"
4
4
  require "hashie"
5
5
 
6
6
  require "active_support/core_ext/hash/keys"
7
+ require "active_support/core_ext/string/inflections"
8
+ require "faraday"
7
9
 
8
10
  require "ika3/version"
9
11
  require "ika3/concerns/utils"
12
+ require "ika3/response"
10
13
  require "ika3/weapons"
14
+ require "ika3/schedule"
11
15
 
12
16
  module Ika3
13
17
  class Error < StandardError; end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ika3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - YutaGoto
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-01 00:00:00.000000000 Z
11
+ date: 2023-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.7.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.7.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: activesupport
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,7 +52,8 @@ dependencies:
38
52
  - - ">="
39
53
  - !ruby/object:Gem::Version
40
54
  version: 2.0.5
41
- description: いか3
55
+ description: Splatoon3 weapons infomation library. This gem provide weapon name, sub,
56
+ and special. not official
42
57
  email:
43
58
  - you.goto.510@gmail.com
44
59
  executables: []
@@ -57,6 +72,8 @@ files:
57
72
  - ika3.gemspec
58
73
  - lib/ika3.rb
59
74
  - lib/ika3/concerns/utils.rb
75
+ - lib/ika3/response.rb
76
+ - lib/ika3/schedule.rb
60
77
  - lib/ika3/version.rb
61
78
  - lib/ika3/weapons.rb
62
79
  - rbs_collection.lock.yaml
@@ -70,7 +87,7 @@ licenses:
70
87
  metadata:
71
88
  homepage_uri: https://github.com/YutaGoto/ika3
72
89
  source_code_uri: https://github.com/YutaGoto/ika3
73
- post_install_message:
90
+ post_install_message:
74
91
  rdoc_options: []
75
92
  require_paths:
76
93
  - lib
@@ -78,15 +95,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
95
  requirements:
79
96
  - - ">="
80
97
  - !ruby/object:Gem::Version
81
- version: 2.6.0
98
+ version: 2.7.0
82
99
  required_rubygems_version: !ruby/object:Gem::Requirement
83
100
  requirements:
84
101
  - - ">="
85
102
  - !ruby/object:Gem::Version
86
103
  version: '0'
87
104
  requirements: []
88
- rubygems_version: 3.3.7
89
- signing_key:
105
+ rubygems_version: 3.4.3
106
+ signing_key:
90
107
  specification_version: 4
91
- summary: いか3
108
+ summary: Splatoon3 weapons infomation library.
92
109
  test_files: []