This line is too long. Please consider breaking code out of it.

    node[:platform_version].split(".")[0]

Can be replaced with

    node[:platform_version].to_i