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
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/instances/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
module Tools
|
8
|
+
INSTANCE_ID = 'ehbrs-tools_0'
|
9
|
+
|
10
|
+
class << self
|
11
|
+
def instance
|
12
|
+
@instance ||= ::Avm::Instances::Base.by_id(INSTANCE_ID)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/ehbrs/tools/version.rb
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
3
4
|
require 'ehbrs/videos/unsupported/check_result'
|
4
5
|
|
5
6
|
module Ehbrs
|
6
7
|
module Videos
|
7
8
|
module Unsupported
|
8
9
|
module CheckSupport
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
include ::EacRubyUtils::Console::Speaker
|
13
|
-
include ::EacRubyUtils::SimpleCache
|
10
|
+
common_concern do
|
11
|
+
enable_simple_cache
|
12
|
+
enable_speaker
|
14
13
|
end
|
15
14
|
|
16
15
|
def aggressions_banner(title)
|
@@ -26,7 +25,7 @@ module Ehbrs
|
|
26
25
|
|
27
26
|
def ffmpeg_fix_args
|
28
27
|
unpassed_checks.flat_map do |check|
|
29
|
-
check.check.fix.ffmpeg_args(self)
|
28
|
+
check.check.fix.if_present([]) { |v| v.ffmpeg_args(self) }
|
30
29
|
end
|
31
30
|
end
|
32
31
|
|
@@ -57,11 +56,17 @@ module Ehbrs
|
|
57
56
|
end
|
58
57
|
|
59
58
|
def pad_speaker
|
60
|
-
|
61
|
-
node.stderr_line_prefix = node.stderr_line_prefix.to_s + ' '
|
59
|
+
::EacRubyUtils::Speaker.context.on(::EacCli::Speaker.new(err_line_prefix: ' ')) do
|
62
60
|
yield
|
63
61
|
end
|
64
62
|
end
|
63
|
+
|
64
|
+
def new_padded_cli_speaker
|
65
|
+
::EacCli::Speaker.new(
|
66
|
+
err_line_prefix(::EacRubyUtils::Speaker.context.optional_current
|
67
|
+
.if_present('') { |v| v.is_a?(::EacCli::Speaker) ? v.err_line_prefix : '' } + ' ')
|
68
|
+
)
|
69
|
+
end
|
65
70
|
end
|
66
71
|
end
|
67
72
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'ehbrs/videos/unsupported/profiles/base'
|
4
|
+
|
5
|
+
module Ehbrs
|
6
|
+
module Videos
|
7
|
+
module Unsupported
|
8
|
+
module Profiles
|
9
|
+
class Aoc < ::Ehbrs::Videos::Unsupported::Profiles::Base
|
10
|
+
AUDIO_SUPPORTED_CODECS = %w[aac ac3 mp2 mp3].freeze
|
11
|
+
AUDIO_UNSUPPORTED_CODECS = %w[eac3 vorbis].freeze
|
12
|
+
|
13
|
+
VIDEO_SUPPORTED_CODECS = %w[h264 mpeg4].freeze
|
14
|
+
VIDEO_UNSUPPORTED_CODECS = %w[hevc].freeze
|
15
|
+
|
16
|
+
SUBTITLE_SUPPORTED_CODECS = %w[ass dvd_subtitle hdmv_pgs_subtitle subrip].freeze
|
17
|
+
SUBTITLE_UNSUPPORTED_CODECS = %w[mov_text].freeze
|
18
|
+
|
19
|
+
OTHER_SUPPORTED_CODECS = %w[].freeze
|
20
|
+
|
21
|
+
MPEG4_EXTRA_SUPPORTED = %w[xvid].freeze
|
22
|
+
MPEG4_EXTRA_UNSUPPORTED = %w[].freeze
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -14,14 +14,19 @@ module Aranha
|
|
14
14
|
|
15
15
|
def chrome_options
|
16
16
|
r = ::Selenium::WebDriver::Chrome::Options.new
|
17
|
-
r.add_argument(
|
18
|
-
r.add_argument('--headless') if headless?
|
19
|
-
r.add_argument('--disable-popup-blocking')
|
20
|
-
r.add_argument('--disable-translate')
|
21
|
-
r.add_argument("user-agent=#{user_agent}") if user_agent.present?
|
17
|
+
chrome_arguments.each { |arg| r.add_argument(arg) }
|
22
18
|
r.add_preference(:download, prompt_for_download: false, default_directory: downloads_dir)
|
23
19
|
r
|
24
20
|
end
|
21
|
+
|
22
|
+
def chrome_arguments
|
23
|
+
r = %w[--disable-popup-blocking --disable-translate]
|
24
|
+
r << '--ignore-certificate-errors' if accept_insecure_certs?
|
25
|
+
r << '--headless' if headless?
|
26
|
+
r << "--user-agent=#{user_agent}" if user_agent.present?
|
27
|
+
r << "--user-data-dir=#{profile_dir}" if profile_dir.present?
|
28
|
+
r
|
29
|
+
end
|
25
30
|
end
|
26
31
|
end
|
27
32
|
end
|
@@ -9,10 +9,7 @@ module Aranha
|
|
9
9
|
def build
|
10
10
|
::Selenium::WebDriver.for(
|
11
11
|
:firefox,
|
12
|
-
options:
|
13
|
-
profile: build_profile,
|
14
|
-
args: build_args
|
15
|
-
),
|
12
|
+
options: build_options,
|
16
13
|
desired_capabilities: build_capabilities
|
17
14
|
)
|
18
15
|
end
|
@@ -21,7 +18,7 @@ module Aranha
|
|
21
18
|
|
22
19
|
def build_args
|
23
20
|
r = []
|
24
|
-
r << '
|
21
|
+
r << '--headless' if headless?
|
25
22
|
r
|
26
23
|
end
|
27
24
|
|
@@ -33,16 +30,33 @@ module Aranha
|
|
33
30
|
end
|
34
31
|
end
|
35
32
|
|
36
|
-
def
|
37
|
-
r = ::Selenium::WebDriver::Firefox::
|
38
|
-
|
39
|
-
r
|
40
|
-
r
|
41
|
-
|
33
|
+
def build_options
|
34
|
+
r = ::Selenium::WebDriver::Firefox::Options.new(args: build_args,
|
35
|
+
prefs: build_preferences)
|
36
|
+
build_profile.if_present { |v| r.profile = v }
|
37
|
+
r
|
38
|
+
end
|
39
|
+
|
40
|
+
def build_preferences
|
41
|
+
r = {
|
42
|
+
'browser.download.dir' => downloads_dir,
|
43
|
+
'browser.download.folderList' => 2,
|
44
|
+
'browser.helperApps.neverAsk.saveToDisk' => auto_download_mime_types.join(';'),
|
45
|
+
'pdfjs.disabled' => true
|
46
|
+
}
|
42
47
|
r['general.useragent.override'] = user_agent if user_agent.present?
|
43
48
|
r
|
44
49
|
end
|
45
50
|
|
51
|
+
def build_profile
|
52
|
+
if profile_name.present?
|
53
|
+
::Selenium::WebDriver::Firefox::Profile.from_name(v)
|
54
|
+
elsif profile_dir.present?
|
55
|
+
::FileUtils.mkdir_p(profile_dir)
|
56
|
+
::Selenium::WebDriver::Firefox::Profile.new(profile_dir)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
46
60
|
def auto_download_mime_types
|
47
61
|
::File.read(
|
48
62
|
::File.join(__dir__, 'firefox_auto_download_mime_types')
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
+
|
5
|
+
require 'avm/apps/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'avm-apps'
|
9
|
+
s.version = Avm::Apps::VERSION
|
10
|
+
s.authors = ['Eduardo H. Bogoni']
|
11
|
+
s.summary = 'AVM components for applications.'
|
12
|
+
|
13
|
+
s.files = Dir['{lib}/**/*']
|
14
|
+
|
15
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.67'
|
16
|
+
|
17
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
|
18
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Apps
|
7
|
+
class Config
|
8
|
+
class << self
|
9
|
+
# @deprecated Use EacConfig::Node.context instead.
|
10
|
+
# @return [EacRubyUtils::Context<EacConfig::Node>]
|
11
|
+
def context
|
12
|
+
::EacConfig::Node.context
|
13
|
+
end
|
14
|
+
|
15
|
+
delegate :current, to: :context
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/apps/jobs/variables_source'
|
4
|
+
require 'eac_cli/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Apps
|
8
|
+
module Jobs
|
9
|
+
module Base
|
10
|
+
common_concern do
|
11
|
+
include ::ActiveSupport::Callbacks
|
12
|
+
|
13
|
+
enable_speaker
|
14
|
+
enable_simple_cache
|
15
|
+
enable_listable
|
16
|
+
common_constructor :instance, :options, default: [{}] do
|
17
|
+
if option_list.present?
|
18
|
+
self.options = option_list.hash_keys_validate!(options.symbolize_keys)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
define_callbacks(*jobs)
|
22
|
+
end
|
23
|
+
|
24
|
+
module ClassMethods
|
25
|
+
def jobs
|
26
|
+
const_get('JOBS').dup
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
module InstanceMethods
|
31
|
+
def option_list
|
32
|
+
nil
|
33
|
+
end
|
34
|
+
|
35
|
+
def run
|
36
|
+
start_banner if respond_to?(:start_banner)
|
37
|
+
run_jobs
|
38
|
+
::Avm::Result.success('Done!')
|
39
|
+
rescue ::Avm::Result::Error => e
|
40
|
+
e.to_result
|
41
|
+
end
|
42
|
+
|
43
|
+
def variables_source
|
44
|
+
::Avm::Apps::Jobs::VariablesSource.new(self, instance)
|
45
|
+
end
|
46
|
+
|
47
|
+
protected
|
48
|
+
|
49
|
+
def run_jobs
|
50
|
+
jobs.each do |job|
|
51
|
+
run_callbacks job do
|
52
|
+
send(job)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def jobs
|
58
|
+
self.class.jobs
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Apps
|
7
|
+
module Jobs
|
8
|
+
class VariablesSource
|
9
|
+
common_constructor :job, :instance
|
10
|
+
|
11
|
+
def read_entry(path, options = {})
|
12
|
+
entry_from_job(path) || instance.read_entry(path, options)
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def entry_from_job(path)
|
18
|
+
method = path.gsub('.', '_').underscore
|
19
|
+
return job.send(method) if job.respond_to?(method, true)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_config/old_configs'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
require 'yaml'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Apps
|
9
|
+
module Sources
|
10
|
+
class Configuration < ::EacConfig::OldConfigs
|
11
|
+
require_sub __FILE__
|
12
|
+
|
13
|
+
FILENAMES = %w[.avm.yml .avm.yaml].freeze
|
14
|
+
|
15
|
+
class << self
|
16
|
+
def find_by_path(path)
|
17
|
+
path = ::Pathname.new(path.to_s) unless path.is_a?(::Pathname)
|
18
|
+
internal_find_path(path.expand_path)
|
19
|
+
end
|
20
|
+
|
21
|
+
def find_in_path(path)
|
22
|
+
absolute_pathname = path.to_pathname.expand_path
|
23
|
+
if absolute_pathname.directory?
|
24
|
+
FILENAMES.each do |filename|
|
25
|
+
file = absolute_pathname.join(filename)
|
26
|
+
return new(file) if file.exist?
|
27
|
+
end
|
28
|
+
end
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def internal_find_path(absolute_pathname)
|
35
|
+
r = find_in_path(absolute_pathname)
|
36
|
+
return r if r.present?
|
37
|
+
|
38
|
+
internal_find_path(absolute_pathname.dirname) unless absolute_pathname.root?
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def initialize(path)
|
43
|
+
super(nil, storage_path: path)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Utility to read a configuration as a [EacRubyUtils::Envs::Command].
|
47
|
+
# @return [EacRubyUtils::Envs::Command]
|
48
|
+
def read_command(key)
|
49
|
+
read_entry(key).if_present do |v|
|
50
|
+
args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
|
51
|
+
::EacRubyUtils::Envs.local.command(args).chdir(::File.dirname(storage_path))
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|