From cf1f57ee9d13e8ed0220e2ef0e4e393a6164968d Mon Sep 17 00:00:00 2001 From: Joe Einertson Date: Wed, 19 Oct 2016 13:33:14 -0500 Subject: [PATCH] Fix undefined method error In recent versions of Chef, the built-in HTTP class has removed the _rest suffix from its method names. This commit updates the only usage to the new name. --- lib/chef/knife/cookbook_github_install.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef/knife/cookbook_github_install.rb b/lib/chef/knife/cookbook_github_install.rb index 7b450a6..f88d039 100644 --- a/lib/chef/knife/cookbook_github_install.rb +++ b/lib/chef/knife/cookbook_github_install.rb @@ -145,7 +145,7 @@ def sha data = nil raise "Unable to find SHA checksum" unless ['heads','tags'].any? do |ref_type| begin - data = noauth_rest.get_rest("https://api.github.com/repos/#{@github_user}/#{@github_repo}/git/refs/#{ref_type}/#{github_branch}") + data = noauth_rest.get("https://api.github.com/repos/#{@github_user}/#{@github_repo}/git/refs/#{ref_type}/#{github_branch}") ui.info("Found #{github_branch} amoung #{ref_type}.") true rescue