ehbrs-tools 0.24.0 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/.avm.yml +4 -0
  3. data/.rspec +1 -0
  4. data/.rubocop.yml +39 -0
  5. data/Gemfile.lock +286 -0
  6. data/lib/ehbrs/{core_ext.rb → tools/core_ext.rb} +0 -0
  7. data/lib/ehbrs/tools/runner/finances/bb_browser.rb +1 -1
  8. data/lib/ehbrs/tools/runner/fs/selected.rb +19 -22
  9. data/lib/ehbrs/tools/runner/music/lyrics.rb +69 -0
  10. data/lib/ehbrs/tools/runner/web_utils/videos/download.rb +20 -10
  11. data/lib/ehbrs/tools/runner/web_utils/videos/upload.rb +1 -1
  12. data/lib/ehbrs/tools/version.rb +1 -1
  13. data/lib/ehbrs/videos/extract/package.rb +2 -2
  14. data/lib/ehbrs/videos/extract/package_file.rb +0 -1
  15. data/spec/code/rubocop_spec.rb +3 -0
  16. data/spec/lib/ehbrs/cooking_book/recipe/measure_spec.rb +21 -0
  17. data/spec/lib/ehbrs/observers/base_spec.rb +93 -0
  18. data/spec/lib/ehbrs/tools/runner/fs/used_space_spec.rb +61 -0
  19. data/spec/lib/ehbrs/tools/runner/vg/ips_spec.rb +31 -0
  20. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/expected.rom +0 -0
  21. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_0.ips +0 -0
  22. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_1.ips +0 -0
  23. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/source.rom +0 -0
  24. data/spec/lib/ehbrs/tools/runner/videos/probe_spec.rb +19 -0
  25. data/spec/lib/ehbrs/tools/runner/videos/probe_spec_files/fixed.target.yaml +105 -0
  26. data/spec/lib/ehbrs/tools/runner/videos/unsupported_spec.rb +75 -0
  27. data/spec/lib/ehbrs/tools/runner/videos/unsupported_spec_files/dts_audio.probe.yaml +90 -0
  28. data/spec/lib/ehbrs/tools/runner_spec.rb +16 -0
  29. data/spec/lib/ehbrs/vg/wii/game_file_spec.rb +21 -0
  30. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec.rb +11 -0
  31. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.source.witdump +27 -0
  32. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.target.yaml +22 -0
  33. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.source.witdump +28 -0
  34. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.target.yaml +21 -0
  35. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.source.witdump +16 -0
  36. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.target.yaml +19 -0
  37. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.source.witdump +28 -0
  38. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.target.yaml +23 -0
  39. data/spec/lib/ehbrs/vg/wii/wit/path_spec.rb +33 -0
  40. data/spec/spec_helper/videos.rb +30 -0
  41. data/spec/spec_helper/videos_files/stub_source.mp4 +0 -0
  42. data/spec/spec_helper.rb +7 -0
  43. data/vendor/aranha-parsers/aranha-parsers.gemspec +3 -2
  44. data/vendor/aranha-parsers/lib/aranha/parsers/rspec/setup.rb +15 -0
  45. data/vendor/aranha-parsers/lib/aranha/parsers/rspec/{source_target_fixtures_example.rb → shared_examples/source_target_fixtures.rb} +0 -0
  46. data/vendor/aranha-parsers/lib/aranha/parsers/source_address/fetch_content_error.rb +10 -0
  47. data/vendor/aranha-parsers/lib/aranha/parsers/source_address/http_get.rb +15 -2
  48. data/vendor/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
  49. data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +1 -1
  50. data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +9 -1
  51. data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +6 -0
  52. data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder.rb +3 -3
  53. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  54. data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +6 -5
  55. data/vendor/eac_docker/eac_docker.gemspec +2 -2
  56. data/vendor/eac_docker/lib/eac_docker/rspec/setup.rb +17 -0
  57. data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
  58. data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
  59. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
  60. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs_cache.rb +1 -1
  61. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +36 -0
  62. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +2 -3
  63. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
  64. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
  65. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/recursive_builder.rb +51 -0
  66. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/default_setup.rb +4 -2
  67. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup/conditionals.rb +17 -0
  68. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup.rb +4 -37
  69. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/setup_manager.rb +49 -0
  70. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
  71. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  72. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
  73. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
  74. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
  75. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/recursive_builder_spec.rb +65 -0
  76. data/vendor/ehbrs_ruby_utils/ehbrs_ruby_utils.gemspec +6 -1
  77. data/{lib/ehbrs → vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils}/fs/compressed_package.rb +1 -1
  78. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs/selected/build.rb +41 -0
  79. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs/selected/build_file.rb +27 -0
  80. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs/selected.rb +35 -0
  81. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs.rb +10 -0
  82. data/{lib/ehbrs/fs.rb → vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music.rb} +2 -2
  83. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/version.rb +1 -1
  84. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container.rb +31 -0
  85. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/stream.rb +1 -1
  86. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/videos/file/rename.rb +28 -0
  87. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/videos/file.rb +11 -8
  88. data/vendor/ultimate_lyrics/Gemfile +5 -0
  89. data/vendor/ultimate_lyrics/bin/download_parser_spec_files.rb +94 -0
  90. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/field.rb +83 -0
  91. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/lyrics.rb +13 -0
  92. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/parser.rb +28 -0
  93. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/exclude_item.rb +17 -0
  94. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/extract_item.rb +21 -0
  95. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/item.rb +48 -0
  96. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/replace_fields.rb +13 -0
  97. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/rule.rb +52 -0
  98. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/url_format.rb +21 -0
  99. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider.rb +92 -0
  100. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider_search.rb +43 -0
  101. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/providers_data.xml +355 -0
  102. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/song_metadata/field.rb +24 -0
  103. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/song_metadata.rb +28 -0
  104. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/version.rb +5 -0
  105. data/vendor/ultimate_lyrics/lib/ultimate_lyrics.rb +7 -0
  106. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec.rb +20 -0
  107. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.source.html +8 -0
  108. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.target.yaml +3 -0
  109. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.url +1 -0
  110. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.source.html +8 -0
  111. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.target.yaml +3 -0
  112. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.url +1 -0
  113. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.source.html +193 -0
  114. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.target.yaml +3 -0
  115. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.url +1 -0
  116. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.source.html +193 -0
  117. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.target.yaml +3 -0
  118. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.url +1 -0
  119. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.source.html +87 -0
  120. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.target.yaml +36 -0
  121. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.url +1 -0
  122. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.source.html +4 -0
  123. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.target.yaml +5 -0
  124. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.url +1 -0
  125. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.source.html +2 -0
  126. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.target.yaml +3 -0
  127. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.url +1 -0
  128. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.source.html +2 -0
  129. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.target.yaml +3 -0
  130. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.url +1 -0
  131. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.source.html +101 -0
  132. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.target.yaml +3 -0
  133. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.url +1 -0
  134. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.source.html +29 -0
  135. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.target.yaml +3 -0
  136. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.url +1 -0
  137. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.source.html +29 -0
  138. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.target.yaml +3 -0
  139. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.url +1 -0
  140. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.source.html +1298 -0
  141. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.target.yaml +3 -0
  142. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.url +1 -0
  143. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/provider_search_spec.rb +72 -0
  144. data/vendor/ultimate_lyrics/spec/rubocop_spec.rb +3 -0
  145. data/vendor/ultimate_lyrics/spec/spec_helper.rb +4 -0
  146. data/vendor/ultimate_lyrics/ultimate_lyrics.gemspec +21 -0
  147. metadata +168 -11
  148. data/vendor/aranha-parsers/lib/aranha/parsers/rspec/setup_include.rb +0 -17
  149. data/vendor/eac_docker/lib/eac_docker/rspec/setup_include.rb +0 -23
  150. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb +0 -35
  151. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/stubbed_ssh.rb +0 -44
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbfa70bd079e79c23dd182fca2f0183300fbd9dc14353b36fce775212a00dd22
4
- data.tar.gz: 951a03991227e106898cfe9b3fced882c5e5c02232d74d10431a3fb69180e807
3
+ metadata.gz: e2fcd84889771b212325a7f4315bb2e03a9584ffd36dfa13184efa56fe0294c7
4
+ data.tar.gz: e4fba78ac97dfd0628bb7f1f4efc0c8fc2f46b6b598b74cb50c71bf5e3785156
5
5
  SHA512:
