ehbrs-tools 0.25.0 → 0.28.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) 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 +307 -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 -26
  9. data/lib/ehbrs/tools/runner/music/lyrics.rb +68 -0
  10. data/lib/ehbrs/tools/runner/music/lyrics_book.rb +41 -0
  11. data/lib/ehbrs/tools/runner/music/selected.rb +6 -6
  12. data/lib/ehbrs/tools/runner/web_utils/videos/upload.rb +1 -1
  13. data/lib/ehbrs/tools/version.rb +1 -1
  14. data/lib/ehbrs/user_dirs.rb +2 -2
  15. data/lib/ehbrs/videos/extract/package.rb +2 -2
  16. data/lib/ehbrs/videos/extract/package_file.rb +0 -1
  17. data/spec/code/rubocop_spec.rb +3 -0
  18. data/spec/lib/ehbrs/cooking_book/recipe/measure_spec.rb +21 -0
  19. data/spec/lib/ehbrs/observers/base_spec.rb +93 -0
  20. data/spec/lib/ehbrs/tools/runner/fs/used_space_spec.rb +62 -0
  21. data/spec/lib/ehbrs/tools/runner/vg/ips_spec.rb +31 -0
  22. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/expected.rom +0 -0
  23. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_0.ips +0 -0
  24. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/patch_1.ips +0 -0
  25. data/spec/lib/ehbrs/tools/runner/vg/ips_spec_files/source.rom +0 -0
  26. data/spec/lib/ehbrs/tools/runner/videos/probe_spec.rb +19 -0
  27. data/spec/lib/ehbrs/tools/runner/videos/probe_spec_files/fixed.target.yaml +105 -0
  28. data/spec/lib/ehbrs/tools/runner/videos/unsupported_spec.rb +75 -0
  29. data/spec/lib/ehbrs/tools/runner/videos/unsupported_spec_files/dts_audio.probe.yaml +90 -0
  30. data/spec/lib/ehbrs/tools/runner_spec.rb +16 -0
  31. data/spec/lib/ehbrs/vg/wii/game_file_spec.rb +21 -0
  32. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec.rb +11 -0
  33. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.source.witdump +27 -0
  34. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_R92P01_wia.target.yaml +22 -0
  35. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.source.witdump +28 -0
  36. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/pikmin2_pal_iso.target.yaml +21 -0
  37. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.source.witdump +16 -0
  38. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/resident_evil_code_veronica_disc2_iso.target.yaml +19 -0
  39. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.source.witdump +28 -0
  40. data/spec/lib/ehbrs/vg/wii/wit/parsers/dump_spec_files/super_mario_galaxy_wbfs.target.yaml +23 -0
  41. data/spec/lib/ehbrs/vg/wii/wit/path_spec.rb +33 -0
  42. data/spec/spec_helper/videos.rb +30 -0
  43. data/spec/spec_helper/videos_files/stub_source.mp4 +0 -0
  44. data/spec/spec_helper.rb +7 -0
  45. data/vendor/aranha-parsers/aranha-parsers.gemspec +1 -0
  46. data/vendor/aranha-parsers/lib/aranha/parsers/rspec/setup.rb +1 -1
  47. data/vendor/aranha-parsers/lib/aranha/parsers/rspec/{source_target_fixtures_example.rb → shared_examples/source_target_fixtures.rb} +0 -0
  48. data/vendor/aranha-parsers/lib/aranha/parsers/source_address/fetch_content_error.rb +10 -0
  49. data/vendor/aranha-parsers/lib/aranha/parsers/source_address/http_get.rb +15 -2
  50. data/vendor/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
  51. data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +1 -1
  52. data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +9 -1
  53. data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +6 -0
  54. data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder.rb +3 -3
  55. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  56. data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +6 -5
  57. data/vendor/eac_fs/Gemfile +5 -0
  58. data/vendor/eac_fs/eac_fs.gemspec +20 -0
  59. data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/filesystem_cache.rb → eac_fs/lib/eac_fs/cache.rb} +7 -2
  60. data/vendor/eac_fs/lib/eac_fs/file_info.rb +24 -0
  61. data/vendor/eac_fs/lib/eac_fs/patches/module/fs_cache.rb +10 -0
  62. data/vendor/eac_fs/lib/eac_fs/patches/module.rb +4 -0
  63. data/vendor/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +10 -0
  64. data/vendor/eac_fs/lib/eac_fs/patches/object.rb +4 -0
  65. data/vendor/eac_fs/lib/eac_fs/patches/pathname/info.rb +12 -0
  66. data/vendor/eac_fs/lib/eac_fs/patches/pathname.rb +4 -0
  67. data/vendor/eac_fs/lib/eac_fs/patches.rb +4 -0
  68. data/vendor/eac_fs/lib/eac_fs/version.rb +5 -0
  69. data/vendor/eac_fs/lib/eac_fs.rb +7 -0
  70. data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils/filesystem_cache_spec.rb → eac_fs/spec/lib/eac_fs/cache_spec.rb} +2 -2
  71. data/vendor/eac_fs/spec/rubocop_spec.rb +3 -0
  72. data/vendor/eac_fs/spec/spec_helper.rb +4 -0
  73. data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +2 -1
  74. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +3 -3
  75. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +1 -0
  76. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +16 -7
  77. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  78. data/vendor/eac_ruby_gems_utils/Gemfile +5 -0
  79. data/vendor/eac_ruby_gems_utils/LICENCE +16 -0
  80. data/vendor/eac_ruby_gems_utils/README.rdoc +3 -0
  81. data/vendor/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +30 -0
  82. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb +33 -0
  83. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/version_file.rb +41 -0
  84. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem.rb +97 -0
  85. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb +58 -0
  86. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/minitest.rb +25 -0
  87. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/decorated_gem.rb +48 -0
  88. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/result.rb +25 -0
  89. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple.rb +84 -0
  90. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/rspec.rb +21 -0
  91. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests.rb +9 -0
  92. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +5 -0
  93. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils.rb +7 -0
  94. data/vendor/eac_ruby_gems_utils/spec/code/rubocop_check_spec.rb +3 -0
  95. data/vendor/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec.rb +14 -0
  96. data/vendor/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec_files/a_version_file.rb +7 -0
  97. data/vendor/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem_spec.rb +20 -0
  98. data/vendor/eac_ruby_gems_utils/spec/spec_helper.rb +4 -0
  99. data/vendor/eac_ruby_gems_utils/spec/support/mygem/Gemfile +5 -0
  100. data/vendor/eac_ruby_gems_utils/spec/support/mygem/Gemfile.lock +19 -0
  101. data/vendor/eac_ruby_gems_utils/spec/support/mygem/Rakefile +14 -0
  102. data/vendor/eac_ruby_gems_utils/spec/support/mygem/exe/myrunner +5 -0
  103. data/vendor/eac_ruby_gems_utils/spec/support/mygem/lib/mygem/version.rb +5 -0
  104. data/vendor/eac_ruby_gems_utils/spec/support/mygem/lib/mygem.rb +5 -0
  105. data/vendor/eac_ruby_gems_utils/spec/support/mygem/mygem.gemspec +16 -0
  106. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
  107. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
  108. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
  109. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
  110. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  111. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
  112. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
  113. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
  114. data/vendor/eac_templates/Gemfile +5 -0
  115. data/vendor/eac_templates/eac_templates.gemspec +19 -0
  116. data/vendor/eac_templates/lib/eac_templates/directory.rb +108 -0
  117. data/vendor/eac_templates/lib/eac_templates/file.rb +48 -0
  118. data/vendor/eac_templates/lib/eac_templates/patches/module/erb_template.rb +9 -0
  119. data/vendor/eac_templates/lib/eac_templates/patches/module/template.rb +10 -0
  120. data/vendor/eac_templates/lib/eac_templates/patches/module.rb +4 -0
  121. data/vendor/eac_templates/lib/eac_templates/patches/object/erb_template.rb +9 -0
  122. data/vendor/eac_templates/lib/eac_templates/patches/object/template.rb +9 -0
  123. data/vendor/eac_templates/lib/eac_templates/patches/object.rb +4 -0
  124. data/vendor/eac_templates/lib/eac_templates/patches.rb +4 -0
  125. data/vendor/eac_templates/lib/eac_templates/searcher.rb +53 -0
  126. data/vendor/eac_templates/lib/eac_templates/variable_not_found_error.rb +5 -0
  127. data/vendor/eac_templates/lib/eac_templates/variable_providers/base.rb +21 -0
  128. data/vendor/eac_templates/lib/eac_templates/variable_providers/config_reader.rb +27 -0
  129. data/vendor/eac_templates/lib/eac_templates/variable_providers/entries_reader.rb +23 -0
  130. data/vendor/eac_templates/lib/eac_templates/variable_providers/generic.rb +23 -0
  131. data/vendor/eac_templates/lib/eac_templates/variable_providers/hash.rb +27 -0
  132. data/vendor/eac_templates/lib/eac_templates/variable_providers.rb +23 -0
  133. data/vendor/eac_templates/lib/eac_templates/version.rb +5 -0
  134. data/vendor/eac_templates/lib/eac_templates.rb +7 -0
  135. data/vendor/eac_templates/spec/lib/eac_templates/file_spec.rb +35 -0
  136. data/vendor/eac_templates/spec/lib/eac_templates/file_spec_files/expected_content +2 -0
  137. data/vendor/eac_templates/spec/lib/eac_templates/file_spec_files/source.template +2 -0
  138. data/vendor/eac_templates/spec/lib/eac_templates/searcher_spec.rb +30 -0
  139. data/vendor/eac_templates/spec/lib/eac_templates/searcher_spec_files/path1/subdir1/file1.template +1 -0
  140. data/vendor/eac_templates/spec/lib/eac_templates/searcher_spec_files/path1/subdir1/file2 +1 -0
  141. data/vendor/eac_templates/spec/lib/eac_templates/searcher_spec_files/path2/subdir1/file3.template +1 -0
  142. data/vendor/eac_templates/spec/lib/object/template_spec.rb +23 -0
  143. data/vendor/eac_templates/spec/lib/object/template_spec_files/path/my_stub_with_template +1 -0
  144. data/vendor/eac_templates/spec/rubocop_spec.rb +3 -0
  145. data/vendor/eac_templates/spec/spec_helper.rb +4 -0
  146. data/vendor/ehbrs_ruby_utils/ehbrs_ruby_utils.gemspec +6 -1
  147. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/core_ext.rb +5 -0
  148. data/{lib/ehbrs → vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils}/fs/compressed_package.rb +1 -1
  149. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs/selected/build.rb +41 -0
  150. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs/selected/build_file.rb +27 -0
  151. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs/selected.rb +35 -0
  152. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs.rb +10 -0
  153. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music/lyrics_book/album.rb +42 -0
  154. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music/lyrics_book/resource.rb +64 -0
  155. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music/lyrics_book/song.rb +68 -0
  156. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music/lyrics_book.rb +65 -0
  157. data/{lib/ehbrs/fs.rb → vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music.rb} +2 -2
  158. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/patches/object.rb +4 -0
  159. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/patches.rb +4 -0
  160. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/version.rb +1 -1
  161. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container.rb +31 -0
  162. data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/stream.rb +1 -1
  163. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/album/inner.html.erb +3 -0
  164. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/custom_style.css +11 -0
  165. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/index.html.erb +14 -0
  166. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/main.html.erb +24 -0
  167. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/resource/main.html.erb +8 -0
  168. data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/song/inner.html.erb +5 -0
  169. data/vendor/ultimate_lyrics/Gemfile +5 -0
  170. data/vendor/ultimate_lyrics/bin/download_parser_spec_files.rb +94 -0
  171. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/field.rb +83 -0
  172. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/lyrics.rb +13 -0
  173. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/parser.rb +28 -0
  174. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/exclude_item.rb +17 -0
  175. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/extract_item.rb +21 -0
  176. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/item.rb +48 -0
  177. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/replace_fields.rb +13 -0
  178. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/rule.rb +52 -0
  179. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/url_format.rb +21 -0
  180. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider.rb +96 -0
  181. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider_search.rb +43 -0
  182. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/providers_data.xml +356 -0
  183. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/song_metadata/field.rb +24 -0
  184. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/song_metadata.rb +28 -0
  185. data/vendor/ultimate_lyrics/lib/ultimate_lyrics/version.rb +5 -0
  186. data/vendor/ultimate_lyrics/lib/ultimate_lyrics.rb +7 -0
  187. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec.rb +20 -0
  188. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.source.html +8 -0
  189. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.target.yaml +3 -0
  190. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.url +1 -0
  191. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.source.html +8 -0
  192. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.target.yaml +3 -0
  193. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.url +1 -0
  194. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.source.html +193 -0
  195. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.target.yaml +3 -0
  196. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.url +1 -0
  197. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.source.html +193 -0
  198. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.target.yaml +3 -0
  199. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.url +1 -0
  200. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.source.html +87 -0
  201. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.target.yaml +36 -0
  202. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.url +1 -0
  203. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.source.html +4 -0
  204. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.target.yaml +3 -0
  205. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.url +1 -0
  206. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.source.html +2 -0
  207. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.target.yaml +3 -0
  208. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.url +1 -0
  209. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.source.html +2 -0
  210. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.target.yaml +3 -0
  211. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.url +1 -0
  212. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.source.html +101 -0
  213. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.target.yaml +3 -0
  214. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.url +1 -0
  215. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.source.html +29 -0
  216. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.target.yaml +3 -0
  217. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.url +1 -0
  218. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.source.html +29 -0
  219. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.target.yaml +3 -0
  220. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.url +1 -0
  221. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.source.html +1301 -0
  222. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.target.yaml +3 -0
  223. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.url +1 -0
  224. data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/provider_search_spec.rb +72 -0
  225. data/vendor/ultimate_lyrics/spec/rubocop_spec.rb +3 -0
  226. data/vendor/ultimate_lyrics/spec/spec_helper.rb +4 -0
  227. data/vendor/ultimate_lyrics/ultimate_lyrics.gemspec +21 -0
  228. metadata +251 -12
  229. data/lib/ehbrs/patches/module/erb_template.rb +0 -11
  230. data/lib/ehbrs/patches/object/erb_template.rb +0 -9
  231. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs_cache.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ca2d4a8d232e8161141dd7e815e3eb1efc9a830816f638a597916874af3f651
