ndbroadbent/capistrano_deploy_lock — pull request #5 by mintuhouse (2014-05-07 22:10:22+00:00)
Title: Fixes errors on multiple servers and stage

When I am using two servers it checks for lock on each server twice
parallel(n) -> find_servers(n)
will result in n**2 loop

Instead changed it to check if the current session's IP is among the servers for the current task

```
** Deploy lock found on:
/home/hasan/.rvm/gems/ruby-1.9.3-p448-railsexpress@mentor/gems/capistrano-2.15.4/lib/capistrano/transfer.rb:157:in `[]=': undefined method `[]=' for nil:NilClass (NoMethodError)
from /home/hasan/.rvm/gems/ruby-1.9.3-p448-railsexpress@mentor/gems/capistrano-2.15.4/lib/capistrano/transfer.rb:212:in `handle_error'
...
from /home/hasan/.rvm/gems/ruby-1.9.3-p448-railsexpress@mentor/gems/capistrano-2.15.4/lib/capistrano/configuration/actions/file_transfer.rb:13:in `put'
from /home/hasan/.rvm/gems/ruby-1.9.3-p448-railsexpress@mentor/gems/capistrano-2.15.4/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /home/hasan/.rvm/gems/ruby-1.9.3-p448-railsexpress@mentor/gems/capistrano_deploy_lock-1.3.3/lib/capistrano/recipes/deploy_lock.rb:40:in `write_deploy_lock'
from /home/hasan/.rvm/gems/ruby-1.9.3-p448-railsexpress@mentor/gems/capistrano_deploy_lock-1.3.3/lib/capistrano/recipes/deploy_lock.rb:177:in `block (3 levels) in '
```

Missed adding respond_to?(:stage) when lock is expired
```
** Deploy lock found on:
/home/chronus/.rvm/gems/ruby-1.9.3-p448-railsexpress@mentor/gems/capistrano-2.15.4/lib/capistrano/configuration/namespaces.rb:193:in `method_missing': undefined local variable or method `stage' for # (NameError)
from /home/chronus/.rvm/gems/ruby-1.9.3-p448-railsexpress@mentor/gems/capistrano_deploy_lock-1.3.3/lib/capistrano/recipes/deploy_lock.rb:136:in `block (3 levels) in '
from /home/chronus/.rvm/gems/ruby-1.9.3-p448-railsexpress@mentor/gems/capistrano-2.15.4/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
```