6
- metadata.gz: c3aa2218cbbfe65e71c9de03b9d8413475c2292013de2820d9e10fbd020df45d78c1f5a1408cbd6deb5bbb9bf8e5553891579ce36657bfbff2c4cb4225878562
7
- data.tar.gz: 70b9939f9efcd0637e6ba3b8bc5049466a37ce9d03f455f25716876c1e7b59ff38823e394a524fb6399e47d6d1bf3761b8ebdb8e971978ba7503d0999abe049f
6
+ metadata.gz: b28bbf0f2abcf8cf7c4ff92f27b96a0f9d3761316cfa5796750606cc3249f00df80187410156b93caae02a649945b7bc2bc87afe656521b5fb6394828a566ee8
7
+ data.tar.gz: f6e325bb6fd61d6ee7eca4cae4de5c0a057b2c1954df5e693cb28143be82c411804771071dcffdbee482ac6aee53412889fbb6eeab4bb21d45c8074abb49d6d6
data/.avm.yml ADDED
@@ -0,0 +1,4 @@
1
+ ---
2
+ locale: pt-BR
3
+ test:
4
+ bundle_command: exec ehbrs self test
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec/spec_helper --color --format doc --default-path . --pattern 'spec/**/*_spec.rb'
data/.rubocop.yml ADDED
@@ -0,0 +1,39 @@
1
+ require:
2
+ - rubocop-rails
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ Exclude:
7
+ - vendor/**/*
8
+
9
+ Layout/LineLength:
10
+ Max: 100
11
+
12
+ Metrics/BlockLength:
13
+ Exclude:
14
+ - spec/**/*_spec.rb
15
+
16
+ Rails/Output:
17
+ Enabled: false
18
+
19
+ Rails/TimeZone:
20
+ Enabled: false
21
+
22
+ RSpec/NestedGroups:
23
+ Exclude:
24
+ - spec/**/*_spec.rb
25
+
26
+ Style/AsciiComments:
27
+ Enabled: false
28
+
29
+ Style/Documentation:
30
+ Enabled: false
31
+
32
+ Style/HashEachMethods:
33
+ Enabled: true
34
+
35
+ Style/HashTransformKeys:
36
+ Enabled: true
37
+
38
+ Style/HashTransformValues:
39
+ Enabled: true
data/Gemfile.lock ADDED
@@ -0,0 +1,286 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ehbrs-tools (0.27.0)
5
+ avm-tools (~> 0.82, >= 0.82.1)
6
+ eac_cli (~> 0.12, >= 0.12.5)
7
+ eac_ruby_utils (~> 0.71)
8
+ ehbrs_ruby_utils (~> 0.8, >= 0.8.1)
9
+ filesize
10
+ inifile (~> 3.0)
11
+ os
12
+ telegram-bot-ruby
13
+
14
+ PATH
15
+ remote: vendor/aranha-parsers
16
+ specs:
17
+ aranha-parsers (0.8.5)
18
+ activesupport (>= 4.0.0)
19
+ addressable (~> 2.7)
20
+ curb (~> 0.9.10)
21
+ eac_ruby_utils (~> 0.74)
22
+ httpclient (~> 2.8, >= 2.8.3)
23
+ nokogiri (~> 1.12, >= 1.12.4)
24
+ ofx-parser (~> 1.1.0)
25
+
26
+ PATH
27
+ remote: vendor/aranha-selenium
28
+ specs:
29
+ aranha-selenium (0.2.2)
30
+ eac_ruby_utils (~> 0.70)
31
+ selenium-webdriver (~> 3.142, >= 3.142.3)
32
+
33
+ PATH
34
+ remote: vendor/eac_cli
35
+ specs:
36
+ eac_cli (0.23.0)
37
+ colorize (~> 0.8.1)
38
+ eac_config (~> 0.5, >= 0.5.1)
39
+ eac_ruby_utils (~> 0.70)
40
+
41
+ PATH
42
+ remote: vendor/eac_config
43
+ specs:
44
+ eac_config (0.5.1)
45
+ addressable
46
+ eac_ruby_utils (~> 0.70)
47
+
48
+ PATH
49
+ remote: vendor/eac_docker
50
+ specs:
51
+ eac_docker (0.4.1)
52
+ eac_ruby_utils (~> 0.74)
53
+ eac_templates (~> 0.1)
54
+
55
+ PATH
56
+ remote: vendor/eac_ruby_base0
57
+ specs:
58
+ eac_ruby_base0 (0.10.1)
59
+ eac_cli (~> 0.22, >= 0.22.2)
60
+ eac_ruby_gems_utils (~> 0.9.5, ~> 0.9)
61
+ eac_ruby_utils (~> 0.70)
62
+
63
+ PATH
64
+ remote: vendor/eac_ruby_utils
65
+ specs:
66
+ eac_ruby_utils (0.75.0)
67
+ activesupport (>= 4.0)
68
+ addressable (~> 2.6)
69
+ filesize
70
+ net-ssh (~> 4.2)
71
+
72
+ PATH
73
+ remote: vendor/ehbrs_ruby_utils
74
+ specs:
75
+ ehbrs_ruby_utils (0.11.0)
76
+ aranha-parsers (~> 0.8, >= 0.8.5)
77
+ avm (~> 0.3, >= 0.3.2)
78
+ eac_ruby_utils (~> 0.70)
79
+ eac_templates (~> 0.1, >= 0.1.1)
80
+ taglib-ruby (~> 1.1)
81
+ ultimate_lyrics (~> 0.1)
82
+
83
+ PATH
84
+ remote: vendor/ultimate_lyrics
85
+ specs:
86
+ ultimate_lyrics (0.1.1)
87
+ aranha-parsers (~> 0.8, >= 0.8.5)
88
+ eac_ruby_utils (~> 0.74)
89
+
90
+ GEM
91
+ remote: https://rubygems.org/
92
+ specs:
93
+ activesupport (6.1.4.1)
94
+ concurrent-ruby (~> 1.0, >= 1.0.2)
95
+ i18n (>= 1.6, < 2)
96
+ minitest (>= 5.1)
97
+ tzinfo (~> 2.0)
98
+ zeitwerk (~> 2.3)
99
+ addressable (2.8.0)
100
+ public_suffix (>= 2.0.2, < 5.0)
101
+ asciidoctor (2.0.16)
102
+ ast (2.4.2)
103
+ avm (0.3.2)
104
+ eac_docker (~> 0.3)
105
+ eac_git (~> 0.6)
106
+ eac_ruby_utils (~> 0.68)
107
+ eac_templates (~> 0.1, >= 0.1.1)
108
+ avm-apps (0.4.1)
109
+ eac_ruby_utils (~> 0.67)
110
+ avm-eac_asciidoctor_base0 (0.3.1)
111
+ asciidoctor (~> 2.0, >= 2.0.12)
112
+ avm-eac_webapp_base0 (~> 0.1)
113
+ eac_ruby_utils (~> 0.63)
114
+ os
115
+ rouge (~> 3.26)
116
+ avm-eac_webapp_base0 (0.1.1)
117
+ avm (~> 0.1)
118
+ eac_ruby_utils (~> 0.68)
119
+ avm-tools (0.105.0)
120
+ aranha-parsers (~> 0.4)
121
+ asciidoctor (~> 2.0, >= 2.0.12)
122
+ avm (~> 0.1)
123
+ avm-apps (~> 0.2)
124
+ avm-eac_asciidoctor_base0
125
+ clipboard (~> 1.3, >= 1.3.3)
126
+ content-type (~> 0.0.1)
127
+ curb (~> 0.9.10)
128
+ eac_docker (~> 0.2)
129
+ eac_git (~> 0.2)
130
+ eac_ruby_base0 (~> 0.7, >= 0.7.2)
131
+ eac_ruby_gems_utils (~> 0.6, >= 0.6.1)
132
+ eac_templates (~> 0.1)
133
+ filesize
134
+ git (~> 1.7)
135
+ htmlbeautifier (~> 1.3, >= 1.3.1)
136
+ minitar
137
+ os
138
+ ruby-progressbar (~> 1.10, >= 1.10.1)
139
+ axiom-types (0.1.1)
140
+ descendants_tracker (~> 0.0.4)
141
+ ice_nine (~> 0.11.0)
142
+ thread_safe (~> 0.3, >= 0.3.1)
143
+ childprocess (3.0.0)
144
+ clipboard (1.3.6)
145
+ coercible (1.0.0)
146
+ descendants_tracker (~> 0.0.1)
147
+ colorize (0.8.1)
148
+ concurrent-ruby (1.1.9)
149
+ content-type (0.0.1)
150
+ parslet (~> 1.5)
151
+ curb (0.9.11)
152
+ descendants_tracker (0.0.4)
153
+ thread_safe (~> 0.3, >= 0.3.1)
154
+ diff-lcs (1.4.4)
155
+ dry-inflector (0.2.1)
156
+ eac_git (0.7.3)
157
+ eac_ruby_utils (~> 0.74)
158
+ parseconfig (~> 1.0, >= 1.0.8)
159
+ eac_ruby_gem_support (0.4.0)
160
+ eac_ruby_utils (~> 0.74)
161
+ rspec (~> 3.9)
162
+ rubocop (~> 0.80.1)
163
+ rubocop-rails (~> 2.4.2)
164
+ rubocop-rspec (~> 1.38.1)
165
+ eac_ruby_gems_utils (0.9.5)
166
+ bundler (~> 2.2, >= 2.2.17)
167
+ eac_ruby_utils (~> 0.70)
168
+ eac_templates (0.1.2)
169
+ eac_config (~> 0.5)
170
+ eac_ruby_utils (~> 0.64)
171
+ faraday (1.8.0)
172
+ faraday-em_http (~> 1.0)
173
+ faraday-em_synchrony (~> 1.0)
174
+ faraday-excon (~> 1.1)
175
+ faraday-httpclient (~> 1.0.1)
176
+ faraday-net_http (~> 1.0)
177
+ faraday-net_http_persistent (~> 1.1)
178
+ faraday-patron (~> 1.0)
179
+ faraday-rack (~> 1.0)
180
+ multipart-post (>= 1.2, < 3)
181
+ ruby2_keywords (>= 0.0.4)
182
+ faraday-em_http (1.0.0)
183
+ faraday-em_synchrony (1.0.0)
184
+ faraday-excon (1.1.0)
185
+ faraday-httpclient (1.0.1)
186
+ faraday-net_http (1.0.1)
187
+ faraday-net_http_persistent (1.2.0)
188
+ faraday-patron (1.0.0)
189
+ faraday-rack (1.0.0)
190
+ filesize (0.2.0)
191
+ git (1.9.1)
192
+ rchardet (~> 1.8)
193
+ hpricot (0.8.6)
194
+ htmlbeautifier (1.3.1)
195
+ httpclient (2.8.3)
196
+ i18n (1.8.10)
197
+ concurrent-ruby (~> 1.0)
198
+ ice_nine (0.11.2)
199
+ inifile (3.0.0)
200
+ jaro_winkler (1.5.4)
201
+ minitar (0.9)
202
+ minitest (5.14.4)
203
+ multipart-post (2.1.1)
204
+ net-ssh (4.2.0)
205
+ nokogiri (1.12.4-x86_64-linux)
206
+ racc (~> 1.4)
207
+ ofx-parser (1.1.0)
208
+ hpricot (>= 0.6)
209
+ os (1.1.1)
210
+ parallel (1.21.0)
211
+ parseconfig (1.1.0)
212
+ parser (3.0.2.0)
213
+ ast (~> 2.4.1)
214
+ parslet (1.8.2)
215
+ public_suffix (4.0.6)
216
+ racc (1.5.2)
217
+ rack (2.2.3)
218
+ rainbow (3.0.0)
219
+ rchardet (1.8.0)
220
+ rexml (3.2.5)
221
+ rouge (3.26.1)
222
+ rspec (3.10.0)
223
+ rspec-core (~> 3.10.0)
224
+ rspec-expectations (~> 3.10.0)
225
+ rspec-mocks (~> 3.10.0)
226
+ rspec-core (3.10.1)
227
+ rspec-support (~> 3.10.0)
228
+ rspec-expectations (3.10.1)
229
+ diff-lcs (>= 1.2.0, < 2.0)
230
+ rspec-support (~> 3.10.0)
231
+ rspec-mocks (3.10.2)
232
+ diff-lcs (>= 1.2.0, < 2.0)
233
+ rspec-support (~> 3.10.0)
234
+ rspec-support (3.10.2)
235
+ rubocop (0.80.1)
236
+ jaro_winkler (~> 1.5.1)
237
+ parallel (~> 1.10)
238
+ parser (>= 2.7.0.1)
239
+ rainbow (>= 2.2.2, < 4.0)
240
+ rexml
241
+ ruby-progressbar (~> 1.7)
242
+ unicode-display_width (>= 1.4.0, < 1.7)
243
+ rubocop-rails (2.4.2)
244
+ rack (>= 1.1)
245
+ rubocop (>= 0.72.0)
246
+ rubocop-rspec (1.38.1)
247
+ rubocop (>= 0.68.1)
248
+ ruby-progressbar (1.11.0)
249
+ ruby2_keywords (0.0.5)
250
+ rubyzip (2.3.2)
251
+ selenium-webdriver (3.142.7)
252
+ childprocess (>= 0.5, < 4.0)
253
+ rubyzip (>= 1.2.2)
254
+ taglib-ruby (1.1.0)
255
+ telegram-bot-ruby (0.16.0)
256
+ dry-inflector
257
+ faraday
258
+ virtus (~> 2.0)
259
+ thread_safe (0.3.6)
260
+ tzinfo (2.0.4)
261
+ concurrent-ruby (~> 1.0)
262
+ unicode-display_width (1.6.1)
263
+ virtus (2.0.0)
264
+ axiom-types (~> 0.1)
265
+ coercible (~> 1.0)
266
+ descendants_tracker (~> 0.0, >= 0.0.3)
267
+ zeitwerk (2.4.2)
268
+
269
+ PLATFORMS
270
+ x86_64-linux
271
+
272
+ DEPENDENCIES
273
+ aranha-parsers!
274
+ aranha-selenium!
275
+ eac_cli!
276
+ eac_config!
277
+ eac_docker!
278
+ eac_ruby_base0!
279
+ eac_ruby_gem_support (~> 0.3)
280
+ eac_ruby_utils!
281
+ ehbrs-tools!
282
+ ehbrs_ruby_utils!
283
+ ultimate_lyrics!
284
+
285
+ BUNDLED WITH
286
+ 2.2.25
File without changes
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'ehbrs/core_ext'
3
+ require 'ehbrs/tools/core_ext'
4
4
  require 'ehbrs_ruby_utils/finances/bb_browser/docker_image'
