Sha256: b315e89d2cd2de1cb8b9eb7986be8df5cdadd47a476e8541d04e58c43b4fd474

Contents?: true

Size: 687 Bytes

Versions: 3

Compression:

Stored size: 687 Bytes

Contents

module Vagrant
  module Actions
    module Box
      # A meta-action which adds a box by downloading and unpackaging it.
      # This action downloads and unpackages a box with a given URI. This
      # is a _meta action_, meaning it simply adds more actions to the
      # action chain, and those actions do the work.
      #
      # This is the action called by {Box#add}.
      class Add < Base
        def prepare
          if File.exists?(@runner.directory)
            raise ActionException.new(:box_add_already_exists, :box_name => @runner.name)
          end

          @runner.add_action(Download)
          @runner.add_action(Unpackage)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
vagrantup-0.3.0 lib/vagrant/actions/box/add.rb
vagrant-0.3.0 lib/vagrant/actions/box/add.rb
bmabey-vagrant-0.2.0 lib/vagrant/actions/box/add.rb