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