X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/2c854e9952890a119750a187479eb2701107705f..b25b96fb7ba845165a157faa87ed39a425a10d80:/cookbooks/wordpress/libraries/wordpress.rb?ds=sidebyside diff --git a/cookbooks/wordpress/libraries/wordpress.rb b/cookbooks/wordpress/libraries/wordpress.rb index 8ebb1460c..f4f17e220 100644 --- a/cookbooks/wordpress/libraries/wordpress.rb +++ b/cookbooks/wordpress/libraries/wordpress.rb @@ -1,4 +1,4 @@ -require 'chef/mixin/command' +require "chef/mixin/command" 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]*/ - $1 + Regexp.last_match[1] else "trunk" end end - private + private def self.core_version_check api_get("http://api.wordpress.org/core/version-check/1.6")