ehbrs-tools 0.25.1 → 0.28.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +60 -22
- data/lib/ehbrs/{core_ext.rb → tools/core_ext.rb} +0 -0
- data/lib/ehbrs/tools/runner/finances/bb_browser.rb +1 -1
- data/lib/ehbrs/tools/runner/fs/selected.rb +19 -26
- data/lib/ehbrs/tools/runner/music/lyrics.rb +68 -0
- data/lib/ehbrs/tools/runner/music/lyrics_book.rb +41 -0
- data/lib/ehbrs/tools/runner/music/selected.rb +6 -6
- data/lib/ehbrs/tools/runner/web_utils/videos/upload.rb +1 -1
- data/lib/ehbrs/tools/version.rb +1 -1
- data/lib/ehbrs/user_dirs.rb +2 -2
- data/lib/ehbrs/videos/extract/package.rb +2 -2
- data/lib/ehbrs/videos/extract/package_file.rb +0 -1
- data/spec/lib/ehbrs/tools/runner/fs/used_space_spec.rb +2 -1
- data/vendor/aranha-parsers/aranha-parsers.gemspec +1 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/rspec/setup.rb +1 -1
- data/vendor/aranha-parsers/lib/aranha/parsers/rspec/{source_target_fixtures_example.rb → shared_examples/source_target_fixtures.rb} +0 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/source_address/fetch_content_error.rb +10 -0
- data/vendor/aranha-parsers/lib/aranha/parsers/source_address/http_get.rb +15 -2
- data/vendor/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
- data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +1 -1
- data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +9 -1
- data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +6 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/help/builder.rb +3 -3
- data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
- data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +6 -5
- data/vendor/eac_fs/Gemfile +5 -0
- data/vendor/eac_fs/eac_fs.gemspec +20 -0
- data/vendor/{eac_ruby_utils/lib/eac_ruby_utils/filesystem_cache.rb → eac_fs/lib/eac_fs/cache.rb} +7 -2
- data/vendor/eac_fs/lib/eac_fs/file_info.rb +24 -0
- data/vendor/eac_fs/lib/eac_fs/patches/module/fs_cache.rb +10 -0
- data/vendor/eac_fs/lib/eac_fs/patches/module.rb +4 -0
- data/vendor/eac_fs/lib/eac_fs/patches/object/fs_cache.rb +10 -0
- data/vendor/eac_fs/lib/eac_fs/patches/object.rb +4 -0
- data/vendor/eac_fs/lib/eac_fs/patches/pathname/info.rb +12 -0
- data/vendor/eac_fs/lib/eac_fs/patches/pathname.rb +4 -0
- data/vendor/eac_fs/lib/eac_fs/patches.rb +4 -0
- data/vendor/eac_fs/lib/eac_fs/version.rb +5 -0
- data/vendor/eac_fs/lib/eac_fs.rb +7 -0
- 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
- data/vendor/eac_fs/spec/rubocop_spec.rb +3 -0
- data/vendor/eac_fs/spec/spec_helper.rb +4 -0
- data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +2 -1
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +3 -3
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +1 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +16 -7
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
- data/vendor/eac_ruby_gems_utils/Gemfile +5 -0
- data/vendor/eac_ruby_gems_utils/LICENCE +16 -0
- data/vendor/eac_ruby_gems_utils/README.rdoc +3 -0
- data/vendor/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +30 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb +33 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/version_file.rb +41 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem.rb +97 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb +58 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/minitest.rb +25 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/decorated_gem.rb +48 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/result.rb +25 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple.rb +84 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/rspec.rb +21 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests.rb +9 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +5 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils.rb +7 -0
- data/vendor/eac_ruby_gems_utils/spec/code/rubocop_check_spec.rb +3 -0
- data/vendor/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec.rb +14 -0
- data/vendor/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec_files/a_version_file.rb +7 -0
- data/vendor/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem_spec.rb +20 -0
- data/vendor/eac_ruby_gems_utils/spec/spec_helper.rb +4 -0
- data/vendor/eac_ruby_gems_utils/spec/support/mygem/Gemfile +5 -0
- data/vendor/eac_ruby_gems_utils/spec/support/mygem/Gemfile.lock +19 -0
- data/vendor/eac_ruby_gems_utils/spec/support/mygem/Rakefile +14 -0
- data/vendor/eac_ruby_gems_utils/spec/support/mygem/exe/myrunner +5 -0
- data/vendor/eac_ruby_gems_utils/spec/support/mygem/lib/mygem/version.rb +5 -0
- data/vendor/eac_ruby_gems_utils/spec/support/mygem/lib/mygem.rb +5 -0
- data/vendor/eac_ruby_gems_utils/spec/support/mygem/mygem.gemspec +16 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/compact.rb +22 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/compact.rb +20 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/delimited.rb +16 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/string_delimited.rb +70 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/compact_spec.rb +20 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/compact_spec.rb +20 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/string/delimited_spec.rb +34 -0
- data/vendor/eac_templates/Gemfile +5 -0
- data/vendor/eac_templates/eac_templates.gemspec +19 -0
- data/vendor/eac_templates/lib/eac_templates/directory.rb +108 -0
- data/vendor/eac_templates/lib/eac_templates/file.rb +48 -0
- data/vendor/eac_templates/lib/eac_templates/patches/module/erb_template.rb +9 -0
- data/vendor/eac_templates/lib/eac_templates/patches/module/template.rb +10 -0
- data/vendor/eac_templates/lib/eac_templates/patches/module.rb +4 -0
- data/vendor/eac_templates/lib/eac_templates/patches/object/erb_template.rb +9 -0
- data/vendor/eac_templates/lib/eac_templates/patches/object/template.rb +9 -0
- data/vendor/eac_templates/lib/eac_templates/patches/object.rb +4 -0
- data/vendor/eac_templates/lib/eac_templates/patches.rb +4 -0
- data/vendor/eac_templates/lib/eac_templates/searcher.rb +53 -0
- data/vendor/eac_templates/lib/eac_templates/variable_not_found_error.rb +5 -0
- data/vendor/eac_templates/lib/eac_templates/variable_providers/base.rb +21 -0
- data/vendor/eac_templates/lib/eac_templates/variable_providers/config_reader.rb +27 -0
- data/vendor/eac_templates/lib/eac_templates/variable_providers/entries_reader.rb +23 -0
- data/vendor/eac_templates/lib/eac_templates/variable_providers/generic.rb +23 -0
- data/vendor/eac_templates/lib/eac_templates/variable_providers/hash.rb +27 -0
- data/vendor/eac_templates/lib/eac_templates/variable_providers.rb +23 -0
- data/vendor/eac_templates/lib/eac_templates/version.rb +5 -0
- data/vendor/eac_templates/lib/eac_templates.rb +7 -0
- data/vendor/eac_templates/spec/lib/eac_templates/file_spec.rb +35 -0
- data/vendor/eac_templates/spec/lib/eac_templates/file_spec_files/expected_content +2 -0
- data/vendor/eac_templates/spec/lib/eac_templates/file_spec_files/source.template +2 -0
- data/vendor/eac_templates/spec/lib/eac_templates/searcher_spec.rb +30 -0
- data/vendor/eac_templates/spec/lib/eac_templates/searcher_spec_files/path1/subdir1/file1.template +1 -0
- data/vendor/eac_templates/spec/lib/eac_templates/searcher_spec_files/path1/subdir1/file2 +1 -0
- data/vendor/eac_templates/spec/lib/eac_templates/searcher_spec_files/path2/subdir1/file3.template +1 -0
- data/vendor/eac_templates/spec/lib/object/template_spec.rb +23 -0
- data/vendor/eac_templates/spec/lib/object/template_spec_files/path/my_stub_with_template +1 -0
- data/vendor/eac_templates/spec/rubocop_spec.rb +3 -0
- data/vendor/eac_templates/spec/spec_helper.rb +4 -0
- data/vendor/ehbrs_ruby_utils/ehbrs_ruby_utils.gemspec +4 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/core_ext.rb +5 -0
- data/{lib/ehbrs → vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils}/fs/compressed_package.rb +1 -1
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs/selected/build.rb +41 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs/selected/build_file.rb +27 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs/selected.rb +35 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/fs.rb +10 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music/lyrics_book/album.rb +42 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music/lyrics_book/resource.rb +64 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music/lyrics_book/song.rb +68 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music/lyrics_book.rb +65 -0
- data/{lib/ehbrs/fs.rb → vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/music.rb} +2 -2
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/patches/object.rb +4 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/patches.rb +4 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/version.rb +1 -1
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/container.rb +31 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/stream.rb +1 -1
- data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/album/inner.html.erb +3 -0
- data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/custom_style.css +15 -0
- data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/index.html.erb +14 -0
- data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/main.html.erb +24 -0
- data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/resource/main.html.erb +8 -0
- data/vendor/ehbrs_ruby_utils/template/ehbrs_ruby_utils/music/lyrics_book/song/inner.html.erb +9 -0
- data/vendor/ultimate_lyrics/Gemfile +5 -0
- data/vendor/ultimate_lyrics/bin/download_parser_spec_files.rb +94 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/field.rb +83 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/lyrics.rb +13 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/parser.rb +28 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/exclude_item.rb +17 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/extract_item.rb +21 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/item.rb +48 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/replace_fields.rb +13 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/rule.rb +52 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider/url_format.rb +21 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider.rb +96 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/provider_search.rb +43 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/providers_data.xml +356 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/song_metadata/field.rb +24 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/song_metadata.rb +28 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics/version.rb +5 -0
- data/vendor/ultimate_lyrics/lib/ultimate_lyrics.rb +7 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec.rb +20 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.source.html +8 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.source.html +8 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/encyclopaedia_metallum__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.source.html +193 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.source.html +193 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/hindilyrics_net_bollywood_songs__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.source.html +87 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.target.yaml +36 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.source.html +4 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyrics_com__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.source.html +2 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.source.html +2 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsplugin_com__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.source.html +101 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/lyricsreg_com__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.source.html +29 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.source.html +29 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/mp3lyrics_org__milton_nascimento_rouxinol.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.source.html +1301 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.target.yaml +3 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec_files/songlyrics_com__michael_jackson_thriller.url +1 -0
- data/vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/provider_search_spec.rb +72 -0
- data/vendor/ultimate_lyrics/spec/rubocop_spec.rb +3 -0
- data/vendor/ultimate_lyrics/spec/spec_helper.rb +4 -0
- data/vendor/ultimate_lyrics/ultimate_lyrics.gemspec +21 -0
- metadata +170 -13
- data/lib/ehbrs/patches/module/erb_template.rb +0 -11
- data/lib/ehbrs/patches/object/erb_template.rb +0 -9
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 558059e25d8a6a43c217fc0bee9124272d21dc2ff16412d55259d50be5cce94b
|
4
|
+
data.tar.gz: 5f636e17e8b5577e7ae65b72e56b82d9c28e34c34902c82afb83115d1d7a331e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f10bf9f2eecd95c38d19362315c126411addc52fdf972e2f1d7a3be1abe26fd58ee09f5159b9618ffe1533fd4b032a14d908fa3d9b6d37b4438206986a1fce0
|
7
|
+
data.tar.gz: 94f20bb40c888fc248f357634148a0c0b9bd907164381e95a0e60af58c1794021c525c076605d1c72fc4a2c58c0738cc391cf2045d68f7641afa7b25b90f4741
|
data/Gemfile.lock
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ehbrs-tools (0.
|
4
|
+
ehbrs-tools (0.28.1)
|
5
5
|
avm-tools (~> 0.82, >= 0.82.1)
|
6
6
|
eac_cli (~> 0.12, >= 0.12.5)
|
7
7
|
eac_ruby_utils (~> 0.71)
|
8
|
-
ehbrs_ruby_utils (~> 0.8
|
8
|
+
ehbrs_ruby_utils (~> 0.8, >= 0.8.1)
|
9
9
|
filesize
|
10
10
|
inifile (~> 3.0)
|
11
11
|
os
|
@@ -14,12 +14,13 @@ PATH
|
|
14
14
|
PATH
|
15
15
|
remote: vendor/aranha-parsers
|
16
16
|
specs:
|
17
|
-
aranha-parsers (0.8.
|
17
|
+
aranha-parsers (0.8.5)
|
18
18
|
activesupport (>= 4.0.0)
|
19
19
|
addressable (~> 2.7)
|
20
20
|
curb (~> 0.9.10)
|
21
21
|
eac_ruby_utils (~> 0.74)
|
22
22
|
httpclient (~> 2.8, >= 2.8.3)
|
23
|
+
nokogiri (~> 1.12, >= 1.12.4)
|
23
24
|
ofx-parser (~> 1.1.0)
|
24
25
|
|
25
26
|
PATH
|
@@ -32,7 +33,7 @@ PATH
|
|
32
33
|
PATH
|
33
34
|
remote: vendor/eac_cli
|
34
35
|
specs:
|
35
|
-
eac_cli (0.
|
36
|
+
eac_cli (0.23.0)
|
36
37
|
colorize (~> 0.8.1)
|
37
38
|
eac_config (~> 0.5, >= 0.5.1)
|
38
39
|
eac_ruby_utils (~> 0.70)
|
@@ -51,29 +52,63 @@ PATH
|
|
51
52
|
eac_ruby_utils (~> 0.74)
|
52
53
|
eac_templates (~> 0.1)
|
53
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
|
+
|
54
63
|
PATH
|
55
64
|
remote: vendor/eac_ruby_base0
|
56
65
|
specs:
|
57
|
-
eac_ruby_base0 (0.
|
66
|
+
eac_ruby_base0 (0.11.0)
|
58
67
|
eac_cli (~> 0.22, >= 0.22.2)
|
59
|
-
|
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)
|
60
77
|
eac_ruby_utils (~> 0.70)
|
61
78
|
|
62
79
|
PATH
|
63
80
|
remote: vendor/eac_ruby_utils
|
64
81
|
specs:
|
65
|
-
eac_ruby_utils (0.
|
82
|
+
eac_ruby_utils (0.76.0)
|
66
83
|
activesupport (>= 4.0)
|
67
84
|
addressable (~> 2.6)
|
68
85
|
filesize
|
69
86
|
net-ssh (~> 4.2)
|
70
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
|
+
|
71
95
|
PATH
|
72
96
|
remote: vendor/ehbrs_ruby_utils
|
73
97
|
specs:
|
74
|
-
ehbrs_ruby_utils (0.
|
98
|
+
ehbrs_ruby_utils (0.12.0)
|
99
|
+
aranha-parsers (~> 0.8, >= 0.8.5)
|
100
|
+
avm (~> 0.3, >= 0.3.2)
|
75
101
|
eac_ruby_utils (~> 0.70)
|
76
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)
|
77
112
|
|
78
113
|
GEM
|
79
114
|
remote: https://rubygems.org/
|
@@ -88,23 +123,23 @@ GEM
|
|
88
123
|
public_suffix (>= 2.0.2, < 5.0)
|
89
124
|
asciidoctor (2.0.16)
|
90
125
|
ast (2.4.2)
|
91
|
-
avm (0.3.
|
126
|
+
avm (0.3.2)
|
92
127
|
eac_docker (~> 0.3)
|
93
128
|
eac_git (~> 0.6)
|
94
129
|
eac_ruby_utils (~> 0.68)
|
95
130
|
eac_templates (~> 0.1, >= 0.1.1)
|
96
|
-
avm-apps (0.4.
|
131
|
+
avm-apps (0.4.1)
|
97
132
|
eac_ruby_utils (~> 0.67)
|
98
|
-
avm-eac_asciidoctor_base0 (0.3.
|
133
|
+
avm-eac_asciidoctor_base0 (0.3.1)
|
99
134
|
asciidoctor (~> 2.0, >= 2.0.12)
|
100
135
|
avm-eac_webapp_base0 (~> 0.1)
|
101
136
|
eac_ruby_utils (~> 0.63)
|
102
137
|
os
|
103
138
|
rouge (~> 3.26)
|
104
|
-
avm-eac_webapp_base0 (0.1.
|
139
|
+
avm-eac_webapp_base0 (0.1.1)
|
105
140
|
avm (~> 0.1)
|
106
141
|
eac_ruby_utils (~> 0.68)
|
107
|
-
avm-tools (0.
|
142
|
+
avm-tools (0.106.0)
|
108
143
|
aranha-parsers (~> 0.4)
|
109
144
|
asciidoctor (~> 2.0, >= 2.0.12)
|
110
145
|
avm (~> 0.1)
|
@@ -150,13 +185,7 @@ GEM
|
|
150
185
|
rubocop (~> 0.80.1)
|
151
186
|
rubocop-rails (~> 2.4.2)
|
152
187
|
rubocop-rspec (~> 1.38.1)
|
153
|
-
|
154
|
-
bundler (~> 2.2, >= 2.2.17)
|
155
|
-
eac_ruby_utils (~> 0.70)
|
156
|
-
eac_templates (0.1.1)
|
157
|
-
eac_config (~> 0.5)
|
158
|
-
eac_ruby_utils (~> 0.64)
|
159
|
-
faraday (1.7.0)
|
188
|
+
faraday (1.8.0)
|
160
189
|
faraday-em_http (~> 1.0)
|
161
190
|
faraday-em_synchrony (~> 1.0)
|
162
191
|
faraday-excon (~> 1.1)
|
@@ -190,20 +219,23 @@ GEM
|
|
190
219
|
minitest (5.14.4)
|
191
220
|
multipart-post (2.1.1)
|
192
221
|
net-ssh (4.2.0)
|
222
|
+
nokogiri (1.12.4-x86_64-linux)
|
223
|
+
racc (~> 1.4)
|
193
224
|
ofx-parser (1.1.0)
|
194
225
|
hpricot (>= 0.6)
|
195
226
|
os (1.1.1)
|
196
|
-
parallel (1.
|
227
|
+
parallel (1.21.0)
|
197
228
|
parseconfig (1.1.0)
|
198
229
|
parser (3.0.2.0)
|
199
230
|
ast (~> 2.4.1)
|
200
231
|
parslet (1.8.2)
|
201
232
|
public_suffix (4.0.6)
|
233
|
+
racc (1.5.2)
|
202
234
|
rack (2.2.3)
|
203
235
|
rainbow (3.0.0)
|
204
236
|
rchardet (1.8.0)
|
205
237
|
rexml (3.2.5)
|
206
|
-
rouge (3.26.
|
238
|
+
rouge (3.26.1)
|
207
239
|
rspec (3.10.0)
|
208
240
|
rspec-core (~> 3.10.0)
|
209
241
|
rspec-expectations (~> 3.10.0)
|
@@ -230,12 +262,14 @@ GEM
|
|
230
262
|
rubocop (>= 0.72.0)
|
231
263
|
rubocop-rspec (1.38.1)
|
232
264
|
rubocop (>= 0.68.1)
|
265
|
+
ruby-filemagic (0.7.2)
|
233
266
|
ruby-progressbar (1.11.0)
|
234
267
|
ruby2_keywords (0.0.5)
|
235
268
|
rubyzip (2.3.2)
|
236
269
|
selenium-webdriver (3.142.7)
|
237
270
|
childprocess (>= 0.5, < 4.0)
|
238
271
|
rubyzip (>= 1.2.2)
|
272
|
+
taglib-ruby (1.1.0)
|
239
273
|
telegram-bot-ruby (0.16.0)
|
240
274
|
dry-inflector
|
241
275
|
faraday
|
@@ -259,11 +293,15 @@ DEPENDENCIES
|
|
259
293
|
eac_cli!
|
260
294
|
eac_config!
|
261
295
|
eac_docker!
|
296
|
+
eac_fs!
|
262
297
|
eac_ruby_base0!
|
263
298
|
eac_ruby_gem_support (~> 0.3)
|
299
|
+
eac_ruby_gems_utils!
|
264
300
|
eac_ruby_utils!
|
301
|
+
eac_templates!
|
265
302
|
ehbrs-tools!
|
266
303
|
ehbrs_ruby_utils!
|
304
|
+
ultimate_lyrics!
|
267
305
|
|
268
306
|
BUNDLED WITH
|
269
307
|
2.2.25
|
File without changes
|
@@ -1,56 +1,51 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/envs'
|
4
|
-
|
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
|
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 '
|
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
|
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.
|
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
|
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
|
-
|
63
|
-
|
64
|
-
|
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
|
-
'
|
35
|
+
'videos_local_files_import_list[list_file]' => ::File.new(files_list_path)
|
36
36
|
},
|
37
37
|
header: {
|
38
38
|
'Accept' => 'application/json'
|
data/lib/ehbrs/tools/version.rb
CHANGED
data/lib/ehbrs/user_dirs.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
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
|
-
::
|
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 '
|
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
|
-
::
|
40
|
+
::EhbrsRubyUtils::Fs::CompressedPackage.new(path).extract_to(r)
|
41
41
|
r
|
42
42
|
end
|
43
43
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'eac_fs/cache'
|
3
4
|
require 'eac_ruby_utils/fs/temp'
|
4
5
|
require 'ehbrs/tools/runner'
|
5
6
|
require 'ehbrs/tools/runner/fs/used_space'
|
@@ -8,7 +9,7 @@ require 'ehbrs/observers/with_persistence'
|
|
8
9
|
RSpec.describe ::Ehbrs::Tools::Runner::Fs::UsedSpace do
|
9
10
|
let(:target) { ::EacRubyUtils::Fs::Temp.directory }
|
10
11
|
let(:user_dir) { ::EacRubyUtils::Fs::Temp.directory }
|
11
|
-
let(:cached_user_dir) { ::
|
12
|
+
let(:cached_user_dir) { ::EacFs::Cache.new(user_dir) }
|
12
13
|
let(:observers_user_dir) { cached_user_dir.child('observers') }
|
13
14
|
let(:observer_path) do
|
14
15
|
observers_user_dir.child(target.to_s.parameterize).content_path.to_pathname
|
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.add_dependency 'curb', '~> 0.9.10'
|
18
18
|
s.add_dependency 'eac_ruby_utils', '~> 0.74'
|
19
19
|
s.add_dependency 'httpclient', '~> 2.8', '>= 2.8.3'
|
20
|
+
s.add_dependency 'nokogiri', '~> 1.12', '>= 1.12.4'
|
20
21
|
s.add_dependency 'ofx-parser', '~> 1.1.0'
|
21
22
|
|
22
23
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3', '>= 0.3.3'
|
File without changes
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'addressable'
|
4
4
|
require 'curb'
|
5
|
+
require 'aranha/parsers/source_address/fetch_content_error'
|
5
6
|
|
6
7
|
module Aranha
|
7
8
|
module Parsers
|
@@ -34,15 +35,27 @@ module Aranha
|
|
34
35
|
def content
|
35
36
|
c = ::Curl::Easy.new(url)
|
36
37
|
c.follow_location = true
|
37
|
-
|
38
|
+
curl_perform(c)
|
38
39
|
return c.body_str if c.status.to_i == 200
|
39
40
|
|
40
|
-
raise
|
41
|
+
raise ::Aranha::Parsers::SourceAddress::FetchContentError,
|
42
|
+
"Get #{url} returned #{c.status.to_i}"
|
41
43
|
end
|
42
44
|
|
43
45
|
def serialize
|
44
46
|
url
|
45
47
|
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def curl_perform(curl)
|
52
|
+
unless curl.perform
|
53
|
+
raise(::Aranha::Parsers::SourceAddress::FetchContentError,
|
54
|
+
"Curl perform failed (URL: #{url})")
|
55
|
+
end
|
56
|
+
rescue Curl::Err::CurlError => e
|
57
|
+
raise ::Aranha::Parsers::SourceAddress::FetchContentError, "CURL error: #{e.class.name}"
|
58
|
+
end
|
46
59
|
end
|
47
60
|
end
|
48
61
|
end
|
@@ -18,7 +18,7 @@ module EacCli
|
|
18
18
|
|
19
19
|
enable_listable
|
20
20
|
enable_abstract_methods :build_value, :default_value
|
21
|
-
lists.add_symbol :option, :optional, :usage, :repeat, :required
|
21
|
+
lists.add_symbol :option, :default, :optional, :usage, :repeat, :required
|
22
22
|
common_constructor :short, :long, :description, :options, default: [{}] do
|
23
23
|
raise 'Nor short neither long selector was set' if short.blank? && long.blank?
|
24
24
|
|
@@ -27,6 +27,14 @@ module EacCli
|
|
27
27
|
)
|
28
28
|
end
|
29
29
|
|
30
|
+
def default_value
|
31
|
+
default_value? ? options[OPTION_DEFAULT] : default_default_value
|
32
|
+
end
|
33
|
+
|
34
|
+
def default_value?
|
35
|
+
options.key?(OPTION_DEFAULT)
|
36
|
+
end
|
37
|
+
|
30
38
|
def identifier
|
31
39
|
[long, short].each do |v|
|
32
40
|
v.to_s.if_present { |vv| return vv.variableize.to_sym }
|
@@ -36,9 +36,9 @@ module EacCli
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def option_definition(option)
|
39
|
-
self.class.option_usage_full(option)
|
40
|
-
|
41
|
-
|
39
|
+
[self.class.option_usage_full(option), option.description,
|
40
|
+
option.default_value? ? "[Default: \"#{option.default_value}\"]" : nil]
|
41
|
+
.reject(&:blank?).join(OPTION_DESC_SEP)
|
42
42
|
end
|
43
43
|
|
44
44
|
def section(header, include_header = true)
|