Sha256: dac7dbc03d7478a781b4ae015ac67fee043f406910b017d11c5f918ac0dbdd68

Contents?: true

Size: 987 Bytes

Versions: 1

Compression:

Stored size: 987 Bytes

Contents

begin
  require "vagrant"
rescue LoadError
  raise "The vagrant-rsync-blitz plugin must be run within Vagrant."
end

module VagrantPlugins
  module RsyncBlitz
    class Plugin < Vagrant.plugin(2)
      name "Rsync Blitz"
      description <<-DESC
      Rsync large project directories to your Vagrant VM without using many resources on the host.
      DESC

      # This initializes the internationalization strings.
      def self.setup_i18n
        I18n.load_path << File.expand_path("locales/en.yml", RsyncBlitz.source_root)
        I18n.reload!
      end

      action_hook "startup-rsync" do |hook|
        setup_i18n
        require_relative "action/startup_rsync"
        hook.after Vagrant::Action::Builtin::SyncedFolders, StartupRsync
      end

      command "rsync-blitz" do
        setup_i18n

        require_relative "command/rsync_auto"
        RsyncBlitzAuto
      end

      config "blitz" do
        require_relative "config"
        Config
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-rsync-blitz-2.0.0 lib/vagrant-rsync-blitz/plugin.rb