From 0a52e0629859cd310b0773ab88de2e3f008c420b Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 8 Oct 2015 10:40:46 -0400 Subject: [PATCH] commands/snapshot: use require relative --- plugins/commands/snapshot/command/push_shared.rb | 1 + plugins/commands/snapshot/command/root.rb | 12 ++++++------ plugins/commands/snapshot/plugin.rb | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/commands/snapshot/command/push_shared.rb b/plugins/commands/snapshot/command/push_shared.rb index bbaba8dbc..a82779ee5 100644 --- a/plugins/commands/snapshot/command/push_shared.rb +++ b/plugins/commands/snapshot/command/push_shared.rb @@ -16,6 +16,7 @@ module VagrantPlugins end end + # Success, exit with 0 0 end diff --git a/plugins/commands/snapshot/command/root.rb b/plugins/commands/snapshot/command/root.rb index 2ed460fa4..4ced72277 100644 --- a/plugins/commands/snapshot/command/root.rb +++ b/plugins/commands/snapshot/command/root.rb @@ -15,32 +15,32 @@ module VagrantPlugins @subcommands = Vagrant::Registry.new @subcommands.register(:save) do - require File.expand_path("../save", __FILE__) + require_relative "save" Save end @subcommands.register(:restore) do - require File.expand_path("../restore", __FILE__) + require_relative "restore" Restore end @subcommands.register(:delete) do - require File.expand_path("../delete", __FILE__) + require_relative "delete" Delete end @subcommands.register(:list) do - require File.expand_path("../list", __FILE__) + require_relative "list" List end @subcommands.register(:push) do - require File.expand_path("../push", __FILE__) + require_relative "push" Push end @subcommands.register(:pop) do - require File.expand_path("../pop", __FILE__) + require_relative "pop" Pop end end diff --git a/plugins/commands/snapshot/plugin.rb b/plugins/commands/snapshot/plugin.rb index e83be5bca..5b2af81df 100644 --- a/plugins/commands/snapshot/plugin.rb +++ b/plugins/commands/snapshot/plugin.rb @@ -7,7 +7,7 @@ module VagrantPlugins description "The `snapshot` command gives you a way to manage snapshots." command("snapshot") do - require File.expand_path("../command/root", __FILE__) + require_relative "command/root" Command::Root end end