]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/postgresql/libraries/postgresql.rb
Merge remote-tracking branch 'tigerfell/pr257'
[chef.git] / cookbooks / postgresql / libraries / postgresql.rb
index 70d38135b7cbfa9c69cc32807f84325368b494d1..62188795bd3f3aa6d168e5b172bdae217533f250 100644 (file)
@@ -1,6 +1,6 @@
 require "chef/mixin/shell_out"
 
-class Chef
+module OpenStreetMap
   class PostgreSQL
     include Chef::Mixin::ShellOut
 
@@ -12,6 +12,10 @@ class Chef
       @cluster = cluster
     end
 
+    def version
+      @cluster.split("/").first.to_f
+    end
+
     def execute(options)
       # Create argument array
       args = []