lib/vagrant-capistrano-push/plugin.rb in vagrant-capistrano-push-0.0.3 vs lib/vagrant-capistrano-push/plugin.rb in vagrant-capistrano-push-0.0.4
- old
+ new
@@ -1,5 +1,15 @@
-require "vagrant"
+begin
+ require "vagrant"
+rescue LoadError
+ raise "The Vagrant capistrano-push plugin 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.2.0"
+ raise "The Vagrant capistrano-push plugin is only compatible with Vagrant 1.2+"
+end
module VagrantPlugins
module CapistranoPush
class Plugin < Vagrant.plugin("2")
name "capistrano"