Sha256: 13acfa7da227c957dce7e999c6e53b65de16d7e9a3e8e9aeb837f23bfaedbd8d

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

require "vagrant"

module VagrantPlugins
  module LoginCommand
    autoload :Client, File.expand_path("../client", __FILE__)
    autoload :Errors, File.expand_path("../errors", __FILE__)

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

      command(:login) do
        require File.expand_path("../../cloud/auth/login", __FILE__)
        init!
        $stderr.puts "WARNING: This command has been deprecated in favor of `vagrant cloud auth login`"
        VagrantPlugins::CloudCommand::AuthCommand::Command::Login
      end

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

      protected

      def self.init!
        return if defined?(@_init)
        I18n.load_path << File.expand_path("../../cloud/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-unbundled-2.2.0.0 plugins/commands/login/plugin.rb