From 514f5e11941d6d1f26394c75be92198f7f130dac Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Tue, 9 May 2017 09:28:13 +0200 Subject: [PATCH] renamed classes and moved files to match virtialbox provider --- lib/{vagrant/lxd.rb => vagrant-lxd.rb} | 4 ++-- lib/{vagrant/lxd => vagrant-lxd}/action.rb | 4 ++-- lib/{vagrant/lxd => vagrant-lxd}/action/bootstrap.rb | 4 ++-- lib/{vagrant/lxd => vagrant-lxd}/action/create.rb | 4 ++-- lib/{vagrant/lxd => vagrant-lxd}/action/destroy.rb | 4 ++-- .../lxd => vagrant-lxd}/action/ensure_image.rb | 4 ++-- .../lxd => vagrant-lxd}/action/ensure_ssh.rb | 4 ++-- .../lxd => vagrant-lxd}/action/ensure_started.rb | 4 ++-- lib/{vagrant/lxd => vagrant-lxd}/action/network.rb | 4 ++-- lib/{vagrant/lxd => vagrant-lxd}/action/stop.rb | 4 ++-- lib/{vagrant/lxd => vagrant-lxd}/command.rb | 4 ++-- lib/{vagrant/lxd => vagrant-lxd}/config.rb | 4 ++-- lib/{vagrant/lxd => vagrant-lxd}/driver.rb | 4 ++-- lib/{vagrant/lxd => vagrant-lxd}/plugin.rb | 12 ++++++------ lib/{vagrant/lxd => vagrant-lxd}/provider.rb | 4 ++-- lib/vagrant-lxd/version.rb | 5 +++++ lib/vagrant/lxd/version.rb | 5 ----- vagrant-lxd.gemspec | 4 ++-- 18 files changed, 41 insertions(+), 41 deletions(-) rename lib/{vagrant/lxd.rb => vagrant-lxd.rb} (64%) rename lib/{vagrant/lxd => vagrant-lxd}/action.rb (97%) rename lib/{vagrant/lxd => vagrant-lxd}/action/bootstrap.rb (96%) rename lib/{vagrant/lxd => vagrant-lxd}/action/create.rb (95%) rename lib/{vagrant/lxd => vagrant-lxd}/action/destroy.rb (91%) rename lib/{vagrant/lxd => vagrant-lxd}/action/ensure_image.rb (95%) rename lib/{vagrant/lxd => vagrant-lxd}/action/ensure_ssh.rb (92%) rename lib/{vagrant/lxd => vagrant-lxd}/action/ensure_started.rb (94%) rename lib/{vagrant/lxd => vagrant-lxd}/action/network.rb (93%) rename lib/{vagrant/lxd => vagrant-lxd}/action/stop.rb (91%) rename lib/{vagrant/lxd => vagrant-lxd}/command.rb (91%) rename lib/{vagrant/lxd => vagrant-lxd}/config.rb (61%) rename lib/{vagrant/lxd => vagrant-lxd}/driver.rb (99%) rename lib/{vagrant/lxd => vagrant-lxd}/plugin.rb (81%) rename lib/{vagrant/lxd => vagrant-lxd}/provider.rb (97%) create mode 100644 lib/vagrant-lxd/version.rb delete mode 100644 lib/vagrant/lxd/version.rb diff --git a/lib/vagrant/lxd.rb b/lib/vagrant-lxd.rb similarity index 64% rename from lib/vagrant/lxd.rb rename to lib/vagrant-lxd.rb index 8da8103..9b646a5 100644 --- a/lib/vagrant/lxd.rb +++ b/lib/vagrant-lxd.rb @@ -6,5 +6,5 @@ rescue LoadError Bundler.require(:default, :development) end -require 'vagrant/lxd/version' -require 'vagrant/lxd/plugin' +require 'vagrant-lxd/version' +require 'vagrant-lxd/plugin' diff --git a/lib/vagrant/lxd/action.rb b/lib/vagrant-lxd/action.rb similarity index 97% rename from lib/vagrant/lxd/action.rb rename to lib/vagrant-lxd/action.rb index 4cc731e..ade6c3e 100644 --- a/lib/vagrant/lxd/action.rb +++ b/lib/vagrant-lxd/action.rb @@ -3,8 +3,8 @@ require 'log4r' require 'vagrant/action/builder' -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd module Action action_root = Pathname.new(File.expand_path("../action", __FILE__)) autoload :Bootstrap, action_root.join("bootstrap") diff --git a/lib/vagrant/lxd/action/bootstrap.rb b/lib/vagrant-lxd/action/bootstrap.rb similarity index 96% rename from lib/vagrant/lxd/action/bootstrap.rb rename to lib/vagrant-lxd/action/bootstrap.rb index 3020921..57f7c77 100644 --- a/lib/vagrant/lxd/action/bootstrap.rb +++ b/lib/vagrant-lxd/action/bootstrap.rb @@ -1,7 +1,7 @@ require 'erb' -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd module Action class Bootstrap def initialize(app, env) diff --git a/lib/vagrant/lxd/action/create.rb b/lib/vagrant-lxd/action/create.rb similarity index 95% rename from lib/vagrant/lxd/action/create.rb rename to lib/vagrant-lxd/action/create.rb index a381a3e..ac0c7a1 100644 --- a/lib/vagrant/lxd/action/create.rb +++ b/lib/vagrant-lxd/action/create.rb @@ -1,5 +1,5 @@ -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd module Action class Create def initialize(app, env) diff --git a/lib/vagrant/lxd/action/destroy.rb b/lib/vagrant-lxd/action/destroy.rb similarity index 91% rename from lib/vagrant/lxd/action/destroy.rb rename to lib/vagrant-lxd/action/destroy.rb index 938d5d5..0a4df3b 100644 --- a/lib/vagrant/lxd/action/destroy.rb +++ b/lib/vagrant-lxd/action/destroy.rb @@ -1,5 +1,5 @@ -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd module Action class Destroy def initialize(app, env) diff --git a/lib/vagrant/lxd/action/ensure_image.rb b/lib/vagrant-lxd/action/ensure_image.rb similarity index 95% rename from lib/vagrant/lxd/action/ensure_image.rb rename to lib/vagrant-lxd/action/ensure_image.rb index b5ac043..90051d8 100644 --- a/lib/vagrant/lxd/action/ensure_image.rb +++ b/lib/vagrant-lxd/action/ensure_image.rb @@ -1,5 +1,5 @@ -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd module Action class EnsureImage def initialize(app, env) diff --git a/lib/vagrant/lxd/action/ensure_ssh.rb b/lib/vagrant-lxd/action/ensure_ssh.rb similarity index 92% rename from lib/vagrant/lxd/action/ensure_ssh.rb rename to lib/vagrant-lxd/action/ensure_ssh.rb index e0457c4..be0a4a9 100644 --- a/lib/vagrant/lxd/action/ensure_ssh.rb +++ b/lib/vagrant-lxd/action/ensure_ssh.rb @@ -1,5 +1,5 @@ -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd module Action class EnsureSsh def initialize(app, env) diff --git a/lib/vagrant/lxd/action/ensure_started.rb b/lib/vagrant-lxd/action/ensure_started.rb similarity index 94% rename from lib/vagrant/lxd/action/ensure_started.rb rename to lib/vagrant-lxd/action/ensure_started.rb index d00dd69..607057c 100644 --- a/lib/vagrant/lxd/action/ensure_started.rb +++ b/lib/vagrant-lxd/action/ensure_started.rb @@ -1,5 +1,5 @@ -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd module Action class EnsureStarted def initialize(app, env) diff --git a/lib/vagrant/lxd/action/network.rb b/lib/vagrant-lxd/action/network.rb similarity index 93% rename from lib/vagrant/lxd/action/network.rb rename to lib/vagrant-lxd/action/network.rb index e6f3306..e81995c 100644 --- a/lib/vagrant/lxd/action/network.rb +++ b/lib/vagrant-lxd/action/network.rb @@ -1,5 +1,5 @@ -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd module Action class Network def initialize(app, env) diff --git a/lib/vagrant/lxd/action/stop.rb b/lib/vagrant-lxd/action/stop.rb similarity index 91% rename from lib/vagrant/lxd/action/stop.rb rename to lib/vagrant-lxd/action/stop.rb index f44d87a..332d7c5 100644 --- a/lib/vagrant/lxd/action/stop.rb +++ b/lib/vagrant-lxd/action/stop.rb @@ -1,5 +1,5 @@ -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd module Action class Stop def initialize(app, env) diff --git a/lib/vagrant/lxd/command.rb b/lib/vagrant-lxd/command.rb similarity index 91% rename from lib/vagrant/lxd/command.rb rename to lib/vagrant-lxd/command.rb index 4bcd041..11e137c 100644 --- a/lib/vagrant/lxd/command.rb +++ b/lib/vagrant-lxd/command.rb @@ -1,5 +1,5 @@ -module Vagrant - module Lxd +module VagrantPlugins + module CommandLxd class Command < Vagrant.plugin('2', :command) # def initialize(argv, env) # super argv, env diff --git a/lib/vagrant/lxd/config.rb b/lib/vagrant-lxd/config.rb similarity index 61% rename from lib/vagrant/lxd/config.rb rename to lib/vagrant-lxd/config.rb index d4ce8cb..d81e97a 100644 --- a/lib/vagrant/lxd/config.rb +++ b/lib/vagrant-lxd/config.rb @@ -1,5 +1,5 @@ -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd class Config < Vagrant.plugin("2", :config) end end diff --git a/lib/vagrant/lxd/driver.rb b/lib/vagrant-lxd/driver.rb similarity index 99% rename from lib/vagrant/lxd/driver.rb rename to lib/vagrant-lxd/driver.rb index 7aefba6..973c3bc 100644 --- a/lib/vagrant/lxd/driver.rb +++ b/lib/vagrant-lxd/driver.rb @@ -63,8 +63,8 @@ require 'yaml' require 'vagrant/util/retryable' -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd class Driver include Vagrant::Util::Retryable diff --git a/lib/vagrant/lxd/plugin.rb b/lib/vagrant-lxd/plugin.rb similarity index 81% rename from lib/vagrant/lxd/plugin.rb rename to lib/vagrant-lxd/plugin.rb index 970a3fd..dbb52de 100644 --- a/lib/vagrant/lxd/plugin.rb +++ b/lib/vagrant-lxd/plugin.rb @@ -2,8 +2,8 @@ # Test with something like: # ~> bundle exec vagrant ls # -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd class Plugin < Vagrant.plugin('2') name "Lxd" @@ -26,10 +26,10 @@ module Vagrant # SyncedFolder #end - command 'ls' do - require File.expand_path("../command", __FILE__) - Command - end + #command 'ls' do + # require File.expand_path("../command", __FILE__) + # Command + #end autoload :Action, File.expand_path("../action", __FILE__) end diff --git a/lib/vagrant/lxd/provider.rb b/lib/vagrant-lxd/provider.rb similarity index 97% rename from lib/vagrant/lxd/provider.rb rename to lib/vagrant-lxd/provider.rb index 6b602aa..63e9b8c 100644 --- a/lib/vagrant/lxd/provider.rb +++ b/lib/vagrant-lxd/provider.rb @@ -1,7 +1,7 @@ require "log4r" -module Vagrant - module Lxd +module VagrantPlugins + module ProviderLxd autoload :Driver, File.expand_path("../driver", __FILE__) autoload :Action, File.expand_path("../action", __FILE__) diff --git a/lib/vagrant-lxd/version.rb b/lib/vagrant-lxd/version.rb new file mode 100644 index 0000000..d3a8068 --- /dev/null +++ b/lib/vagrant-lxd/version.rb @@ -0,0 +1,5 @@ +module VagrantPlugins + module ProviderLxd + VERSION = "0.0.1" + end +end diff --git a/lib/vagrant/lxd/version.rb b/lib/vagrant/lxd/version.rb deleted file mode 100644 index f412cd7..0000000 --- a/lib/vagrant/lxd/version.rb +++ /dev/null @@ -1,5 +0,0 @@ -module Vagrant - module Lxd - VERSION = "0.0.1" - end -end diff --git a/vagrant-lxd.gemspec b/vagrant-lxd.gemspec index 6e6acba..3fb71ee 100644 --- a/vagrant-lxd.gemspec +++ b/vagrant-lxd.gemspec @@ -1,11 +1,11 @@ # coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'vagrant/lxd/version' +require 'vagrant-lxd/version' Gem::Specification.new do |spec| spec.name = "vagrant-lxd" - spec.version = Vagrant::Lxd::VERSION + spec.version = VagrantPlugins::ProviderLxd::VERSION spec.authors = ["Georg Hopp"] spec.email = ["hopp@silpion.de"]