5
5
 
6
6
  module Ehbrs
@@ -1,24 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/envs'
4
- require 'eac_ruby_utils/fs/clearable_directory'
5
- require 'ehbrs/core_ext'
4
+
5
+ require 'ehbrs/tools/core_ext'
6
+ require 'ehbrs_ruby_utils/fs/selected'
6
7
 
7
8
  module Ehbrs
8
9
  module Tools
9
10
  class Runner
10
11
  class Fs
11
12
  class Selected
12
- DEFAULT_TRAVERSER_RECURSIVE = true
13
-
14
13
  enable_jobs_runner
15
- runner_with :confirmation, :help, :filesystem_traverser do
14
+ runner_with :confirmation, :help do
16
15
  desc 'Seleciona diretórios.'
17
16
  arg_opt '-b', '--build-dir', 'Constrói diretório alvo.'
17
+ arg_opt '-f', '--filename', 'Nome do arquivo que anota o diretório como selecionado.',
18
+ default: ::EhbrsRubyUtils::Fs::Selected::DEFAULT_FILENAME
19
+
20
+ pos_arg :root_path
18
21
  end
19
22
 
20
23
  def run
21
- infov 'Recursive', traverser_recursive
24
+ infov 'Root path', selected.root_path
25
+ infov 'Filename', selected.filename
26
+ infov 'Build directory', build_dir.if_present('-')
22
27
  run_jobs :show, :build
