avm-tools 0.83.0 → 0.87.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/eac_writings_base1/apache_host.rb +17 -0
  3. data/lib/avm/eac_writings_base1/build.rb +2 -2
  4. data/lib/avm/eac_writings_base1/deploy.rb +26 -0
  5. data/lib/avm/eac_writings_base1/instance.rb +11 -0
  6. data/lib/avm/git/file_auto_fixup.rb +22 -3
  7. data/lib/avm/instances/base/auto_values/database.rb +10 -0
  8. data/lib/avm/instances/entry_keys.rb +1 -1
  9. data/lib/avm/projects/stereotypes/git/update.rb +42 -0
  10. data/lib/avm/projects/stereotypes/git/update/subrepo.rb +85 -0
  11. data/lib/avm/tools/runner.rb +2 -4
  12. data/lib/avm/tools/runner/eac_rails_base0.rb +1 -1
  13. data/lib/avm/tools/runner/eac_rails_base0/apache_path.rb +1 -1
  14. data/lib/avm/tools/runner/eac_redmine_base0.rb +1 -1
  15. data/lib/avm/tools/runner/eac_redmine_base0/core_update.rb +1 -1
  16. data/lib/avm/tools/runner/eac_redmine_base0/docker.rb +1 -1
  17. data/lib/avm/tools/runner/eac_redmine_base0/project_rename.rb +1 -1
  18. data/lib/avm/tools/runner/eac_wordpress_base0.rb +1 -1
  19. data/lib/avm/tools/runner/eac_writings_base0.rb +1 -1
  20. data/lib/avm/tools/runner/eac_writings_base1.rb +15 -0
  21. data/lib/avm/tools/runner/files.rb +7 -15
  22. data/lib/avm/tools/runner/files/format.rb +18 -27
  23. data/lib/avm/tools/runner/files/rotate.rb +11 -21
  24. data/lib/avm/tools/runner/git.rb +10 -15
  25. data/lib/avm/tools/runner/git/auto_commit.rb +2 -2
  26. data/lib/avm/tools/runner/git/auto_fixup.rb +23 -16
  27. data/lib/avm/tools/runner/git/commit.rb +2 -2
  28. data/lib/avm/tools/runner/git/deploy.rb +18 -28
  29. data/lib/avm/tools/runner/git/dirty_files.rb +2 -2
  30. data/lib/avm/tools/runner/git/issue.rb +2 -2
  31. data/lib/avm/tools/runner/git/organize.rb +2 -2
  32. data/lib/avm/tools/runner/git/revisions_test.rb +2 -2
  33. data/lib/avm/tools/runner/git/subrepo.rb +2 -2
  34. data/lib/avm/tools/runner/git/subrepo/check.rb +2 -2
  35. data/lib/avm/tools/runner/git/subrepo/clone.rb +2 -2
  36. data/lib/avm/tools/runner/git/subrepo/fix.rb +4 -3
  37. data/lib/avm/tools/runner/instance.rb +1 -1
  38. data/lib/avm/tools/runner/instance/info.rb +1 -1
  39. data/lib/avm/tools/runner/launcher.rb +1 -1
  40. data/lib/avm/tools/runner/launcher/instances.rb +1 -1
  41. data/lib/avm/tools/runner/launcher/projects.rb +1 -1
  42. data/lib/avm/tools/runner/launcher/publish.rb +1 -1
  43. data/lib/avm/tools/runner/local_project.rb +5 -8
  44. data/lib/avm/tools/runner/local_project/eac_writings_base0.rb +5 -6
  45. data/lib/avm/tools/runner/local_project/eac_writings_base0/build_chapters.rb +4 -6
  46. data/lib/avm/tools/runner/local_project/eac_writings_base0/build_single.rb +4 -5
  47. data/lib/avm/tools/runner/local_project/eac_writings_base0/info.rb +4 -5
  48. data/lib/avm/tools/runner/local_project/eac_writings_base1.rb +2 -2
  49. data/lib/avm/tools/runner/local_project/eac_writings_base1/build.rb +2 -2
  50. data/lib/avm/tools/runner/local_project/info.rb +2 -2
  51. data/lib/avm/tools/runner/local_project/ruby.rb +2 -2
  52. data/lib/avm/tools/runner/local_project/ruby/bundler.rb +2 -2
  53. data/lib/avm/tools/runner/local_project/ruby/bundler/gemfile_lock.rb +2 -2
  54. data/lib/avm/tools/runner/local_project/test.rb +2 -2
  55. data/lib/avm/tools/runner/local_project/update.rb +2 -2
  56. data/lib/avm/tools/runner/local_project/version_bump.rb +10 -13
  57. data/lib/avm/tools/runner/ruby.rb +1 -1
  58. data/lib/avm/tools/runner/ruby/gems.rb +1 -1
  59. data/lib/avm/tools/runner/ruby/gems/generate.rb +1 -1
  60. data/lib/avm/tools/runner/ruby/rubocop.rb +1 -1
  61. data/lib/avm/tools/runner/self.rb +1 -1
  62. data/lib/avm/tools/runner/self/docker.rb +1 -1
  63. data/lib/avm/tools/version.rb +1 -1
  64. data/template/avm/eac_rails_base0/deploy/config/database.yml.template +3 -2
  65. data/vendor/eac_cli/lib/eac_cli/docopt/runner_context_replacement.rb +15 -0
  66. data/vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb +5 -0
  67. data/vendor/eac_cli/lib/eac_cli/parser/alternative.rb +4 -4
  68. data/vendor/eac_cli/lib/eac_cli/parser/alternative/long_options.rb +37 -0
  69. data/vendor/eac_cli/lib/eac_cli/parser/alternative/option_argument.rb +29 -0
  70. data/vendor/eac_cli/lib/eac_cli/parser/alternative/options.rb +7 -36
  71. data/vendor/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +45 -0
  72. data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands.rb +14 -2
  73. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  74. data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +22 -1
  75. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +1 -0
  76. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +9 -6
  77. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb +4 -9
  78. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  79. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_concern/module_setup.rb +16 -6
  80. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +2 -99
  81. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_initialize.rb +29 -0
  82. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/instance_initialize.rb +53 -0
  83. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/super_args.rb +54 -0
  84. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb +10 -1
  85. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/traverser.rb +0 -2
  86. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +4 -1
  87. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/template.rb +10 -0
  88. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/template.rb +1 -8
  89. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  90. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +8 -0
  91. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/common_concern_spec.rb +14 -4
  92. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +30 -0
  93. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +2 -1
  94. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d469de0c152bb7c3b2f23bf083a10d66bed14ee4963cd6a6502ac8ef545145c9
