RiotGames/ridley — pull request #113 by reset (2013-05-04 16:52:26+00:00)
Title: CookbookObject#download_fun missing connection

Downloading a cookbook file from the chef server fails due to `connection` not being available from the download_fun method.

https://github.com/RiotGames/ridley/blob/master/lib/ridley/chef_objects/cookbook_object.rb#L186

Stacktrace:
```
[2013-05-03T21:39:52Z] PID[63706] TID[oujguy4fs] ERROR: MotherBrain::PluginManager crashed!
NameError: undefined local variable or method `connection' for #
/Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/ridley-0.11.0/lib/ridley/chef_objects/cookbook_object.rb:186:in `block in download_fun'
/Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/ridley-0.11.0/lib/ridley/chef_objects/cookbook_object.rb:121:in `call'
/Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/ridley-0.11.0/lib/ridley/chef_objects/cookbook_object.rb:121:in `download_file'
/Users/jhowarth/code/motherbrain/lib/mb/plugin_manager.rb:275:in `load_remote'
/Users/jhowarth/code/motherbrain/lib/mb/plugin_manager.rb:172:in `find'
/Users/jhowarth/code/motherbrain/lib/mb/plugin_manager.rb:380:in `satisfy'
/Users/jhowarth/code/motherbrain/lib/mb/plugin_manager.rb:198:in `for_environment'
/Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/calls.rb:11:in `public_send'
/Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/calls.rb:11:in `dispatch'
/Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/calls.rb:63:in `dispatch'
/Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/actor.rb:326:in `block in handle_message'
/Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/tasks/task_fiber.rb:28:in `block in initialize'
/Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/ridley-0.11.0/lib/ridley/chef_objects/cookbook_object.rb:186:in `block in download_fun': undefined local variable or method `connection' for # (NameError)
from /Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/ridley-0.11.0/lib/ridley/chef_objects/cookbook_object.rb:121:in `call'
from /Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/ridley-0.11.0/lib/ridley/chef_objects/cookbook_object.rb:121:in `download_file'
from /Users/jhowarth/code/motherbrain/lib/mb/plugin_manager.rb:275:in `load_remote'
from /Users/jhowarth/code/motherbrain/lib/mb/plugin_manager.rb:172:in `find'
from /Users/jhowarth/code/motherbrain/lib/mb/plugin_manager.rb:380:in `satisfy'
from /Users/jhowarth/code/motherbrain/lib/mb/plugin_manager.rb:198:in `for_environment'
from /Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/calls.rb:11:in `public_send'
from /Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/calls.rb:11:in `dispatch'
from /Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/calls.rb:63:in `dispatch'
from /Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/actor.rb:326:in `block in handle_message'
from /Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/tasks/task_fiber.rb:28:in `block in initialize'
from (celluloid):0:in `remote procedure call'
from /Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/actor.rb:69:in `call'
from /Users/jhowarth/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/celluloid-0.13.0/lib/celluloid/legacy.rb:14:in `method_missing'
from /Users/jhowarth/code/motherbrain/lib/mb/cli_gateway.rb:77:in `find_plugin'
from /Users/jhowarth/code/motherbrain/lib/mb/cli_gateway.rb:129:in `start'
```