4
- data.tar.gz: dc4e6dbaa6b95d33d14d7b96c0c97a170bf1793f2a342cee349c07c85b007c9c
3
+ metadata.gz: d120fac3799ba8b11dea2134287103606747746071469112c2fd8b78232666c4
4
+ data.tar.gz: bd700b8bfef75819deffd9e0894cb1956517f417643e975915764a77dff5423e
5
5
  SHA512:
6
- metadata.gz: e7f68b4e30e166f7d34c1558e40f9eef3c9aee1e58b5b82bd9b27a422ee2fa591cb62315495c710c50f7ec120876a036a87107cb025fe65631339bb3b1bb6abb
7
- data.tar.gz: 8adff386213db3055d097f5e48b363f9d17a99278dc6f09aa10950d49e35fe36278affef93e37916cf5323c2bc6253411b3c3398d1e4f05184756b3269285cb6
6
+ metadata.gz: ee15c9a092934a7ee3d760f327919efa619da486bf615fc67c0c46fe02b49968b5523206303851694b6c4a4089c154818225e5bcc5d3eebc1ca78a22726aa6ac
7
+ data.tar.gz: 94c0648afebd291856a80a2f2214ba5ccab7e2d5a979373f0a72104f2b60b5b5053d1b7086db17ee95f688a4ed818799b6b6192116f3576c1cb31c99a1e03663
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,307 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ehbrs-tools (0.28.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_fs
57
+ specs:
58
+ eac_fs (0.3.0)
59
+ content-type
60
+ eac_ruby_utils (~> 0.70)
61
+ ruby-filemagic
62
+
63
+ PATH
64
+ remote: vendor/eac_ruby_base0
65
+ specs:
66
+ eac_ruby_base0 (0.11.0)
67
+ eac_cli (~> 0.22, >= 0.22.2)
68
+ eac_fs (~> 0.3)
69
+ eac_ruby_gems_utils (~> 0.9.6, ~> 0.9)
70
+ eac_ruby_utils (~> 0.70)
71
+
72
+ PATH
73
+ remote: vendor/eac_ruby_gems_utils
74
+ specs:
75
+ eac_ruby_gems_utils (0.9.6)
76
+ bundler (~> 2.2, >= 2.2.17)
77
+ eac_ruby_utils (~> 0.70)
78
+
79
+ PATH
80
+ remote: vendor/eac_ruby_utils
81
+ specs:
82
+ eac_ruby_utils (0.76.0)
83
+ activesupport (>= 4.0)
84
+ addressable (~> 2.6)
85
+ filesize
86
+ net-ssh (~> 4.2)
87
+
88
+ PATH
89
+ remote: vendor/eac_templates
90
+ specs:
91
+ eac_templates (0.2.0)
92
+ eac_config (~> 0.5)
93
+ eac_ruby_utils (~> 0.64)
94
+
95
+ PATH
96
+ remote: vendor/ehbrs_ruby_utils
97
+ specs:
98
+ ehbrs_ruby_utils (0.12.0)
99
+ aranha-parsers (~> 0.8, >= 0.8.5)
100
+ avm (~> 0.3, >= 0.3.2)
101
+ eac_ruby_utils (~> 0.70)
102
+ eac_templates (~> 0.1, >= 0.1.1)
103
+ taglib-ruby (~> 1.1)
104
+ ultimate_lyrics (~> 0.1)
105
+
106
+ PATH
107
+ remote: vendor/ultimate_lyrics
108
+ specs:
109
+ ultimate_lyrics (0.1.2)
110
+ aranha-parsers (~> 0.8, >= 0.8.5)
111
+ eac_ruby_utils (~> 0.74)
112
+
113
+ GEM
114
+ remote: https://rubygems.org/
115
+ specs:
116
+ activesupport (6.1.4.1)
117
+ concurrent-ruby (~> 1.0, >= 1.0.2)
118
+ i18n (>= 1.6, < 2)
119
+ minitest (>= 5.1)
120
+ tzinfo (~> 2.0)
121
+ zeitwerk (~> 2.3)
122
+ addressable (2.8.0)
123
+ public_suffix (>= 2.0.2, < 5.0)
124
+ asciidoctor (2.0.16)
125
+ ast (2.4.2)
126
+ avm (0.3.2)
127
+ eac_docker (~> 0.3)
128
+ eac_git (~> 0.6)
129
+ eac_ruby_utils (~> 0.68)
130
+ eac_templates (~> 0.1, >= 0.1.1)
131
+ avm-apps (0.4.1)
132
+ eac_ruby_utils (~> 0.67)
133
+ avm-eac_asciidoctor_base0 (0.3.1)
134
+ asciidoctor (~> 2.0, >= 2.0.12)
135
+ avm-eac_webapp_base0 (~> 0.1)
136
+ eac_ruby_utils (~> 0.63)
137
+ os
138
+ rouge (~> 3.26)
139
+ avm-eac_webapp_base0 (0.1.1)
140
+ avm (~> 0.1)
141
+ eac_ruby_utils (~> 0.68)
142
+ avm-tools (0.106.0)
143
+ aranha-parsers (~> 0.4)
144
+ asciidoctor (~> 2.0, >= 2.0.12)
145
+ avm (~> 0.1)
146
+ avm-apps (~> 0.2)
147
+ avm-eac_asciidoctor_base0
148
+ clipboard (~> 1.3, >= 1.3.3)
149
+ content-type (~> 0.0.1)
150
+ curb (~> 0.9.10)
151
+ eac_docker (~> 0.2)
152
+ eac_git (~> 0.2)
153
+ eac_ruby_base0 (~> 0.7, >= 0.7.2)
154
+ eac_ruby_gems_utils (~> 0.6, >= 0.6.1)
155
+ eac_templates (~> 0.1)
156
+ filesize
157
+ git (~> 1.7)
158
+ htmlbeautifier (~> 1.3, >= 1.3.1)
159
+ minitar
160
+ os
161
+ ruby-progressbar (~> 1.10, >= 1.10.1)
162
+ axiom-types (0.1.1)
163
+ descendants_tracker (~> 0.0.4)
164
+ ice_nine (~> 0.11.0)
165
+ thread_safe (~> 0.3, >= 0.3.1)
166
+ childprocess (3.0.0)
167
+ clipboard (1.3.6)
168
+ coercible (1.0.0)
169
+ descendants_tracker (~> 0.0.1)
170
+ colorize (0.8.1)
171
+ concurrent-ruby (1.1.9)
172
+ content-type (0.0.1)
173
+ parslet (~> 1.5)
174
+ curb (0.9.11)
175
+ descendants_tracker (0.0.4)
176
+ thread_safe (~> 0.3, >= 0.3.1)
177
+ diff-lcs (1.4.4)
178
+ dry-inflector (0.2.1)
179
+ eac_git (0.7.3)
180
+ eac_ruby_utils (~> 0.74)
181
+ parseconfig (~> 1.0, >= 1.0.8)
182
+ eac_ruby_gem_support (0.4.0)
183
+ eac_ruby_utils (~> 0.74)
184
+ rspec (~> 3.9)
185
+ rubocop (~> 0.80.1)
186
+ rubocop-rails (~> 2.4.2)
187
+ rubocop-rspec (~> 1.38.1)
188
+ faraday (1.8.0)
189
+ faraday-em_http (~> 1.0)
190
+ faraday-em_synchrony (~> 1.0)
191
+ faraday-excon (~> 1.1)
192
+ faraday-httpclient (~> 1.0.1)
193
+ faraday-net_http (~> 1.0)
194
+ faraday-net_http_persistent (~> 1.1)
195
+ faraday-patron (~> 1.0)
196
+ faraday-rack (~> 1.0)
197
+ multipart-post (>= 1.2, < 3)
198
+ ruby2_keywords (>= 0.0.4)
199
+ faraday-em_http (1.0.0)
200
+ faraday-em_synchrony (1.0.0)
201
+ faraday-excon (1.1.0)
202
+ faraday-httpclient (1.0.1)
203
+ faraday-net_http (1.0.1)
204
+ faraday-net_http_persistent (1.2.0)
205
+ faraday-patron (1.0.0)
206
+ faraday-rack (1.0.0)
207
+ filesize (0.2.0)
208
+ git (1.9.1)
209
+ rchardet (~> 1.8)
210
+ hpricot (0.8.6)
211
+ htmlbeautifier (1.3.1)
212
+ httpclient (2.8.3)
213
+ i18n (1.8.10)
214
+ concurrent-ruby (~> 1.0)
215
+ ice_nine (0.11.2)
216
+ inifile (3.0.0)
217
+ jaro_winkler (1.5.4)
218
+ minitar (0.9)
219
+ minitest (5.14.4)
220
+ multipart-post (2.1.1)
221
+ net-ssh (4.2.0)
222
+ nokogiri (1.12.4-x86_64-linux)
223
+ racc (~> 1.4)
224
+ ofx-parser (1.1.0)
225
+ hpricot (>= 0.6)
226
+ os (1.1.1)
227
+ parallel (1.21.0)
228
+ parseconfig (1.1.0)
229
+ parser (3.0.2.0)
230
+ ast (~> 2.4.1)
231
+ parslet (1.8.2)
232
+ public_suffix (4.0.6)
233
+ racc (1.5.2)
234
+ rack (2.2.3)
235
+ rainbow (3.0.0)
236
+ rchardet (1.8.0)
237
+ rexml (3.2.5)
238
+ rouge (3.26.1)
239
+ rspec (3.10.0)
240
+ rspec-core (~> 3.10.0)
241
+ rspec-expectations (~> 3.10.0)
242
+ rspec-mocks (~> 3.10.0)
243
+ rspec-core (3.10.1)
244
+ rspec-support (~> 3.10.0)
245
+ rspec-expectations (3.10.1)
246
+ diff-lcs (>= 1.2.0, < 2.0)
247
+ rspec-support (~> 3.10.0)
248
+ rspec-mocks (3.10.2)
249
+ diff-lcs (>= 1.2.0, < 2.0)
250
+ rspec-support (~> 3.10.0)
251
+ rspec-support (3.10.2)
252
+ rubocop (0.80.1)
253
+ jaro_winkler (~> 1.5.1)
254
+ parallel (~> 1.10)
255
+ parser (>= 2.7.0.1)
256
+ rainbow (>= 2.2.2, < 4.0)
257
+ rexml
258
+ ruby-progressbar (~> 1.7)
259
+ unicode-display_width (>= 1.4.0, < 1.7)
260
+ rubocop-rails (2.4.2)
261
+ rack (>= 1.1)
262
+ rubocop (>= 0.72.0)
263
+ rubocop-rspec (1.38.1)
264
+ rubocop (>= 0.68.1)
265
+ ruby-filemagic (0.7.2)
266
+ ruby-progressbar (1.11.0)
267
+ ruby2_keywords (0.0.5)
268
+ rubyzip (2.3.2)
269
+ selenium-webdriver (3.142.7)
270
+ childprocess (>= 0.5, < 4.0)
271
+ rubyzip (>= 1.2.2)
272
+ taglib-ruby (1.1.0)
273
+ telegram-bot-ruby (0.16.0)
274
+ dry-inflector
275
+ faraday
276
+ virtus (~> 2.0)
277
+ thread_safe (0.3.6)
278
+ tzinfo (2.0.4)
279
+ concurrent-ruby (~> 1.0)
280
+ unicode-display_width (1.6.1)
281
+ virtus (2.0.0)
282
+ axiom-types (~> 0.1)
283
+ coercible (~> 1.0)
284
+ descendants_tracker (~> 0.0, >= 0.0.3)
285
+ zeitwerk (2.4.2)
286
+
287
+ PLATFORMS
288
+ x86_64-linux
289
+
290
+ DEPENDENCIES
291
+ aranha-parsers!
292
+ aranha-selenium!
293
+ eac_cli!
294
+ eac_config!
295
+ eac_docker!
296
+ eac_fs!
297
+ eac_ruby_base0!
298
+ eac_ruby_gem_support (~> 0.3)
299
+ eac_ruby_gems_utils!
300
+ eac_ruby_utils!
301
+ eac_templates!
302
+ ehbrs-tools!
303
+ ehbrs_ruby_utils!
304
+ ultimate_lyrics!
305
+
306
+ BUNDLED WITH
307
+ 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,56 +1,51 @@
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
 
25
30
  protected
26
31
 
27
- def build_selected_directory(path)
28
- path
29
- end
30
-
31
32
  def directory_label(directory)
32
33
  directory.to_s
33
34
  end
34
35
 
35
36
  def directory_target_basename(directory)
36
- directory.basename.to_path
37
+ ::EhbrsRubyUtils::Fs::Selected::Build::DEFAULT_TARGET_BASENAME_PROC.call(directory)
37
38
  end
38
39
 
39
40
  private
40
41
 
41
42
  def build
42
43
  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
44
+ selected.build(build_dir, &method(:directory_target_basename)).perform
50
45
  end
51
46
 
52
47
  def build_dir_uncached
53
- parsed.build_dir.if_present { |v| ::EacRubyUtils::Fs::ClearableDirectory.new(v) }
48
+ parsed.build_dir.if_present(&:to_pathname)
54
49
  end
55
50
 
56
51
  def run_build?
@@ -59,9 +54,11 @@ module Ehbrs
59
54
 
60
55
  def selected_directories_uncached
61
56
  infom 'Searching selected directories...'
62
- @selected = []
63
- run_filesystem_traverser
64
- @selected.sort
57
+ selected.found
58
+ end
59
+
60
+ def selected_uncached
61
+ ::EhbrsRubyUtils::Fs::Selected.new(parsed.root_path, filename: parsed.filename)
65
62
  end
66
63
 
67
64
  def show
@@ -70,10 +67,6 @@ module Ehbrs
70
67
  puts directory_label(directory)
71
68
  end
72
69
  end
73
-
74
- def traverser_check_directory(path)
75
- @selected << build_selected_directory(path) if path.join('.selected').exist?
76
- end
77
70
  end
78
71
  end
79
72
  end
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ehbrs/tools/core_ext'
4
+ require 'ehbrs_ruby_utils/videos/container'
5
+ require 'ultimate_lyrics/provider'
6
+
7
+ module Ehbrs
8
+ module Tools
9
+ class Runner
10
+ class Music
11
+ class Lyrics
12
+ DEFAULT_PROVIDER = 'lyrics.com'
13
+
14
+ runner_with :help, :output do
15
+ arg_opt '-p', '--provider', 'Nome do provedor.', default: DEFAULT_PROVIDER
16
+ pos_arg :file
17
+ end
18
+
19
+ def run
20
+ start_banner
21
+ show_results
22
+ end
23
+
24
+ def show_results
25
+ if lyrics.found?
26
+ success 'Lyrics found'
27
+ run_output
28
+ else
29
+ fatal_error 'No lyric found'
30
+ end
31
+ end
32
+
33
+ def start_banner
34
+ infov 'File', file
35
+ %w[artist album track title year].each do |attr|
36
+ infov attr.humanize, container.tag_file.tag.send(attr)
37
+ end
38
+ infov 'Selected provider', provider
39
+ end
40
+
41
+ def container_uncached
42
+ ::EhbrsRubyUtils::Videos::Container.from_file(file)
43
+ end
44
+
45
+ def file
46
+ parsed.file.to_pathname
47
+ end
48
+
49
+ def lyrics_uncached
50
+ container.lyrics_by_provider(provider)
51
+ end
52
+
53
+ def output_content
54
+ lyrics.text
55
+ end
56
+
57
+ def provider_uncached
58
+ ::UltimateLyrics::Provider.by_name(provider_name)
59
+ end
60
+
61
+ def provider_name
62
+ parsed.provider
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ehbrs/tools/core_ext'
4
+ require 'ehbrs_ruby_utils/music/lyrics_book'
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 LyricsBook
13
+ runner_with :help, :output do
14
+ arg_opt '-p', '--provider', 'Nome do provedor.',
15
+ default: ::EhbrsRubyUtils::Music::LyricsBook::DEFAULT_PROVIDER_NAME
16
+ pos_arg :source_dir
17
+ end
18
+
19
+ def run
20
+ start_banner
21
+ run_output
22
+ end
23
+
24
+ def start_banner
25
+ infov 'Source directory', book.source_dir
26
+ infov 'Selected provider', book.provider
27
+ end
28
+
29
+ def book_uncached
30
+ ::EhbrsRubyUtils::Music::LyricsBook.new(parsed.source_dir,
31
+ provider_name: parsed.provider)
32
+ end
33
+
34
+ def output_content
35
+ book.output
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -10,16 +10,16 @@ module Ehbrs
10
10
  class Selected < ::Ehbrs::Tools::Runner::Fs::Selected
11
11
  protected
12
12
 
13
- def build_selected_directory(path)
14
- ::Ehbrs::Music::Album.new(path)
15
- end
16
-
17
13
  def directory_label(directory)
18
- directory.to_label
14
+ path_to_album(directory).to_label
19
15
  end
20
16
 
21
17
  def directory_target_basename(directory)
22
- directory.id
18
+ path_to_album(directory).id
19
+ end
20
+
21
+ def path_to_album(path)
22
+ ::Ehbrs::Music::Album.new(path)
23
23
  end
24
24
  end
25
25
  end
@@ -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.25.0'
5
+ VERSION = '0.28.0'
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/filesystem_cache'
3
+ require 'eac_fs/cache'
4
4
  require 'eac_ruby_utils/simple_cache'
5
5
 
6
6
  module Ehbrs
@@ -15,7 +15,7 @@ module Ehbrs
15
15
  private
16
16
 
17
17
  def user_home_dir_uncached
18
- ::EacRubyUtils::FilesystemCache.new(ENV['HOME'])
18
+ ::EacFs::Cache.new(ENV['HOME'])
19
19
  end
20
20
 
21
21
  def cache_uncached
@@ -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