23
28
  end
24
29
 
@@ -33,24 +38,18 @@ module Ehbrs
33
38
  end
34
39
 
35
40
  def directory_target_basename(directory)
36
- directory.basename.to_path
41
+ ::EhbrsRubyUtils::Fs::Selected::Build::DEFAULT_TARGET_BASENAME_PROC.call(directory)
37
42
  end
38
43
 
39
44
  private
40
45
 
41
46
  def build
42
47
  infom "Building directory \"#{build_dir}\" with selected..."
43
- build_dir.clear
44
- selected_directories.each do |directory|
45
- ::EacRubyUtils::Envs.local.command(
46
- 'ln', '-s', directory.to_path,
47
- build_dir.join(directory_target_basename(directory))
48
- ).system!
49
- end
48
+ selected.build(build_dir, &method(:directory_target_basename)).perform
50
49
  end
51
50
 
52
51
  def build_dir_uncached
53
- parsed.build_dir.if_present { |v| ::EacRubyUtils::Fs::ClearableDirectory.new(v) }
52
+ parsed.build_dir.if_present(&:to_pathname)
54
53
  end
55
54
 
56
55
  def run_build?
@@ -59,9 +58,11 @@ module Ehbrs
59
58
 
60
59
  def selected_directories_uncached
61
60
  infom 'Searching selected directories...'
