avm-tools 0.92.0 → 0.93.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/eac_asciidoctor_base0/apache_path.rb +10 -0
  3. data/lib/avm/eac_rails_base0/apache_path.rb +6 -38
  4. data/lib/avm/eac_webapp_base0/apache_host.rb +7 -31
  5. data/lib/avm/eac_webapp_base0/apache_path.rb +51 -0
  6. data/lib/avm/eac_webapp_base0/deploy.rb +12 -30
  7. data/lib/avm/eac_webapp_base0/runner/apache_host.rb +7 -10
  8. data/lib/avm/eac_webapp_base0/runner/apache_path.rb +40 -0
  9. data/lib/avm/eac_webapp_base0/runner/data.rb +6 -15
  10. data/lib/avm/eac_webapp_base0/runner/data/dump.rb +18 -24
  11. data/lib/avm/eac_webapp_base0/runner/data/load.rb +12 -23
  12. data/lib/avm/tools/runner/local_project/ruby.rb +1 -1
  13. data/lib/avm/tools/runner/local_project/ruby/bundler.rb +1 -1
  14. data/lib/avm/tools/runner/local_project/ruby/bundler/gemfile_lock.rb +1 -1
  15. data/lib/avm/tools/runner/ruby.rb +6 -14
  16. data/lib/avm/tools/runner/ruby/gems.rb +4 -7
  17. data/lib/avm/tools/runner/ruby/gems/generate.rb +12 -23
  18. data/lib/avm/tools/runner/ruby/rubocop.rb +1 -1
  19. data/lib/avm/tools/version.rb +1 -1
  20. data/template/avm/eac_rails_base0/apache_path/extra_content.conf +5 -0
  21. data/template/avm/eac_webapp_base0/apache_path/default.conf +9 -0
  22. data/vendor/avm-apps/Gemfile +5 -0
  23. data/vendor/avm-apps/avm-apps.gemspec +18 -0
  24. data/vendor/avm-apps/lib/avm/apps.rb +9 -0
  25. data/vendor/avm-apps/lib/avm/apps/jobs.rb +11 -0
  26. data/vendor/avm-apps/lib/avm/apps/jobs/base.rb +64 -0
  27. data/vendor/avm-apps/lib/avm/apps/jobs/variables_source.rb +24 -0
  28. data/vendor/avm-apps/lib/avm/apps/version.rb +7 -0
  29. data/vendor/avm-apps/spec/rubocop_spec.rb +7 -0
  30. data/vendor/avm-apps/spec/spec_helper.rb +100 -0
  31. data/vendor/eac_cli/lib/eac_cli/definition/alternative.rb +4 -7
  32. data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +15 -8
  33. data/vendor/eac_cli/lib/eac_cli/definition/base_option/initialize_args_parser.rb +47 -0
  34. data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder.rb +15 -1
  35. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  36. data/vendor/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb +4 -0
  37. metadata +17 -4
  38. data/lib/avm/tools/runner/eac_rails_base0/apache_path.rb +0 -38
  39. data/template/avm/eac_rails_base0/apache_path/default.conf +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b6568f1c571107315662a90e29d111bf1af9a534c326ea57f358fa68c7ec550
4
- data.tar.gz: 808a16008057b72ef58b11d91f05e021c814bca2100f3c5e85c0363bcac97216
3
+ metadata.gz: ff6d2b367a6cca1ba76094f9847bfc4155a3c9abe9665b582c572cb35567320b
4
+ data.tar.gz: 3aea3baa7f0e41dc0566d2d4411e1cf4c78e852aae4787f33d002a274dd4f3b2
5
5
  SHA512:
6
- metadata.gz: dc0628987c36f9c72d642546a7b4ab85e3c630a239e053af92beb86658deac8fba9c7e389947b843097499fce529d2b100d734173aad36dea200d5c874a61ef8
7
- data.tar.gz: c3b19cbf0a2d063e5a436d314b5b20ab7167e584bca986c486e6ee2fd9beccfcd156e0d7095559caf0fd4236f279aeea91a81cb45207cd5b01f769e2987c85b4
6
+ metadata.gz: 73222b5a84ab23aacbc5088f0c9a297babcae52fa5427ebcae52053c697250ac4aa8a3e91940a4f82dd5d5f5bf39f12fb730c1d9883ae44cccf606419a241117
7
+ data.tar.gz: f76583694406760f366788cc4535095604adf4eaaf784350d425d3d820764c4a531a317fde4ddab56abd496b85895cf55dc9825046c3c4fa09059d66934d4992
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/apache_path'
4
+
5
+ module Avm
6
+ module EacAsciidoctorBase0
7
+ class ApachePath < ::Avm::EacWebappBase0::ApachePath
8
+ end
9
+ end
10
+ end
@@ -1,49 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_ubuntu_base0/apache'
3
+ require 'avm/eac_webapp_base0/apache_path'
4
4
  require 'eac_ruby_utils/core_ext'
5
5
 
6
6
  module Avm
7
7
  module EacRailsBase0
8
- class ApachePath
9
- enable_console_speaker
10
- enable_simple_cache
11
- common_constructor :instance, :options, default: [{}]
12
-
13
- def run
14
- write_available_conf
15
- enable_conf
16
- reload_apache
17
- ::Avm::Result.success('Done')
18
- end
19
-
20
- def content
21
- template.child('default.conf').apply(instance)
22
- end
23
-
24
- private
25
-
26
- def apache_uncached
27
- ::Avm::EacUbuntuBase0::Apache.new(instance.host_env)
28
- end
29
-
30
- def enable_conf
31
- infom 'Enabling configuration...'
32
- conf.enable
33
- end
34
-
35
- def reload_apache
36
- infom 'Reloading Apache...'
37
- apache.service('reload')
38
- end
39
-
40
- def conf_uncached
41
- apache.conf(instance.id)
8
+ class ApachePath < ::Avm::EacWebappBase0::ApachePath
9
+ def document_root
10
+ ::File.join(super, 'public')
42
11
  end
