Sha256: 7eee065dbb75bc780258e3eb9fbb2662567868b3f1b7eaf40c00afe840debf04

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

require "vagrant"
require 'vagrant_cloud'
require Vagrant.source_root.join("plugins/commands/cloud/util")
require Vagrant.source_root.join("plugins/commands/cloud/client/client")

module VagrantPlugins
  module CloudCommand
    class Plugin < Vagrant.plugin("2")
      name "vagrant-cloud"
      description <<-DESC
      Provides the cloud command and internal API access to Vagrant Cloud.
      DESC

      command(:cloud) do
        require_relative "root"
        init!
        Command::Root
      end

      action_hook(:cloud_authenticated_boxes, :authenticate_box_url) do |hook|
        require_relative "auth/middleware/add_authentication"
        hook.prepend(AddAuthentication)
      end

      action_hook(:cloud_authenticated_boxes, :authenticate_box_downloader) do |hook|
        require_relative "auth/middleware/add_downloader_authentication"
        hook.prepend(AddDownloaderAuthentication)
      end

      protected

      def self.init!
        return if defined?(@_init)
        I18n.load_path << File.expand_path("../locales/en.yml", __FILE__)
        I18n.reload!
        @_init = true
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/plugins/commands/cloud/plugin.rb