backport patch from master
use chef-sugar instead of versionub gem
merged check_upgrade branch