Permalink
Browse files

Added BC support for rake < 11

  • Loading branch information...
1 parent c051da8 commit d3e33b0a13477686092a0ebbc9a43aac09280952 @toupeira toupeira committed Jan 10, 2017
Showing with 3 additions and 2 deletions.
  1. +1 −1 CHANGELOG.md
  2. +2 −1 lib/capistrano/tasks/migrations.rake
View
@@ -1,6 +1,6 @@
# [master][]
-* Your contribution here!
+* Restored compatibility with older versions of Rake (< 11.0.0), introduced in previous change. (@toupeira)
# [1.2.1][] (Dec 23 2016)
@@ -11,7 +11,8 @@ namespace :deploy do
info '[deploy:migrate] Skip `deploy:migrate` (nothing changed in db)'
else
info '[deploy:migrate] Run `rake db:migrate`'
- invoke :'deploy:migrating' unless Rake::Task[:'deploy:migrating'].already_invoked
+ # NOTE: We access instance variable since the accessor was only added recently. Once capistrano-rails depends on rake 11+, we can revert the following line
+ invoke :'deploy:migrating' unless Rake::Task[:'deploy:migrating'].instance_variable_get(:@already_invoked)
end
end
end

0 comments on commit d3e33b0

Please sign in to comment.