]> git.openstreetmap.org Git - chef.git/blob - cookbooks/chef/libraries/compare_versions.rb
planet: also sync to s3 changeset state config file
[chef.git] / cookbooks / chef / libraries / compare_versions.rb
1 class Chef
2   class Util
3     def self.compare_versions(a, b)
4       a = a.split(".").map(&:to_i) if a.is_a?(String)
5
6       b = b.split(".").map(&:to_i) if b.is_a?(String)
7
8       a <=> b
9     end
10   end
11 end