62
- @selected = []
63
- run_filesystem_traverser
64
- @selected.sort
61
+ selected.found.map { |path| build_selected_directory(path) }
62
+ end
63
+
64
+ def selected_uncached
65
+ ::EhbrsRubyUtils::Fs::Selected.new(parsed.root_path, filename: parsed.filename)
65
66
  end
66
67
 
67
68
  def show
@@ -70,10 +71,6 @@ module Ehbrs
70
71
  puts directory_label(directory)
71
72
  end
72
73
  end
73
-
74
- def traverser_check_directory(path)
75
- @selected << build_selected_directory(path) if path.join('.selected').exist?
76
- end
77
74
  end
78
75
  end
79
76
  end
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/fs_cache'
4
+ require 'ehbrs/tools/core_ext'
5
+ require 'ehbrs_ruby_utils/videos/container'
6
+ require 'ultimate_lyrics/provider'
7
+
8
+ module Ehbrs
9
+ module Tools
10
+ class Runner
11
+ class Music
12
+ class Lyrics
13
+ DEFAULT_PROVIDER = 'lyrics.com'
14
+
15
+ runner_with :help, :output do
16
+ arg_opt '-p', '--provider', "Nome do provedor [Nome do #{DEFAULT_PROVIDER}]"
17
+ pos_arg :file
18
+ end
19
+
20
+ def run
21
+ start_banner
22
+ show_results
23
+ end
24
+
25
+ def show_results
26
+ if lyrics.found?
27
+ success 'Lyrics found'
28
+ run_output
29
+ else
30
+ fatal_error 'No lyric found'
31
+ end
32
+ end
33
+
34
+ def start_banner
35
+ infov 'File', file
36
+ %w[artist album track title].each do |attr|
37
+ infov attr.humanize, container.tag_file.tag.send(attr)
38
+ end
39
+ infov 'Selected provider', provider
40
+ end
41
+
42
+ def container_uncached
43
+ ::EhbrsRubyUtils::Videos::Container.from_file(file)
44
+ end
45
+
46
+ def file
47
+ parsed.file.to_pathname
48
+ end
49
+
50
+ def lyrics_uncached
51
+ container.lyrics_by_provider(provider)
52
+ end
53
+
54
+ def output_content
55
+ lyrics.text
56
+ end
57
+
58
+ def provider_uncached
59
+ ::UltimateLyrics::Provider.by_name(provider_name)
60
+ end
61
+
62
+ def provider_name
63
+ parsed.provider.if_present(DEFAULT_PROVIDER)
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_cli/core_ext'
3
+ require 'eac_ruby_base0/core_ext'
4
4
  require 'ehbrs_ruby_utils/web_utils/videos/file'