43
12
 
44
- def write_available_conf
45
- infom 'Writing available configuration...'
46
- conf.write(content)
13
+ def extra_content
14
+ template.child('extra_content.conf').apply(instance)
47
15
  end
48
16
  end
49
17
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
+ require 'avm/apps/jobs/base'
4
5
  require 'avm/patches/object/template'
5
6
  require 'avm/eac_ubuntu_base0/apache'
6
7
  require 'avm/patches/object/template'
@@ -8,24 +9,14 @@ require 'avm/patches/object/template'
8
9
  module Avm
9
10
  module EacWebappBase0
10
11
  class ApacheHost
11
- enable_console_speaker
12
- enable_simple_cache
13
- common_constructor :instance, :options, default: [{}]
14
-
15
- def run
16
- write_available_no_ssl_site
17
- enable_no_ssl_site
18
- remove_ssl_site
19
- reload_apache
20
- run_certbot
21
- enable_ssl_site
22
- reload_apache
23
- ::Avm::Result.success('Done')
24
- end
12
+ JOBS = %w[write_available_no_ssl_site enable_no_ssl_site remove_ssl_site reload_apache
13
+ run_certbot enable_ssl_site reload_apache].freeze
14
+ include ::Avm::Apps::Jobs::Base
25
15
 
26
16
  def no_ssl_site_content
27
- ::Avm::EacWebappBase0::ApacheHost.template.child('no_ssl.conf')
28
- .apply(EntriesReader.new(self, instance))
17
+ ::Avm::EacWebappBase0::ApacheHost
18
+ .template.child('no_ssl.conf')
19
+ .apply(variables_source)
29
20
  end
30
21
 
31
22
  def ssl?
@@ -83,21 +74,6 @@ module Avm
83
74
  infom 'Writing no SSL site conf...'
84
75
  no_ssl_site.write(no_ssl_site_content)
85
76
  end
86
-
87
- class EntriesReader
88
- common_constructor :job, :instance
89
-
90
- def read_entry(path, options = {})
91
- entry_from_job(path) || instance.read_entry(path, options)
92
- end
93
-
94
- private
95
-
96
- def entry_from_job(path)
97
- method = path.gsub('.', '_').underscore
98
- return job.send(method) if job.respond_to?(method, true)
99
- end
100
- end
101
77
  end
102
78
  end
103
79
  end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/apps/jobs/base'
4
+ require 'avm/eac_ubuntu_base0/apache'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module EacWebappBase0
9
+ class ApachePath
10
+ JOBS = %w[write_available_conf enable_conf reload_apache].freeze
11
+ include ::Avm::Apps::Jobs::Base
12
+
13
+ def content
14
+ ::Avm::EacWebappBase0::ApachePath.template.child('default.conf').apply(variables_source)
15
+ end
16
+
17
+ def document_root
18
+ instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
19
+ end
20
+
21
+ def extra_content
22
+ ''
23
+ end
24
+
25
+ private
26
+
27
+ def apache_uncached
28
+ ::Avm::EacUbuntuBase0::Apache.new(instance.host_env)
29
+ end
30
+
31
+ def enable_conf
32
+ infom 'Enabling configuration...'
33
+ conf.enable
34
+ end
35
+
36
+ def reload_apache
37
+ infom 'Reloading Apache...'
38
+ apache.service('reload')
39
+ end
40
+
41
+ def conf_uncached
42
+ apache.conf(instance.id)
43
+ end
44
+
45
+ def write_available_conf
46
+ infom 'Writing available configuration...'
47
+ conf.write(content)
48
+ end
49
+ end
50
+ end
51
+ end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'active_support/callbacks'
4
+ require 'avm/apps/jobs/base'
4
5
  require 'avm/git'
5
6
  require 'avm/patches/object/template'
6
7
  require 'eac_ruby_utils/core_ext'
@@ -11,30 +12,23 @@ module Avm
11
12
  module EacWebappBase0
12
13
  class Deploy
13
14
  require_sub __FILE__, include_modules: true
14
- include ::ActiveSupport::Callbacks
15
15
 
16
16
  DEFAULT_REFERENCE = 'HEAD'
17
17
 
18
- enable_console_speaker
19
- enable_simple_cache
20
- enable_listable
21
- lists.add_symbol :option, :appended_directories, :no_request_test, :reference
22
- common_constructor :instance, :options, default: [{}] do
23
- self.options = ::Avm::EacWebappBase0::Deploy.lists.option
24
- .hash_keys_validate!(options.symbolize_keys)
25
- end
26
-
27
18
  REQUEST_TEST_JOB = 'request_test'
28
19
  JOBS = (%w[create_build_dir build_content append_instance_content write_on_target
29
20
  setup_files_units assert_instance_branch] + [REQUEST_TEST_JOB]).freeze
30
- define_callbacks(*JOBS)
21
+
22
+ include ::Avm::Apps::Jobs::Base
23
+
24
+ lists.add_symbol :option, :appended_directories, :no_request_test, :reference
25
+
26
+ def option_list
27
+ ::Avm::EacWebappBase0::Deploy.lists.option
28
+ end
31
29
 
32
30
  def run
