1 require "chef/mixin/shell_out"
9 extend Chef::Mixin::ShellOut
15 core_version_check["offers"].first["current"]
18 def current_plugin_version(name)
19 plugin_information(name)["version"]
24 def core_version_check
25 api_get("https://api.wordpress.org/core/version-check/1.7")
28 def plugin_information(name)
29 api_get("https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request[slug]=#{name}")
33 @api_responses[url] ||= ::JSON.parse(::HTTPClient.new.get_content(url))