4
- data.tar.gz: 04a3077630a42a18df2a82ab7cf2874aa7f16b133d3ab99d899dc34e3231a571
3
+ metadata.gz: df3208595cdaefa7e6f51a5a14518064df146b2081e32365e3ad746326e844bb
4
+ data.tar.gz: 367b039c49b3ff3e9a8083bafe1c889656e924403014efbeec2f3032ccfe0247
5
5
  SHA512:
6
- metadata.gz: a82ad8c06b90942d34e09e4c388a7b5335561026b5f4b63c62c1a623daca8c99ae10410caa70207e63cb3487b11c1aa84adab5a1a206e8c00cd5448a1c5ea4f3
7
- data.tar.gz: 932ce1dad2c115a3a04998b4bed1697e179f257beba3f35af343f02f51274cbe8d25ace9f2ca9667289da18561dbcff9ab40dbe87fd04ebaaaac740efd601336
6
+ metadata.gz: 1e1aa08cda713c6600a551681f4f2d986e939675ba41bd5f270497f9dba564213906ae71890ce9ea00285a289d8edc626d70bd91aa31e2a381524bc19404d58b
7
+ data.tar.gz: 25c272f9097b2d48cf1d88ece314eef1361527644942c3b0e1e862709f60e155ac4db9a31b823432f72abd478eaec9f4218503932228a8bf0c44c30b3a3ee46b
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/apache_host'
4
+
5
+ module Avm
6
+ module EacWritingsBase1
7
+ class ApacheHost < ::Avm::EacWebappBase0::ApacheHost
8
+ def document_root
9
+ instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
10
+ end
11
+
12
+ def extra_content
13
+ ''
14
+ end
15
+ end
16
+ end
17
+ end
@@ -12,7 +12,7 @@ module Avm
12
12
  enable_listable
13
13
  lists.add_symbol :option, :target_directory
14
14
  common_constructor :project, :options, default: [{}] do
15
- self.options = options.symbolize_keys
15
+ self.options = self.class.lists.option.hash_keys_validate!(options.symbolize_keys)
16
16
  end
17
17
 
18
18
  def run
@@ -27,7 +27,7 @@ module Avm
27
27
 
28
28
  def target_directory
29
29
  ::EacRubyUtils::Fs::ClearableDirectory.new(
30
- options[OPTION_TARGET_DIRECTORY].if_present(default_target_directory)
30
+ options[OPTION_TARGET_DIRECTORY] || default_target_directory
31
31
  )
32
32
  end
