lib/cogy/capistrano.rb in cogy-0.1.1 vs lib/cogy/capistrano.rb in cogy-0.2.0
- old
+ new
@@ -1,14 +1,28 @@
-require "cogy/capistrano/v2/tasks"
+require "capistrano/version"
+
+if defined?(Capistrano::VERSION) && Gem::Version.new(Capistrano::VERSION).release >= Gem::Version.new("3.0.0")
+ load File.expand_path("../capistrano/cogy.rake", __FILE__)
+else
+ Capistrano::Configuration.instance(:must_exist).load do
+ _cset(:cogy_release_trigger_url) { nil }
+ _cset(:cogy_endpoint) { nil }
+ _cset(:cogy_trigger_timeout) { nil }
+
+ load File.expand_path("../capistrano/cogy.rake", __FILE__)
+
+ after "deploy:restart", "cogy:notify_cog"
+ end
+end