5
5
 
6
6
  module Ehbrs
@@ -9,33 +9,43 @@ module Ehbrs
9
9
  class WebUtils
10
10
  class Videos
11
11
  class Download
12
- runner_with :help do
12
+ runner_with :confirmation, :help do
13
13
  desc 'Importa informações de arquivos de vídeo de uma instância EHB/RS Utils.'
14
- bool_opt '-c', '--confirm', 'Confirma as mudanças'
14
+ bool_opt '-d', '--delete', 'Remove vídeos indesejados.'
15
+ arg_opt '-m', '--move', 'Move vídeos indesejados para o diretório indicado.'
15
16
  end
16
17
 
17
18
  def run
18
19
  start_banner
19
20
  to_rename.each { |file| process_rename_file(file) }
20
- to_delete.each { |file| process_delete_file(file) }
21
+ unwanted.each { |file| process_unwanted_file(file) }
21
22
  end
22
23
 
23
24
  private
24
25
 
26
+ def delete?
27
+ parsed.delete? && !move?
28
+ end
29
+
30
+ def move?
31
+ parsed.move.present?
32
+ end
33
+
25
34
  def start_banner
26
35
  infov 'Files downloaded', files.count
27
36
  infov 'To rename', to_rename.count
28
- infov 'To delete', to_delete.count
37
+ infov 'Unwanted', unwanted.count
29
38
  end