33
33
 
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/deploy'
4
+ require 'avm/eac_writings_base1/project'
5
+ require 'avm/eac_writings_base1/build'
6
+
7
+ module Avm
8
+ module EacWritingsBase1
9
+ class Deploy < ::Avm::EacWebappBase0::Deploy
10
+ def build_content
11
+ ::Avm::EacWritingsBase1::Build.new(
12
+ project,
13
+ ::Avm::EacWritingsBase1::Build::OPTION_TARGET_DIRECTORY => build_dir
14
+ ).run
15
+ end
16
+
17
+ private
18
+
19
+ def project_uncached
20
+ ::Avm::EacWritingsBase1::Project.new(
21
+ instance.source_instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
22
+ )
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/instance'
4
+
5
+ module Avm
6
+ module EacWritingsBase1
7
+ class Instance < ::Avm::EacWebappBase0::Instance
8
+ FILES_UNITS = {}.freeze
9
+ end
10
+ end
11
+ end
@@ -7,8 +7,12 @@ module Avm
7
7
  class FileAutoFixup
8
8
  enable_console_speaker
9
9
  enable_simple_cache
10
+ enable_listable
11
+ lists.add_symbol :option, :select, :unique
10
12
 
11
- common_constructor :git, :path
13
+ common_constructor :git, :path, :options, default: [{}] do
14
+ self.options = self.class.lists.option.hash_keys_validate!(options.symbolize_keys)
15
+ end
12
16
 
13
17
  COMMIT_FORMAT = '%h - %s (%cr)'
14
18
  COMMITS_SEARCH_INTERVAL = 'origin/master..HEAD'
@@ -18,8 +22,8 @@ module Avm
18
22
  start_banner
19
23
  if commits.count.zero?
20
24
  run_no_commits_found
21
- elsif commits.count == 1
22
- fixup_commit(commits.first)
25
+ elsif auto_selected_commit.present?
26
+ fixup_commit(auto_selected_commit)
23
27
  else
24
28
  run_commits_selection
25
29
  end
@@ -27,6 +31,10 @@ module Avm
27
31
 
28
32
  private
29
33
 
34
+ def auto_selected_commit_uncached
35
+ selected_commit_by_unique || select_commit_by_select
36
+ end
37
+
30
38
  def start_banner
31
39
  infov 'Path', path
32
40
  infov ' Commits found', commits.count
@@ -56,6 +64,17 @@ module Avm
56
64
  request_input('Which commit?', list: commits_by_position)
57
65
  end
58
66
 
67
+ def selected_commit_by_unique
68
+ return unless options[OPTION_UNIQUE]
69
+ return commits.first if commits.first
70
+ end
71
+
72
+ def select_commit_by_select
73
+ options[OPTION_SELECT].if_present(&:to_i).if_present do |v|
74
+ commits.find { |commit| commit.position == v }
75
+ end
76
+ end
77
+
59
78
  def commits_banner
60
79
  commits.each_with_index do |commit, _index|
61
80
  infov " #{commit.position}", format_commit(commit)
@@ -8,6 +8,7 @@ module Avm
8
8
  module AutoValues
9
9
  module Database
10
10
  DEFAULT_HOSTNAME = '127.0.0.1'
11
+ DEFAULT_LIMIT = 5
11
12
  DEFAULT_PORTS = {
12
13
  'postgresql' => 5432,
13
14
  'mysql' => 3306,
@@ -15,6 +16,7 @@ module Avm
15
16
  'sqlserver' => 1433
16
17
  }.freeze
17
18
  DEFAULT_SYSTEM = 'postgresql'
19
+ DEFAULT_TIMEOUT = 5000
18
20
 
19
21
  def auto_database_name
