1 require "chef/mixin/shell_out"
4 require "php_serialize"
8 extend Chef::Mixin::ShellOut
15 core_version_check["offers"].first["current"]
18 def current_plugin_version(name)
19 if svn_cat("http://plugins.svn.wordpress.org/#{name}/trunk/readme.txt") =~ /Stable tag:\s*([^\s\r]*)[\s\r]*/
28 def core_version_check
29 api_get("http://api.wordpress.org/core/version-check/1.6")
33 @api_responses[url] ||= ::PHP.unserialize(::HTTPClient.new.get_content(url))
37 unless @svn_responses[url]
38 result = shell_out!("svn", "cat", url)
40 @svn_responses[url] = result.stdout.force_encoding("UTF-8")