30
39
 
31
40
  def process_rename_file(file)
32
41
  infov " * #{file.new_path}", file.original_path
33
- file.rename if parsed.confirm?
42
+ file.rename if confirm?
34
43
  end
35
44
 
36
- def process_delete_file(file)
37
- infov " * #{file.new_path}", 'REMOVE'
38
- file.remove if parsed.confirm?
45
+ def process_unwanted_file(file)
46
+ infov " * #{file.new_path}", 'UNWANTED'
47
+ file.remove if delete? && confirm?
48
+ file.move(parsed.move) if move? && confirm?
39
49
  end
40
50
 
41
51
  def files_uncached
@@ -46,7 +56,7 @@ module Ehbrs
46
56
  files.select(&:path_changed?)
47
57
  end
48
58
 
49
- def to_delete_uncached
59
+ def unwanted_uncached
50
60
  files.reject { |f| f.type == 'Videos::SeriesDirectory' }.select(&:unwanted)
51
61
  end
52
62
 
@@ -32,7 +32,7 @@ module Ehbrs
32
32
  '/videos/files/import',
33
33
  method: :put,
34
34
  body: {
35
- 'videos_tableless_local_import_list[list_file]' => ::File.new(files_list_path)
35
+ 'videos_local_files_import_list[list_file]' => ::File.new(files_list_path)
36
36
  },
