lib/vagrant-profitbricks/plugin.rb in vagrant-profitbricks-1.0.0 vs lib/vagrant-profitbricks/plugin.rb in vagrant-profitbricks-4.0.0

- old
+ new

@@ -1,43 +1,45 @@ +# frozen_string_literal: true + begin - require "vagrant" + require 'vagrant' rescue LoadError - raise "The ProfitBricks Cloud provider must be run within Vagrant." + raise 'The ProfitBricks Cloud provider must be run within Vagrant.' end # This is a sanity check to make sure no one is attempting to install # this into an early Vagrant version. -if Vagrant::VERSION < "1.1.0" - raise "ProfitBricks Cloud provider is only compatible with Vagrant 1.1+" +if Vagrant::VERSION < '1.1.0' + raise 'ProfitBricks Cloud provider is only compatible with Vagrant 1.1+' end module VagrantPlugins module ProfitBricks - class Plugin < Vagrant.plugin("2") - name "ProfitBricks Cloud" + class Plugin < Vagrant.plugin('2') + name 'ProfitBricks Cloud' description <<-DESC This plugin enables Vagrant to manage machines in the ProfitBricks Cloud. DESC config(:profitbricks, :provider) do - require_relative "config" + require_relative 'config' Config end - provider(:profitbricks, { :box_optional => true, parallel: true}) do + provider(:profitbricks, box_optional: true, parallel: true) do # Setup localization and logging ProfitBricks.init_i18n ProfitBricks.init_logging # Load the actual provider - require_relative "provider" + require_relative 'provider' Provider end command('profitbricks') do ProfitBricks.init_i18n - - require_relative "command/root" + + require_relative 'command/root' Command::Root end end end end