X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/2bfb0ef07fb64314f5c4ded641a8c280df9c1d0b..6bed11692085e79a7201e3b9a15492482ad0fdb7:/cookbooks/wordpress/libraries/wordpress.rb diff --git a/cookbooks/wordpress/libraries/wordpress.rb b/cookbooks/wordpress/libraries/wordpress.rb index 92db4b199..73a0a5467 100644 --- a/cookbooks/wordpress/libraries/wordpress.rb +++ b/cookbooks/wordpress/libraries/wordpress.rb @@ -1,13 +1,8 @@ -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 @@ -22,7 +17,7 @@ class Chef 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) @@ -30,7 +25,7 @@ class Chef end def api_get(url) - @api_responses[url] ||= ::JSON.parse(::HTTPClient.new.get_content(url)) + @api_responses[url] ||= ::JSON.parse(Net::HTTP.get(URI(url))) end end end