ehbrs_ruby_utils 0.31.0 → 0.33.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/base/format_option.rb +22 -0
- data/lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/base/format_player.rb +27 -0
- data/lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/base.rb +68 -0
- data/lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/beginning/format_player.rb +24 -0
- data/lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/beginning.rb +35 -0
- data/lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/ending/format_player.rb +32 -0
- data/lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/ending.rb +45 -0
- data/lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters.rb +13 -0
- data/lib/ehbrs_ruby_utils/cooking_book/build/base_page.rb +42 -0
- data/lib/ehbrs_ruby_utils/cooking_book/build/index_page.rb +26 -0
- data/lib/ehbrs_ruby_utils/cooking_book/build/recipe_page.rb +26 -0
- data/lib/ehbrs_ruby_utils/cooking_book/build.rb +45 -0
- data/lib/ehbrs_ruby_utils/cooking_book/project.rb +31 -0
- data/lib/ehbrs_ruby_utils/cooking_book/recipe/ingredient.rb +21 -0
- data/lib/ehbrs_ruby_utils/cooking_book/recipe/measure.rb +60 -0
- data/lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb +32 -0
- data/lib/ehbrs_ruby_utils/cooking_book/recipe.rb +37 -0
- data/lib/ehbrs_ruby_utils/cooking_book.rb +9 -0
- data/lib/ehbrs_ruby_utils/gjt1/manager.rb +8 -5
- data/lib/ehbrs_ruby_utils/version.rb +1 -1
- data/lib/ehbrs_ruby_utils/vg/wii/file_move.rb +89 -0
- data/lib/ehbrs_ruby_utils/vg/wii/game_file.rb +87 -0
- data/lib/ehbrs_ruby_utils/vg/wii/wit/image_format.rb +47 -0
- data/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump.rb +67 -0
- data/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/info.rb +39 -0
- data/lib/ehbrs_ruby_utils/vg/wii/wit/path.rb +55 -0
- data/lib/ehbrs_ruby_utils/vg/wii/wit.rb +13 -0
- data/lib/ehbrs_ruby_utils/vg/wii.rb +11 -0
- data/lib/ehbrs_ruby_utils/vg.rb +9 -0
- data/spec/lib/ehbrs_ruby_utils/cooking_book/recipe/measure_spec.rb +21 -0
- data/spec/lib/ehbrs_ruby_utils/vg/wii/game_file_spec.rb +21 -0
- data/spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec.rb +11 -0
- data/spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.source.witdump +27 -0
- data/spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.target.yaml +22 -0
- data/spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.source.witdump +28 -0
- data/spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.target.yaml +21 -0
- data/spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.source.witdump +16 -0
- data/spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.target.yaml +19 -0
- data/spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.source.witdump +28 -0
- data/spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.target.yaml +23 -0
- data/spec/lib/ehbrs_ruby_utils/vg/wii/wit/path_spec.rb +33 -0
- metadata +104 -62
- data/lib/ehbrs_ruby_utils/bga/table_whatsapp_formatter/format_option.rb +0 -18
- data/lib/ehbrs_ruby_utils/bga/table_whatsapp_formatter/format_player.rb +0 -30
- data/lib/ehbrs_ruby_utils/bga/table_whatsapp_formatter.rb +0 -66
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'ehbrs_ruby_utils/vg/wii/wit/path'
|
4
|
+
|
5
|
+
RSpec.describe ::EhbrsRubyUtils::Vg::Wii::Wit::Path do
|
6
|
+
describe '#parse' do
|
7
|
+
context 'when type is present' do
|
8
|
+
let(:source) { 'WbFs:path/to/file.wbfs' }
|
9
|
+
let(:instance) { described_class.parse(source) }
|
10
|
+
|
11
|
+
it { expect(instance.type).to eq('WBFS') }
|
12
|
+
it { expect(instance.path.to_s).to eq('path/to/file.wbfs') }
|
13
|
+
end
|
14
|
+
|
15
|
+
context 'when type is blank' do
|
16
|
+
let(:source) { 'path/to/file.wbfs' }
|
17
|
+
let(:instance) { described_class.parse(source) }
|
18
|
+
|
19
|
+
it { expect(instance.type).to eq('') }
|
20
|
+
it { expect(instance.path.to_s).to eq('path/to/file.wbfs') }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '#change?' do
|
25
|
+
let(:with_type) { described_class.new('ISO', 'path/to/file.wbfs') }
|
26
|
+
let(:without_type) { described_class.new(nil, 'path/to/file.wbfs') }
|
27
|
+
|
28
|
+
it { expect(with_type.change?(without_type)).to eq(false) }
|
29
|
+
it { expect(without_type.change?(with_type)).to eq(true) }
|
30
|
+
|
31
|
+
context 'when'
|
32
|
+
end
|
33
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ehbrs_ruby_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo H. Bogoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0.
|
67
|
+
version: '0.79'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '0.
|
74
|
+
version: '0.79'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: dentaku
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,40 +112,34 @@ dependencies:
|
|
112
112
|
requirements:
|
113
113
|
- - "~>"
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version: '0.
|
116
|
-
- - ">="
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: 0.9.1
|
115
|
+
version: '0.10'
|
119
116
|
type: :runtime
|
120
117
|
prerelease: false
|
121
118
|
version_requirements: !ruby/object:Gem::Requirement
|
122
119
|
requirements:
|
123
120
|
- - "~>"
|
124
121
|
- !ruby/object:Gem::Version
|
125
|
-
version: '0.
|
126
|
-
- - ">="
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: 0.9.1
|
122
|
+
version: '0.10'
|
129
123
|
- !ruby/object:Gem::Dependency
|
130
124
|
name: eac_ruby_utils
|
131
125
|
requirement: !ruby/object:Gem::Requirement
|
132
126
|
requirements:
|
133
127
|
- - "~>"
|
134
128
|
- !ruby/object:Gem::Version
|
135
|
-
version: '0.
|
129
|
+
version: '0.119'
|
136
130
|
- - ">="
|
137
131
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
132
|
+
version: 0.119.2
|
139
133
|
type: :runtime
|
140
134
|
prerelease: false
|
141
135
|
version_requirements: !ruby/object:Gem::Requirement
|
142
136
|
requirements:
|
143
137
|
- - "~>"
|
144
138
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0.
|
139
|
+
version: '0.119'
|
146
140
|
- - ">="
|
147
141
|
- !ruby/object:Gem::Version
|
148
|
-
version: 0.
|
142
|
+
version: 0.119.2
|
149
143
|
- !ruby/object:Gem::Dependency
|
150
144
|
name: eac_templates
|
151
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -258,9 +252,14 @@ files:
|
|
258
252
|
- lib/ehbrs_ruby_utils/bga/table.rb
|
259
253
|
- lib/ehbrs_ruby_utils/bga/table/option.rb
|
260
254
|
- lib/ehbrs_ruby_utils/bga/table/player.rb
|
261
|
-
- lib/ehbrs_ruby_utils/bga/
|
262
|
-
- lib/ehbrs_ruby_utils/bga/
|
263
|
-
- lib/ehbrs_ruby_utils/bga/
|
255
|
+
- lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters.rb
|
256
|
+
- lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/base.rb
|
257
|
+
- lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/base/format_option.rb
|
258
|
+
- lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/base/format_player.rb
|
259
|
+
- lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/beginning.rb
|
260
|
+
- lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/beginning/format_player.rb
|
261
|
+
- lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/ending.rb
|
262
|
+
- lib/ehbrs_ruby_utils/bga/table/whatsapp_formatters/ending/format_player.rb
|
264
263
|
- lib/ehbrs_ruby_utils/bga/urls.rb
|
265
264
|
- lib/ehbrs_ruby_utils/circular_list_spreader.rb
|
266
265
|
- lib/ehbrs_ruby_utils/circular_list_spreader/base_level.rb
|
@@ -268,6 +267,16 @@ files:
|
|
268
267
|
- lib/ehbrs_ruby_utils/circular_list_spreader/item_level.rb
|
269
268
|
- lib/ehbrs_ruby_utils/circular_list_spreader/list.rb
|
270
269
|
- lib/ehbrs_ruby_utils/circular_list_spreader/list/item_pair_spreadness.rb
|
270
|
+
- lib/ehbrs_ruby_utils/cooking_book.rb
|
271
|
+
- lib/ehbrs_ruby_utils/cooking_book/build.rb
|
272
|
+
- lib/ehbrs_ruby_utils/cooking_book/build/base_page.rb
|
273
|
+
- lib/ehbrs_ruby_utils/cooking_book/build/index_page.rb
|
274
|
+
- lib/ehbrs_ruby_utils/cooking_book/build/recipe_page.rb
|
275
|
+
- lib/ehbrs_ruby_utils/cooking_book/project.rb
|
276
|
+
- lib/ehbrs_ruby_utils/cooking_book/recipe.rb
|
277
|
+
- lib/ehbrs_ruby_utils/cooking_book/recipe/ingredient.rb
|
278
|
+
- lib/ehbrs_ruby_utils/cooking_book/recipe/measure.rb
|
279
|
+
- lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
|
271
280
|
- lib/ehbrs_ruby_utils/core_ext.rb
|
272
281
|
- lib/ehbrs_ruby_utils/executables.rb
|
273
282
|
- lib/ehbrs_ruby_utils/finances/bb_browser/docker_image.rb
|
@@ -293,6 +302,15 @@ files:
|
|
293
302
|
- lib/ehbrs_ruby_utils/patches/object.rb
|
294
303
|
- lib/ehbrs_ruby_utils/patches/object/template.rb
|
295
304
|
- lib/ehbrs_ruby_utils/version.rb
|
305
|
+
- lib/ehbrs_ruby_utils/vg.rb
|
306
|
+
- lib/ehbrs_ruby_utils/vg/wii.rb
|
307
|
+
- lib/ehbrs_ruby_utils/vg/wii/file_move.rb
|
308
|
+
- lib/ehbrs_ruby_utils/vg/wii/game_file.rb
|
309
|
+
- lib/ehbrs_ruby_utils/vg/wii/wit.rb
|
310
|
+
- lib/ehbrs_ruby_utils/vg/wii/wit/image_format.rb
|
311
|
+
- lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump.rb
|
312
|
+
- lib/ehbrs_ruby_utils/vg/wii/wit/parsers/info.rb
|
313
|
+
- lib/ehbrs_ruby_utils/vg/wii/wit/path.rb
|
296
314
|
- lib/ehbrs_ruby_utils/videos.rb
|
297
315
|
- lib/ehbrs_ruby_utils/videos/container.rb
|
298
316
|
- lib/ehbrs_ruby_utils/videos/convert_job.rb
|
@@ -372,6 +390,18 @@ files:
|
|
372
390
|
- spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/ehbrs_music1.target.yaml
|
373
391
|
- spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/minimum.source.yaml
|
374
392
|
- spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/minimum.target.yaml
|
393
|
+
- spec/lib/ehbrs_ruby_utils/cooking_book/recipe/measure_spec.rb
|
394
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/game_file_spec.rb
|
395
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec.rb
|
396
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.source.witdump
|
397
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.target.yaml
|
398
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.source.witdump
|
399
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.target.yaml
|
400
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.source.witdump
|
401
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.target.yaml
|
402
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.source.witdump
|
403
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.target.yaml
|
404
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/path_spec.rb
|
375
405
|
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec.rb
|
376
406
|
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec_files/counterpart_s01e01.source.html
|
377
407
|
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec_files/counterpart_s01e01.target.yaml
|
@@ -426,67 +456,79 @@ signing_key:
|
|
426
456
|
specification_version: 4
|
427
457
|
summary: Utilities for EHB/RS's Ruby projects.
|
428
458
|
test_files:
|
429
|
-
- spec/
|
459
|
+
- spec/spec_helper.rb
|
460
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/path_spec.rb
|
461
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec.rb
|
462
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.source.witdump
|
463
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.target.yaml
|
464
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.target.yaml
|
465
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.target.yaml
|
466
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.source.witdump
|
467
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.target.yaml
|
468
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.source.witdump
|
469
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.source.witdump
|
470
|
+
- spec/lib/ehbrs_ruby_utils/vg/wii/game_file_spec.rb
|
471
|
+
- spec/lib/ehbrs_ruby_utils/cooking_book/recipe/measure_spec.rb
|
472
|
+
- spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec.rb
|
473
|
+
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.target.yaml
|
474
|
+
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.target.yaml
|
475
|
+
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.source.yaml
|
476
|
+
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.source.yaml
|
477
|
+
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.source.yaml
|
478
|
+
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.target.yaml
|
479
|
+
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.target.yaml
|
480
|
+
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.source.yaml
|
481
|
+
- spec/lib/ehbrs_ruby_utils/videos/resolution_spec.rb
|
482
|
+
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec.rb
|
483
|
+
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/title_spec.rb
|
484
|
+
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec_files/counterpart_s01e01.target.yaml
|
485
|
+
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec_files/wire-season-1-page-1.target.yaml
|
486
|
+
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec_files/counterpart_s01e01.source.html
|
487
|
+
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec_files/wire-season-1-page-1.source.html
|
488
|
+
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/title_spec_files/countepart.source.html
|
489
|
+
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/title_spec_files/countepart.target.yaml
|
490
|
+
- spec/lib/ehbrs_ruby_utils/videos/stream_spec.rb
|
430
491
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_308782287.target.yaml
|
431
492
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_383405743.target.yaml
|
432
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_356513708.target.yaml
|
433
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_302873643.target.yaml
|
434
493
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_368448439.target.yaml
|
435
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_368448439.source.html
|
436
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_357408039.source.html
|
437
494
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_383405743.source.html
|
438
495
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_356513708.source.html
|
496
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_357408039.source.html
|
497
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_356513708.target.yaml
|
498
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_373747455.target.yaml
|
499
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_302873643.target.yaml
|
439
500
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_373747455.source.html
|
440
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_373602409.source.html
|
441
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_373602409.target.yaml
|
442
501
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_302873643.source.html
|
443
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/
|
502
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_373602409.target.yaml
|
444
503
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_308782287.source.html
|
445
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/
|
446
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/
|
447
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/
|
504
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_368448439.source.html
|
505
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_373602409.source.html
|
506
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec_files/table_357408039.target.yaml
|
448
507
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_stats_spec_files/1.source.html
|
508
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_stats_spec_files/2.target.yaml
|
449
509
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_stats_spec_files/1.target.yaml
|
450
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/
|
451
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec.rb
|
452
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_84920871_2023-06-12.source.html
|
510
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_stats_spec_files/2.source.html
|
453
511
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93248308_2023-06-12.target.yaml
|
454
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/
|
455
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/
|
512
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_84920871_2023-06-12.target.yaml
|
513
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_84920871_2023-06-19.target.yaml
|
456
514
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_84920871_2023-06-19.source.html
|
457
515
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93205235_2023-06-12.target.yaml
|
516
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93167144_2023-06-12.source.html
|
517
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_84920871_2023-06-12.source.html
|
518
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93167144_2023-06-12.target.yaml
|
519
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93248308_2023-06-12.source.html
|
458
520
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93223573_2023-06-12.target.yaml
|
459
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93212034_2023-06-12.target.yaml
|
460
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93223573_2023-06-12.source.html
|
461
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_84920871_2023-06-12.target.yaml
|
462
521
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93205235_2023-06-12.source.html
|
463
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/
|
464
|
-
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_84920871_2023-06-19.target.yaml
|
522
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93223573_2023-06-12.source.html
|
465
523
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93212034_2023-06-12.source.html
|
524
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec_files/player_93212034_2023-06-12.target.yaml
|
466
525
|
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_in_progress_spec.rb
|
467
|
-
- spec/lib/ehbrs_ruby_utils/
|
468
|
-
- spec/lib/ehbrs_ruby_utils/
|
469
|
-
- spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/ehbrs_music1.source.yaml
|
526
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/game_stats_spec.rb
|
527
|
+
- spec/lib/ehbrs_ruby_utils/bga/parsers/table_spec.rb
|
470
528
|
- spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/minimum.source.yaml
|
529
|
+
- spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/minimum.target.yaml
|
471
530
|
- spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/ehbrs_music1.target.yaml
|
472
|
-
- spec/lib/ehbrs_ruby_utils/
|
473
|
-
- spec/
|
474
|
-
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/title_spec.rb
|
475
|
-
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec.rb
|
476
|
-
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec_files/counterpart_s01e01.source.html
|
477
|
-
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec_files/wire-season-1-page-1.target.yaml
|
478
|
-
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec_files/wire-season-1-page-1.source.html
|
479
|
-
- spec/lib/ehbrs_ruby_utils/videos/opensubtitles/parsers/episode_spec_files/counterpart_s01e01.target.yaml
|
480
|
-
- spec/lib/ehbrs_ruby_utils/videos/stream_spec.rb
|
481
|
-
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.target.yaml
|
482
|
-
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.target.yaml
|
483
|
-
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.target.yaml
|
484
|
-
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.target.yaml
|
485
|
-
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.source.yaml
|
486
|
-
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.source.yaml
|
487
|
-
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_subtitle.source.yaml
|
488
|
-
- spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.source.yaml
|
489
|
-
- spec/lib/ehbrs_ruby_utils/videos/resolution_spec.rb
|
490
|
-
- spec/spec_helper.rb
|
531
|
+
- spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/ehbrs_music1.source.yaml
|
532
|
+
- spec/rubocop_check_spec.rb
|
491
533
|
- ".rubocop.yml"
|
492
534
|
- ".rspec"
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
|
-
module EhbrsRubyUtils
|
6
|
-
module Bga
|
7
|
-
class TableWhatsappFormatter
|
8
|
-
class FormatOption
|
9
|
-
enable_method_class
|
10
|
-
common_constructor :table_formatter, :option
|
11
|
-
|
12
|
-
def result
|
13
|
-
"*#{option.label}:* #{option.value}"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
|
-
module EhbrsRubyUtils
|
6
|
-
module Bga
|
7
|
-
class TableWhatsappFormatter
|
8
|
-
class FormatPlayer
|
9
|
-
enable_method_class
|
10
|
-
common_constructor :table_formatter, :player
|
11
|
-
|
12
|
-
FIELD_SEPARATOR = ' - '
|
13
|
-
|
14
|
-
def result
|
15
|
-
%w[table_rank name score].map { |v| send(v) }.join(FIELD_SEPARATOR)
|
16
|
-
end
|
17
|
-
|
18
|
-
def table_rank
|
19
|
-
"*#{player.rank}º*"
|
20
|
-
end
|
21
|
-
|
22
|
-
delegate :name, to: :player
|
23
|
-
|
24
|
-
def score
|
25
|
-
"⭐ #{player.score}"
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,66 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'ehbrs_ruby_utils/bga/session'
|
4
|
-
require 'ehbrs_ruby_utils/executables'
|
5
|
-
require 'eac_ruby_utils/core_ext'
|
6
|
-
|
7
|
-
module EhbrsRubyUtils
|
8
|
-
module Bga
|
9
|
-
class TableWhatsappFormatter
|
10
|
-
enable_simple_cache
|
11
|
-
common_constructor :table
|
12
|
-
|
13
|
-
TITLE_BEFORE = 0x22D8.chr(::Encoding::UTF_8) + ' '
|
14
|
-
TITLE_AFTER = ' ' + 0x22D9.chr(::Encoding::UTF_8)
|
15
|
-
|
16
|
-
ROOT_ITENS = {
|
17
|
-
'Jogo' => :game_name,
|
18
|
-
'Criada em' => :creation_time,
|
19
|
-
'Duração' => :estimated_duration,
|
20
|
-
'Endereço' => :url
|
21
|
-
}.freeze
|
22
|
-
SECTION_SEPARATOR = "\n\n"
|
23
|
-
|
24
|
-
# @return [Pathname]
|
25
|
-
def image_local_path
|
26
|
-
table.game.box_large_image.local_path
|
27
|
-
end
|
28
|
-
|
29
|
-
def to_s
|
30
|
-
[root_items_to_s, players_to_s, options_to_s].map(&:strip).join(SECTION_SEPARATOR)
|
31
|
-
end
|
32
|
-
|
33
|
-
def root_items_to_s
|
34
|
-
title_to_s('Mesa terminada') + ROOT_ITENS.map { |k, v| "*#{k}*: #{table.send(v)}" }
|
35
|
-
.join("\n")
|
36
|
-
end
|
37
|
-
|
38
|
-
# @return [String]
|
39
|
-
def game_conceded_to_s
|
40
|
-
table.game_conceded? ? "*Derrota admitida*\n\n" : ''
|
41
|
-
end
|
42
|
-
|
43
|
-
def players_to_s
|
44
|
-
title_to_s('Resultado') + game_conceded_to_s + players.join("\n")
|
45
|
-
end
|
46
|
-
|
47
|
-
def options_to_s
|
48
|
-
title_to_s('Opções') + options.join("\n")
|
49
|
-
end
|
50
|
-
|
51
|
-
def title_to_s(title)
|
52
|
-
"*#{TITLE_BEFORE}#{title}#{TITLE_AFTER}*\n\n"
|
53
|
-
end
|
54
|
-
|
55
|
-
def players
|
56
|
-
table.players.map { |player| format_player(player) }
|
57
|
-
end
|
58
|
-
|
59
|
-
def options
|
60
|
-
table.options.map { |player| format_option(player) }
|
61
|
-
end
|
62
|
-
|
63
|
-
require_sub __FILE__, require_mode: :kernel
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|