Sha256: aaabb09f320302bb96e3899fb05c51ac80808ce214ce60bb54e4892961c82574

Contents?: true

Size: 869 Bytes

Versions: 21

Compression:

Stored size: 869 Bytes

Contents

module Vagrant
  class Config
    class SSHConfig < Base
      configures :ssh

      attr_accessor :username
      attr_accessor :host
      attr_accessor :port
      attr_accessor :forwarded_port_key
      attr_accessor :max_tries
      attr_accessor :timeout
      attr_writer :private_key_path
      attr_accessor :forward_agent

      def private_key_path
        File.expand_path(@private_key_path, env.root_path)
      end

      def validate(errors)
        [:username, :host, :port, :forwarded_port_key, :max_tries, :timeout, :private_key_path].each do |field|
          errors.add(I18n.t("vagrant.config.common.error_empty", :field => field)) if !instance_variable_get("@#{field}".to_sym)
        end

        errors.add(I18n.t("vagrant.config.ssh.private_key_missing", :path => private_key_path)) if !File.file?(private_key_path)
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
vagrantup-0.6.9 lib/vagrant/config/ssh.rb
vagrantup-0.6.8 lib/vagrant/config/ssh.rb
vagrantup-0.6.7 lib/vagrant/config/ssh.rb
vagrantup-0.6.6 lib/vagrant/config/ssh.rb
vagrantup-0.6.5 lib/vagrant/config/ssh.rb
vagrantup-0.6.4 lib/vagrant/config/ssh.rb
vagrantup-0.6.3 lib/vagrant/config/ssh.rb
vagrantup-0.6.2 lib/vagrant/config/ssh.rb
vagrantup-0.6.1 lib/vagrant/config/ssh.rb
vagrantup-0.6.0 lib/vagrant/config/ssh.rb
vagrant-0.7.0.beta lib/vagrant/config/ssh.rb
vagrant-0.6.9 lib/vagrant/config/ssh.rb
vagrant-0.6.8 lib/vagrant/config/ssh.rb
vagrant-0.6.7 lib/vagrant/config/ssh.rb
vagrant-0.6.6 lib/vagrant/config/ssh.rb
vagrant-0.6.5 lib/vagrant/config/ssh.rb
vagrant-0.6.4 lib/vagrant/config/ssh.rb
vagrant-0.6.3 lib/vagrant/config/ssh.rb
vagrant-0.6.2 lib/vagrant/config/ssh.rb
vagrant-0.6.1 lib/vagrant/config/ssh.rb