33
- start_banner
34
- run_jobs
35
- ::Avm::Result.success('Deployed')
36
- rescue ::Avm::Result::Error => e
37
- e.to_result
31
+ super
38
32
  ensure
39
33
  remove_build_dir
40
34
  end
@@ -67,25 +61,13 @@ module Avm
67
61
  fatal_error "Request to #{uri} failed" unless response.code.to_i == 200
68
62
  end
69
63
 
70
- def variables_source
71
- instance
72
- end
73
-
74
- private
64
+ protected
75
65
 
76
66
  def jobs
77
- r = JOBS.dup
67
+ r = super
78
68
  r.delete(REQUEST_TEST_JOB) if options[OPTION_NO_REQUEST_TEST]
79
69
  r
80
70
  end
81
-
82
- def run_jobs
83
- jobs.each do |job|
84
- run_callbacks job do
85
- send(job)
86
- end
87
- end
88
- end
89
71
  end
90
72
  end
91
73
  end
@@ -1,22 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_cli/default_runner'
4
- require 'eac_ruby_utils/core_ext'
3
+ require 'avm/instances/runner'
4
+ require 'eac_cli/core_ext'
5
5
 
6
6
  module Avm
7
7
  module EacWebappBase0
8
8
  class Runner < ::Avm::Instances::Runner
9
- class ApacheHost < ::EacRubyUtils::Console::DocoptRunner
10
- include ::EacCli::DefaultRunner
11
-
12
- runner_definition do
9
+ class ApacheHost
10
+ runner_with :help do
13
11
  desc 'Configure Apache virtual host for instance.'
14
12
  bool_opt '-c', '--certbot', 'Install certbot.'
15
13
  end
16
14
 
17
15
  def run
