Sha256: 5ca370c4922ac02dd01c6caa018473af511fb311455a652f8828736bbab01604

Contents?: true

Size: 960 Bytes

Versions: 6

Compression:

Stored size: 960 Bytes

Contents

# @see http://docs.vagrantup.com/v2/provisioning/file.html
class ConfigBuilder::Model::Provisioner::File < ConfigBuilder::Model::Base
  # @!attribute [rw] source
  #   @return [Source] Is the local path of the file to be uploaded.
  def_model_attribute :source

  # @!attribute [rw] destination
  #   @return [Source] Is the remote path on the guest machine where the file
  #     will be uploaded to. The file is uploaded as the SSH user over SCP, so
  #     this location must be writable to that user. The SSH user can be
  #     determined by running vagrant ssh-config, and defaults to "vagrant".
  def_model_attribute :destination

  def to_proc
    Proc.new do |vm_config|
      vm_config.provision :file do |file_config|
        with_attr(:source)        { |val| file_config.source = val }
        with_attr(:destination)   { |val| file_config.destination = val }
      end
    end
  end

  ConfigBuilder::Model::Provisioner.register('file', self)
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
vagrant-config_builder-0.15.1 lib/config_builder/model/provisioner/file.rb
vagrant-config_builder-0.15.0 lib/config_builder/model/provisioner/file.rb
vagrant-config_builder-0.14.0 lib/config_builder/model/provisioner/file.rb
vagrant-config_builder-0.13.0 lib/config_builder/model/provisioner/file.rb
vagrant-masonry-0.13.0 lib/config_builder/model/provisioner/file.rb
vagrant-config_builder-0.12.0 lib/config_builder/model/provisioner/file.rb