vovimayhem/vagrant-guest_ansible — pull request #4 by tknerr (2014-12-09 06:57:59+00:00)
Title: Fix NoMethodError - there is no `String#blank?`method

When the provisioner is started via `vagrant provision` (or `vagrant up` respectively) it will bail out early with a `NoMethodError`, e.g. like this:

```
Y:\workspace\vagrant-ansible-example>vagrant provision
==> default: Configuring cache buckets...
==> default: Running provisioner: guest_ansible...
Y:/home/.vagrant.d/gems/gems/vagrant-guest_ansible-0.0.1/lib/vagrant-guest_ansible/provisioner.rb:17:in `provision': undefined method `blank?' for nil:NilClass (NoMethodError)
from Y:/tools/vagrant-1.6.5/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/provision.rb:127:in `run_provisioner'
from Y:/tools/vagrant-1.6.5/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:95:in `call'
from Y:/tools/vagrant-1.6.5/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from Y:/tools/vagrant-1.6.5/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
from Y:/tools/vagrant-1.6.5/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
from Y:/tools/vagrant-1.6.5/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builder.rb:116:in `call'
from Y:/tools/vagrant-1.6.5/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:66:in `block in run'
from Y:/tools/vagrant-1.6.5/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/util/busy.rb:19:in `busy'
...
```

It uses the `String#blank?` method which is only available in Rails afaik.

This PR extracts the formatting logic into a separate method and uses `strip` rather than `blank?` to ensure that the args are properly formatted