the version checking here uses a function which is intended only
for chef cookbook versions, which must be x.y or x.y.z. when fed
a legal chef prerelease version the prior code throws an exception:
[2014-05-01T22:08:01+00:00] FATAL: Configuration error Chef::Exceptions::InvalidCookbookVersion: '11.14.0.alpha.1' does not match 'x.y.z' or 'x.y'
[2014-05-01T22:08:01+00:00] FATAL: /tmp/vagrant-chef-2/solo.rb:6:in `from_string'
[2014-05-01T22:08:01+00:00] FATAL: Aborting due to error in '/tmp/vagrant-chef-2/solo.rb'
since we only need to compare the major and minor version numbers a
simple #to_f sufficies for this test.
alternative, we could use Gem::Version here, but i didn't really see
the need to...
Refs #1250.
Will correctly produce the desired result on Chef 11.x and above, as the
original directive was written against Chef 10.x, and released in Vagrant 1.2.7.
While this will continue to work for Chef 10.x, since this is not the 'mainline'
release track, and the alternative would be to write more conditional code in
the configuration file to detect the version and place the correct directive, this
changes the directive to support the current releases of Chef 11 and above.