Sha256: 31a3a945a0c4f20b1a0f3a0d8596f0cab640bcbb7959c84e3851e709c02372e8

Contents?: true

Size: 957 Bytes

Versions: 76

Compression:

Stored size: 957 Bytes

Contents

# frozen_string_literal: true

require 'avm/instances/runner'
require 'eac_cli/core_ext'

module Avm
  module EacWebappBase0
    class Runner < ::Avm::Instances::Runner
      class ApacheHost
        runner_with :help do
          desc 'Configure Apache virtual host for instance.'
          bool_opt '-c', '--certbot', 'Install certbot.'
        end

        def run
          result = stereotype_apache_host_class.new(runner_context.call(:instance),
                                                    stereotype_apache_host_options).run
          if result.error?
            fatal_error result.to_s
          else
            infov 'Result', result.label
          end
        end

        def stereotype_apache_host_class
          "#{runner_context.call(:instance).class.name.deconstantize}::ApacheHost".constantize
        end

        def stereotype_apache_host_options
          { certbot: parsed.certbot? }
        end
      end
    end
  end
end

Version data entries

76 entries across 76 versions & 3 rubygems

Version Path
eac_tools-0.27.2 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
avm-eac_webapp_base0-0.6.1 lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.27.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
avm-eac_webapp_base0-0.6.0 lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.27.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.26.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
avm-eac_webapp_base0-0.5.0 lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.25.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
avm-eac_webapp_base0-0.4.1 lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.25.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.24.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.24.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
avm-eac_webapp_base0-0.4.0 lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.23.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.22.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.21.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.20.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.19.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.18.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb
eac_tools-0.17.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/apache_host.rb