RiotGames/ridley — pull request #255 by coderanger (2014-03-04 01:57:34+00:00)
Title: Remove usage of Hash#slice

Hash#slice, at least for me, is coming from the i18n gem (by way of Vagrant) and this seems to have different semantics from what the Ridley code expects. Specifically it appears the buff-extensions version won't throw an error if a given key isn't found, while with i18n it will. In general having a library that relies on non-standardized core extensions is :-(

The original traceback is:

```
/usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `fetch': key not found: :retries (KeyError)
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `block in slice'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `each'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `slice'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/ridley-2.5.1/lib/ridley/client.rb:10:in `initialize'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in `dispatch'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
from (celluloid):0:in `remote procedure call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid.rb:189:in `new'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/ridley-2.5.1/lib/ridley/client.rb:146:in `initialize'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in `dispatch'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
from (celluloid):0:in `remote procedure call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid.rb:189:in `new'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/ridley-2.5.1/lib/ridley/client.rb:35:in `open'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/ridley-2.5.1/lib/ridley.rb:51:in `open'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/downloader.rb:72:in `try_download'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/downloader.rb:37:in `block in download'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/downloader.rb:36:in `each'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/downloader.rb:36:in `download'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/installer.rb:64:in `block in run'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/installer.rb:53:in `collect'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/installer.rb:53:in `run'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/berksfile.rb:353:in `install'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/berksfile.rb:574:in `vendor'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-berkshelf-8fca7b2f0089/lib/berkshelf/vagrant/action/install.rb:46:in `install'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-berkshelf-8fca7b2f0089/lib/berkshelf/vagrant/action/install.rb:30:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/provision.rb:52:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/set_name.rb:19:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builder.rb:116:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `block in run'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `run'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/call.rb:51:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builder.rb:116:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `block in run'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `run'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/call.rb:51:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builder.rb:116:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `block in run'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `run'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/call.rb:51:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/call.rb:57:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-berkshelf-8fca7b2f0089/lib/berkshelf/vagrant/action/configure_chef.rb:23:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-berkshelf-8fca7b2f0089/lib/berkshelf/vagrant/action/load_shelf.rb:28:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-berkshelf-8fca7b2f0089/lib/berkshelf/vagrant/action/set_ui.rb:12:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/env_set.rb:19:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/call.rb:57:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builder.rb:116:in `call'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `block in run'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `run'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/machine.rb:147:in `action'
from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'
```