]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/wordpress/libraries/wordpress.rb
Revert "nominatim: only redirect traffic for www pool"
[chef.git] / cookbooks / wordpress / libraries / wordpress.rb
index 8ebb1460c621dc953fae8e1d41462239dfa4e567..f4f17e2202b0391879c1ed9e10519ba6e235989a 100644 (file)
@@ -1,4 +1,4 @@
-require 'chef/mixin/command'
+require "chef/mixin/command"
 
 class Chef
   module Wordpress
 
 class Chef
   module Wordpress
@@ -13,13 +13,13 @@ class Chef
 
     def self.current_plugin_version(name)
       if svn_cat("http://plugins.svn.wordpress.org/#{name}/trunk/readme.txt") =~ /Stable tag:\s*([^\s\r]*)[\s\r]*/
 
     def self.current_plugin_version(name)
       if svn_cat("http://plugins.svn.wordpress.org/#{name}/trunk/readme.txt") =~ /Stable tag:\s*([^\s\r]*)[\s\r]*/
-        $1
+        Regexp.last_match[1]
       else
         "trunk"
       end
     end
 
       else
         "trunk"
       end
     end
 
-  private
+    private
 
     def self.core_version_check
       api_get("http://api.wordpress.org/core/version-check/1.6")
 
     def self.core_version_check
       api_get("http://api.wordpress.org/core/version-check/1.6")