From dc32d6e9a0d732824a6764ee2048678806a40a13 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Thu, 26 Aug 2021 15:03:14 -0700 Subject: [PATCH] Clean up constant aliases and set at top level for everyone --- plugins/commands/serve/client.rb | 6 ------ plugins/commands/serve/command.rb | 5 +++++ plugins/commands/serve/service.rb | 5 ----- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/plugins/commands/serve/client.rb b/plugins/commands/serve/client.rb index ce89301b3..4aa2c2e6e 100644 --- a/plugins/commands/serve/client.rb +++ b/plugins/commands/serve/client.rb @@ -1,12 +1,6 @@ module VagrantPlugins module CommandServe module Client - # Simple alias - Empty = Google::Protobuf::Empty - SDK = Service::SDK - SRV = Service::SRV - ServiceInfo = Service::ServiceInfo - autoload :Guest, Vagrant.source_root.join("plugins/commands/serve/client/guest").to_s autoload :Machine, Vagrant.source_root.join("plugins/commands/serve/client/machine").to_s autoload :TargetIndex, Vagrant.source_root.join("plugins/commands/serve/client/target_index").to_s diff --git a/plugins/commands/serve/command.rb b/plugins/commands/serve/command.rb index e45db3719..55d852cae 100644 --- a/plugins/commands/serve/command.rb +++ b/plugins/commands/serve/command.rb @@ -18,9 +18,14 @@ require 'grpc/health/v1/health_services_pb' module VagrantPlugins module CommandServe + # Simple constant aliases to reduce namespace typing + SDK = Hashicorp::Vagrant::Sdk + SRV = Hashicorp::Vagrant + Empty = Google::Protobuf::Empty autoload :Broker, Vagrant.source_root.join("plugins/commands/serve/broker").to_s autoload :Client, Vagrant.source_root.join("plugins/commands/serve/client").to_s + autoload :Mappers, Vagrant.source_root.join("plugins/commands/serve/mappers").to_s autoload :Service, Vagrant.source_root.join("plugins/commands/serve/service").to_s autoload :Util, Vagrant.source_root.join("plugins/commands/serve/util").to_s diff --git a/plugins/commands/serve/service.rb b/plugins/commands/serve/service.rb index 1ebb72200..272780085 100644 --- a/plugins/commands/serve/service.rb +++ b/plugins/commands/serve/service.rb @@ -1,11 +1,6 @@ module VagrantPlugins module CommandServe module Service - - # Simple aliases - SDK = Hashicorp::Vagrant::Sdk - SRV = Hashicorp::Vagrant - autoload :CommandService, Vagrant.source_root.join("plugins/commands/serve/service/command_service").to_s autoload :GuestService, Vagrant.source_root.join("plugins/commands/serve/service/guest_service").to_s autoload :HostService, Vagrant.source_root.join("plugins/commands/serve/service/host_service").to_s