Sha256: 5ac604e854b1f3019135fc45603d57ff7b051417f1ea20a1fc7a41deb5110d8e

Contents?: true

Size: 600 Bytes

Versions: 25

Compression:

Stored size: 600 Bytes

Contents

module Eco
  module API
    class Session
      class Config
        class SFTP < BaseConfig
          attr_key :host, :user
          attr_key :password, :key_file
          attr_key :base_path, :enviro_subpaths

          def configured?
            required = host && user && (key_file || password)
            !!required
          end

          def enviro_subpath
            enviro_subpaths[config.active_enviro]
          end

          def remote_folder
            [base_path, enviro_subpath].compact.join("/")
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
eco-helpers-2.5.10 lib/eco/api/session/config/sftp.rb
eco-helpers-2.5.9 lib/eco/api/session/config/sftp.rb
eco-helpers-2.5.8 lib/eco/api/session/config/sftp.rb
eco-helpers-2.5.7 lib/eco/api/session/config/sftp.rb
eco-helpers-2.5.6 lib/eco/api/session/config/sftp.rb
eco-helpers-2.5.5 lib/eco/api/session/config/sftp.rb
eco-helpers-2.5.4 lib/eco/api/session/config/sftp.rb
eco-helpers-2.5.3 lib/eco/api/session/config/sftp.rb
eco-helpers-2.5.2 lib/eco/api/session/config/sftp.rb
eco-helpers-2.5.1 lib/eco/api/session/config/sftp.rb
eco-helpers-2.4.9 lib/eco/api/session/config/sftp.rb
eco-helpers-2.4.8 lib/eco/api/session/config/sftp.rb
eco-helpers-2.4.7 lib/eco/api/session/config/sftp.rb
eco-helpers-2.4.6 lib/eco/api/session/config/sftp.rb
eco-helpers-2.4.5 lib/eco/api/session/config/sftp.rb
eco-helpers-2.4.4 lib/eco/api/session/config/sftp.rb
eco-helpers-2.4.3 lib/eco/api/session/config/sftp.rb
eco-helpers-2.4.2 lib/eco/api/session/config/sftp.rb
eco-helpers-2.3.3 lib/eco/api/session/config/sftp.rb
eco-helpers-2.3.2 lib/eco/api/session/config/sftp.rb