From 755dcc335270c18640d5d4c020180e93b781a41b Mon Sep 17 00:00:00 2001 From: Matt White Date: Thu, 27 Jul 2023 08:49:41 -0700 Subject: [PATCH 1/3] Add Ruby 3 Support --- lib/chef/knife/roleflip.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef/knife/roleflip.rb b/lib/chef/knife/roleflip.rb index d66b97a..72f8ec0 100644 --- a/lib/chef/knife/roleflip.rb +++ b/lib/chef/knife/roleflip.rb @@ -62,7 +62,7 @@ def run q_nodes = Chef::Search::Query.new node_query = "role:#{@role}" - query_nodes = URI.escape(node_query, + query_nodes = URI::Parser.new.escape(node_query, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]")) result_items = [] From efce98181eb1a75795c6269bbccd0f61b6ae366b Mon Sep 17 00:00:00 2001 From: Matt White Date: Thu, 27 Jul 2023 08:50:52 -0700 Subject: [PATCH 2/3] Update environmentflip.rb --- lib/chef/knife/environmentflip.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef/knife/environmentflip.rb b/lib/chef/knife/environmentflip.rb index 8cc2d27..f7c1cbb 100644 --- a/lib/chef/knife/environmentflip.rb +++ b/lib/chef/knife/environmentflip.rb @@ -56,7 +56,7 @@ def run q_nodes = Chef::Search::Query.new node_query = "chef_environment:#{@old_env}" - query_nodes = URI.escape(node_query, + query_nodes = URI::Parser.new.escape(node_query, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]")) result_items = [] From bb928cba317272e4700cd08bd1d7dc8c1e012a4a Mon Sep 17 00:00:00 2001 From: Matt White Date: Thu, 27 Jul 2023 08:51:05 -0700 Subject: [PATCH 3/3] Update knife-flip.rb --- lib/knife-flip.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/knife-flip.rb b/lib/knife-flip.rb index 2b91bc2..3dce5b4 100644 --- a/lib/knife-flip.rb +++ b/lib/knife-flip.rb @@ -1,3 +1,3 @@ module KnifeFlip - VERSION = "0.1.6" + VERSION = "0.1.7" end