18
- options
19
- result = stereotype_apache_host_class.new(context(:instance),
16
+ result = stereotype_apache_host_class.new(runner_context.call(:instance),
20
17
  stereotype_apache_host_options).run
21
18
  if result.error?
22
19
  fatal_error result.to_s
@@ -26,11 +23,11 @@ module Avm
26
23
  end
27
24
 
28
25
  def stereotype_apache_host_class
29
- "#{context(:instance).class.name.deconstantize}::ApacheHost".constantize
26
+ "#{runner_context.call(:instance).class.name.deconstantize}::ApacheHost".constantize
30
27
  end
31
28
 
32
29
  def stereotype_apache_host_options
33
- { certbot: options.fetch('--certbot') }
30
+ { certbot: parsed.certbot? }
34
31
  end
35
32
  end
36
33
  end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+ require 'avm/instances/runner'
5
+ require 'avm/eac_webapp_base0/runner/apache_host'
6
+ require 'avm/eac_rails_base0/apache_path'
7
+
8
+ module Avm
9
+ module EacWebappBase0
10
+ class Runner < ::Avm::Instances::Runner
11
+ class ApachePath
12
+ runner_with :help do
13
+ desc 'Configure Apache path configuration for instance.'
14
+ end
15
+
16
+ def run
17
+ if result.error?
18
+ fatal_error result.to_s
19
+ else
20
+ infov 'Result', result.label
21
+ end
22
+ end
23
+
24
+ private
25
+
26
+ def apache_path_uncached
27
+ stereotype_apache_path_class.new(runner_context.call(:instance))
28
+ end
29
+
30
+ def result_uncached
31
+ apache_path.run
32
+ end
33
+
34
+ def stereotype_apache_path_class
35
+ "#{runner_context.call(:instance).class.name.deconstantize}::ApachePath".constantize
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,24 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/console/docopt_runner'
4
- require 'eac_ruby_utils/require_sub'
3
+ require 'eac_cli/core_ext'
5
4
 
6
5
  module Avm
7
6
  module EacWebappBase0
8
7
  class Runner < ::Avm::Instances::Runner
9
- class Data < ::EacRubyUtils::Console::DocoptRunner
10
- ::EacRubyUtils.require_sub(__FILE__)
11
-
12
- DOC = <<~DOCOPT
13
- Data utilities for EacRailsBase0 instances.
14
-
15
- Usage:
16
- __PROGRAM__ __SUBCOMMANDS__
17
- __PROGRAM__ -h | --help
18
-
19
- Options:
20
- -h --help Show this screen.
21
- DOCOPT
8
+ class Data
9
+ require_sub __FILE__
10
+ runner_with :help, :subcommands do
11
+ desc 'Data utilities for EacRailsBase0 instances.'
12
+ end
22
13
  end
23
14
  end
24
15
  end
@@ -1,37 +1,26 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/core_ext/numeric/time'
4
- require 'eac_ruby_utils/console/speaker'
5
- require 'eac_ruby_utils/simple_cache'
6
3
  require 'avm/data/package/dump'
4
+ require 'eac_cli/core_ext'
7
5
 
8
6
  module Avm
9
7
  module EacWebappBase0
10
8
  class Runner < ::Avm::Instances::Runner
11
- class Data < ::EacRubyUtils::Console::DocoptRunner
12
- class Dump < ::EacRubyUtils::Console::DocoptRunner
13
- include ::EacRubyUtils::SimpleCache
14
- include ::EacRubyUtils::Console::Speaker
15
-
9
+ class Data
10
+ class Dump
16
11
  DUMP_EXPIRE_TIME = 1.day
17
12
  DEFAULT_DUMP_PATH_ENTRY_SUFFIX = 'data.default_dump_path'
18
13
  NO_DUMP_MESSAGE = 'Dump "%s" already exist and rewrite options was no setted nor ' \
19
14
  'dump was expired.'
20
15
 
21
- DOC = <<~DOCUMENT
22
- Dump utility for EacRailsBase instance.
23
-
24
- Usage:
25
- __PROGRAM__ [options]
26
-
27
- Options:
28
- -h --help Show this screen.
29
- --rewrite Forces dump overwrite.
30
- --dump-path=<dump_path> Set DUMP_PATH variable.
31
- DOCUMENT
16
+ runner_with :help do
17
+ desc 'Dump utility for EacRailsBase instance.'
18
+ bool_opt '-w', 'rewrite', 'Forces dump overwrite.'
19
+ arg_opt '-p', '--dump-path', 'Set DUMP_PATH variable.'
20
+ end
32
21
 
33
22
  def run
34
- infov 'Instance to dump', "#{context(:instance)} (#{context(:instance).class})"
23
+ infov 'Instance to dump', "#{instance} (#{instance.class})"
35
24
  if package_dump.runnable?
36
25
  package_dump.run
37
26
  else
@@ -43,20 +32,25 @@ module Avm
43
32
 
44
33
  private
45
34
 
35
+ def instance
36
+ runner_context.call(:instance)
37
+ end
38
+
46
39
  def package_dump_uncached
47
- context(:instance).data_package.dump(dump_path, existing: package_dump_existing)
40
+ instance
41
+ .data_package.dump(dump_path, existing: package_dump_existing)
48
42
  end
49
43
 
50
44
  def dump_path
51
- options.fetch('--dump-path') || default_dump_path
45
+ parsed.dump_path || default_dump_path
52
46
  end
53
47
 
54
48
  def default_dump_path
55
- context(:instance).read_entry(DEFAULT_DUMP_PATH_ENTRY_SUFFIX)
49
+ instance.read_entry(DEFAULT_DUMP_PATH_ENTRY_SUFFIX)
56
50
  end
57
51
 
58
52
  def package_dump_existing
59
- if options.fetch('--rewrite')
53
+ if parsed.rewrite?
60
54
  ::Avm::Data::Package::Dump::EXISTING_ROTATE
61
55
  else
62
56
  ::Avm::Data::Package::Dump::EXISTING_ROTATE_EXPIRED
@@ -7,22 +7,13 @@ require 'eac_ruby_utils/simple_cache'
7
7
  module Avm
8
8
  module EacWebappBase0
9
9
  class Runner < ::Avm::Instances::Runner
10
- class Data < ::EacRubyUtils::Console::DocoptRunner
11
- class Load < ::EacRubyUtils::Console::DocoptRunner
12
- include ::EacRubyUtils::SimpleCache
13
- include ::EacRubyUtils::Console::Speaker
14
-
15
- DOC = <<~DOCUMENT
16
- Load utility for EacRailsBase instance.
17
-
18
- Usage:
19
- __PROGRAM__ (<dump-path>|--source-instance=<source-instance>)
20
- __PROGRAM__ -h | --help
21
-
22
- Options:
23
- -h --help Show this screen.
24
- -S --source-instance=<source-instance> Informa a instância a ser extraída o dump.
25
- DOCUMENT
10
+ class Data
11
+ class Load
12
+ runner_with :ĥelp do
13
+ desc 'Load utility for EacRailsBase instance.'
14
+ arg_opt '-S', '--source-instance', 'Informa a instância a ser extraída o dump.'
15
+ pos_arg :dump_path, optional: true
16
+ end
26
17
 
27
18
  def run
28
19
  return ::Dev::Result.error("Dump \"#{dump_path}\" does not exist") unless
@@ -33,16 +24,14 @@ module Avm
33
24
  end
34
25
 
35
26
  def dump_path_uncached
36
- return options.fetch('<dump-path>').to_s if options.fetch('<dump-path>').present?
37
- return source_instance_dump_path if options.fetch('--source-instance').present?
27
+ return parsed.dump_path.to_s if parsed.dump_path.present?
28
+ return source_instance_dump_path if parsed.source_instance.present?
38
29
 
39
- raise "Dump path unknown (Options: #{options})"
30
+ raise "Dump path unknown (Options: #{parsed})"
40
31
  end
41
32
 
42
33
  def source_instance_dump_path
43
- context(:instance).class.by_id(
44
- options.fetch('--source-instance')
45
- ).data_dump
34
+ runner_context.call(:instance).class.by_id(parsed.source_instance).data_dump
46
35
  end
47
36
 
48
37
  def load_dump
@@ -57,7 +46,7 @@ module Avm
57
46
  private
58
47
 
59
48
  def package_load_uncached
60
- context(:instance).data_package.load(dump_path)
49
+ runner_context.call(:instance).data_package.load(dump_path)
61
50
  end
62
51
  end
63
52
  end
@@ -9,7 +9,7 @@ module Avm
9
9
  module Tools
10
10
  class Runner
11
11
  class LocalProject
12
- class Ruby < ::EacRubyUtils::Console::DocoptRunner
12
+ class Ruby
13
13
  require_sub __FILE__
14
14
  include ::EacCli::DefaultRunner
15
15
 
@@ -8,7 +8,7 @@ module Avm
8
8
  module Tools
9
9
  class Runner
10
10
  class LocalProject
11
- class Ruby < ::EacRubyUtils::Console::DocoptRunner
11
+ class Ruby
12
12
  class Bundler < ::EacRubyUtils::Console::DocoptRunner
13
13
  require_sub __FILE__
14
14
  include ::EacCli::DefaultRunner
@@ -7,7 +7,7 @@ module Avm
7
7
  module Tools
8
8
  class Runner
9
9
  class LocalProject
10
- class Ruby < ::EacRubyUtils::Console::DocoptRunner
10
+ class Ruby
11
11
  class Bundler < ::EacRubyUtils::Console::DocoptRunner
12
12
  class GemfileLock < ::EacRubyUtils::Console::DocoptRunner
13
13
  include ::EacCli::DefaultRunner
@@ -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
7
  class Runner
9
- class Ruby < ::EacRubyUtils::Console::DocoptRunner
8
+ class Ruby
10
9
  require_sub __FILE__
11
-
12
- DOC = <<~DOCOPT
13
- Ruby 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 'Ruby utilities for AVM.'
12
+ subcommands
13
+ end
22
14
  end
23
15
  end
24
16
  end
@@ -1,17 +1,14 @@
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
7
  class Runner
9
- class Ruby < ::EacRubyUtils::Console::DocoptRunner
10
- class Gems < ::EacRubyUtils::Console::DocoptRunner
8
+ class Ruby
9
+ class Gems
11
10
  require_sub __FILE__
12
- include ::EacCli::DefaultRunner
13
-
14
- runner_definition do
11
+ runner_with :help, :subcommands do
15
12
  desc 'Rubygems utilities for AVM.'
16
13
  subcommands
17
14
  end
@@ -1,31 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/ruby/gems/generator'
4
- require 'eac_ruby_utils/console/docopt_runner'
5
- require 'eac_ruby_utils/core_ext'
6
- require 'eac_cli/default_runner'
4
+ require 'eac_cli/core_ext'
7
5
 
8
6
  module Avm
9
7
  module Tools
10
8
  class Runner
11
- class Ruby < ::EacRubyUtils::Console::DocoptRunner
12
- class Gems < ::EacRubyUtils::Console::DocoptRunner
13
- class Generate < ::EacRubyUtils::Console::DocoptRunner
14
- enable_console_speaker
15
- enable_simple_cache
16
-
17
- DOC = <<~DOCUMENT
18
- Create a gem.
19
-
20
- Usage:
21
- __PROGRAM__ [options] <path>
22
- __PROGRAM__ -h --help
23
-
24
- Options:
25
- -h --help Show this help.
26
- --eac-ruby-utils-version=<version> Version for "eac_ruby_utils" gem.
27
- --eac-ruby-gem-support-version=<version> Version for "eac_ruby_gem_support" gem.
28
- DOCUMENT
9
+ class Ruby
10
+ class Gems
11
+ class Generate
12
+ runner_with :help do
13
+ desc 'Create a gem.'
14
+ arg_opt '--eac-ruby-utils-version', 'Version for "eac_ruby_utils" gem.'
15
+ arg_opt '--eac-ruby-gem-support-version', 'Version for "eac_ruby_gem_support" gem.'
16
+ pos_arg :path
17
+ end
29
18
 
30
19
  def run
31
20
  success "Gem \"#{generator.name}\" created in \"#{generator.root_directory}\""
@@ -34,12 +23,12 @@ module Avm
34
23
  private
35
24
 
36
25
  def generator_uncached
37
- ::Avm::Ruby::Gems::Generator.new(options.fetch('<path>'), generator_options)
26
+ ::Avm::Ruby::Gems::Generator.new(parsed.path, generator_options)
38
27
  end
39
28
 
40
29
  def generator_options
41
30
  %w[eac_ruby_utils eac_ruby_gem_support].map do |gem_name|
42
- ["#{gem_name}_version".to_sym, options.fetch("--#{gem_name.dasherize}-version")]
31
+ ["#{gem_name}_version".to_sym, parsed.fetch("#{gem_name.variableize}_version")]
43
32
  end.to_h
44
33
  end
45
34
  end
@@ -7,7 +7,7 @@ require 'eac_ruby_utils/core_ext'
7
7
  module Avm
8
8
  module Tools
9
9
  class Runner
10
- class Ruby < ::EacRubyUtils::Console::DocoptRunner
10
+ class Ruby
11
11
  class Rubocop < ::EacRubyUtils::Console::DocoptRunner
12
12
  include ::EacRubyUtils::Console::Speaker
13
13
  include ::EacRubyUtils::SimpleCache
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.92.0'
5
+ VERSION = '0.93.0'
6
6
  end
7
7
  end
@@ -0,0 +1,5 @@
1
+ <Location "%%WEB.PATH%%">
2
+ PassengerBaseURI "%%WEB.PATH%%"
3
+ PassengerAppRoot "%%FS_PATH%%"
4
+ PassengerAppEnv production
5
+ </Location>
@@ -0,0 +1,9 @@
1
+ <IfModule mod_passenger.c>
2
+ Alias "%%WEB.PATH%%" "%%DOCUMENT_ROOT%%"
3
+ %%EXTRA_CONTENT%%
4
+ <Directory "%%DOCUMENT_ROOT%%">
5
+ Allow from all
6
+ Options -MultiViews
7
+ Require all granted
8
+ </Directory>
9
+ </IfModule>
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
@@ -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.58', '>= 0.58.1'
16
+
17
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.1', '>= 0.1.2'
18
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Apps
7
+ require_sub __FILE__
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Apps
7
+ module Jobs
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/apps/jobs/variables_source'
4
+ require 'eac_ruby_utils/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_console_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,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module Apps
5
+ VERSION = '0.1.0'
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_gem_support/spec/examples/rubocop_check'
4
+
5
+ RSpec.describe ::RuboCop, slow: true do
6
+ include_examples 'rubocop_check', ::File.expand_path('..', __dir__)
7
+ end
@@ -0,0 +1,100 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by the `rspec --init` command. Conventionally, all
4
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
6
+ # this file to always be loaded, without a need to explicitly require it in any
7
+ # files.
8
+ #
9
+ # Given that it is always loaded, you are encouraged to keep this file as
10
+ # light-weight as possible. Requiring heavyweight dependencies from this file
11
+ # will add to the boot time of your test suite on EVERY test run, even for an
12
+ # individual file that may not need all of that loaded. Instead, consider making
13
+ # a separate helper file that requires the additional dependencies and performs
14
+ # the additional setup, and require it from the spec files that actually need
15
+ # it.
16
+ #
17
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
18
+ RSpec.configure do |config|
19
+ # rspec-expectations config goes here. You can use an alternate
20
+ # assertion/expectation library such as wrong or the stdlib/minitest
21
+ # assertions if you prefer.
22
+ config.expect_with :rspec do |expectations|
23
+ # This option will default to `true` in RSpec 4. It makes the `description`
24
+ # and `failure_message` of custom matchers include text for helper methods
25
+ # defined using `chain`, e.g.:
26
+ # be_bigger_than(2).and_smaller_than(4).description
27
+ # # => "be bigger than 2 and smaller than 4"
28
+ # ...rather than:
29
+ # # => "be bigger than 2"
30
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
31
+ end
32
+
33
+ # rspec-mocks config goes here. You can use an alternate test double
34
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
35
+ config.mock_with :rspec do |mocks|
36
+ # Prevents you from mocking or stubbing a method that does not exist on
37
+ # a real object. This is generally recommended, and will default to
38
+ # `true` in RSpec 4.
39
+ mocks.verify_partial_doubles = true
40
+ end
41
+
42
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
43
+ # have no way to turn it off -- the option exists only for backwards
44
+ # compatibility in RSpec 3). It causes shared context metadata to be
45
+ # inherited by the metadata hash of host groups and examples, rather than
46
+ # triggering implicit auto-inclusion in groups with matching metadata.
47
+ config.shared_context_metadata_behavior = :apply_to_host_groups
48
+
49
+ # The settings below are suggested to provide a good initial experience
50
+ # with RSpec, but feel free to customize to your heart's content.
51
+ # # This allows you to limit a spec run to individual examples or groups
52
+ # # you care about by tagging them with `:focus` metadata. When nothing
53
+ # # is tagged with `:focus`, all examples get run. RSpec also provides
54
+ # # aliases for `it`, `describe`, and `context` that include `:focus`
55
+ # # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
56
+ # config.filter_run_when_matching :focus
57
+ #
58
+ # # Allows RSpec to persist some state between runs in order to support
59
+ # # the `--only-failures` and `--next-failure` CLI options. We recommend
60
+ # # you configure your source control system to ignore this file.
61
+ # config.example_status_persistence_file_path = "spec/examples.txt"
62
+ #
63
+ # # Limits the available syntax to the non-monkey patched syntax that is
64
+ # # recommended. For more details, see:
65
+ # # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
66
+ # # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
67
+ # # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
68
+ # config.disable_monkey_patching!
69
+ #
70
+ # # This setting enables warnings. It's recommended, but in some cases may
71
+ # # be too noisy due to issues in dependencies.
72
+ # config.warnings = true
73
+ #
74
+ # # Many RSpec users commonly either run the entire suite or an individual
75
+ # # file, and it's useful to allow more verbose output when running an
76
+ # # individual spec file.
77
+ # if config.files_to_run.one?
78
+ # # Use the documentation formatter for detailed output,
79
+ # # unless a formatter has already been configured
80
+ # # (e.g. via a command-line flag).
81
+ # config.default_formatter = "doc"
82
+ # end
83
+ #
84
+ # # Print the 10 slowest examples and example groups at the
85
+ # # end of the spec run, to help surface which specs are running
86
+ # # particularly slow.
87
+ # config.profile_examples = 10
88
+ #
89
+ # # Run specs in random order to surface order dependencies. If you find an
90
+ # # order dependency and want to debug it, you can fix the order by providing
91
+ # # the seed, which is printed after each run.
92
+ # # --seed 1234
93
+ # config.order = :random
94
+ #
95
+ # # Seed global randomization in this process using the `--seed` CLI option.
96
+ # # Setting this allows you to use `--seed` to deterministically reproduce
97
+ # # test failures related to randomization by passing the same `--seed` value
98
+ # # as the one that triggered the failure.
99
+ # Kernel.srand config.seed
100
+ end
@@ -10,15 +10,12 @@ module EacCli
10
10
  SUBCOMMAND_NAME_ARG = :subcommand
11
11
  SUBCOMMAND_ARGS_ARG = :subcommand_args
12
12
 
13
- def arg_opt(short, long, description, option_options = {})
14
- options_set << ::EacCli::Definition::ArgumentOption.new(
15
- short, long, description, option_options
16
- )
13
+ def arg_opt(*args)
14
+ options_set << ::EacCli::Definition::ArgumentOption.from_args(args)
17
15
  end
18
16
 
19
- def bool_opt(short, long, description, option_options = {})
20
- options_set << ::EacCli::Definition::BooleanOption.new(short, long, description,
21
- option_options)
17
+ def bool_opt(*args)
18
+ options_set << ::EacCli::Definition::BooleanOption.from_args(args)
22
19
  end
23
20
 
24
21
  def options
@@ -5,19 +5,26 @@ require 'eac_ruby_utils/core_ext'
5
5
  module EacCli
6
6
  class Definition
7
7
  class BaseOption
8
+ require_sub __FILE__
9
+
10
+ class << self
11
+ def from_args(args)
12
+ p = ::EacCli::Definition::BaseOption::InitializeArgsParser.new(args)
13
+ new(p.short, p.long, p.description, p.options)
14
+ end
15
+ end
16
+
8
17
  DEFAULT_REQUIRED = false
9
18
 
10
19
  enable_listable
11
20
  enable_abstract_methods :build_value, :default_value
12
21
  lists.add_symbol :option, :optional, :usage, :repeat, :required
13
- attr_reader :short, :long, :description, :options
14
-
15
- def initialize(short, long, description, options = {})
16
- @short = short
17
- @long = long
18
- @description = description
19
- @options = options.symbolize_keys
20
- @options.assert_valid_keys(::EacCli::Definition::BaseOption.lists.option.values)
22
+ common_constructor :short, :long, :description, :options, default: [{}] do
23
+ raise 'Nor short neither long selector was set' if short.blank? && long.blank?
24
+
25
+ self.options = ::EacCli::Definition::BaseOption.lists.option.hash_keys_validate!(
26
+ options.symbolize_keys
27
+ )
21
28
  end
22
29
 
23
30
  def identifier
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EacCli
4
+ class Definition
5
+ class BaseOption
6
+ class InitializeArgsParser
7
+ PROPERTIES = %i[short long description options].freeze
8
+ attr_reader(*PROPERTIES)
9
+
10
+ def initialize(args)
11
+ self.options = args.extract_options!.freeze
12
+ args.each { |arg| absorb_arg(arg) }
13
+ end
14
+
15
+ private
16
+
17
+ attr_writer(*PROPERTIES)
18
+
19
+ def absorb_arg(arg)
20
+ arg_ext = ArgumentParser.new(arg)
21
+ send("#{arg_ext.type}=", arg_ext.value)
22
+ end
23
+
24
+ class ArgumentParser
25
+ TYPES = %i[short long description].freeze
26
+ common_constructor :value
27
+
28
+ def type
29
+ TYPES.find { |type| send("#{type}?") } || raise("Unknown type for \"#{value}\"")
30
+ end
31
+
32
+ def short?
33
+ value.start_with?('-') && !long?
34
+ end
35
+
36
+ def long?
37
+ value.start_with?('--')
38
+ end
39
+
40
+ def description?
41
+ !short? || !long?
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -19,10 +19,24 @@ module EacCli
19
19
  b += '=<value>' if option.argument?
20
20
  b
21
21
  end
22
+
23
+ def option_short(option)
24
+ b = option.short
25
+ b += '=<value>' if option.argument?
26
+ b
27
+ end
28
+
29
+ def option_usage_full(option)
30
+ if option.long.present?
31
+ [option.short, option_long(option)].reject(&:blank?).join(SEP)
32
+ else
33
+ option_short(option)
34
+ end
35
+ end
22
36
  end
23
37
 
24
38
  def option_definition(option)
25
- option.short + SEP + self.class.option_long(option) + OPTION_DESC_SEP + option.description
39
+ self.class.option_usage_full(option) + OPTION_DESC_SEP + option.description
26
40
  end
27
41
 
28
42
  def section(header, include_header = true)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.13.0'
4
+ VERSION = '0.14.0'
5
5
  end
@@ -7,6 +7,10 @@ RSpec.describe ::EacCli::Definition::Alternative do
7
7
 
8
8
  it { expect { instance.arg_opt '-a', '--opt2', 'A argument option' }.not_to raise_error }
9
9
  it { expect { instance.bool_opt '-b', '--opt1', 'A boolean option' }.not_to raise_error }
10
+ it { expect { instance.bool_opt '-b', '--no-description' }.not_to raise_error }
11
+ it { expect { instance.bool_opt '--opt1', 'A option without short' }.not_to raise_error }
12
+ it { expect { instance.bool_opt '-b', 'A option without long' }.not_to raise_error }
13
+ it { expect { instance.bool_opt 'A option without selectors' }.to raise_error(::StandardError) }
10
14
  it { expect { instance.options_argument(true) }.not_to raise_error }
11
15
  it { expect { instance.pos_arg :pos1 }.not_to raise_error }
12
16
  it { expect { instance.pos_arg :pos2, optional: true, repeat: true }.not_to raise_error }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.92.0
4
+ version: 0.93.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-13 00:00:00.000000000 Z
11
+ date: 2021-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -312,6 +312,7 @@ files:
312
312
  - lib/avm/docker/runner.rb
313
313
  - lib/avm/eac_asciidoctor_base0.rb
314
314
  - lib/avm/eac_asciidoctor_base0/apache_host.rb
315
+ - lib/avm/eac_asciidoctor_base0/apache_path.rb
315
316
  - lib/avm/eac_asciidoctor_base0/build.rb
316
317
  - lib/avm/eac_asciidoctor_base0/build/file.rb
317
318
  - lib/avm/eac_asciidoctor_base0/deploy.rb
@@ -344,6 +345,7 @@ files:
344
345
  - lib/avm/eac_ubuntu_base0/docker_image.rb
345
346
  - lib/avm/eac_webapp_base0.rb
346
347
  - lib/avm/eac_webapp_base0/apache_host.rb
348
+ - lib/avm/eac_webapp_base0/apache_path.rb
347
349
  - lib/avm/eac_webapp_base0/deploy.rb
348
350
  - lib/avm/eac_webapp_base0/deploy/appended_directories.rb
349
351
  - lib/avm/eac_webapp_base0/deploy/build.rb
@@ -354,6 +356,7 @@ files:
354
356
  - lib/avm/eac_webapp_base0/instance.rb
355
357
  - lib/avm/eac_webapp_base0/runner.rb
356
358
  - lib/avm/eac_webapp_base0/runner/apache_host.rb
359
+ - lib/avm/eac_webapp_base0/runner/apache_path.rb
357
360
  - lib/avm/eac_webapp_base0/runner/data.rb
358
361
  - lib/avm/eac_webapp_base0/runner/data/dump.rb
359
362
  - lib/avm/eac_webapp_base0/runner/data/load.rb
@@ -527,7 +530,6 @@ files:
527
530
  - lib/avm/tools/runner.rb
528
531
  - lib/avm/tools/runner/eac_asciidoctor_base0.rb
529
532
  - lib/avm/tools/runner/eac_rails_base0.rb
530
- - lib/avm/tools/runner/eac_rails_base0/apache_path.rb
531
533
  - lib/avm/tools/runner/eac_redmine_base0.rb
532
534
  - lib/avm/tools/runner/eac_redmine_base0/core_update.rb
533
535
  - lib/avm/tools/runner/eac_redmine_base0/docker.rb
@@ -613,13 +615,14 @@ files:
613
615
  - lib/eac_launcher/vendor.rb
614
616
  - lib/eac_launcher/vendor/github.rb
615
617
  - lib/eac_launcher/version.rb
616
- - template/avm/eac_rails_base0/apache_path/default.conf
618
+ - template/avm/eac_rails_base0/apache_path/extra_content.conf
617
619
  - template/avm/eac_rails_base0/deploy/config/database.yml.template
618
620
  - template/avm/eac_rails_base0/deploy/config/envvars.d/email.yml.template
619
621
  - template/avm/eac_redmine_base0/deploy/config/install.sh.template
620
622
  - template/avm/eac_redmine_base0/deploy/config/secrets.yml
621
623
  - template/avm/eac_ubuntu_base0/docker_image/Dockerfile
622
624
  - template/avm/eac_webapp_base0/apache_host/no_ssl.conf
625
+ - template/avm/eac_webapp_base0/apache_path/default.conf
623
626
  - template/avm/eac_wordpress_base0/deploy/wp-config.php.template
624
627
  - template/avm/eac_writings_base0/commons/all.tex
625
628
  - template/avm/eac_writings_base0/commons/ebook.tex
@@ -638,6 +641,15 @@ files:
638
641
  - template/avm/ruby/gems/generator/version.template
639
642
  - template/avm/self/docker_image/Dockerfile
640
643
  - template/avm/self/docker_image/entrypoint.sh
644
+ - vendor/avm-apps/Gemfile
645
+ - vendor/avm-apps/avm-apps.gemspec
646
+ - vendor/avm-apps/lib/avm/apps.rb
647
+ - vendor/avm-apps/lib/avm/apps/jobs.rb
648
+ - vendor/avm-apps/lib/avm/apps/jobs/base.rb
649
+ - vendor/avm-apps/lib/avm/apps/jobs/variables_source.rb
650
+ - vendor/avm-apps/lib/avm/apps/version.rb
651
+ - vendor/avm-apps/spec/rubocop_spec.rb
652
+ - vendor/avm-apps/spec/spec_helper.rb
641
653
  - vendor/eac_cli/Gemfile
642
654
  - vendor/eac_cli/eac_cli.gemspec
643
655
  - vendor/eac_cli/lib/eac_cli.rb
@@ -647,6 +659,7 @@ files:
647
659
  - vendor/eac_cli/lib/eac_cli/definition/alternative.rb
648
660
  - vendor/eac_cli/lib/eac_cli/definition/argument_option.rb
649
661
  - vendor/eac_cli/lib/eac_cli/definition/base_option.rb
662
+ - vendor/eac_cli/lib/eac_cli/definition/base_option/initialize_args_parser.rb
650
663
  - vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb
651
664
  - vendor/eac_cli/lib/eac_cli/definition/help_formatter.rb
652
665
  - vendor/eac_cli/lib/eac_cli/definition/positional_argument.rb
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_cli/core_ext'
4
- require 'avm/eac_webapp_base0/runner/apache_host'
5
- require 'eac_ruby_utils/console/docopt_runner'
6
- require 'avm/eac_rails_base0/apache_path'
7
-
8
- module Avm
9
- module Tools
10
- class Runner
11
- class EacRailsBase0 < ::Avm::EacRailsBase1::Runner
12
- class ApachePath < ::EacRubyUtils::Console::DocoptRunner
13
- runner_with
14
-
15
- runner_definition do
16
- desc 'Configure Apache path configuration for instance.'
17
- end
18
-
19
- def run
20
- if result.error?
21
- fatal_error result.to_s
22
- else
23
- infov 'Result', result.label
24
- end
25
- end
26
-
27
- def apache_path_uncached
28
- ::Avm::EacRailsBase0::ApachePath.new(context(:instance))
29
- end
30
-
31
- def result_uncached
32
- apache_path.run
33
- end
34
- end
35
- end
36
- end
37
- end
38
- end
@@ -1,13 +0,0 @@
1
- <IfModule mod_passenger.c>
2
- Alias "%%WEB.PATH%%" "%%FS_PATH%%/public"
3
- <Location "%%WEB.PATH%%">
4
- PassengerBaseURI "%%WEB.PATH%%"
5
- PassengerAppRoot "%%FS_PATH%%"
6
- PassengerAppEnv production
7
- </Location>
8
- <Directory "%%FS_PATH%%/public">
9
- Allow from all
10
- Options -MultiViews
11
- Require all granted
12
- </Directory>
13
- </IfModule>