20
22
  inherited_entry_value(::Avm::Instances::EntryKeys::DATABASE_ID,
@@ -25,6 +27,10 @@ module Avm
25
27
  database_auto_common('hostname') || DEFAULT_HOSTNAME
26
28
  end
27
29
 
30
+ def auto_database_limit
31
+ database_auto_common('limit') || DEFAULT_LIMIT
32
+ end
33
+
28
34
  def auto_database_password
29
35
  database_auto_common('password')
30
36
  end
@@ -41,6 +47,10 @@ module Avm
41
47
  database_auto_common('system') || DEFAULT_SYSTEM
42
48
  end
43
49
 
50
+ def auto_database_timeout
51
+ database_auto_common('timeout') || DEFAULT_TIMEOUT
52
+ end
53
+
44
54
  private
45
55
 
46
56
  def database_auto_common(suffix)
@@ -41,7 +41,7 @@ module Avm
41
41
 
42
42
  {
43
43
  '' => %w[fs_path host_id source_instance_id],
44
- database: %w[id hostname name password port system username],
44
+ database: %w[id hostname limit name password port system timeout username],
45
45
  mailer: {
46
46
  '' => %w[id from reply_to],
47
47
  smtp: %w[address port domain username password authentication starttls_auto]
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+ require 'avm/patches/class/i18n'
5
+
6
+ module Avm
7
+ module Projects
8
+ module Stereotypes
9
+ class Git
10
+ class Update
11
+ require_sub __FILE__
12
+ enable_simple_cache
13
+ enable_console_speaker
14
+ common_constructor :instance
15
+
16
+ delegate :git_repo, to: :instance
17
+
18
+ def run
19
+ clean_all
20
+ selected_subrepos.map do |f|
21
+ infov 'Subrepo', f
22
+ on_speaker_node do |node|
23
+ node.stderr_line_prefix = ' '
24
+ ::Avm::Projects::Stereotypes::Git::Update::Subrepo.new(self, f).run
25
+ end
26
+ end
27
+ end
28
+
29
+ def selected_subrepos_uncached
30
+ git_repo.command('subrepo', '-q', 'status').execute!.split("\n").map(&:strip)
31
+ .select(&:present?).map(&:to_pathname)
32
+ end
33
+
34
+ def clean_all
35
+ infom 'Cleaning'
36
+ git_repo.command('subrepo', 'clean', '--all').execute!
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_launcher/git/base'
4
+ require 'avm/git/commit'
5
+
6
+ module Avm
7
+ module Projects
8
+ module Stereotypes
9
+ class Git
10
+ class Update
11
+ class Subrepo
12
+ TRANSLATE_CLASS = self
13
+
14
+ require_sub __FILE__, include_modules: true
15
+ enable_simple_cache
16
+ enable_console_speaker
17
+ common_constructor :parent_update, :subpath do
18
+ self.subpath = subpath.to_pathname
19
+ end
20
+
21
+ delegate :git_repo, :instance, to: :parent_update
22
+
23
+ def run
24
+ run_banner
25
+ if base_commit.sha1 == pull_commit.sha1
26
+ infom 'No new commit (No changes)'
27
+ elsif fix_message.present?
28
+ on_fix_message_present
29
+ else
30
+ warn 'No fix message found'
31
+ end
32
+ end
33
+
34
+ private
35
+
36
+ def base_commit_uncached
37
+ ::Avm::Git::Commit.new(git_repo, git_repo.rev_parse('HEAD'))
38
+ end
39
+
40
+ def on_fix_message_present
41
+ infom 'Fixing message...'
42
+ infov 'Message', fix_message
43
+ git_repo.command('commit', '--amend', '-m', fix_message).execute!
44
+ end
45
+
46
+ def pull_commit_uncached
47
+ base_commit
48
+ infom 'Pulling subrepo...'
49
+ git_repo.command('subrepo', 'pull', '--force', subpath).execute!
50
+ ::Avm::Git::Commit.new(
51
+ ::EacLauncher::Git::Base.new(git_repo.root_path.to_path),
52
+ git_repo.rev_parse('HEAD')
53
+ )
54
+ end
55
+
56
+ def run_banner
57
+ infov 'Base SHA1', base_commit.sha1
58
+ infov 'Pull SHA1', pull_commit.sha1
59
+ end
60
+
61
+ def fix_message
62
+ TRANSLATE_CLASS.translate(
63
+ fix_message_translate_key, subpath: subpath, name: subpath.basename,
64
+ __locale: instance.locale
65
+ )
66
+ end
67
+
68
+ def fix_message_translate_key
69
+ if gitrepo_only_changed?
70
+ :gitrepo_only_changed_fix_message
71
+ else
72
+ :content_updated_fix_message
73
+ end
74
+ end
75
+
76
+ def gitrepo_only_changed?
77
+ pull_commit.files.count == 1 &&
78
+ ::File.basename(pull_commit.files.first.path) == '.gitrepo'
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
@@ -3,14 +3,12 @@
3
3
  require 'avm/self'
4
4
  require 'avm/tools/version'
5
5
  require 'eac_ruby_base0/runner'
6
- require 'eac_ruby_utils/console/docopt_runner'
7
- require 'eac_ruby_utils/core_ext'
8
6
 
9
7
  module Avm
10
8
  module Tools
11
- class Runner < ::EacRubyUtils::Console::DocoptRunner
12
- include ::EacRubyBase0::Runner
9
+ class Runner
13
10
  require_sub __FILE__
11
+ include ::EacRubyBase0::Runner
14
12
 
15
13
  runner_definition do
16
14
  desc 'Tools for AVM.'
@@ -7,7 +7,7 @@ require 'eac_ruby_utils/core_ext'
7
7
 
8
8
  module Avm
9
9
  module Tools
10
- class Runner < ::EacRubyUtils::Console::DocoptRunner
10
+ class Runner
11
11
  class EacRailsBase0 < ::Avm::EacRailsBase1::Runner
12
12
  require_sub __FILE__
13
13
  end
@@ -7,7 +7,7 @@ require 'avm/eac_rails_base0/apache_path'
7
7
 
8
8
  module Avm
9
9
  module Tools
10
- class Runner < ::EacRubyUtils::Console::DocoptRunner
10
+ class Runner
11
11
  class EacRailsBase0 < ::Avm::EacRailsBase1::Runner
12
12
  class ApachePath < ::EacRubyUtils::Console::DocoptRunner
13
13
  runner_with
@@ -7,7 +7,7 @@ require 'eac_ruby_utils/core_ext'
7
7
 
8
8
  module Avm
9
9
  module Tools
10
- class Runner < ::EacRubyUtils::Console::DocoptRunner
10
+ class Runner
11
11
  class EacRedmineBase0 < ::Avm::EacRailsBase1::Runner
12
12
  require_sub __FILE__
13
13
  end
@@ -7,7 +7,7 @@ require 'eac_ruby_utils/core_ext'
7
7
 
8
8
  module Avm
9
9
  module Tools
10
- class Runner < ::EacRubyUtils::Console::DocoptRunner
10
+ class Runner
11
11
  class EacRedmineBase0 < ::Avm::EacRailsBase1::Runner
12
12
  class CoreUpdate < ::EacRubyUtils::Console::DocoptRunner
13
13
  include ::EacCli::DefaultRunner
@@ -4,7 +4,7 @@ require 'avm/docker/runner'
4
4
 
5
5
  module Avm
6
6
  module Tools
7
- class Runner < ::EacRubyUtils::Console::DocoptRunner
7
+ class Runner
8
8
  class EacRedmineBase0 < ::Avm::EacRailsBase1::Runner
9
9
  class Docker < ::Avm::Docker::Runner
10
10
  end
@@ -5,7 +5,7 @@ require 'avm/eac_rails_base1/runner/code_runner'
5
5
 
6
6
  module Avm
7
7
  module Tools
8
- class Runner < ::EacRubyUtils::Console::DocoptRunner
8
+ class Runner
9
9
  class EacRedmineBase0 < ::Avm::EacRailsBase1::Runner
10
10
  class ProjectRename
11
11
  runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle do
@@ -7,7 +7,7 @@ require 'eac_ruby_utils/core_ext'
7
7
 
8
8
  module Avm
9
9
  module Tools
10
- class Runner < ::EacRubyUtils::Console::DocoptRunner
10
+ class Runner
11
11
  class EacWordpressBase0 < ::Avm::EacWebappBase0::Runner
12
12
  require_sub __FILE__
13
13
  end
@@ -6,7 +6,7 @@ require 'eac_ruby_utils/console/docopt_runner'
6
6
 
7
7
  module Avm
8
8
  module Tools
9
- class Runner < ::EacRubyUtils::Console::DocoptRunner
9
+ class Runner
10
10
  class EacWritingsBase0 < ::Avm::EacWebappBase0::Runner
11
11
  require_sub __FILE__
12
12
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/runner'
4
+ require 'avm/eac_writings_base1'
5
+ require 'eac_ruby_utils/console/docopt_runner'
6
+
7
+ module Avm
8
+ module Tools
9
+ class Runner
10
+ class EacWritingsBase1 < ::Avm::EacWebappBase0::Runner
11
+ require_sub __FILE__
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,24 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/console/docopt_runner'
4
- require 'eac_ruby_utils/core_ext'
3
+ require 'eac_cli/core_ext'
5
4
 
6
5
  module Avm
7
6
  module Tools
8
- class Runner < ::EacRubyUtils::Console::DocoptRunner
9
- class Files < ::EacRubyUtils::Console::DocoptRunner
7
+ class Runner
8
+ class Files
10
9
  require_sub __FILE__
11
-
12
- DOC = <<~DOCOPT
13
- Files utilities for AVM.
14
-
15
- Usage:
16
- __PROGRAM__ [options] __SUBCOMMANDS__
17
- __PROGRAM__ -h | --help
18
-
19
- Options:
20
- -h --help Show this screen.
21
- DOCOPT
10
+ runner_with :help, :subcommands do
11
+ desc 'Files utilities for AVM.'
12
+ subcommands
13
+ end
22
14
  end
23
15
  end
24
16
  end