37
37
  header: {
38
38
  'Accept' => 'application/json'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ehbrs
4
4
  module Tools
5
- VERSION = '0.24.0'
5
+ VERSION = '0.27.0'
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'ehbrs/fs/compressed_package'
4
+ require 'ehbrs_ruby_utils/fs/compressed_package'
5
5
  require 'ehbrs/videos/extract/package_file'
6
6
 
7
7
  module Ehbrs
@@ -37,7 +37,7 @@ module Ehbrs
37
37
  raise "Extract directory \"#{r}\" is a file" if r.file?
38
38
 
39
39
  r.rmtree if r.directory?
40
- ::Ehbrs::Fs::CompressedPackage.new(path).extract_to(r)
40
+ ::EhbrsRubyUtils::Fs::CompressedPackage.new(path).extract_to(r)
41
41
  r
42
42
  end
43
43
 
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'ehbrs/fs/compressed_package'
5
4
 
6
5
  module Ehbrs
7
6
  module Videos
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ehbrs/cooking_book/recipe/measure'
4
+
5
+ RSpec.describe ::Ehbrs::CookingBook::Recipe::Measure do
6
+ describe '#build'
7
+ {
8
+ '1.5 cup' => [1.5, nil, 'cup'],
9
+ '~' => [nil, nil, nil],
10
+ '2/ 3 u' => [2, 3, 'u'],
11
+ '4.5/7.8' => [4.5, 7.8, nil]
12
+ }.each do |source, expected|
13
+ context "when source is \"#{source}\"" do
14
+ let(:instance) { described_class.build(source) }
15
+
16
+ it { expect(instance.numerator).to eq(expected[0]) }
17
+ it { expect(instance.denominator).to eq(expected[1]) }
18
+ it { expect(instance.unit).to eq(expected[2]) }
19
+ end
20
+ end
21
+ end