-require "chef/mixin/shell_out"
-
-require "addressable"
-require "httpclient"
require "json"
+require "net/http"
class Chef
module Wordpress
- extend Chef::Mixin::ShellOut
-
@api_responses = {}
class << self
private
def core_version_check
- api_get("https://api.wordpress.org/core/version-check/1.7")
+ api_get("https://api.wordpress.org/core/version-check/1.7/")
end
def plugin_information(name)
end
def api_get(url)
- http_client = ::HTTPClient.new
- http_client.ssl_config.set_default_paths # https://github.com/nahi/httpclient/issues/445
- @api_responses[url] ||= ::JSON.parse(http_client.get_content(url))
+ @api_responses[url] ||= ::JSON.parse(Net::HTTP.get(URI(url)))
end
end
end