Sha256: b039164764343b6619f0c73a082de2f48e93eefde14713d86e89b6060291c031

Contents?: true

Size: 897 Bytes

Versions: 2

Compression:

Stored size: 897 Bytes

Contents

#require "vagrant/disksize/version"
begin
  require 'vagrant'
rescue LoadError
  raise 'The vagrant-disksize plugin must be run within vagrant.'
end


module Vagrant
  module Disksize
    class Plugin < Vagrant.plugin('2')

      name 'vagrant-disksize'

      description <<-DESC
      Provides the ability to resize VirtualBox disks at creation time,
      so they don't need to be the same size as the default for the box.
      Filesystems are not resized by this code.
      DESC

      config 'disksize' do
        require_relative 'disksize/config'
        Config
      end

      action_hook(:disksize, :machine_action_up) do |hook|
        require_relative 'disksize/actions'

        # TODO Ensure we are using the VirtualBox provider
        hook.before(VagrantPlugins::ProviderVirtualBox::Action::Boot, Action::ResizeDisk)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-disksize-0.1.3 lib/vagrant/disksize.rb
vagrant-disksize-0.1.2 lib/vagrant/disksize.rb