Sha256: ca7829a0c7255519ddf31d970f51ed47c587d231e6e2009ebe5138d5004e8a84
Contents?: true
Size: 1.62 KB
Versions: 2
Compression:
Stored size: 1.62 KB
Contents
# frozen_string_literal: true require 'avm/instances/entry_keys' module Avm module Instances class Base module AutoValues module Install def auto_access read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL).present? ? 'ssh' : 'local' end def auto_install_hostname inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, ::Avm::Instances::EntryKeys::INSTALL_HOSTNAME) end def auto_install_port inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, ::Avm::Instances::EntryKeys::INSTALL_PORT) || 22 end def auto_install_username inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, ::Avm::Instances::EntryKeys::INSTALL_USERNAME) end def auto_install_url inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, ::Avm::Instances::EntryKeys::INSTALL_URL) || auto_install_url_by_parts end def auto_install_url_by_parts read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_HOSTNAME).if_present do |a| a = read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME) .if_present(a) { |v| "#{v}@#{a}" } a = read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_PORT) .if_present(a) { |v| "#{a}:#{v}" } "ssh://#{a}" end end end end end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
avm-0.31.0 | lib/avm/instances/base/auto_values/install.rb |
eac_tools-0.13.0 | sub/avm/lib/avm/instances/base/auto_values/install.rb |