ehbrs-tools 0.17.0 → 0.22.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/cooking_book/project.rb +8 -2
- data/lib/ehbrs/core_ext.rb +4 -0
- data/lib/ehbrs/music.rb +9 -0
- data/lib/ehbrs/music/album.rb +44 -0
- data/lib/ehbrs/observers/base.rb +1 -1
- data/lib/ehbrs/observers/with_persistence.rb +1 -1
- data/lib/ehbrs/patches.rb +4 -0
- data/lib/ehbrs/patches/object/template.rb +2 -2
- data/lib/ehbrs/runner/cooking_book/build.rb +20 -2
- data/lib/ehbrs/runner/fs/selected.rb +79 -0
- data/lib/ehbrs/runner/fs/used_space.rb +2 -3
- data/lib/ehbrs/runner/music.rb +16 -0
- data/lib/ehbrs/runner/music/selected.rb +26 -0
- data/lib/ehbrs/runner/telegram.rb +26 -0
- data/lib/ehbrs/runner/telegram/send_message.rb +29 -0
- data/lib/ehbrs/runner/videos/probe.rb +2 -2
- data/lib/ehbrs/runner/videos/unsupported.rb +1 -1
- data/lib/ehbrs/runner/web_utils/videos/upload.rb +1 -1
- data/lib/ehbrs/telegram.rb +9 -0
- data/lib/ehbrs/telegram/message_sending.rb +32 -0
- data/lib/ehbrs/tools/instance.rb +16 -0
- data/lib/ehbrs/tools/version.rb +1 -1
- data/lib/ehbrs/videos/convert_job.rb +1 -1
- data/lib/ehbrs/videos/series/rename/line_result.rb +1 -1
- data/lib/ehbrs/videos/unsupported/check_support.rb +13 -8
- data/lib/ehbrs/videos/unsupported/fixes/supported_codec.rb +1 -1
- data/lib/ehbrs/videos/unsupported/profiles/aoc.rb +27 -0
- data/lib/ehbrs/videos/unsupported/search.rb +1 -1
- data/lib/ehbrs/videos/unsupported/track.rb +1 -1
- data/vendor/aranha-selenium/lib/aranha/selenium/driver_factory/base.rb +8 -0
- data/vendor/aranha-selenium/lib/aranha/selenium/driver_factory/chrome.rb +10 -5
- data/vendor/aranha-selenium/lib/aranha/selenium/driver_factory/firefox.rb +25 -11
- data/vendor/aranha-selenium/lib/aranha/selenium/version.rb +1 -1
- data/vendor/avm-apps/Gemfile +5 -0
- data/vendor/avm-apps/avm-apps.gemspec +18 -0
- data/vendor/avm-apps/lib/avm/apps.rb +9 -0
- data/vendor/avm-apps/lib/avm/apps/config.rb +19 -0
- data/vendor/avm-apps/lib/avm/apps/jobs.rb +11 -0
- data/vendor/avm-apps/lib/avm/apps/jobs/base.rb +64 -0
- data/vendor/avm-apps/lib/avm/apps/jobs/variables_source.rb +24 -0
- data/vendor/avm-apps/lib/avm/apps/sources/configuration.rb +57 -0
- data/vendor/avm-apps/lib/avm/apps/sources/configuration/_locale.rb +18 -0
- data/vendor/avm-apps/lib/avm/apps/sources/configuration/_rubocop.rb +26 -0
- data/vendor/avm-apps/lib/avm/apps/sources/configuration/_tests.rb +29 -0
- data/vendor/avm-apps/lib/avm/apps/version.rb +7 -0
- data/vendor/avm-apps/spec/rubocop_spec.rb +3 -0
- data/vendor/avm-apps/spec/spec_helper.rb +103 -0
- data/vendor/eac_cli/eac_cli.gemspec +4 -2
- data/vendor/eac_cli/lib/eac_cli/config.rb +16 -0
- data/vendor/eac_cli/lib/eac_cli/config/entry.rb +48 -0
- data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/console/configs/read_entry_options.rb → eac_cli/lib/eac_cli/config/entry/options.rb} +20 -9
- data/vendor/eac_cli/lib/eac_cli/config/entry/undefined.rb +26 -0
- data/vendor/eac_cli/lib/eac_cli/core_ext.rb +2 -0
- data/vendor/eac_cli/lib/eac_cli/default_runner.rb +1 -1
- data/vendor/eac_cli/lib/eac_cli/definition/alternative.rb +4 -7
- data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +8 -0
- data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +26 -10
- data/vendor/eac_cli/lib/eac_cli/definition/base_option/initialize_args_parser.rb +47 -0
- data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +8 -0
- data/vendor/eac_cli/lib/eac_cli/definition/help_formatter.rb +3 -2
- data/vendor/eac_cli/lib/eac_cli/definition/positional_argument.rb +18 -1
- data/vendor/eac_cli/lib/eac_cli/old_configs.rb +35 -0
- data/vendor/eac_cli/lib/eac_cli/old_configs/entry_reader.rb +80 -0
- data/vendor/eac_cli/lib/eac_cli/old_configs/password_entry_reader.rb +16 -0
- data/vendor/eac_cli/lib/eac_cli/old_configs/read_entry_options.rb +44 -0
- data/vendor/eac_cli/lib/eac_cli/old_configs/store_passwords_entry_reader.rb +25 -0
- data/vendor/eac_cli/lib/eac_cli/old_configs_bridge.rb +39 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative.rb +4 -4
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/long_options.rb +37 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/option_argument.rb +29 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/options.rb +7 -36
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +47 -0
- data/vendor/eac_cli/lib/eac_cli/parser/collector.rb +3 -17
- data/vendor/eac_cli/lib/eac_cli/patches/object/runner_with.rb +3 -2
- data/vendor/eac_cli/lib/eac_cli/runner.rb +0 -50
- data/vendor/eac_cli/lib/eac_cli/runner/after_class_methods.rb +46 -0
- data/vendor/eac_cli/lib/eac_cli/runner/context.rb +2 -1
- data/vendor/eac_cli/lib/eac_cli/runner/instance_methods.rb +42 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/help.rb +9 -4
- data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder.rb +73 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder/alternative.rb +56 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands.rb +22 -4
- data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands/definition_concern.rb +10 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with_set.rb +50 -0
- data/vendor/eac_cli/lib/eac_cli/speaker.rb +127 -0
- data/vendor/eac_cli/lib/eac_cli/speaker/_constants.rb +12 -0
- data/vendor/eac_cli/lib/eac_cli/speaker/list.rb +61 -0
- data/vendor/eac_cli/lib/eac_cli/speaker/options.rb +38 -0
- data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
- data/vendor/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb +4 -0
- data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils/console/configs_spec.rb → eac_cli/spec/lib/eac_cli/old_configs_spec.rb} +2 -2
- data/vendor/eac_cli/spec/lib/eac_cli/parser/alternative_spec.rb +1 -1
- data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +43 -5
- data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils/console → eac_cli/spec/lib/eac_cli}/speaker_spec.rb +7 -11
- data/vendor/eac_cli/spec/rubocop_spec.rb +1 -5
- data/vendor/eac_cli/spec/spec_helper.rb +3 -0
- data/vendor/eac_config/Gemfile +5 -0
- data/vendor/eac_config/eac_config.gemspec +19 -0
- data/vendor/eac_config/lib/eac_config.rb +7 -0
- data/vendor/eac_config/lib/eac_config/entry.rb +49 -0
- data/vendor/eac_config/lib/eac_config/entry_path.rb +41 -0
- data/vendor/eac_config/lib/eac_config/envvars_node.rb +25 -0
- data/vendor/eac_config/lib/eac_config/envvars_node/entry.rb +54 -0
- data/vendor/eac_config/lib/eac_config/load_nodes_search.rb +39 -0
- data/vendor/eac_config/lib/eac_config/load_path.rb +28 -0
- data/vendor/eac_config/lib/eac_config/node.rb +67 -0
- data/vendor/eac_config/lib/eac_config/node_entry.rb +18 -0
- data/vendor/eac_config/lib/eac_config/node_uri.rb +38 -0
- data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/configs.rb → eac_config/lib/eac_config/old_configs.rb} +6 -5
- data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/configs → eac_config/lib/eac_config/old_configs}/base.rb +5 -5
- data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/configs → eac_config/lib/eac_config/old_configs}/file.rb +4 -4
- data/vendor/{eac_ruby_utils/lib/eac_ruby_utils → eac_config/lib/eac_config}/paths_hash.rb +8 -8
- data/vendor/{eac_ruby_utils/lib/eac_ruby_utils → eac_config/lib/eac_config}/paths_hash/entry_key_error.rb +1 -1
- data/vendor/{eac_ruby_utils/lib/eac_ruby_utils → eac_config/lib/eac_config}/paths_hash/node.rb +2 -2
- data/vendor/{eac_ruby_utils/lib/eac_ruby_utils → eac_config/lib/eac_config}/paths_hash/path_search.rb +4 -4
- data/vendor/eac_config/lib/eac_config/version.rb +5 -0
- data/vendor/eac_config/lib/eac_config/yaml_file_node.rb +48 -0
- data/vendor/eac_config/lib/eac_config/yaml_file_node/entry.rb +37 -0
- data/vendor/eac_config/spec/lib/eac_config/entry_path_spec.rb +30 -0
- data/vendor/eac_config/spec/lib/eac_config/envvars_node/entry_spec.rb +14 -0
- data/vendor/eac_config/spec/lib/eac_config/envvars_node_spec.rb +40 -0
- data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils/configs_spec.rb → eac_config/spec/lib/eac_config/old_configs_spec.rb} +2 -2
- data/vendor/{eac_ruby_utils/spec/lib/eac_ruby_utils → eac_config/spec/lib/eac_config}/paths_hash_spec.rb +6 -6
- data/vendor/eac_config/spec/lib/eac_config/yaml_file_node_spec.rb +52 -0
- data/vendor/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1.yaml +6 -0
- data/vendor/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_1.yaml +2 -0
- data/vendor/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2.yaml +4 -0
- data/vendor/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2/storage1_2_1.yaml +2 -0
- data/vendor/eac_config/spec/rubocop_spec.rb +3 -0
- data/vendor/eac_config/spec/spec_helper.rb +17 -0
- data/vendor/eac_docker/eac_docker.gemspec +3 -2
- data/vendor/eac_docker/lib/eac_docker/images/templatized.rb +1 -0
- data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
- data/vendor/eac_docker/spec/lib/eac_docker/images/templatized_spec.rb +2 -1
- data/vendor/eac_docker/spec/rubocop_spec.rb +1 -5
- data/vendor/eac_docker/spec/spec_helper.rb +3 -0
- data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +4 -4
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +23 -9
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application_xdg.rb +34 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +4 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb +31 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches.rb +4 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class.rb +4 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class/jobs_runner.rb +10 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object.rb +5 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object/runner_with.rb +5 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +22 -12
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb +4 -9
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with.rb +9 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/confirmation.rb +43 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/filesystem_traverser.rb +52 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/input.rb +36 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/output.rb +58 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
- data/vendor/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/confirmation_spec.rb +42 -0
- data/vendor/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/output_spec.rb +81 -0
- data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +1 -5
- data/vendor/eac_ruby_base0/spec/spec_helper.rb +3 -0
- data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +2 -3
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/context.rb +31 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/contextualizable.rb +12 -7
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/envs/command.rb +10 -5
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/filesystem_cache.rb +6 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/logs.rb +63 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/traverser.rb +0 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +13 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +3 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +48 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/settings_provider.rb +10 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/nyi.rb +10 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/common_concern.rb +0 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/context.rb +11 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/speaker.rb +9 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_nil.rb +17 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/to_parser.rb +10 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/inflector.rb +4 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/required_zone.rb +11 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/regexp_parser.rb +34 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb +1 -4
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/settings_provider.rb +10 -29
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/settings_provider/setting_value.rb +69 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb +26 -5
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/speaker.rb +16 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/speaker/receiver.rb +57 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/speaker/sender.rb +32 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +2 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb +17 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/speaker_spec.rb +13 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb +8 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/simple_cache_spec.rb +27 -0
- data/vendor/eac_ruby_utils/spec/rubocop_check_spec.rb +1 -5
- data/vendor/eac_ruby_utils/spec/spec_helper.rb +3 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/convert_job.rb +1 -1
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/web_utils/videos/files_list.rb +1 -1
- metadata +157 -67
- data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder.rb +0 -55
- data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder/alternative.rb +0 -50
- data/vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb +0 -46
- data/vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb +0 -30
- data/vendor/eac_cli/spec/lib/eac_cli/docopt/runner_extension_spec.rb +0 -35
- data/vendor/eac_cli/spec/lib/eac_cli/runner_with/output_file_spec.rb +0 -53
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console.rb +0 -5
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb +0 -38
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/entry_reader.rb +0 -81
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/password_entry_reader.rb +0 -18
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/store_passwords_entry_reader.rb +0 -27
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner.rb +0 -45
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_class_methods.rb +0 -18
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_doc.rb +0 -25
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_settings.rb +0 -19
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb +0 -154
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker.rb +0 -133
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/_class_methods.rb +0 -39
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/_constants.rb +0 -14
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/list.rb +0 -63
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/node.rb +0 -26
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/console_speaker.rb +0 -10
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/template.rb +0 -10
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/template.rb +0 -9
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/default_time_zone_set.rb +0 -5
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/local_time_zone.rb +0 -25
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates.rb +0 -9
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/directory.rb +0 -110
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/file.rb +0 -50
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/searcher.rb +0 -55
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_not_found_error.rb +0 -7
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers.rb +0 -25
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/base.rb +0 -23
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/entries_reader.rb +0 -25
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/generic.rb +0 -25
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/hash.rb +0 -29
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/console/docopt_runner_spec.rb +0 -136
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/console_speaker_spec.rb +0 -13
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/template_spec.rb +0 -23
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec.rb +0 -35
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec_files/expected_content +0 -2
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec_files/source.template +0 -2
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec.rb +0 -30
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec_files/path1/subdir1/file1.template +0 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec_files/path1/subdir1/file2 +0 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec_files/path2/subdir1/file3.template +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65c2d3133ff7e4ef5b4525fd989ea39ca9ba76b6993d470d47543a06258f2f9c
|
4
|
+
data.tar.gz: 42bc25487ca6b2b1aba7ce315a9a9bc311767d26480b08b7b04ee1e88fbf7b7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e73a214bae3409ae28b10ecbfdccc70ccc9981af6140a6371ab158b8552cd1564c8346964f6c4dff005b53e3434e162d9a48fc404c2d321d69504c393ea4a372
|
7
|
+
data.tar.gz: 6a84239f517e9a985e9890717a6dd6a5e2db3623199913da8165bcdf0a484c264428027a3d5514464b6fe7721cc3ffb54753b58f5a4eb399c8b463ec1effb580
|
@@ -6,6 +6,8 @@ require 'ehbrs/cooking_book/recipe'
|
|
6
6
|
module Ehbrs
|
7
7
|
module CookingBook
|
8
8
|
class Project
|
9
|
+
RECIPES_ROOT_SUBPATH = 'recipes'
|
10
|
+
|
9
11
|
enable_simple_cache
|
10
12
|
common_constructor :root do
|
11
13
|
self.root = root.to_pathname
|
@@ -15,9 +17,13 @@ module Ehbrs
|
|
15
17
|
|
16
18
|
private
|
17
19
|
|
20
|
+
def recipes_root_uncached
|
21
|
+
root.join(RECIPES_ROOT_SUBPATH)
|
22
|
+
end
|
23
|
+
|
18
24
|
def recipes_uncached
|
19
|
-
::Dir.glob(File.join('**', '*.{yml,yaml}'), base:
|
20
|
-
::Ehbrs::CookingBook::Recipe.from_file(
|
25
|
+
::Dir.glob(File.join('**', '*.{yml,yaml}'), base: recipes_root.to_path).map do |subpath|
|
26
|
+
::Ehbrs::CookingBook::Recipe.from_file(recipes_root.join(subpath))
|
21
27
|
end
|
22
28
|
end
|
23
29
|
end
|
data/lib/ehbrs/music.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Ehbrs
|
6
|
+
module Music
|
7
|
+
class Album
|
8
|
+
include ::Comparable
|
9
|
+
common_constructor :path do
|
10
|
+
self.path = path.to_pathname.expand_path
|
11
|
+
end
|
12
|
+
|
13
|
+
def <=>(other)
|
14
|
+
to_a <=> other.to_a
|
15
|
+
end
|
16
|
+
|
17
|
+
def to_a
|
18
|
+
[category, artist, name]
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_label
|
22
|
+
(to_a + [id]).map(&:light_white).join(' | '.blue)
|
23
|
+
end
|
24
|
+
|
25
|
+
delegate :to_path, to: :path
|
26
|
+
|
27
|
+
def id
|
28
|
+
[artist, name].join('_').variableize
|
29
|
+
end
|
30
|
+
|
31
|
+
def name
|
32
|
+
path.basename.to_s
|
33
|
+
end
|
34
|
+
|
35
|
+
def artist
|
36
|
+
path.parent.basename.to_s
|
37
|
+
end
|
38
|
+
|
39
|
+
def category
|
40
|
+
path.parent.parent.basename.to_s
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
data/lib/ehbrs/observers/base.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'ehbrs/tools/application'
|
4
|
-
require '
|
4
|
+
require 'eac_templates/patches/object/template'
|
5
5
|
|
6
|
-
::
|
6
|
+
::EacTemplates::Searcher.default.included_paths <<
|
7
7
|
::Ehbrs::Tools.application.gemspec_dir.join('template').to_path
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'eac_cli/core_ext'
|
4
4
|
require 'ehbrs/cooking_book/build'
|
5
|
+
require 'os'
|
5
6
|
|
6
7
|
module Ehbrs
|
7
8
|
class Runner
|
@@ -10,12 +11,13 @@ module Ehbrs
|
|
10
11
|
runner_with :help, :subcommands do
|
11
12
|
desc 'Operações para livros de receitas.'
|
12
13
|
arg_opt '-d', '--target-dir', 'Caminho para o diretório destino da construção.'
|
14
|
+
bool_opt '--open', 'Show the result.'
|
13
15
|
end
|
14
16
|
|
15
17
|
def run
|
16
|
-
|
17
|
-
infov 'Target directory', build.target_dir
|
18
|
+
start_banner
|
18
19
|
build.run
|
20
|
+
open
|
19
21
|
success 'Done'
|
20
22
|
end
|
21
23
|
|
@@ -26,6 +28,22 @@ module Ehbrs
|
|
26
28
|
runner_context.call(:project), target_dir: parsed.target_dir
|
27
29
|
)
|
28
30
|
end
|
31
|
+
|
32
|
+
def open
|
33
|
+
return unless parsed.open?
|
34
|
+
|
35
|
+
infom "Opening \"#{open_path}\"..."
|
36
|
+
::EacRubyUtils::Envs.local.command(OS.open_file_command, open_path).system!
|
37
|
+
end
|
38
|
+
|
39
|
+
def open_path
|
40
|
+
build.index_page.target_path
|
41
|
+
end
|
42
|
+
|
43
|
+
def start_banner
|
44
|
+
infov 'Project', build.project
|
45
|
+
infov 'Target directory', build.target_dir
|
46
|
+
end
|
29
47
|
end
|
30
48
|
end
|
31
49
|
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/envs'
|
4
|
+
require 'eac_ruby_utils/fs/clearable_directory'
|
5
|
+
require 'ehbrs/core_ext'
|
6
|
+
|
7
|
+
module Ehbrs
|
8
|
+
class Runner
|
9
|
+
class Fs
|
10
|
+
class Selected
|
11
|
+
DEFAULT_TRAVERSER_RECURSIVE = true
|
12
|
+
|
13
|
+
enable_jobs_runner
|
14
|
+
runner_with :confirmation, :help, :filesystem_traverser do
|
15
|
+
desc 'Seleciona diretórios.'
|
16
|
+
arg_opt '-b', '--build-dir', 'Constrói diretório alvo.'
|
17
|
+
end
|
18
|
+
|
19
|
+
def run
|
20
|
+
infov 'Recursive', traverser_recursive
|
21
|
+
run_jobs :show, :build
|
22
|
+
end
|
23
|
+
|
24
|
+
protected
|
25
|
+
|
26
|
+
def build_selected_directory(path)
|
27
|
+
path
|
28
|
+
end
|
29
|
+
|
30
|
+
def directory_label(directory)
|
31
|
+
directory.to_s
|
32
|
+
end
|
33
|
+
|
34
|
+
def directory_target_basename(directory)
|
35
|
+
directory.basename.to_path
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def build
|
41
|
+
infom "Building directory \"#{build_dir}\" with selected..."
|
42
|
+
build_dir.clear
|
43
|
+
selected_directories.each do |directory|
|
44
|
+
::EacRubyUtils::Envs.local.command(
|
45
|
+
'ln', '-s', directory.to_path,
|
46
|
+
build_dir.join(directory_target_basename(directory))
|
47
|
+
).system!
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def build_dir_uncached
|
52
|
+
parsed.build_dir.if_present { |v| ::EacRubyUtils::Fs::ClearableDirectory.new(v) }
|
53
|
+
end
|
54
|
+
|
55
|
+
def run_build?
|
56
|
+
build_dir.present? && confirm?('Build?')
|
57
|
+
end
|
58
|
+
|
59
|
+
def selected_directories_uncached
|
60
|
+
infom 'Searching selected directories...'
|
61
|
+
@selected = []
|
62
|
+
run_filesystem_traverser
|
63
|
+
@selected.sort
|
64
|
+
end
|
65
|
+
|
66
|
+
def show
|
67
|
+
infov 'Directories found', selected_directories.count
|
68
|
+
selected_directories.each do |directory|
|
69
|
+
puts directory_label(directory)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def traverser_check_directory(path)
|
74
|
+
@selected << build_selected_directory(path) if path.join('.selected').exist?
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -48,7 +48,7 @@ module Ehbrs
|
|
48
48
|
|
49
49
|
class PathBase
|
50
50
|
enable_simple_cache
|
51
|
-
|
51
|
+
enable_speaker
|
52
52
|
common_constructor :runner, :path do
|
53
53
|
self.path = path.to_pathname
|
54
54
|
end
|
@@ -93,8 +93,7 @@ module Ehbrs
|
|
93
93
|
class PathVerbose < PathBase
|
94
94
|
def run
|
95
95
|
infom path.to_s
|
96
|
-
|
97
|
-
node.stderr_line_prefix = ' '
|
96
|
+
::EacRubyUtils::Speaker.context.on(::EacCli::Speaker.new(err_line_prefix: ' ')) do
|
98
97
|
banner
|
99
98
|
check
|
100
99
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'ehbrs/music/album'
|
4
|
+
require 'ehbrs/runner/fs/selected'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
class Runner
|
8
|
+
class Music
|
9
|
+
class Selected < ::Ehbrs::Runner::Fs::Selected
|
10
|
+
protected
|
11
|
+
|
12
|
+
def build_selected_directory(path)
|
13
|
+
::Ehbrs::Music::Album.new(path)
|
14
|
+
end
|
15
|
+
|
16
|
+
def directory_label(directory)
|
17
|
+
directory.to_label
|
18
|
+
end
|
19
|
+
|
20
|
+
def directory_target_basename(directory)
|
21
|
+
directory.id
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
require 'ehbrs/tools/instance'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
class Runner
|
8
|
+
class Telegram
|
9
|
+
require_sub __FILE__
|
10
|
+
|
11
|
+
runner_with :help, :subcommands do
|
12
|
+
desc 'Operações com Telegram.'
|
13
|
+
arg_opt '-b', '--bot-token', 'Token do bot Telegram.'
|
14
|
+
subcommands
|
15
|
+
end
|
16
|
+
|
17
|
+
def bot_token
|
18
|
+
parsed.bot_token || default_bot_token
|
19
|
+
end
|
20
|
+
|
21
|
+
def default_bot_token
|
22
|
+
::Ehbrs::Tools.instance.read_entry(:telegram_bot_token)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
require 'ehbrs/telegram/message_sending'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
class Runner
|
8
|
+
class Telegram
|
9
|
+
class SendMessage
|
10
|
+
runner_with :help do
|
11
|
+
desc 'Envia mensagens Telegram.'
|
12
|
+
pos_arg :message
|
13
|
+
pos_arg :recipients_ids, repeat: true
|
14
|
+
end
|
15
|
+
|
16
|
+
delegate :run, to: :message_sending
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def message_sending_uncached
|
21
|
+
parsed.recipients_ids
|
22
|
+
.inject(::Ehbrs::Telegram::MessageSending.new) { |a, e| a.recipient_id(e) }
|
23
|
+
.bot_token(runner_context.call(:bot_token))
|
24
|
+
.message(parsed.message)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_cli/core_ext'
|
4
3
|
require 'ehbrs_ruby_utils/videos/container'
|
4
|
+
require 'eac_ruby_base0/core_ext'
|
5
5
|
require 'eac_ruby_utils/yaml'
|
6
6
|
|
7
7
|
module Ehbrs
|
8
8
|
class Runner
|
9
9
|
class Videos
|
10
10
|
class Probe
|
11
|
-
runner_with :help, :
|
11
|
+
runner_with :help, :output do
|
12
12
|
desc 'FFProbe em um arquivo de vídeo.'
|
13
13
|
pos_arg :file_path
|
14
14
|
end
|
@@ -42,7 +42,7 @@ module Ehbrs
|
|
42
42
|
def process_response(response)
|
43
43
|
infov 'Response status', response.status
|
44
44
|
if response.status == 200
|
45
|
-
pp ::JSON.parse(response.body)
|
45
|
+
pp ::JSON.parse(response.body)
|
46
46
|
else
|
47
47
|
error_file = '/tmp/ehbrsutils.html'
|
48
48
|
::File.write(error_file, response.body)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'eac_ruby_utils/immutable'
|
5
|
+
require 'telegram/bot'
|
6
|
+
|
7
|
+
module Ehbrs
|
8
|
+
module Telegram
|
9
|
+
class MessageSending
|
10
|
+
include ::EacRubyUtils::Immutable
|
11
|
+
immutable_accessor :bot_token, :message
|
12
|
+
immutable_accessor :recipient_id, type: :array
|
13
|
+
|
14
|
+
def run
|
15
|
+
::Telegram::Bot::Client.run(prop(:bot_token)) do |bot|
|
16
|
+
prop(:recipient_ids).each do |recipient_id|
|
17
|
+
bot.api.sendMessage(chat_id: recipient_id, text: prop(:message))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def prop(attribute)
|
25
|
+
r = send(attribute)
|
26
|
+
return r if r.present?
|
27
|
+
|
28
|
+
raise "Attribute #{attribute} is blank"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|