lib/dotenv/capistrano.rb in dotenv-0.9.0 vs lib/dotenv/capistrano.rb in dotenv-0.10.0
- old
+ new
@@ -1,5 +1,11 @@
-require 'dotenv/capistrano/recipes'
+require 'capistrano/version'
-Capistrano::Configuration.instance(:must_exist).load do
- before "deploy:finalize_update", "dotenv:symlink"
+if defined?(Capistrano::VERSION) && Capistrano::VERSION >= '3.0'
+ raise 'Please read https://github.com/bkeepers/dotenv#capistrano-integration to update your dotenv configuration for new Capistrano version'
+else
+ require 'dotenv/capistrano/recipes'
+
+ Capistrano::Configuration.instance(:must_exist).load do
+ before "deploy:finalize_update", "dotenv:symlink"
+ end
end